This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-16
Channels
- # announcements (7)
- # babashka (8)
- # beginners (48)
- # calva (4)
- # cider (6)
- # circleci (2)
- # clj-commons (14)
- # clj-kondo (3)
- # clj-on-windows (7)
- # cljs-dev (34)
- # clojure (49)
- # clojure-dev (25)
- # clojure-europe (48)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-norway (33)
- # clojure-uk (2)
- # clojurescript (37)
- # community-development (5)
- # conjure (17)
- # cursive (2)
- # data-science (1)
- # editors (10)
- # emacs (50)
- # events (22)
- # honeysql (11)
- # introduce-yourself (1)
- # jobs-discuss (13)
- # lsp (42)
- # malli (9)
- # off-topic (7)
- # pathom (11)
- # portal (5)
- # re-frame (3)
- # reagent (22)
- # reitit (8)
- # reveal (1)
- # rewrite-clj (4)
- # shadow-cljs (38)
- # xtdb (21)
Hm, we have a utility function
(defn cast-ids [ids]
[:cast [:lift (mapv str ids)]
[:raw "mongo_id[]"]])
Where the interesting thing is the :lift
that passes in the whole CLJ vector as a single parameter, which somewhere down the stack is converted in a PG arrayand q. specific to your example - what is a mongo_id[]
? do you have a custom type in postgres?
:lift will, IIRC, instruct honey sql to treat the argument as a single value and to not infer anything from the values type - it’s a honey sql2 thing.
Ah, the docs say that honeysql has “value” for something equivalent - we upgraded all of our code to honeysql2 a couple of months back.