Skip to main content

Crate harn_sqlite

Crate harn_sqlite 

Source
Expand description

Shared initialization for Harn-owned SQLite databases.

File-backed databases use a persistent sidecar advisory lock while changing journal mode and committing a versioned schema marker. Once both WAL and the exact marker are visible, later opens avoid the lock. Transient databases share the schema transaction contract without a filesystem lock or WAL.

Structs§

SchemaVersion
Stable identity for one schema stored in a Harn-owned SQLite database.

Enums§

InitializationError
Failure to configure or initialize a Harn-owned SQLite database.
SqliteContention
Lock-contention reason reported by SQLite.

Functions§

initialize_file
Initialize a file-backed Harn database exactly once per schema version.
initialize_transient
Initialize a transient database with the same atomic schema-marker contract.
require_file_initialized
Require an exact schema version on a file-backed connection without initializing it.
sqlite_contention
Classify a SQLite error without relying on rendered error text.