build *clause.Expr

This commit is contained in:
Jinzhu 2021-03-19 13:21:43 +08:00
parent 27bb9137d3
commit a3d9bbfc36
1 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,8 @@ func (stmt *Statement) AddVar(writer clause.Writer, vars ...interface{}) {
stmt.AddVar(writer, v.GormValue(stmt.Context, stmt.DB))
case clause.Expr:
v.Build(stmt)
case *clause.Expr:
v.Build(stmt)
case driver.Valuer:
stmt.Vars = append(stmt.Vars, v)
stmt.DB.Dialector.BindVarTo(writer, stmt, v)