fix IN and NotIN SQL not add quote (#547)
This commit is contained in:
parent
c352f30dd2
commit
70bc6741cf
|
@ -195,14 +195,14 @@ func (statement *Statement) Or(query interface{}, args ...interface{}) *Statemen
|
||||||
|
|
||||||
// In generate "Where column IN (?) " statement
|
// In generate "Where column IN (?) " statement
|
||||||
func (statement *Statement) In(column string, args ...interface{}) *Statement {
|
func (statement *Statement) In(column string, args ...interface{}) *Statement {
|
||||||
in := builder.In(column, args...)
|
in := builder.In(statement.Engine.quote(column), args...)
|
||||||
statement.cond = statement.cond.And(in)
|
statement.cond = statement.cond.And(in)
|
||||||
return statement
|
return statement
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotIn generate "Where column NOT IN (?) " statement
|
// NotIn generate "Where column NOT IN (?) " statement
|
||||||
func (statement *Statement) NotIn(column string, args ...interface{}) *Statement {
|
func (statement *Statement) NotIn(column string, args ...interface{}) *Statement {
|
||||||
notIn := builder.NotIn(column, args...)
|
notIn := builder.NotIn(statement.Engine.quote(column), args...)
|
||||||
statement.cond = statement.cond.And(notIn)
|
statement.cond = statement.cond.And(notIn)
|
||||||
return statement
|
return statement
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue