[DB-SIG] Database API clarifications
Mon, 26 Jan 1998 11:53:30 -0800
Generally the way to do this is just to have a seperate getNextResult() API
call that you call when your first result set
fetch*() calls return None.
More computing sins are committed in the name of efficiency
(without necessarily achieving it) than for any other single reason
---including blind stupidity.
> Python: the power of simplicity
> Perl: the power of obscurity
> -----Original Message-----
> From: Tod Olson [SMTP:email@example.com]
> Sent: Monday, January 26, 1998 10:00 AM
> To: firstname.lastname@example.org
> Subject: [DB-SIG] Database API clarifications
> I'm working on a Sybase interface for Python. The ones that exist do
> not appear to permit sufficient low-level access for my needs, so I'm
> implementing a low-level interface as a wrapper around Open Client and
> will build a database-API-compliant interface on top of that.
> Sybase permits one to issue a command that will generate multiple
> result sets. The database-API does not directly address this
> possibility. How should the fetch*() functions distinguish to the
> Python programmer the difference between the end of the current result
> set and the end of all data returned by the command?
> Under the current database-API, the programmer could loop over any of
> the fetch*() functions, have None signal end of all results, and look
> for a change in description to signal a new result set. (Personal
> bias: fetchmany() and fetchall() should only return rows from one
> result set on any invocation.) But this is potentially unreliable, as
> two result sets might have the same descriptions.
> Another question: once any of fetch*() returns None, should they
> continue to return None until the next command is sent, or can they
> signal an error after returning None?
> I'm interested in these fetch*() details because I am implementing
> them (so for as possible) directly in my low-level interface.
> Anyone else running into these issues? Anyone else interested in
> lower level access to Sybase?
> Tod A. Olson "How do you know I'm mad?" said Alice.
> email@example.com "If you weren't mad, you wouldn't have
> The University of Chicago Library come here," said the Cat.
> DB-SIG - SIG on Tabular Databases in Python
> send messages to: firstname.lastname@example.org
> administrivia to: email@example.com
DB-SIG - SIG on Tabular Databases in Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com