pub struct OpenOptions {
pub busy_timeout: Option<Duration>,
pub schema_preflight: &'static [&'static SchemaDomain],
}Expand description
Per-open overrides. The zero-value default defers everything to the profile.
Fields§
§busy_timeout: Option<Duration>Override the profile’s busy timeout. A store with a deliberate
contention policy (for example a lock-arbitration sidecar that waits
30s then fails closed) names it here instead of hand-rolling an
opener. Values beyond SQLite’s int millisecond range are clamped to
i32::MAX milliseconds.
schema_preflight: &'static [&'static SchemaDomain]Schema domains checked against the file’s meerkat_schema ledger
BEFORE any mutating pragma runs. A file whose ledger records a
version newer than a listed domain supports is refused
(SqliteStoreError::SchemaFromTheFuture) with its logical content
unmodified — sidecars may still be touched, because reading the
ledger of a WAL-mode file over a read-write connection contacts its
-wal/-shm files (see WriteContact::ReadOnlyWalSidecars).
Without the preflight, a Primary open by an old binary would convert
a future database’s journal mode before the ledger refusal in
crate::ledger::apply_domain_migrations ever fires. The check runs
unconditionally after every open — never gated on a pre-open
filesystem probe, which a concurrent creator could race — and passes
trivially on files with no ledger table (fresh creates, pre-ledger
files). Empty (the default) skips the preflight.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more