[DB-SIG] cx_Oracle 2.5

M.-A. Lemburg mal@lemburg.com
Wed, 17 Jul 2002 19:02:28 +0200


Tom Jenkins wrote:
> On Wed, 2002-07-17 at 12:25, M.-A. Lemburg wrote:
> 
>>
>>Anthony Tuininga wrote:
>>
>>>-------------------------------- QUOTE ---------------------------------
>>> Prepare and execute a database operation (query or command). Parameters
>>>may be provided as sequence or mapping and will be bound to variables in
>>>the operation. Variables are specified in a database-specific notation
>>>(see the module's paramstyle attribute for details). [5]
>>>-------------------------------- QUOTE ---------------------------------
>>
>>Ah sorry, I forgot about that addition. The trick was that
>>__getitem__ is used for finding the parameters in the data
>>object.
>>
>>Strikes me as rather uncommon, though.
>>
> 
> 
> Actually this is our most common way to send parameters.  i'd estimate
> that around 85% of our execute calls use mappings to hold the
> parameters.  it just seems to fit really well into how we work.

Interesting. Porting such an application to a sequence based
DB API module must be a nightmare though...

I think we really need some sort of standard support for this:
a function which takes an SQL string, a parameter object (or
sequence of such object) and a paramstyle
and converts it to whichever other paramstyle format
is needed.

Any volunteers ?

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/