I see a lot of clojure libraries use the pattern where an implicit
variable is stored as a dynamic variable.  A good example is
clojure.java.jdbc:

(require '[clojure.java.jdbc :as sql])

(sql/with-connection db-spec
  sql code here)

What do I do if I have to instantiate two things that uses the same
dynamic binding at the same time.  Using the java.jdbc example, what
if I wanted to run multiple selects from db-1 and insert each result
into db-2?  Do I need keep calling (sql/with-connection db-2 ...)
after each select from db-1?

-- 
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