[DB-SIG] Database API clarifications
M.-A. Lemburg
lemburg@uni-duesseldorf.de
Fri, 30 Jan 1998 17:36:52 +0100
Thomas Marsh wrote:
>
> M.-A. Lemburg wrote:
> > > [...]
> > Could you explain how you define multiple result sets with one
> > SQL statement ? I'm not sure whether a cursor method is the right
> > thing to add. Also, most DBs probably don't support this feature,
> > so it should be optional from the APIs point of view.
>
> Any database that supports compute clauses should return multiple result
> sets. Sybase, for instance, does this.
Ok, I see. Well then a method cursor.nextset() should go into the
API. With the same semantics that Bill proposed:
return 1 if there are more sets and organize for the
next fetch* calls to return rows from the next set;
return 0 otherwise.
Interface packages not providing this feature should always
return 0.
Is that ok ? I'll add to my API 1.1. draft then.
--
Marc-Andre Lemburg
_______________
DB-SIG - SIG on Tabular Databases in Python
send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
_______________