Skip to content

Commit 76ed53c

Browse files
miss-islingtonErlend Egeberg Aasland
andauthored
bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)
(cherry picked from commit 9014437) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
1 parent 632b403 commit 76ed53c

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
@@ -635,7 +635,8 @@ Cursor Objects
635635

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

640641
*sql_script* can be an instance of :class:`str`.
641642

@@ -1038,6 +1039,9 @@ setting :attr:`isolation_level` to ``None``. This will leave the underlying
10381039
control the transaction state by explicitly issuing ``BEGIN``, ``ROLLBACK``,
10391040
``SAVEPOINT``, and ``RELEASE`` statements in your code.
10401041

1042+
Note that :meth:`~Cursor.executescript` disregards
1043+
:attr:`isolation_level`; any transaction control must be added explicitly.
1044+
10411045
.. versionchanged:: 3.6
10421046
:mod:`sqlite3` used to implicitly commit an open transaction before DDL
10431047
statements. This is no longer the case.

0 commit comments

Comments
 (0)