[DB-SIG] Result Set Inconsistencies

Gerhard Häring gh at ghaering.de
Thu Jul 17 12:44:33 EDT 2003

Anthony Baxter wrote:
>>>>"Orr, Steve" wrote
>>I'm thinking results sets should always be a lists or I should be able
>>to specify how I want the result sets. I know there are lots of
>>differences in database engines and an API can't make all database
>>engines behave the same but it OUGHT to impose SOME consistency. 
> What about if someone wanted to make the result set a generator? That
> way you're not going to be pulling down all the data unless you actually
> need it...

We have that already. Well, almost. The form

c.execute("select ...")
for row in c: ...

is already an optional DB-API extension according to the spec. Just 
implement the __iter__ method in the cursor class :)

-- Gerhard

More information about the DB-SIG mailing list