Fork me on GitHub
#hugsql
<
2020-08-31
>
svt10:08:59

Hello I’m trying to use IN operation but getting error : org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of clojure.lang.PersistentVector

jmayaalv10:08:08

hi @cksharma122, can you copy your code?

svt10:08:23

Sorry I cannot but I can give you an example how my code looks like

jmayaalv10:08:49

yes, basically just make sure you have specified a value lists on the sql expression

jmayaalv10:08:56

something like

select * from characters where name in (:v*:names)

jmayaalv10:08:14

where names is the name of your parameter

svt10:08:18

:names can be list or a vector right?

jmayaalv10:08:56

as long as you specified that is a value list, i dont’ think there is something else you need to do .

svt10:08:34

Let me see once again. Thank you for the suggestion

👍 3
svt11:08:47

Will it not work if I pass a vector instead of list?

jmayaalv11:08:00

it should work