This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-20
Channels
- # aleph (12)
- # announcements (7)
- # aws (6)
- # babashka (36)
- # beginners (161)
- # boot (1)
- # calva (6)
- # cider (21)
- # clj-kondo (13)
- # cljs-dev (28)
- # cljsrn (1)
- # clojars (3)
- # clojure (13)
- # clojure-colombia (1)
- # clojure-europe (10)
- # clojure-spec (12)
- # clojure-uk (47)
- # clojuredesign-podcast (2)
- # clojurescript (67)
- # datascript (8)
- # datomic (21)
- # duct (3)
- # emacs (6)
- # events (1)
- # fulcro (6)
- # graalvm (98)
- # jobs (1)
- # kaocha (18)
- # luminus (1)
- # malli (7)
- # off-topic (56)
- # pathom (5)
- # re-frame (18)
- # reagent (3)
- # reitit (9)
- # remote-jobs (3)
- # rewrite-clj (10)
- # ring (1)
- # shadow-cljs (155)
- # spacemacs (2)
- # sql (5)
- # tools-deps (27)
- # vim (86)
- # xtdb (2)
what’s the best way to store clojure data structures as jsonb objects on postgres using next.jdbc? i tried extending the SettableParameter protocol but the extension point never gets called.
(extend-protocol p/SettableParameter
clojure.lang.IPersistentVector
(set-parameter [v ^PreparedStatement stmt ^long idx]
......)
Other extensions do get callit seems my problem is related to the way honeysql. trying to pass a vector as a parameter to store as jsonb.
just for completion this is what i ended up doing.
(-> (sql/insert-into :my_table)
(sql/values [{:json_payload (h/call :cast json-string :jsonb)}])
h/format)
8
@jmayaalv this is interesting - where in this call is the clojure data serialized to json? - or is json-string
already created as json in a prior step?