Skip to content

Commit b3faf8c

Browse files
[3.11] gh-100021: Document that sqlite3's executemany() discards resulting rows (#103939) (#103966)
1 parent 294398c commit b3faf8c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Doc/library/sqlite3.rst

+9-2
Original file line numberDiff line numberDiff line change
@@ -1363,12 +1363,12 @@ Cursor objects
13631363

13641364
For every item in *parameters*,
13651365
repeatedly execute the :ref:`parameterized <sqlite3-placeholders>`
1366-
SQL statement *sql*.
1366+
:abbr:`DML (Data Manipulation Language)` SQL statement *sql*.
13671367

13681368
Uses the same implicit transaction handling as :meth:`~Cursor.execute`.
13691369

13701370
:param str sql:
1371-
A single SQL :abbr:`DML (Data Manipulation Language)` statement.
1371+
A single SQL DML statement.
13721372

13731373
:param parameters:
13741374
An :term:`!iterable` of parameters to bind with
@@ -1391,6 +1391,13 @@ Cursor objects
13911391
# cur is an sqlite3.Cursor object
13921392
cur.executemany("INSERT INTO data VALUES(?)", rows)
13931393

1394+
.. note::
1395+
1396+
Any resulting rows are discarded,
1397+
including DML statements with `RETURNING clauses`_.
1398+
1399+
.. _RETURNING clauses: https://www.sqlite.org/lang_returning.html
1400+
13941401
.. method:: executescript(sql_script, /)
13951402

13961403
Execute the SQL statements in *sql_script*.

0 commit comments

Comments
 (0)