Skip to content

Commit

Permalink
Merge pull request jmoiron#339 from npiganeau/patch-1
Browse files Browse the repository at this point in the history
Valuer objects should be evaluated before In expansion
  • Loading branch information
jmoiron authored Oct 16, 2018
2 parents 41a1ad7 + 257e684 commit 7b3aef7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func In(query string, args ...interface{}) (string, []interface{}, error) {
meta := make([]argMeta, len(args))

for i, arg := range args {
if a, ok := arg.(driver.Valuer); ok {
arg, _ = a.Value()
}
v := reflect.ValueOf(arg)
t := reflectx.Deref(v.Type())

Expand Down

0 comments on commit 7b3aef7

Please sign in to comment.