whereIn() with empty array #477
Closed
Comments
Added, also added |
It seems like sqlite doesn't support the "where false" syntax. This query:
Worked on my sqlite db in knex 0.6.22, but fails in 0.7.x . The error is:
Not sure if I'm reading this right, but doesn't seem to support bools here: https://www.sqlite.org/syntax/expr.html |
runeh
added a commit
to runeh/knex
that referenced
this issue
Oct 20, 2014
…lite3 using ints, not bools. Fixes knex#477 for sqlite3.
tgriesser
added a commit
that referenced
this issue
Feb 25, 2015
* SQLite uses integers, not booleans * whereIn/whereNotIn with empty array uses a boolean * Closes #477
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the call:
If
names
is an empty array, the generated query will have invalid syntax:Can knex support empty arrays for
whereIn()
? e.g. by generating something likeThe text was updated successfully, but these errors were encountered: