Expand description
SQLite pragma helpers applied on every connection. SQLite PRAGMA helpers applied at connection open and on each transaction.
Functionsยง
- apply_
connection_ pragmas - Applies per-connection PRAGMAs: synchronous, foreign keys, busy timeout, cache, mmap, WAL.
- apply_
init_ pragmas - Applies one-time PRAGMAs on a freshly opened connection (e.g.
auto_vacuum). - ensure_
wal_ mode - Re-asserts
PRAGMA journal_mode = WALafter operations that may revert it (notably refinery-driven migrations, which can open internal handles that reset the journal mode in some scenarios). Idempotent and cheap; emitstracing::warn!if WAL fails to engage so degraded behaviour is observable.