Take a look at this for connection pooling:

http://bitbucket.org/kumarshantanu/clj-dbcp/src

On Thu, Dec 9, 2010 at 1:39 PM, Ghadi Shayban <gshay...@gmail.com> wrote:
> I'm using contrib,sql to clean rows from one DB and insert them into
> another.
>
> I was thinking something like (pseudo-code
>
> (sql/with-connection db1
>  .....
>  (doseq [x (map rs)] (insert-into-other x)))
>
>
> (defn insert-into-other [r]
> (sql/with-connection db2
>  ...))
>
> But this obviously will open/close a connection to db2 for each row.
>
> Can someone assist with an idiomatic solution?  Do I need to bind *db*?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to