The `db-spec` can have a `:connection` member and all operations will
use that. You are responsible for closing it when you're done.
Something like (untested, off the top of my head):
(with-open [conn (get-connection db-spec)]
(let [db (assoc db-spec :connection conn)]
...
(query db ...)
...
(insert! db ...)
...))
This sort of thing needs to be added to the (community-editable)
documentation since it's one of the most frequently asked questions:
http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html
For the most part, the way we use it at World Singles is to define a
pool datasource connection and use that as the db-spec (which _is_
documented at that URL for both c3p0 and BoneCP).
Sean
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View --
http://corfield.org/
World Singles, LLC. --
http://worldsingles.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)