pub struct FileQuerySnapshotReader { /* private fields */ }Expand description
A long-lived read-only SQLite sidecar for latency-critical native views. Network rounds stay serialized on the mutable core owner, while atomic query snapshots use this independent connection and therefore never queue behind HTTP/WebSocket latency.
Implementations§
Source§impl FileQuerySnapshotReader
impl FileQuerySnapshotReader
pub fn new(path: impl Into<String>) -> Self
Sourcepub fn snapshot_read(
&mut self,
request: &SnapshotReadRequest<'_>,
) -> Result<SnapshotRead, QueryReadFailure>
pub fn snapshot_read( &mut self, request: &SnapshotReadRequest<'_>, ) -> Result<SnapshotRead, QueryReadFailure>
One atomic read over the shared primitive: every statement, coverage,
catch-up, and delivery under one SAVEPOINT and one revision.
Sourcepub fn local_revision(&mut self) -> Result<String, QueryReadFailure>
pub fn local_revision(&mut self) -> Result<String, QueryReadFailure>
The current durable local revision. A host can skip a read when it is unchanged; a corrupt or unreadable marker fails typed.
Sourcepub fn subscription_catchup(
&mut self,
id: &str,
) -> Result<SubscriptionCatchup, QueryReadFailure>
pub fn subscription_catchup( &mut self, id: &str, ) -> Result<SubscriptionCatchup, QueryReadFailure>
One subscription’s persisted catch-up state (see the §7.5 contract).
Sourcepub fn commit_delivery(
&mut self,
id: &str,
) -> Result<CommitDelivery, QueryReadFailure>
pub fn commit_delivery( &mut self, id: &str, ) -> Result<CommitDelivery, QueryReadFailure>
One client commit’s delivery status: pending, its retained outcome, or an explicit unknown (never held, or pruned by retention).
Sourcepub fn query_snapshot(
&mut self,
sql: &str,
params: &[Value],
coverage: &[WindowCoverage],
) -> Result<QuerySnapshot, QueryReadFailure>
pub fn query_snapshot( &mut self, sql: &str, params: &[Value], coverage: &[WindowCoverage], ) -> Result<QuerySnapshot, QueryReadFailure>
Hosts report an owned failure, and the first success after it, to the
owning core through SyncClient::record_query_read (§7.6).