gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH-96832)

(cherry picked from commit 16c33a9676)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
Miss Islington (bot) 2022-09-15 14:21:08 -07:00 committed by Pablo Galindo
parent a955cccf7a
commit 746dad4eab
No known key found for this signature in database
GPG key ID: FFE87404168BD847

View file

@ -2239,7 +2239,8 @@ If the connection attribute :attr:`~Connection.isolation_level`
is not ``None``, is not ``None``,
new transactions are implicitly opened before new transactions are implicitly opened before
:meth:`~Cursor.execute` and :meth:`~Cursor.executemany` executes :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 Use the :meth:`~Connection.commit` and :meth:`~Connection.rollback` methods
to respectively commit and roll back pending transactions. to respectively commit and roll back pending transactions.
You can choose the underlying `SQLite transaction behaviour`_ You can choose the underlying `SQLite transaction behaviour`_