tyneq / CompileOptions
Interface: CompileOptions
Defined in: src/queryplan/compiler/QueryPlanCompiler.ts:12
Options for QueryPlanCompiler.compile and QueryPlanCompiler.compileRaw.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
source? | readonly | Iterable<unknown, any, any> | Replaces the source data when compiling. When provided, the compiler passes this value as the first argument to the source operator instead of the value stored in the plan node's args. This lets you reuse the same pipeline structure (operators, predicates, projections) against a different data set without rebuilding the sequence. Example const plan = Tyneq.from([1, 2, 3]).where(x => x > 1).select(x => x * 2)[tyneqQueryNode]!; const compiler = new QueryPlanCompiler(); compiler.compile(plan).toArray(); // -> [4, 6] compiler.compile(plan, { source: [10, 20, 30] }).toArray(); // -> [40, 60] Remarks Only affects source nodes (the root of the plan). All operator nodes are replayed exactly as recorded. If the plan has no source node (e.g. it starts from an operator node with a missing parent), this option has no effect. | src/queryplan/compiler/QueryPlanCompiler.ts:35 |