This commit is contained in:
Ethan Koenig 2017-02-22 08:32:13 +00:00 committed by GitHub
commit daaaacf3e3
1 changed files with 3 additions and 1 deletions

View File

@ -196,7 +196,9 @@ 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 {
if len(args) == 0 { if len(args) == 0 {
return statement // use a false condition, since there isn't an easy way to have
// an empty list in SQL
return statement.And("0=1")
} }
in := builder.In(column, args...) in := builder.In(column, args...)