One thing that annoys me when writing db code is having to remember to close connections after I'm done. This has become annoying enough that I wrote a small macro, with-connection, that ensures dbi:disconnect will be called. Here I humbly submit it to you, in the hope that maybe you'll find it useful enough to include in cl-dbi proper.
One thing that annoys me when writing db code is having to remember to close connections after I'm done. This has become annoying enough that I wrote a small macro,
with-connection
, that ensuresdbi:disconnect
will be called. Here I humbly submit it to you, in the hope that maybe you'll find it useful enough to include in cl-dbi proper.Definition
Sample usage