Expand description
DDL-free connection opening under named policy profiles.
Every profile maps to a policy that already existed somewhere in the workspace; the profiles name those policies instead of erasing them:
ConnectionProfile::Primary: the production writer policy (WAL +synchronous=FULL+ the one shared busy timeout). Withcreate: falseit is the no-create writer variant previously hand-rolled for identity databases. WAL establishment is verified against the mode SQLite reports back, and the journal-mode conversion only runs after theOpenOptions::schema_preflightledger check, so an old binary refuses a future file before mutating it.ConnectionProfile::ReadOnly: passive observation (SQLITE_OPEN_READ_ONLY | URI | NO_MUTEX, shared busy timeout, no pragma mutation — a reader must not convert a foreign file’s journal mode). The precise no-write guarantee is typed asWriteContact::ReadOnlyWalSidecars: logical content is never altered, but WAL sidecars may be required to read a WAL database.ConnectionProfile::Maintenance: fail-fast offline access (zero busy timeout, never creates, no pragma mutation). This is the profile for migration/diagnostic work performed by the party holding the exclusive maintenance fence; it deliberately does not take a shared fence guard.
Opening a connection never runs schema DDL. Stores apply their
crate::ledger domain after opening.
Structs§
- Open
Options - Per-open overrides. The zero-value default defers everything to the profile.
Enums§
- Connection
Profile - Named connection policy profiles.
- Write
Contact - The strongest filesystem no-write guarantee an open under a profile can make. Diagnostic surfaces (doctor) report from this instead of promising a zero-touch open that SQLite cannot deliver.
Constants§
- SHARED_
BUSY_ TIMEOUT - The one shared busy timeout for production profiles.
Functions§
- begin_
immediate - Begin an IMMEDIATE transaction. Bounded waiting for the write lock is the connection busy handler’s job (set at open per profile), not a caller retry loop.
- open
- Open
pathunderprofilewith the profile’s defaults. - open_
with - Open
pathunderprofilewith per-open overrides.