summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorGéry Ogam <gery.ogam@gmail.com>2022-11-30 12:33:50 +0100
committerGitHub <noreply@github.com>2022-11-30 12:33:50 +0100
commit19c38801ba2f42a220adece5d5f12e833b41822a (patch)
treeda066380319b9df1b5c5ad5ed7a35048163402cd /Doc
parentfe17d353134748dc772f8743ceadc2dd9e0db187 (diff)
downloadcpython-git-19c38801ba2f42a220adece5d5f12e833b41822a.tar.gz
gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (#99825)
Authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sqlite3.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 7e2235b285..a9ee1e207d 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -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`.