Closed simkoc closed 2 years ago
My current solution is to avoid :in
and use :any*
instead. But this cannot be the answer, as I also need to convert the list to a vector.
(defprepared example-working-any
(:select 'a 'b
:from 'example
:where (:= 'a (:any* '$1))))
(example-working-any (coerce '(1 2 3) 'vector))
https://marijnhaverbeke.nl/postmodern/s-sql.html#sql-op-in
"IMPORTANT: If you are trying to use a list in a parametized statement, you can't. You have to convert the list to a vector and use "any" rather than "in." "
Ok, thank you for the quick response. This is hidden deep inside related documentation.
Good Point. I will add it to other parts of the documentation.
I am having a similar issue to #74, however, proposed solution using
(:set)
does not work.I create a prepared query that requires a list of values as the only parameter, bu however I try I am running into issues.
Attempt A:
Attempt B:
How can I solve this?