@@ -654,7 +654,7 @@ Connection objects
654
654
If :attr: `autocommit ` is ``False ``, this method implicitly rolls back
655
655
any open transaction before closing.
656
656
If :attr: `!autocommit ` is ``True `` or :data: `LEGACY_TRANSACTION_CONTROL `,
657
- this method does not execute any implicit transaction control.
657
+ this method does not perform any implicit transaction control.
658
658
Make sure to :meth: `commit ` before closing
659
659
to avoid losing pending changes.
660
660
@@ -1285,7 +1285,7 @@ Connection objects
1285
1285
1286
1286
.. attribute :: in_transaction
1287
1287
1288
- This read-only attribute corresponds to the low-level SQLite
1288
+ This read-only attribute corresponds to the low-level SQLite's
1289
1289
`autocommit mode `_.
1290
1290
1291
1291
``True `` if a transaction is active (there are uncommitted changes),
@@ -2392,10 +2392,9 @@ This means:
2392
2392
and :meth: `Connection.rollback ` implicitly open a new transaction to ensure
2393
2393
that a transaction is always open.
2394
2394
Those methods use a ``BEGIN DEFERRED `` statement when opening a transaction.
2395
- * Transactions should be committed explicitly using :meth: `!commit `.
2396
- * Transactions should be rolled back explicitly using :meth: `!rollback `.
2397
- * An implicit rollback is performed if the database is
2398
- :meth: `~Connection.close `-ed with pending changes.
2395
+ * Transactions should be explicitly committed using :meth: `!commit `.
2396
+ * Transactions should be explicitly rolled back using :meth: `!rollback `.
2397
+ * :meth: `Connection.close ` implicitly rolls back any open transaction.
2399
2398
2400
2399
Set *autocommit * to ``True `` to enable the :pep: `249 `-compliant autocommit mode.
2401
2400
This means:
@@ -2408,8 +2407,8 @@ This means:
2408
2407
2409
2408
Note that SQLite's autocommit mode is distinct from
2410
2409
the :pep: `249 `-compliant :attr: `Connection.autocommit ` attribute;
2411
- use :attr: ` Connection.in_transaction ` to query
2412
- the low-level SQLite autocommit mode .
2410
+ SQLite's autocommit mode can be queried using the
2411
+ :attr: ` Connection.in_transaction ` attribute .
2413
2412
2414
2413
Set *autocommit * to :data: `LEGACY_TRANSACTION_CONTROL ` to enable legacy
2415
2414
(pre-Python 3.12) transaction control.
@@ -2448,15 +2447,16 @@ If :attr:`~Connection.isolation_level` is not ``None``:
2448
2447
* Transactions should be explicitly rolled back using :meth: `!rollback `.
2449
2448
2450
2449
If :attr: `~Connection.isolation_level ` is set to ``None ``,
2451
- no transactions are implicitly opened at all.
2452
- This leaves the underlying SQLite library in `autocommit mode `_,
2453
- but also allows the user to perform their own transaction handling
2454
- using explicit SQL statements.
2455
- The underlying SQLite library autocommit mode can be queried using the
2450
+ no implicit transaction control is performed.
2451
+ This leaves SQLite in `autocommit mode `_,
2452
+ but also allows the user to perform their own transaction control
2453
+ using explicit SQL-transaction statements.
2454
+
2455
+ SQLite's autocommit mode can be queried using the
2456
2456
:attr: `~Connection.in_transaction ` attribute.
2457
2457
2458
- The :meth: `~Cursor.executescript ` method implicitly commits
2459
- any pending transaction before execution of the given SQL script,
2458
+ :meth: `~Cursor.executescript ` implicitly commits any open transaction before
2459
+ executing the given SQL script,
2460
2460
regardless of the value of :attr: `~Connection.isolation_level `.
2461
2461
2462
2462
.. versionchanged :: 3.6
0 commit comments