Fork me on GitHub
#sql
<
2022-07-10
>
Benjamin14:07:06

does next.jdbc support where id in ? and then passing a list of ids?

Benjamin14:07:01

naively tring to put a hashset as param

Can't infer the SQL type to use for an instance of
   clojure.lang.PersistentHashSet. Use setObject() with an explicit
   Types value to specify the type to use.

RedshiftPreparedStatement.java: 1127  com.amazon.redshift.jdbc.RedshiftPreparedStatement/setObject
               prepare.clj:   42  next.jdbc.prepare/eval7095/fn
               prepare.clj:   -1  next.jdbc.prepare/eval7095/fn
               prepare.clj:   29  next.jdbc.prepare/eval7070/fn/G
               prepare.clj:   55  next.jdbc.prepare/set-parameters
               prepare.clj:   48  next.jdbc.prepare/set-parameters
               prepare.clj:  144  next.jdbc.prepare/create
               prepare.clj:   83  next.jdbc.prepare/create

seancorfield19:07:18

Only if the jdbc driver supports it. I think PostgreSQL supports it for a native Java array with a type hint (I think there's an example in the docs?)

seancorfield19:07:03

I don't think other jdbc drivers support that

Benjamin05:07:42

O see thanks