Skip to main content

Crate onlyne_store

Crate onlyne_store 

Source
Expand description

SQLite persistence for Onlyne.

§Schema versus plan

Every timestamp column in both databases is written by this crate’s conversion helpers, unix_to_rfc3339 and rfc3339, and no caller supplies a raw stored value: the kernel’s i64 seconds (SessionWrite, ServerFaultRow, VersionedSession, FaultRecord) convert at the write, and the one text input, RoleRow::updated_at from the server’s upsert_role call sites, is re-encoded through the same helpers before the insert. The server ledger.body_json column is nullable because retention pruning clears acknowledged bodies after the cutoff. Extra indexes support ledger pulls, fault deduplication, due-intent ordering, and event-cursor scans. schema_marker records the v1.0.0 schema and protocol gate for each database.

Re-exports§

pub use session::FaultRecord;
pub use session::SessionLedger;
pub use session::SessionRecord;
pub use session::VersionedSession;

Modules§

session
The session mirror’s row shape and the port its writers go through.

Structs§

ClientStore
CursorRow
EventRecord
FaultQuery
GhostSweepRow
One settlement the server’s ghost sweep recorded in its own audit table.
IntentRow
LedgerRow
RoleRow
ServerFaultRow
ServerLedger
SessionBindingRow
One session_tasks row: which delivery a session serves, and whether it still serves it.
SessionWrite
One mirror row as a writer hands it over, and as a reader gets it back.
TaskRow
One task record, as the task table holds it. The chain columns come from the delivery envelope’s causality, so a task says who caused it and how deep it sits without its owner being asked. task_state is the whole answer to “how did this end”: no session row carries it, and None from ClientStore::task means this role never opened the task, not that it is in flight.

Enums§

Append
LedgerState
Ledger row state for one envelope (decision D10, D11).
StoreError

Constants§

CLIENT_DDL
INTENT_FLUSH_BATCH_SIZE
Rows one flush pass takes from the intent queue.
SERVER_DDL

Functions§

rfc3339
One moment as RFC 3339 text.
transition_allowed

Type Aliases§

ServerSessionRow
StoreResult