mirror of https://github.com/python/cpython
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
|
@ -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…
Reference in New Issue