]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-100021: Document that sqlite3's executemany() discards resulting rows (#103939)
authorErlend E. Aasland <erlend.aasland@protonmail.com>
Fri, 28 Apr 2023 08:02:23 +0000 (10:02 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Apr 2023 08:02:23 +0000 (10:02 +0200)
Doc/library/sqlite3.rst

index 743915688dae9b16e828d7acaa2fe560032ecf89..89673b8006ae777f833bb9105a80d2c2f6944fbc 100644 (file)
@@ -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