[PYTHON DB-SIG] Python Database API
Tue, 15 Apr 1997 19:55:08 -0700
Hmm. I thought there was a spec for DBI (just checked... there is, but
it doesn't cover the "generic" exceptions). Personally, I have no
objections to your extensions, but I'd recommend ensuring that your
changes get propagated to the other DBAPI modules. It might be worth it
to have somebody step up as the "owner" of the DBI as a separate entity.
It would be available separately, but the modules simply repackage it.
If you could write a spec for your new DBI to go along with what you
code, and nobody has any objections, then we can plop that up onto the
I would say that any cursors associated with a closed connection become
unusable. Closing cursors should not have an impact on the connection.
I've never dealt with callproc. In truth, I'm not positive that it is
needed after all. It seems to be quite possible to simply use execute()
for store procedures in addition to (SQL) statements.
One interesting note: the ODBC module is apparently quite fast
relatively to other mechanisms available to Python for accessing
databases (e.g. ADO). You can *make* ADO go faster, but it takes a good
amount of fine tuning and voodoo. Empirically, the ODBC module is simple
to use (love that API!) and capable of being quite efficient.
To fetch/insert more than one row at a time, are you using the row count
from fetchmany() and/or the arraysize attribute?
From: Anthony Baxter [SMTP:email@example.com]
Sent: Monday, April 14, 1997 9:31 PM
To: Greg Stein
Cc: 'Mona E. Gamboa'; firstname.lastname@example.org
Subject: Re: [PYTHON DB-SIG] Python Database API
>>> Greg Stein wrote
> The API is stable and has not changed since then. There are
> to DBI (as mentioned) that have not been documented yet. The
> that can be found via the code of the various other modules
> oracle, informix).
FWIW, I'd like to fill in a few of the "not well defined yet"
bits - I'm
currently rewriting the oracle module (amongst other things, to
than one row at a time, and to use the thread-safe interfaces of
As far as I can see, there's no spec for the DBI stuff. I'd like
be able to specify creation of dbiDates, using either a delta,
7-tuple, as produced by time.gmtime() and friends. The current
module forces everything to be done in terms of localtime, which
Other things: currently the spec says connection.close() should
the connection unusable, and any attempts to use the connection
raise an exception. Should this also apply to any cursors
What about cursor.close()? Should that just nuke the current
the connection it's attached to?
Has anyone done anything with connection.callproc() at all?
DB-SIG - SIG on Tabular Databases in Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org