This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-17
Channels
- # babashka (4)
- # beginners (161)
- # calva (19)
- # cider (13)
- # circleci (16)
- # clj-kondo (7)
- # cljs-dev (3)
- # cljsrn (46)
- # clojure (105)
- # clojure-australia (2)
- # clojure-nl (15)
- # clojurescript (20)
- # conjure (14)
- # core-async (8)
- # cursive (3)
- # datomic (4)
- # figwheel (5)
- # fulcro (22)
- # graalvm (1)
- # hoplon (2)
- # kaocha (3)
- # leiningen (6)
- # malli (5)
- # off-topic (19)
- # re-frame (5)
- # reagent (1)
- # reitit (43)
- # releases (1)
- # reveal (14)
- # rewrite-clj (2)
- # rum (1)
- # shadow-cljs (31)
- # spacemacs (2)
- # sql (6)
- # xtdb (8)
For people using next.jdbc with Postgres, am I doing this right?
(next.jdbc/execute! ds
["select id from profiles where id = ANY(?)"
(into-array ["id1" "id2"])])
Can I somehow do without the into-array
call?I got the ANY(?)
trick https://cljdoc.org/d/seancorfield/next.jdbc/1.1.613/doc/getting-started/tips-tricks#postgresql, and I found I can extend next.jdbc.prepare/SettableParameter
to clojure.lang.IPersistentVector
to make it so that I don't have to type into-array
every time, but it still happens underneath...
@jaihindhreddy The PG driver needs a Java array, not a Clojure vector, so I don't think you can get away from having that somewhere in the call stack.
👍 6