Visitar URL original
bpo-29121: Remove outdated documentation about transactions by berkerpeksag · Pull Request #313 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-29121: Remove outdated documentation about transactions
Patch by Aviv Palivoda.
  • Loading branch information
berkerpeksag committed Feb 26, 2017
commit d8d865da89990272ee784b2e04f1596baba65583
8 changes: 0 additions & 8 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down