Re: understanding 'binding' use in clojure.java.jdbc

2012-12-03 Thread Matthias Cords
Hi, I found database connection pools to be the right thing to use with c.j.jdbc and multiple databases. https://clojars.org/org.bituf/clj-dbcp (let [conn1 (make-pool-1) conn2 (make-pool-2)] (sql/with-connection conn1 (sql/with-query-results r ["select ..."] (sql/with-connectio

Re: Good book on migrating from (Java) OO to FP

2011-07-30 Thread Matthias Cords
not sure wheret it applies to your requirements: www.gigamonkeys.com/book On 29 July 2011 14:03, Colin Yates wrote: > Hi all, > > Not sure whether this is good etiquette or not, but I wanted to praise > http://oreilly.com/catalog/0636920021667. I found it pretty useful in > bridging the gap b

Re: clojure.contrib.sql and multiple connections

2011-06-22 Thread Matthias Cords
source-conn >  (with-query-results source ["SELECT id FROM emp WHERE salary > ?" > 1000] >    ... >    ;; here `source` contains a lazy seq (from ResultSet) that won't > blow the heap >    ;; read from `source` sequentially and write results to target >    ... &

Re: clojure.contrib.sql and multiple connections

2011-06-21 Thread Matthias Cords
thank you, this sounds very reasonable. very often there is more than one piece of data to copy back and forth. so typically i do a sql select, then put that to destination data store, do another sql select and put to destination, ... and so forth. from my understanding (sql/with-connection ...)