[DB-SIG] Re: db module wrapper

M.-A. Lemburg mal at egenix.com
Tue Aug 24 12:38:01 CEST 2004


Jonathan M. Franz wrote:
> Note to Marc: the clarifications as to the descriptor fields and their 
> meanings we discussed on the python list a long time ago was a big help 
> - but those clarifications are still outstanding in the spec itself.  
> Should I submit a doc patch?

Yes, please.

>> I'm mainly programming to API 2.  Config files are used to adapt 
>> modules that do not completely comply.  In theory, a module that is 
>> API2 compliant needs no config.
> 
> 
> We're pretty much at the same point.  A word of warning - watch out for 
> assumed behaviors.  For example, some modules return the number of rows 
> affected by an execute as the return value of the execute; Others do 
> not.  The standard just states that return values are undefined - hence 
> the ambiguity and different behavior.

It says "Return values are not defined". You should use .rowcount to
access the number of affected rows. The reason is that getting this
information from the database can be an expensive operation; hence
you don't want to do this for every single call to .execute().

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Aug 24 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the DB-SIG mailing list