mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
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
a955cccf7a
commit
746dad4eab
1 changed files with 2 additions and 1 deletions
|
@ -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`_ —
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue