[DB-SIG] First patch to DBAPI

M.-A. Lemburg mal@lemburg.com
Thu, 22 Mar 2001 23:58:57 +0100


Federico Di Gregorio wrote:
> 
> here is the first little patch to the dbapi document.

The patch looks fine.

> note that i
> don't have included the changes on .executemany() because the discussion
> is not finished. in particular the following paragraph from the
> current document seems to go *agains* the ".executemany() produces
> multiple result sets" argument.
> 
>           Modules are free to implement this method using multiple
>           calls to the <CODE>execute()</CODE> method or by using
>           array operations to have the database process the
>           ^^^^^^^^^^^^^^^^
>           sequence as a whole in one call.
>                    ^^^^^^^^^^

This refers to the use of .executemany() for INSERT and UPDATE
operations which do not return any result sets. Back when we
introduced the API we never even thought of using it for SELECT
and multiple result sets.

I think we should simply clarify that using SELECTs with 
.executemany() is explicitly left undefined by the DB API spec and
that using the API for SELECTs will result in non-portable code.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Pages:                           http://www.lemburg.com/python/