Fork me on GitHub
#sql
<
2017-01-03
>
ustunozgur17:01:18

Hi all, I'm using clojure.jdbc + honeysql with a postgres db. I have some citext type columns, that are not automatically converted to string when I do a query. What is the best way to cast these to string? They return as PGObject's. Actually found the solution, but sharing in case anyone needs it: https://gist.github.com/ustun/93f61be83a138533e0e91249020e57a7

richiardiandrea22:01:59

@ustunozgur yes that's the right solution

richiardiandrea22:01:11

the jdbc/ISQLValue protocol gives you the "clojure to db" instead of "db to clojure"