auto judge exist or not quote,then add or ignore (#548)

* fix IN and NotIN SQL not add quote

* auto judge exist or not quote,then add or ignore

* auto judge exist or not quote,then add or ignore
This commit is contained in:
ZACH 2017-03-23 15:22:06 +08:00 committed by Lunny Xiao
parent 70bc6741cf
commit 24fae7b3b1
1 changed files with 2 additions and 2 deletions

View File

@ -195,14 +195,14 @@ func (statement *Statement) Or(query interface{}, args ...interface{}) *Statemen
// In generate "Where column IN (?) " statement
func (statement *Statement) In(column string, args ...interface{}) *Statement {
in := builder.In(statement.Engine.quote(column), args...)
in := builder.In(statement.Engine.Quote(column), args...)
statement.cond = statement.cond.And(in)
return statement
}
// NotIn generate "Where column NOT IN (?) " statement
func (statement *Statement) NotIn(column string, args ...interface{}) *Statement {
notIn := builder.NotIn(statement.Engine.quote(column), args...)
notIn := builder.NotIn(statement.Engine.Quote(column), args...)
statement.cond = statement.cond.And(notIn)
return statement
}