Skip to main content

Crate dpm_store

Crate dpm_store 

Source
Expand description

SQLite snapshots and append-only operations committed as one validated transaction.

The sqlite feature (default) builds the store itself. Without it the crate provides only the records and errors the store returns, so an application layer built for a target without SQLite keeps one result and error vocabulary.

Structs§

HistoryEntry
One immutable operation addressed by its local append order.
HistoryPage
A bounded operation page read with a consistent authoritative revision.
IntegrityReport
Outcome of a full read-only verification of one store.
RecordedOperation
A committed operation with the workspace and writable history it was recorded in; mutation results and history entries return the same object, so a resent operation is answered with exactly what the first attempt returned.
RunBinding
The workspace and history a run store was created for.
RunStore
A connection to one run store file.
RunStoreReport
What a verified run store holds.
SqliteStore
A synchronous local database with validated snapshots and immutable operation history.
StoreLineage
The lineage row of one store file.
StoreRevision
The authoritative revision of a store and the lineage it belongs to, read without decoding the plan, so clients can poll it for changes.
Written
The outcome of a write, and whether it only answered a repeat of an earlier one.

Enums§

LineageError
Why a store’s lineage does not permit a read or write.
RunStoreError
A run store operation that was refused or could not be completed.
StoreError
A persistence operation that could not be completed safely.
StoredRecord
Which stored record a corruption report refers to.

Constants§

RUN_ACTIVITY_LIMIT
Activity records kept by default; older ones are pruned and reported as a gap.
RUN_STORE_VERSION
Layout version of the run store this binary reads and writes.
SCHEMA_VERSION
Database layout version this binary reads and writes.

Functions§

restore_store_blocking
Verify a backup, copy it into a new writable store file in WAL mode with a new lineage, and verify the result; the source keeps its own lineage.
store_revision_blocking
Check the version and layout of an existing file through a read-only connection first.
verify_store_blocking
Check pages, exact layout, snapshot and history of a store in one read transaction, then replay the history from the genesis plan and compare it with the snapshot, without writing to the store or creating any file next to it. A divergence is reported, never repaired.