Skip to main content

Module cursor_context

Module cursor_context 

Source
Expand description

Session-scoped forward-only cursors over streaming results.

A cursor holds one StreamingQueryResult execution handle plus a small row buffer. Fetching pulls chunks until the requested page is full (or the execution is exhausted); the frontend never buffers the full result. Explicit close drops the handle promptly. Query deregistration runs through the handle’s drop callback, the single path shared with streaming queries, which also covers idle-timeout sweeps, fetch-failure removals, and session drops.

Structs§

CursorContext
Session-owned cursor registry, keyed by server-assigned cursor id.
CursorPage
One fetched page: column names plus row-major values.
CursorState
One open cursor: an execution handle plus buffered rows.

Constants§

CURSOR_IDLE_TIMEOUT
Idle cursors are reclaimed on the next cursor operation.
MAX_CURSORS_PER_SESSION
Cap on concurrently open cursors per session.
MAX_CURSOR_PAGE_SIZE
Largest page a single fetch returns.
MIN_CURSOR_PAGE_SIZE
Smallest page a single fetch returns.