sqlite-utils/docs
Claude adfcbb4731
Support sqlite3.connect(autocommit=False) connections too
Database() now accepts all three Python transaction handling modes and
behaves identically in each. For autocommit=False connections - where
the driver holds an implicit transaction open at all times - the
library tracks transaction ownership itself:

- A new _explicit_transaction flag distinguishes transactions opened
  with begin()/atomic() from the driver's implicit one, exposed as a
  new db.in_transaction property (conn.in_transaction is always True
  in this mode)
- begin() claims the driver's implicit transaction instead of
  executing BEGIN, which the driver would reject; BEGIN/COMMIT/
  ROLLBACK passed to db.execute() are routed through begin()/commit()/
  rollback()
- Writes outside a user transaction commit the implicit transaction
  immediately, preserving the library's auto-commit contract
- Row-returning statements outside a transaction fetch eagerly and
  commit, so the implicit read transaction does not hold a shared
  lock that blocks writes from other connections
- PRAGMA and VACUUM run in temporary driver autocommit mode
  (ensure_autocommit_on() now flips conn.autocommit), since PRAGMAs
  are silently ignored and VACUUM refused inside the implicit
  transaction

A new pytest --sqlite-autocommit-false option runs the entire suite
in this mode, wired into CI alongside --sqlite-autocommit. Tests that
asserted on conn.in_transaction or wrote through db.conn without
committing now use the mode-aware library API instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFkrS2nuP8mo1jmT594VCd
2026-07-09 22:06:46 +00:00
..
_static/js Removed trogon feature in favor of sqlite-util-tui 2025-01-10 17:15:02 -08:00
_templates Reformatted CLI examples in docs 2023-05-21 13:57:22 -07:00
.gitignore Initial project layout + database table creation tools 2018-07-28 06:46:17 -07:00
changelog.rst Support sqlite3.connect(autocommit=False) connections too 2026-07-09 22:06:46 +00:00
cli-reference.rst drop-index command and table.drop_index(index_name) 2026-07-07 21:00:43 -07:00
cli.rst drop-index command and table.drop_index(index_name) 2026-07-07 21:00:43 -07:00
codespell-ignore-words.txt Run codespell against source code too, refs #307 2021-08-03 10:06:08 -07:00
conf.py Fix for frustrating error in 'just docs' locally 2026-07-05 23:19:40 -07:00
contributing.rst dependency-groups.dev and uv in docs (#691) 2025-12-11 15:32:00 -08:00
index.rst Add upgrading guide to the documentation 2026-07-04 19:21:34 +00:00
installation.rst Remove sqlean.py support (#772) 2026-07-05 16:00:52 -07:00
Makefile Add reference page to documentation using Sphinx autodoc (#312) 2021-08-10 16:09:28 -07:00
migrations.rst Corrected imports in migrations docs 2026-07-07 11:51:53 -07:00
plugins.rst Unwrap hard-wrapped prose in the documentation 2026-07-04 23:33:48 +00:00
python-api.rst Support sqlite3.connect(autocommit=False) connections too 2026-07-09 22:06:46 +00:00
reference.rst Documentation for compound foreign key support, refs #594 2026-07-05 14:45:08 -07:00
tutorial.ipynb Use double quotes not braces for tables and columns (#678) 2025-11-23 20:43:26 -08:00
upgrading.rst Support sqlite3.connect(autocommit=False) connections too 2026-07-09 22:06:46 +00:00