Commit 430a09e1 authored by ryszard.szopa's avatar ryszard.szopa
Browse files

with-class-connection always uses a pooled connection.

darcs-hash:2d3902a9b73755ffe819d19589b7e931ca5db760
parent b349fa77
......@@ -52,11 +52,11 @@ specified by the DB-CLASS-CONNECTION-SPEC of the class of OBJECT."
(defun with-class-connection-fun (class what-to-do)
"Functional interface to the macro WITH-CLASS-CONNECTION."
(with-connection-fun (db-class-connection-spec class)
(with-connection-fun (append (db-class-connection-spec class) '(t))
what-to-do))
(defmacro with-class-connection ((class) &body body)
"Run BODY in an environment with a connection to the database
"Run BODY in an environment with an always pooled connection to the database
specified by the DB-CLASS-CONNECTION-SPEC of CLASS."
`(with-class-connection-fun ,class
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment