Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
Merge branch 'master' of github.com:go-xorm/xorm
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Feb 4, 2016
2 parents cb1be61 + fbe5850 commit f561133
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,14 @@ func (statement *Statement) getExpr() map[string]exprParam {

// Generate "Where column IN (?) " statment
func (statement *Statement) In(column string, args ...interface{}) *Statement {
length := len(args)
if length == 0 {
return statement
}

k := strings.ToLower(column)
var newargs []interface{}
if len(args) == 1 &&
if length == 1 &&
reflect.TypeOf(args[0]).Kind() == reflect.Slice {
newargs = make([]interface{}, 0)
v := reflect.ValueOf(args[0])
Expand Down

0 comments on commit f561133

Please sign in to comment.