Lots of databases (and even the ODBC spec) support returning multiple
resultsets from a single query execution call (usually the individual
sql queries must be separated by semi-colons, but stored procedures can
also return multiple resultsets). This formalizes the idea by
introducing DBInterface.executemultiple, which looks and acts exactly
like DBInterface.execute (takes conn arg, query string, params,
etc.), except instead of returning a single Cursor, it returns an
iterator of Cursors. I like that this doesn't affect/change execute
at all, and is strictly additive in functionality for the interface
overall.
single query
Lots of databases (and even the ODBC spec) support returning multiple resultsets from a single query execution call (usually the individual sql queries must be separated by semi-colons, but stored procedures can also return multiple resultsets). This formalizes the idea by introducing
DBInterface.executemultiple
, which looks and acts exactly likeDBInterface.execute
(takesconn
arg, query string, params, etc.), except instead of returning a singleCursor
, it returns an iterator ofCursor
s. I like that this doesn't affect/changeexecute
at all, and is strictly additive in functionality for the interface overall.