[DB-SIG] Re: [PyGreSQL] Version 3.0 PyGreSQL

M.-A. Lemburg mal@lemburg.com
Fri, 12 May 2000 10:27:37 +0200


Greg Stein wrote:
> 
> On Thu, 11 May 2000, Jeremy Hylton wrote:
> >...
> > Does the DB spec have an author? Is this the right place to ask
> > questions?  (I realize there are lots of reason for questions to go
> > unanswered.)
> 
> A bit more here:
> 
> The DBAPI 1.0 spec was primarily myself and Michael Lorton while we were
> still eShop.
> 
> The DBAPI 2.0 spec was primarily Marc-Andre and Andy Dustman, with me
> pestering them :-). There was also plenty of other input from the members
> of the DB-SIG, but I'd say most of the changes were MAL and Andy.
> 
> MAL would be the guy who might have a wish list and/or suggested list of
> changes for a 3.0 spec.

There were some suggestions for 3.0 (or maybe just 2.1). The
archives have the details as usual ;-)

One addition which I tried in the mxODBC was the addition
of a .prepare(command) method and a .command read-only 
attribute. 

The .prepare() method allows preparing a command for execution
on the cursor *without* actually executing it. The .command
attribute is always set to the currently cached command
on the cursor. Now, to execute a prepared command, all you
have to do is pass .command to the .execute() method as
command. Then the re-use optimization will notice that you
are executing a prepared command and skip the normally
needed prepare step -- very useful for pooling cursors
with often used commands such as id-name mappings etc.

Modules not capabale of providing such a method should
not implement it and ones which only know at run-time
should raise a NotSupported error (like for all other
optional features).

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/