Skip to main content

Crate pulsify_sqlite

Crate pulsify_sqlite 

Source
Expand description

Durable Pulsify documents in SQLite, without materializing them.

The database file uses the schema and append semantics of the TypeScript SqlitePatchStore, so either implementation can open a file written by the other.

Structs§

AppendResult
Error
A failure carrying a Pulsify protocol error code, such as CONFLICT.
PatchRow
RelayOutput
The frames produced by one incoming frame.
SqliteStore
Rows keyed by (doc_id, sid, time_start), whose operations are immutable. Rows stay pending until their actor prefix is contiguous and their dependencies are stored. A field without history keeps each actor’s newest write to it in pulsify_values, overwritten in place: the sequence numbers of the writes it replaces hold nothing, and spans are computed when rows are read.

Constants§

PACKED_MIGRATION
Byte-for-byte SQLITE_PACKED_MIGRATION: added to a table created before packed segments.
SCHEMA
Byte-for-byte SQLITE_PATCH_SCHEMA from pulsify-core/storage.

Traits§

PatchStore
Rows keyed by (doc_id, sid, clock), whose operations are immutable. Rows stay pending until their actor prefix is contiguous and their dependencies are stored.
Sink
Delivers frames to one session. Returns false once the peer is gone.

Functions§

chunk_rows
Mirror of chunkRows: about 2 MiB, 4096 rows and the relay node budget per page.
relay_frame
Serve one protocol frame from the store, like relayStoreMessage. Rows are committed before the acknowledgement. A frame which cannot be decoded is an Err; every other failure becomes an error frame for the peer.
validate_doc_id

Type Aliases§

Hub
One writer and its sessions: each session is pinned to a document, and rows stored through one session are forwarded to the document’s other sessions.
Result
VersionVector