Expand description
Reader (per-connection) + Cursor (per-query) public API.
Each Reader allows at most one in-flight cursor at a time
(runtime-checked, not type-encoded). Cursor::cancel() issues a
CANCEL frame and drains until the terminal frame, leaving the
Reader reusable. Dropping a cursor before it has reached a
terminal closes the underlying WebSocket: subsequent operations
on the Reader fail at the transport layer (open a fresh Reader to
recover). Call Cursor::cancel() (or read until next_batch()
returns None) before drop if you want to keep the existing
connection alive.
The sync-reader-qwp-ws feature gate is applied at the module
declaration in egress/mod.rs; an inner #![cfg(...)] here would
duplicate that gate (clippy::duplicated_attributes) without
changing what’s compiled.
Structs§
- Batch
View - Borrowed view over the most recently decoded batch.
- Cursor
- Streaming cursor over
RESULT_BATCHframes. - Failover
Progress Event - Notification delivered to the
ReaderQuery::on_failover_progresscallback at each transition of a mid-query failover lifecycle. SeeFailoverPhasefor the per-variant semantics. - Failover
Reset Event - Notification delivered to the
ReaderQuery::on_failover_resetcallback right before replayed batches start arriving on a new connection. Mirrors the JavaonFailoverReset(newNode)contract: the user-side handler is responsible for discarding any rows it had accumulated from the previous (now-dead) connection, since the query restarts frombatch_seq=0against the new endpoint. - Reader
- Per-connection reader. Owns the WebSocket transport and the connection-scoped symbol dictionary.
- Reader
Query - Borrows a
Readerexclusively while the query is being constructed and (eventually) the cursor is live. - Reader
Stats - Diagnostic counters shared between a
Readerand its FFI handle.
Enums§
- Failover
Phase - Phase discriminant on
FailoverProgressEvent. - Terminal
- Reason the stream ended. Surfaced via
Cursor::terminaloncenext_batchreturnsNone.