Re: Get a LAZY list of records from a database query ?

2014-03-14 Thread Shantanu Kumar
Hi Frank, You can look at the source code of `resultset-seq` (in Clojure-JVM) to see how it does a similar thing. You must consume the entire set of messages before closing the connection though. The `clojure.java.jdbc` library ensures that, for example. You may also want to discuss this on Cl

Get a LAZY list of records from a database query ?

2014-03-14 Thread Frank Behrens
Hi, I wonder if its possible to convert this database query (its CLR) into a lazy sequence. The reader loop is wrapped in the opening and closing of the db-connection and reader. When i 'take a few records from the sequence, will then the connection be closed because it's getting out of scope