Classes
Type Aliases
PageSegment
Ƭ PageSegment:Object
One read of a page: where it starts and how many objects it asks for, and
where it ends once pinned (pinSegments).
A page is one or more segments, each starting at the previous one’s cursor.
Type declaration
FilledPage
Ƭ FilledPage:AppPage & { segments: number ; filling: boolean ; stalled: boolean }
A page joined from its segments, as one AppPage.
StepDriverState
Ƭ StepDriverState:Object
Cursor-fenced execution driven by reactive inputs. Close pauses between steps.
Type declaration
Variables
FILL_SEGMENTS
•Const FILL_SEGMENTS: 8
Segments a page reads on its own before it asks to continue: a highly
selective filter over a large checked collection stops here and says so,
rather than issuing reads without end.
Functions
validateBranchResponse
▸ validateBranchResponse(endpoint, value, request): void
Parameters
Returns
void
joinSegments
▸ joinSegments(results, pageSize): AppPage & { rows: number } | undefined
The page the segments read so far make, or undefined until each has
answered.
Segments partition the range: each starts at its predecessor’s cursor, and
a reactive page keeps its end position after its first answer, so their
concatenation neither repeats nor skips an object at the client’s one
snapshot. The page ends as its last segment does, except that a page that
filled (pageSize objects or more) ends as page.
Parameters
Returns
AppPage & { rows: number } | undefined
nextSegment
▸ nextSegment(segments, results, pageSize, limit): PageSegment | null
The segment to read next for a page of pageSize, or null: only after the
last segment has answered, only while it ended at its read bound
(budget) with the page still short, and only within limit segments. It
asks for exactly the objects still missing.
Parameters
Returns
PageSegment | null
pinSegments
▸ pinSegments(segments, results): PageSegment[] | null
The segments with each answered segment listed in a spatial index’s order
(order: "index") pinned to end where its first answer ended, or null
when none needs pinning. A native page keeps its end on re-runs by itself;
an index-order page keeps it only when asked with its end cursor, so an
object written before its end never shifts it into the next segment.
Parameters
Returns
PageSegment[] | null
isStalled
▸ isStalled(segments, results, pageSize, limit): boolean
Whether the joined page stopped continuing on its own while short.
Parameters
Returns
boolean