-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
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
'In' arguments are not supported #6
Comments
@nurpax Any news on this? Is it possible to implement something similar to what is done for Ideally with support for named parameters as well. |
No news. The original bug description still stands. IN would require parsing the sql statement and generating a new one. I’m unwilling to do that as the current implementation just passes the original query string down to sqlite. This is very robust as sqlite does all the hardwork. Sent with GitHawk |
Any news on this front? |
Is the fastest way to achieve the lookup in the example to run the query three times for each of P.S. Thanks for this library. |
@aryairani If you're meaning runtime speed then string-splicing might be the easier thing to do (albeit it being less safe). |
@nurpax Where do you go looking for whether sqlite has grown support for the |
You think I've changed my mind about this? :) (I still think the original position is the right thing, albeit annoying from a user's point of view. But it's very bug-free and secure thing to do.) But you'll have to ask the current maintainers for their opinion. I've stopped working on this library (and in general, do very little if any Haskell.) |
@nurpax No. :) The question I was trying to ask was that whether sqlite's prepared statements had added support for I do agree that it's much simpler to have sqlite itself parse the query templates, its params and then merge them (if I understood the issue right). |
I guess you'd have to look into sqlite's C API to see if there are any new features related to this. Also worth looking if any other other SQL bindings (for any language) or ORM libraries have some certain ways of dealing with IN args. |
SQL parameter expansion for cases like
select * from whatever where id in ?" (In [3,4,5])
is not currently supported.
The reason being that it's not easily (or at all?) supported by sqlite3's prepared statement bound parameters.
To support this, would need to bring back query string parsing and string substitution.
Filing this bug about this missing feature in the hope that someone has an idea how to get this working with bound params.
The text was updated successfully, but these errors were encountered: