An app’s existing one-row-per-version table, read once to adopt its applied version (see
MigrateOptions::import_legacy_versions). Only the highest version_column value is used.
Options for a ReadPool. The default (ReadPoolOptions::new) matches
DbOptions::open_read_pool: read-write file handles, with query_only set and verified on
every reader. Build with the with_* methods; the fields are private.
How the journal mode is chosen. WAL needs working shared-memory locking, which network
filesystems often lack and which SQLite will silently downgrade; the default therefore
verifies the mode that took effect and falls back to a rollback journal.
Where migration versions are stored. Table storage uses Blueprint-compatible
key TEXT PRIMARY KEY, value TEXT NOT NULL rows, leaving user_version untouched.
Environment kill-switch (wal | delete | truncate) for a misclassified mount in the
field. An app’s own variable (DbOptions::journal_env) is checked first.
Idempotent ALTER TABLE .. ADD COLUMN (SQLite has no IF NOT EXISTS for columns).
table, column and decl must be literals from the app, never user input.
Classify an open-time failure that is neither corruption nor an unrelated error. None means
“not in this family”: the caller returns the original error. path is the database file; it
is probed (opened for reading) only to tell a permission failure from other SQLITE_CANTOPEN
causes, because SQLite reports EACCES as SQLITE_CANTOPEN.
True if table has column, including STORED/VIRTUAL generated columns (table_xinfo;
table_info omits them, which made MailRight re-run an ALTER on every open).
quarantine_database with full QuarantineOptions. The same refusal rules apply to the
other stamps: an existing destination is an error, and sidecar failures are errors.
quarantine_database with an explicit suffix format and sidecar policy. Refuses to overwrite
an existing file at the destination. Sidecar failures are errors, not ignored: a -wal left
at the original path would be replayed into the replacement database.
Validate backup_path before copying it into an already-open destination.
Uses the SQLite backup API, including committed WAL contents. options supplies
the backup’s key and timeout; its path is ignored. Invalid backups never touch
destination. The destination must be writable and outside a transaction.
Revert to target by replaying each step’s down, highest first, one transaction per step.
Refuses before touching anything unless every step in the range has a down.