[DB-SIG] db module wrapper

M.-A. Lemburg mal at egenix.com
Thu Aug 19 22:13:29 CEST 2004

Dieter Maurer wrote:
> Randall Smith wrote at 2004-8-18 15:22 -0500:
>>* Standardize the params input to use the ? operator and a list.  The 
>>module translates input params and query into the one appropriate for 
>>the  native module.  For example with cx_Oracle: "Select foo from table 
>>where goo > ?" with params [myparam] converts to "Select foo from table 
>>where goo > :var1" with params {'var1':myparam}.  This is working with 
>>both psycopg and cx_Oracle.
> Why are you replacing a readable and reliable syntax by one
> that is difficult to read and unreliable?
>   As soon as you have a couple of "?", it becomes quite difficult
>   to grasp...

You get used to it rather quickly ;-) (and it's easy to parse and
convert into the other formats).

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Aug 19 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