Skip to content
Snippets Groups Projects
Unverified Commit 19c38801 authored by Géry Ogam's avatar Géry Ogam Committed by GitHub
Browse files

gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (#99825)

parent fe17d353
No related branches found
No related tags found
No related merge requests found
......@@ -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`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment