Hi there,
The macro with-connection doesn't seem to work as I would expect. It seems two macros were merged...
I am curious as to why the following definition is used:
(defmacro with-connection (spec &body body) "Like with-connection, but evaluate the specification list." `(let ((*database* (apply #'connect ,spec))) (unwind-protect (progn ,@body) (disconnect *database*))))
Note the documentation above.
I think a more standard "with-" macro doesn't evaluate the spec (like below).
(defmacro with-connection (spec &body body) "Like with-connection, but evaluate the specification list." `(let ((*database* (connect ,@spec))) (unwind-protect (progn ,@body) (disconnect *database*))))
What's the reasoning here?
-Luke