diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-09-15 21:20:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 21:20:25 (GMT) |
commit | ec08534f95021def8a9959e2e1312e9766986b25 (patch) | |
tree | b6b5d96aeb81c884521bad9b736412fe491c1a43 /Doc | |
parent | 7528e2c06c8baf809b56f406bcc50e8436c9647c (diff) | |
download | cpython-ec08534f95021def8a9959e2e1312e9766986b25.zip cpython-ec08534f95021def8a9959e2e1312e9766986b25.tar.gz cpython-ec08534f95021def8a9959e2e1312e9766986b25.tar.bz2 |
gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH-96832)
(cherry picked from commit 16c33a9676e2f3ef330d09f2ab515c56636fa09f)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/sqlite3.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 8849527..15a052b 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1850,7 +1850,8 @@ If the connection attribute :attr:`~Connection.isolation_level` is not ``None``, new transactions are implicitly opened before :meth:`~Cursor.execute` and :meth:`~Cursor.executemany` executes -``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statements. +``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statements; +for other statements, no implicit transaction handling is performed. Use the :meth:`~Connection.commit` and :meth:`~Connection.rollback` methods to respectively commit and roll back pending transactions. You can choose the underlying `SQLite transaction behaviour`_ — |