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

index 165bac4c0f707bc913657ada944e0ec4178e7f67..4dbbfe21ff66c42eb37bb85278ed6df98bb552e8 100644 (file)
@@ -1363,12 +1363,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
@@ -1391,6 +1391,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
+
    .. method:: executescript(sql_script, /)
 
       Execute the SQL statements in *sql_script*.