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§
- Client
Store - Cursor
Row - Event
Record - Fault
Query - Ghost
Sweep Row - One settlement the server’s ghost sweep recorded in its own audit table.
- Intent
Row - Ledger
Row - RoleRow
- Server
Fault Row - Server
Ledger - Session
Binding Row - One
session_tasksrow: which delivery a session serves, and whether it still serves it. - Session
Write - One mirror row as a writer hands it over, and as a reader gets it back.
- TaskRow
- One task record, as the
tasktable 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_stateis the whole answer to “how did this end”: no session row carries it, andNonefromClientStore::taskmeans this role never opened the task, not that it is in flight.
Enums§
- Append
- Ledger
State - Ledger row state for one envelope (decision D10, D11).
- Store
Error
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