We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When passing []int to dbx.In(), the compiler give error as such:
dbx.In()
sql: converting argument $3 type: unsupported type []int, a slice of int
How can I pass a slice in the dbx.In()?
numberList := []int{ 1, 2, 3} err = rs.Tx().Select().Where(dbx.And(dbx.HashExp{"creator": rs.UserID(), "status": "a"}, dbx.In("role", numberList ))).OrderBy("modified").All(&customer)
tried ->
dbx.In("role", numberList)
dbx.In("role", numberList...)
can't really get it done... may please advise...
The text was updated successfully, but these errors were encountered:
It should be dbx.In("role", numberList...)
Sorry, something went wrong.
A snapshot of my dbx usage. It works well until I use the dbx.In() together with []int. May try to have a look? :)
[]int
Anyway, a very very good package... user friendly x1000...
I see. I think this is how Go works. You need to declare your numberList to be []interface{}.
[]interface{}
Yes, it works by declaring []interface. Thank you...
[]interface
No branches or pull requests
When passing []int to
dbx.In()
, the compiler give error as such:sql: converting argument $3 type: unsupported type []int, a slice of int
How can I pass a slice in the dbx.In()?
tried ->
dbx.In("role", numberList)
dbx.In("role", numberList...)
can't really get it done... may please advise...
The text was updated successfully, but these errors were encountered: