mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (#99825)
Authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
fe17d35313
commit
19c38801ba
1 changed files with 3 additions and 3 deletions
|
@ -2468,9 +2468,9 @@ which implies :pep:`249`-compliant transaction control.
|
|||
This means:
|
||||
|
||||
* :mod:`!sqlite3` ensures that a transaction is always open,
|
||||
so :meth:`Connection.commit` and :meth:`Connection.rollback`
|
||||
will implicitly open a new transaction immediately after closing
|
||||
the pending one.
|
||||
so :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
|
||||
will implicitly open a new transaction
|
||||
(immediately after closing the pending one, for the latter two).
|
||||
:mod:`!sqlite3` uses ``BEGIN DEFERRED`` statements when opening transactions.
|
||||
* Transactions should be committed explicitly using :meth:`!commit`.
|
||||
* Transactions should be rolled back explicitly using :meth:`!rollback`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue