Skip to content

Commit 000e4c5

Browse files
Mention layday's suggestion
1 parent 345043f commit 000e4c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/sqlite3.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,6 +2696,11 @@ This means:
26962696
.. note::
26972697

26982698
Some ``PRAGMA`` statements have no effect when a transaction is open.
2699+
If ``PRAGMA`` statements are a part of the database connection setup
2700+
and you want :pep:`249`-compliant transaction control,
2701+
set *autocommit* to ``True`` in :func:`connect`,
2702+
execute the needed ``PRAGMA`` statements,
2703+
then set :attr:`Connection.autocommit` to ``False``.
26992704
See :ref:`sqlite3-howto-pragma-in-transaction` for details.
27002705

27012706
Set *autocommit* to ``True`` to enable SQLite's `autocommit mode`_.

0 commit comments

Comments
 (0)