diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2017-02-26 15:31:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-26 15:31:12 (GMT) |
commit | fe70d924bb6106d4c21eb414f4a1ba1324e8f46a (patch) | |
tree | 894fd99e6cbf0f8ac717e2de8fef5db7c0c67cea | |
parent | ed6795e46f7653e23b862efad240a93453e7df97 (diff) | |
download | cpython-fe70d924bb6106d4c21eb414f4a1ba1324e8f46a.zip cpython-fe70d924bb6106d4c21eb414f4a1ba1324e8f46a.tar.gz cpython-fe70d924bb6106d4c21eb414f4a1ba1324e8f46a.tar.bz2 |
bpo-29121: Remove outdated documentation about transactions (#313)
Patch by Aviv Palivoda.
-rw-r--r-- | Doc/library/sqlite3.rst | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 5635577..d1f7a6f 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -927,14 +927,6 @@ By default, the :mod:`sqlite3` module opens transactions implicitly before a Data Modification Language (DML) statement (i.e. ``INSERT``/``UPDATE``/``DELETE``/``REPLACE``). -So if you are within a transaction and issue a command like ``CREATE TABLE -...``, ``VACUUM``, ``PRAGMA``, the :mod:`sqlite3` module will commit implicitly -before executing that command. There are two reasons for doing that. The first -is that some of these commands don't work within transactions. The other reason -is that sqlite3 needs to keep track of the transaction state (if a transaction -is active or not). The current transaction state is exposed through the -:attr:`Connection.in_transaction` attribute of the connection object. - You can control which kind of ``BEGIN`` statements sqlite3 implicitly executes (or none at all) via the *isolation_level* parameter to the :func:`connect` call, or via the :attr:`isolation_level` property of connections. @@ -945,6 +937,9 @@ Otherwise leave it at its default, which will result in a plain "BEGIN" statement, or set it to one of SQLite's supported isolation levels: "DEFERRED", "IMMEDIATE" or "EXCLUSIVE". +The current transaction state is exposed through the +:attr:`Connection.in_transaction` attribute of the connection object. + .. versionchanged:: 3.6 :mod:`sqlite3` used to implicitly commit an open transaction before DDL statements. This is no longer the case. |