Fork me on GitHub
#sql
<
2017-06-23
>
pandeiro18:06:05

Do postgresql json functions and operators Just Work™ using clojure.java.jdbc + hugsql?

jonas21:06:16

in my experience, yes.

jonas21:06:40

you have to transform maps/vectors to jsonb types either manually or via some clojure.java.jdbc protocol but other than that everything should work fine

pandeiro21:06:43

Thanks @jonas - if the column type is json (not jsonb), then it would just mean serializing to JSON prior to calling the insert function, I take it?

jonas21:06:31

I'm not quite sure about that. I've only used jsonb. From reading the postgres docs I think jsonb is the suggested type in almost all cases