[DB-SIG] Re: cx_Oracle - passing unnecessary bind variables

Anthony Tuininga anthony at computronix.com
Tue Nov 25 18:01:42 EST 2003


On Tue, 2003-11-25 at 13:52, Dieter Maurer wrote:
> Anthony Tuininga wrote at 2003-11-24 11:32 -0700:
>  > ...
>  > >  > There are a
>  > >  > few cases where it might be convenient to pass a prebuilt dictionary but
>  > >  > they are few and far between -- unless you can give me some additional
>  > >  > examples??
>  > > 
>  > > That is no longer an issue:
>  > > 
>  > >   When you have a dictionary "d" and you need keyword arguments,
>  > >   you simply pass "**d", e.g.:
>  > > 
>  > >       cursor.execute(sql, **d)
>  > 
>  > Could you explain exactly what you mean? I believe the syntax you show
>  > is invalid in the DB API.
> 
> The syntax is Python syntax. The DB-API will not see it, as
> Python will call "execute" with "sql, key1=val1, key2=val2, ..." ---
> not supported by the DB-API but by your "execute" implementation.

Right. That is what I thought. Just clarifying.

-- 
Anthony Tuininga
anthony at computronix.com
 
Computronix
Distinctive Software. Real People.
Suite 200, 10216 - 124 Street NW
Edmonton, AB, Canada  T5N 4A3
Phone:	(780) 454-3700
Fax:	(780) 454-3838
http://www.computronix.com




More information about the DB-SIG mailing list