mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-08-02 03:10:10 +03:00
add executemany example with multiple parameters
This commit is contained in:
parent
9caf65e2de
commit
cf22e65f19
|
@ -200,6 +200,9 @@ The ``cursor`` class
|
||||||
|
|
||||||
>>> nums = [[1],[5],[10]]
|
>>> nums = [[1],[5],[10]]
|
||||||
>>> cur.executemany("INSERT INTO test (num) VALUES (%s)", nums)
|
>>> cur.executemany("INSERT INTO test (num) VALUES (%s)", nums)
|
||||||
|
|
||||||
|
>>> tuples = ((123,"foo"), (42,"bar"), (23,"baz"))
|
||||||
|
>>> cur.executemany("INSERT INTO test (num, data) VALUES (%s, %s)", tuples)
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
In its current implementation this method is not faster than
|
In its current implementation this method is not faster than
|
||||||
|
|
Loading…
Reference in New Issue
Block a user