Open mtstickney opened 8 years ago
Thank you for pointing out. CL-DBI fetches rows after the query execution and stores them in a private slot by default, so it wouldn't always be a problem. However, since CL-DBI is a lower-level DB interface, it may be preferable to have a method to free a query object.
I was working on an ODBC driver for cl-dbi the other day, and I've run into a snag: the driver has to allocate some (foreign) resources to execute a query, which need to be freed after results have been fetched, but there's no obvious place to do this. It seems like there are three cases:
EXECUTE
andFETCH
directly.DO-SQL
orFETCH-ALL
, but signal a condition before all results are fetched.DO-SQL
orFETCH-ALL
, and fetch all results normally.3 is easy to do, but 1 & 2 are harder. The thing that comes to mind is that cl-dbi needs a
FREE-QUERY
counterpart toEXECUTE
(and probably some kind ofWITH-QUERY
macro), but that would mean an API change. Thoughts?