[DB-SIG] Multiple Statements
Andy Dustman
andy@dustman.net
28 May 2002 18:41:47 -0400
On Tue, 2002-05-28 at 15:36, Gerhard H=E4ring wrote:
> From my interpretation of the DB-API specfication, it's not possible to
> put multiple SELECT statements into one execute() call. That's what
> .executemany() with .nextset() is for, right? Do I really have to
> support this in a DB-API compliant module, though?
Nearly all DB-API modules I have seen require a single statement passed
to either execute() or executemany(), i.e. no multiple statement
queries. nextset() is for SELECTs which return multiple result sets;
I've never seen this used.
=20
> What about multiple non-SELECT SQL statements seperated by ; in an
> execute() call (read: INSERT, UPDATE, PRAGMA). Would this be valid?
> Again I personally would use executemany(). I'm just wondering if I have
> to have to account for it in an execute() call.
Also, the only thing I have ever seen executemany() used for is a
multi-row INSERT.
--=20
Andy Dustman PGP: 0x930B8AB6
@ .net http://dustman.net/andy
"Cogito, ergo sum." -- Rene Descartes
"I yam what I yam and that's all that I yam." -- Popeye