8000 Improve sqlite3 documentation of the new autocommit attribute by geryogam · Pull Request #99435 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Improve sqlite3 documentation of the new autocommit attribute #99435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Normalize ‘open transaction’
  • Loading branch information
geryogam committed Nov 22, 2022
commit 55a28c85bc733480adbf74e9b144f1637520e435
8 changes: 4 additions & 4 deletions Doc/library/sqlite3.rst
D733
Original file line number Diff line number Diff line change
Expand Up @@ -634,15 +634,15 @@ Connection objects

.. method:: commit()

Commit any pending transaction to the database.
Commit any open transaction to the database.
If :attr:`autocommit` is ``True``, or there is no open transaction,
this method does nothing.
If :attr:`!autocommit` is ``False``, this method implicitly opens
a new transaction after committing.

.. method:: rollback()

Roll back to the start of any pending transaction.
Roll back to the start of any open transaction.
If :attr:`autocommit` is ``True``, or there is no open transaction,
this method does nothing.
If :attr:`!autocommit` is ``False``, this method implicitly opens
Expand Down Expand Up @@ -1272,7 +1272,7 @@ Connection objects
This is currently the default value of :attr:`!autocommit`.

Changing :attr:`!autocommit` to ``False`` will open a new transaction,
and changing it to ``True`` will commit any pending transaction.
and changing it to ``True`` will commit any open transaction.

See :ref:`sqlite3-transaction-control-autocommit` for more details.

Expand Down Expand Up @@ -1473,7 +1473,7 @@ Cursor objects
Execute the SQL statements in *sql_script*.
If the :attr:`~Connection.autocommit` is
:data:`LEGACY_TRANSACTION_CONTROL`
and there is a pending transaction,
and there is an open transaction,
an implicit ``COMMIT`` statement is executed first.
No other implicit transaction control is performed;
any transaction control must be added to *sql_script*.
Expand Down
0