On 02.12.2022 18:32, John Stevenson - BGS wrote:
The documents officially state “named” as the paramstyle, but with
cx_Oracle we often use the numeric style with executemany so that we
can insert from lists of tuples. In this context, the useful
“feature” of the numeric paramstyle is that you don’t need to
transform your data into a dictionary.
https://cx-oracle.readthedocs.io/en/latest/api_manual/module.html#cx_Oracle.paramstyle
I haven’t tried binding the same value multiple times or using the
placeholders in different orders, though.
cx_Oracle seems to use "named" style, but simply binds by position when
passing in a tuple instead of a dictionary (or keyword args). At least
that's what the docs suggest:
https://cx-oracle.readthedocs.io/en/latest/user_guide/bind.html
I suppose that using "where a=:2 and b=:1" would still bind the first
parameter value to "a" and the second to "b".
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Experts (#1, Dec 02 2022)
Python Projects, Coaching and Support ... https://www.egenix.com/
Python Product Development ... https://consulting.egenix.com/
________________________________________________________________________
::: We implement business ideas - efficiently in both time and costs :::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
https://www.egenix.com/company/contact/
https://www.malemburg.com/
_______________________________________________
DB-SIG maillist - DB-SIG@python.org
https://mail.python.org/mailman/listinfo/db-sig