executemany ('SELECT ...') (was: [DB-SIG] DBAPI-2.0 clarifications)

Federico Di Gregorio fog@mixadlive.com
Mon, 19 Mar 2001 19:07:45 +0100


Scavenging the mail folder uncovered M.-A. Lemburg's letter:

> Note that the original idea behind .nextset() was to allow
> stored procedures to pass back multiple result sets. The idea
> of having .executemany() produce mutliple result sets only came
> up recently on the db-sig list -- I can't really say, that I like
> it...
[snip] 
> Snice it is not defined in the DB API spec, the feature is deemed
> to be implementation specific. Multiple selects in one execution

right. that's why i started this thread ;) i think we need to formalize
thing like this one a little more, to avoid *user* problems. if a 
programmer uses a dbapi compliant driver, she should as free as possible
from thoughts like "mmm... *this* one returns multiple sets when i
give a SELECT to executemany()? or does it return just a single set? or
it just bombs out. or it returns the _last_ result?"

> In contrast with array INSERTs/UPDATESs, array SELECts are a rather exotic
> feature. So standardizing it's behaviour in a way that requires additional
> work by the driver implementor is probably a waste of time.

i better like  a clear api that puts some burden on the driver's 
implementor but free the user/programmer from problems when switching 
from a driver to another one. a won't call helping the final user a
"waste of time."

ciao,
federico

-- 
Federico Di Gregorio
MIXAD LIVE Chief of Research & Technology              fog@mixadlive.com
Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
             A short story: I want you. I love you. I'll miss you. -- Me