Skip to content

Commit 9014437

Browse files
author
Erlend Egeberg Aasland
authored
bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)
1 parent 4fdcc39 commit 9014437

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/library/sqlite3.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,8 @@ Cursor Objects
648648

649649
This is a nonstandard convenience method for executing multiple SQL statements
650650
at once. It issues a ``COMMIT`` statement first, then executes the SQL script it
651-
gets as a parameter.
651+
gets as a parameter. This method disregards :attr:`isolation_level`; any
652+
transation control must be added to *sql_script*.
652653

653654
*sql_script* can be an instance of :class:`str`.
654655

@@ -1048,6 +1049,9 @@ setting :attr:`isolation_level` to ``None``. This will leave the underlying
10481049
control the transaction state by explicitly issuing ``BEGIN``, ``ROLLBACK``,
10491050
``SAVEPOINT``, and ``RELEASE`` statements in your code.
10501051

1052+
Note that :meth:`~Cursor.executescript` disregards
1053+
:attr:`isolation_level`; any transaction control must be added explicitly.
1054+
10511055
.. versionchanged:: 3.6
10521056
:mod:`sqlite3` used to implicitly commit an open transaction before DDL
10531057
statements. This is no longer the case.

0 commit comments

Comments
 (0)