-
Notifications
You must be signed in to change notification settings - Fork 194
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
ORDER BY won't work with query parameters #362
Comments
We currently only support I know three quick fixes/workarounds:
In the long term, I think this can be solved by providing a kind of (1) There is currently a query-parser in the pipeline (#361) which will statically validate and type-check your query. This kind of parser won't work if it doesn't know the query structure and being able to replace arbitrary query parts without even knowing what might be there at compile time is pretty much the definition of not knowing anything. Edit: add reference to https://sqlite.org/cintro.html#binding_parameters_and_reusing_prepared_statements |
I guess the solution with |
I have query like this:
Which generates this:
When I try to use this query I get the following error:
Although generated code looks working seems that there is no way one can use "?" with ORDER BY key word in
queryList()
method, which I find frustrating as It means I'll have to duplicate query for each list I want to sort, like this:The above code duplication is clearly unwanted, so is there any other options to generate SQL query without described limitations?
The text was updated successfully, but these errors were encountered: