Re: Jsonify a Jdbc4Array in Clojure

2013-10-02 Thread Christian Jauvin
Actually, re-reading the jdbc/query doc http://clojure.github.io/java.jdbc/#clojure.java.jdbc/query I can't find any reference to this ":connection" keyword param.. may I ask where you got it from? On Wednesday, October 2, 2013 9:50:13 AM UTC-4, Christian Jauvin wrote:

Re: Jsonify a Jdbc4Array in Clojure

2013-10-02 Thread Christian Jauvin
x27;t use clojure.java.jdbc, so this may be non-idiomatic or just wrong, > but have you tried something like > > (with-open [connection (jdbc/db-connection *db*)] > (json/write-str > (jdbc/query {:connection connection} > ["SELECT * FROM..."]))) > &

Re: Jsonify a Jdbc4Array in Clojure

2013-10-01 Thread Christian Jauvin
rocessing function of > your query and forget about registering JSON writers. > > > > On Tue, Oct 1, 2013 at 9:00 PM, Christian Jauvin > > > wrote: > >> Hi Roman, >> >> This approach works for java.sql.Timestamp, which was another type for >>

Re: Jsonify a Jdbc4Array in Clojure

2013-10-01 Thread Christian Jauvin
SONWriter > (-write [array out] > (-write (seq (.getArray array)) out))) > > Roman > > > On Tuesday, October 1, 2013 3:57:02 PM UTC+2, Christian Jauvin wrote: >> >> Hi, >> >> I asked this question on Stack Overflow yesterday: >> >> I want

Jsonify a Jdbc4Array in Clojure

2013-10-01 Thread Christian Jauvin
Hi, I asked this question on Stack Overflow yesterday: I want to jsonify the results of a query performed against a Postgres table containing a column of type text[], but the problem is that clojure.data.json.write-str doesn't seem to know how to handle PG arrays: *Exception Don't know how to