[DB-SIG] Re: cx_Oracle - passing unnecessary bind variables
dieter at handshake.de
Tue Nov 25 15:52:35 EST 2003
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.
More information about the DB-SIG