summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-04-28 08:02:23 (GMT)
committerGitHub <noreply@github.com>2023-04-28 08:02:23 (GMT)
commit30216b69a2fc716c7cfab842364a379cd6ffe458 (patch)
treeb4d8d0189336ae45b507d32e6e75a590a3a4c773
parent52cedc5c10336f0bc199d28524491e7de05bd047 (diff)
downloadcpython-30216b69a2fc716c7cfab842364a379cd6ffe458.zip
cpython-30216b69a2fc716c7cfab842364a379cd6ffe458.tar.gz
cpython-30216b69a2fc716c7cfab842364a379cd6ffe458.tar.bz2
gh-100021: Document that sqlite3's executemany() discards resulting rows (#103939)
-rw-r--r--Doc/library/sqlite3.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 7439156..89673b8 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -1530,12 +1530,12 @@ Cursor objects
For every item in *parameters*,
repeatedly execute the :ref:`parameterized <sqlite3-placeholders>`
- SQL statement *sql*.
+ :abbr:`DML (Data Manipulation Language)` SQL statement *sql*.
Uses the same implicit transaction handling as :meth:`~Cursor.execute`.
:param str sql:
- A single SQL :abbr:`DML (Data Manipulation Language)` statement.
+ A single SQL DML statement.
:param parameters:
An :term:`!iterable` of parameters to bind with
@@ -1558,6 +1558,13 @@ Cursor objects
# cur is an sqlite3.Cursor object
cur.executemany("INSERT INTO data VALUES(?)", rows)
+ .. note::
+
+ Any resulting rows are discarded,
+ including DML statements with `RETURNING clauses`_.
+
+ .. _RETURNING clauses: https://www.sqlite.org/lang_returning.html
+
.. deprecated-removed:: 3.12 3.14
:exc:`DeprecationWarning` is emitted if