mirror of https://github.com/python/cpython.git
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:
parent
7528e2c06c
commit
ec08534f95
|
@ -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`_ —
|
||||
|
|
Loading…
Reference in New Issue