Rindle docs and package mapSkip to main content

Module change

Module change 

Source
Expand description

The dataflow value types: Node, the lazy relationship stream, Change, SourceChange, Constraint, FetchRequest, and the overlay snapshots.

Primitive #6: the 'yield' sentinel is dropped. In the JS engine every stream element is Node | 'yield' (a cooperative-responsiveness hack for the single JS event loop, stripped before the view by skipYields). The port drops it entirely: NodeStream’s item is just Node. Responsiveness, if ever needed, is an explicit budget threaded in — never unioned into the item.

Structs§

FetchRequest
What Input::fetch receives. multi_constraints (from FlippedJoin) is a disjunction-of-conjunctions IN-batch; empty ⇒ the single-constraint path.
Node
A row plus its lazily-produced relationships.
OutEdge
A downstream edge: who to push to, and on which of their input ports.
Relationship
Start

Enums§

Basis
Change
A downstream incremental change. Mirrors zql/src/ivm/change.ts but as a real tagged union (the JS uses a tuple where slot 2 aliases OLD_NODE / CHILD_DATA — the enum removes that aliasing footgun).
ChangeType
The kind of a Change, independent of its payload. Used by the OR fan-in collapse (push_accumulated_changes, 06 §3.5): the dedup decision keys off the fan-out’s original change type (was it an Add/Remove/Edit/ Child that entered the fan), so we need to name the type without owning a Change. Mirrors the JS change.type string discriminant.
Port
Marker for which join port a change arrived on (replaces JS’s two distinct setOutput({push: ...}) closures).
SourceChange
A change applied at the source (before fan-out to connections). Mirrors the SourceChange tagged tuple (source.ts): Add/Remove carry one row, Edit carries the new row and the old row it replaces.

Functions§

constraint_matches
True if row satisfies every (col, value) pair. Uses values_equal (null ≠ null — SQL/join semantics), matching the JS constraintMatchesRow (constraint.ts:17). Not compare_values (which treats null == null): a constraint value of null can never match (and joins never produce one — build_join_constraint returns None on null, §3.8).

Type Aliases§

Constraint
(column, value) equality constraints, ANDed. Index-addressed. Owned values (Vec<(ColId, OwnedValue)>) because a constraint outlives the fetch that produced its source row (foundations §3.3). Insertion order is significant: it determines the index sort the source builds to seek the constraint (mirrors the JS Object.keys(constraint) order — memory-source.ts:289).
MultiConstraint
A disjunction of Constraints — a row matches the multiConstraint iff it matches some entry. FlippedJoin lowers an IN-batch to these (operator.ts MultiConstraint). The memory leaf drives a sub-fetch per entry and k-way-merges (#fetchMulti); the SQLite leaf lowers to native IN.
RowFlow
A lazy stream of owned rows — the currency of the source read pipeline.