forked from mirror/gorm
build *clause.Expr
This commit is contained in:
parent
27bb9137d3
commit
a3d9bbfc36
|
@ -167,6 +167,8 @@ func (stmt *Statement) AddVar(writer clause.Writer, vars ...interface{}) {
|
||||||
stmt.AddVar(writer, v.GormValue(stmt.Context, stmt.DB))
|
stmt.AddVar(writer, v.GormValue(stmt.Context, stmt.DB))
|
||||||
case clause.Expr:
|
case clause.Expr:
|
||||||
v.Build(stmt)
|
v.Build(stmt)
|
||||||
|
case *clause.Expr:
|
||||||
|
v.Build(stmt)
|
||||||
case driver.Valuer:
|
case driver.Valuer:
|
||||||
stmt.Vars = append(stmt.Vars, v)
|
stmt.Vars = append(stmt.Vars, v)
|
||||||
stmt.DB.Dialector.BindVarTo(writer, stmt, v)
|
stmt.DB.Dialector.BindVarTo(writer, stmt, v)
|
||||||
|
|
Loading…
Reference in New Issue