8000 gh-100021: Document that sqlite3's executemany() discards resulting r… · python/cpython@30216b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 30216b6

Browse files
gh-100021: Document that sqlite3's executemany() discards resulting rows (#103939)
1 parent 52cedc5 commit 30216b6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Doc/library/sqlite3.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,12 +1530,12 @@ Cursor objects
15301530

15311531
For every item in *parameters*,
15321532
repeatedly execute the :ref:`parameterized <sqlite3-placeholders>`
1533-
SQL statement *sql*.
1533+
:abbr:`DML (Data Manipulation Language)` SQL statement *sql*.
15341534

15351535
Uses the same implicit transaction handling as :meth:`~Cursor.execute`.
15361536

15371537
:param str sql:
1538-
A single SQL :abbr:`DML (Data Manipulation Language)` statement.
1538+
A single SQL DML statement.
15391539

15401540
:param parameters:
15411541
An :term:`!iterable` of parameters to bind with
@@ -1558,6 +1558,13 @@ Cursor objects
15581558
# cur is an sqlite3.Cursor object
15591559
cur.executemany("INSERT INTO data VALUES(?)", rows)
15601560

1561+
.. note::
1562+
1563+
Any resulting rows are discarded,
1564+
including DML statements with `RETURNING clauses`_.
1565+
1566+
.. _RETURNING clauses: https://www.sqlite.org/lang_returning.html
1567+
15611568
.. deprecated-removed:: 3.12 3.14
15621569

15631570
:exc:`DeprecationWarning` is emitted if

0 commit comments

Comments
 (0)
0