This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-29
Channels
- # aws (16)
- # beginners (14)
- # boulder-clojurians (1)
- # braveandtrue (184)
- # cider (9)
- # cljs-dev (17)
- # cljsrn (10)
- # clojure (70)
- # clojure-austin (16)
- # clojure-finland (2)
- # clojure-germany (4)
- # clojure-italy (6)
- # clojure-nl (6)
- # clojure-sanfrancisco (2)
- # clojure-spec (5)
- # clojure-uk (60)
- # clojurescript (82)
- # cursive (1)
- # data-science (1)
- # datomic (13)
- # defnpodcast (1)
- # docker (82)
- # figwheel-main (18)
- # fulcro (51)
- # funcool (6)
- # jobs (13)
- # jobs-discuss (5)
- # jobs-rus (7)
- # juxt (2)
- # leiningen (4)
- # lumo (5)
- # mount (1)
- # off-topic (38)
- # pedestal (9)
- # re-frame (13)
- # reagent (16)
- # shadow-cljs (70)
- # spacemacs (5)
- # specter (9)
- # sql (8)
- # tools-deps (2)
- # vim (6)
Having issues with a stored procedure returning a JSON result and getting the result back through HugSQL.
@dadair what kind of issues?
i.e. can you provide error messages, examples, etc.
I’m using jsonb in HugSQL with great success. I have these simple definitions to transform clojure maps -> jsonb and jsonb -> maps. https://github.com/lipas-liikuntapaikat/lipas/blob/master/webapp/src/clj/lipas/backend/db/utils.clj#L19-L38 Similar approach should work for json-type.
Looks like we were messing something up at a more basic level. We are using an open source schema that requires plv8 and we were calling SET .. prior to a select to activate plv8, and the query was returning the result of the SET, rather than the select. Removing the SET and calling a separate jdbc/execute! first before the hugsql query resolved the issue.