@bjornpagen/bumbledb 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/COOKBOOK.md +1394 -0
  2. package/README.md +4 -0
  3. package/dist/closed.d.ts +60 -37
  4. package/dist/closed.d.ts.map +1 -1
  5. package/dist/closed.js +159 -40
  6. package/dist/closed.js.map +1 -1
  7. package/dist/count.d.ts +64 -17
  8. package/dist/count.d.ts.map +1 -1
  9. package/dist/count.js +37 -14
  10. package/dist/count.js.map +1 -1
  11. package/dist/db.d.ts +15 -7
  12. package/dist/db.d.ts.map +1 -1
  13. package/dist/db.js +13 -5
  14. package/dist/db.js.map +1 -1
  15. package/dist/exhume.d.ts +12 -11
  16. package/dist/exhume.d.ts.map +1 -1
  17. package/dist/exhume.js +7 -6
  18. package/dist/exhume.js.map +1 -1
  19. package/dist/face.d.ts +79 -19
  20. package/dist/face.d.ts.map +1 -1
  21. package/dist/face.js +14 -15
  22. package/dist/face.js.map +1 -1
  23. package/dist/fields.d.ts +158 -129
  24. package/dist/fields.d.ts.map +1 -1
  25. package/dist/fields.js +80 -81
  26. package/dist/fields.js.map +1 -1
  27. package/dist/index.d.ts +21 -21
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +13 -12
  30. package/dist/index.js.map +1 -1
  31. package/dist/lower.d.ts +6 -3
  32. package/dist/lower.d.ts.map +1 -1
  33. package/dist/lower.js +48 -17
  34. package/dist/lower.js.map +1 -1
  35. package/dist/marshal.d.ts +36 -21
  36. package/dist/marshal.d.ts.map +1 -1
  37. package/dist/marshal.js +41 -25
  38. package/dist/marshal.js.map +1 -1
  39. package/dist/native.js +2 -2
  40. package/dist/query/atom.d.ts +332 -174
  41. package/dist/query/atom.d.ts.map +1 -1
  42. package/dist/query/atom.js +72 -172
  43. package/dist/query/atom.js.map +1 -1
  44. package/dist/query/lower.d.ts +295 -107
  45. package/dist/query/lower.d.ts.map +1 -1
  46. package/dist/query/lower.js +860 -388
  47. package/dist/query/lower.js.map +1 -1
  48. package/dist/query/predicate.d.ts +69 -88
  49. package/dist/query/predicate.d.ts.map +1 -1
  50. package/dist/query/predicate.js +118 -72
  51. package/dist/query/predicate.js.map +1 -1
  52. package/dist/query/run.d.ts +19 -16
  53. package/dist/query/run.d.ts.map +1 -1
  54. package/dist/query/run.js +31 -24
  55. package/dist/query/run.js.map +1 -1
  56. package/dist/query/scope.d.ts +139 -123
  57. package/dist/query/scope.d.ts.map +1 -1
  58. package/dist/query/scope.js +71 -115
  59. package/dist/query/scope.js.map +1 -1
  60. package/dist/query/select.d.ts +102 -80
  61. package/dist/query/select.d.ts.map +1 -1
  62. package/dist/query/select.js +39 -34
  63. package/dist/query/select.js.map +1 -1
  64. package/dist/relation.d.ts +33 -36
  65. package/dist/relation.d.ts.map +1 -1
  66. package/dist/relation.js +15 -16
  67. package/dist/relation.js.map +1 -1
  68. package/dist/schema.d.ts.map +1 -1
  69. package/dist/schema.js +19 -8
  70. package/dist/schema.js.map +1 -1
  71. package/dist/spec.d.ts +6 -5
  72. package/dist/spec.d.ts.map +1 -1
  73. package/dist/spec.js.map +1 -1
  74. package/dist/statements.d.ts +56 -31
  75. package/dist/statements.d.ts.map +1 -1
  76. package/dist/statements.js +38 -13
  77. package/dist/statements.js.map +1 -1
  78. package/package.json +4 -3
  79. package/src/closed.ts +271 -93
  80. package/src/count.ts +112 -18
  81. package/src/db.ts +22 -12
  82. package/src/exhume.ts +12 -11
  83. package/src/face.ts +114 -22
  84. package/src/fields.ts +261 -217
  85. package/src/index.ts +50 -59
  86. package/src/lower.ts +62 -20
  87. package/src/marshal.ts +48 -30
  88. package/src/native.ts +2 -2
  89. package/src/query/atom.ts +480 -376
  90. package/src/query/lower.ts +1341 -542
  91. package/src/query/predicate.ts +198 -161
  92. package/src/query/run.ts +35 -25
  93. package/src/query/scope.ts +188 -218
  94. package/src/query/select.ts +168 -93
  95. package/src/relation.ts +38 -44
  96. package/src/schema.ts +22 -12
  97. package/src/spec.ts +6 -5
  98. package/src/statements.ts +69 -26
  99. package/dist/brand.d.ts +0 -59
  100. package/dist/brand.d.ts.map +0 -1
  101. package/dist/brand.js +0 -47
  102. package/dist/brand.js.map +0 -1
  103. package/src/brand.ts +0 -82
@@ -1,145 +1,333 @@
1
1
  /**
2
- * `query()` and the IR lowering (PRD-08). A query is built inside a scope
3
- * callback (variable identity is lexical and typed) and is an INERT value:
4
- * `Query<Rels, Row, Params>` with `Row` inferred from `select` and
5
- * `Params` from every parameter the returned rules (and the predicates
6
- * they reach) use. Lowering is a pure function of the query value down to
7
- * the bridge's `ProgramIr` (`bumbledb/crates/bumbledb/src/ir.rs`, the
8
- * bijection target): relations and predicates by declaration ordinal (the
9
- * declaration-order-is-ids law the engine's manifest pins), variables by
10
- * dense per-rule first-occurrence ids (rule-scoped, exactly as the IR
11
- * scopes them), params by scope declaration order. Lowering is STABLE
12
- * the same query value lowers to deeply-equal IR every time, and two
13
- * identically-written queries lower identically (prepared-query caching
14
- * upstream keys on this). Construction validates negation safety (typed,
15
- * naming the variable earlier and warmer than the engine's refusal);
16
- * everything else (strata, types, aggregates rosters, rule caps) is the
17
- * ENGINE's judge, surfacing its typed errors at prepare. No invented
18
- * limits: rule counts and predicate counts are never pre-checked here.
2
+ * `query()` and the IR lowering, STRUCTURAL edition. A query is built
3
+ * kysely-shaped — `query(S).rule(r => r.match(Rel, { f: r.var("x") })
4
+ * .where(r.eq(r.var("x"), r.param("p"))).select("x"))` and is an INERT
5
+ * value: `Query<Rels, Row, Params>` with `Row` inferred from each rule's
6
+ * `.select` and `Params` inferred to be EXACTLY the params the rules use
7
+ * (params are typed BY USE; a param value no rule uses never registers, so
8
+ * every query executes under its own inferred type). Vars are string
9
+ * names, domain-typed by the field they first bind and joined by reuse —
10
+ * the rule builder's environment carries name field descriptor through
11
+ * the chain, checked structurally at every reuse (`JoinOk`), so the old
12
+ * brand-equal join is now the domain-equal compile error. Lowering is a
13
+ * pure function of the query value down to the bridge's `ProgramIr`
14
+ * (`bumbledb/crates/bumbledb/src/ir.rs`, the bijection target): relations
15
+ * by declaration ordinal (the declaration-order-is-ids law the engine's
16
+ * manifest pins), variables by dense per-rule first-occurrence ids
17
+ * (rule-scoped, exactly as the IR scopes them), params by first-use order
18
+ * across the program walk. Lowering is STABLE the same query value
19
+ * lowers to deeply-equal IR every time, and two identically-written
20
+ * queries lower identically. Construction validates negation safety and
21
+ * name-boundness (typed, naming the variable — earlier and warmer than
22
+ * the engine's refusal); everything else (strata, types, aggregate
23
+ * rosters, rule caps) is the ENGINE's judge, surfacing its typed errors
24
+ * at prepare. No invented limits: rule and predicate counts are never
25
+ * pre-checked here.
19
26
  */
20
- import { phantom } from "#brand.ts";
21
- import { type FieldData } from "#fields.ts";
27
+ import type { AnyField } from "#fields.ts";
22
28
  import type { ProgramIr, TaggedValue } from "#native.ts";
23
- import type { AnyBodyItem } from "#query/atom.ts";
24
- import type { ColumnValues, Predicate, PredicateColumnsInput, PredicateParams, PredicateRuleInput, PredicateSelf } from "#query/predicate.ts";
25
- import type { AnyVar, ItemParams, MaskParam, Param, ParamSet, ParamsRecord, ParamsShape, QueryRegistry, Var } from "#query/scope.ts";
26
- import type { AggregateData, RowOf, SelectShape } from "#query/select.ts";
27
- import type { FieldRef } from "#relation.ts";
28
- import type { Schema, SchemaRelations } from "#schema.ts";
29
+ import type { AnyCond, BindEnv, BindParamsShape, CheckBindings, CheckCond, CmpKind, CondParamsShape, MatchShape, RecData, RuleData, SelectColumn } from "#query/atom.ts";
30
+ import { allen, and, covers, eq, ge, gt, le, lt, ne, not, or, pointIn } from "#query/atom.ts";
31
+ import type { EnvShape, Flatten, InferredOf, JoinOk, ParamEntry, ParamsRecord, Var } from "#query/scope.ts";
32
+ import { inferred, makeDuration, makeMaskParam, makeParam, makeSetParam, makeVar } from "#query/scope.ts";
33
+ import type { CheckNameSelect, CheckSelect, RowOfNameSelect, RowOfSelect, SelectEntry } from "#query/select.ts";
34
+ import { argMax, argMin, count, countDistinct, max, min, pack, sum } from "#query/select.ts";
35
+ import type { AnyRelation, FieldsShape, RelationFields } from "#relation.ts";
36
+ import type { AnySchema, Schema, SchemaRelations } from "#schema.ts";
37
+ /** The ordinary (matchable) relations of a schema's record — closed relations lack the relation shape entirely. */
38
+ type QueryRelation<Rels extends SchemaRelations> = Extract<Rels[keyof Rels], AnyRelation>;
39
+ /** The environment after one bindings record: the incoming env plus every var the record binds. */
40
+ type EnvOfMatch<Env extends EnvShape, F extends FieldsShape, B> = Flatten<Env & BindEnv<F, B>> extends infer E extends EnvShape ? E : never;
41
+ /** Reads an inferred-params carrier off a rec reference or rule value. */
42
+ type ParamsOf<T> = InferredOf<T> extends {
43
+ readonly params: infer P extends ParamsRecord;
44
+ } ? P : Record<never, never>;
45
+ /** Reads an inferred-row carrier off a rule value or query. */
46
+ type RowOf<T> = InferredOf<T> extends {
47
+ readonly row: infer R;
48
+ } ? R : never;
29
49
  /**
30
- * The scope value the `query()` build callback receives: variable and
31
- * parameter declaration plus predicate declaration (engine recursion).
50
+ * A recursive predicate's HEAD signature as field descriptors, position
51
+ * for position carried on the rec reference so an `idb` join can be
52
+ * judged against it; `undefined` on values that carry no head (a plain
53
+ * query rule, or an unthreaded rec handle before its first rule).
32
54
  */
33
- interface Scope<Rels extends SchemaRelations> {
34
- /**
35
- * Declares one query variable, typed by the field it is declared from
36
- * usable in ANY atom position whose field carries the same brand
37
- * (the nominal join discipline). Two calls are two variables.
38
- */
39
- var<V>(field: FieldRef<keyof Rels & string, string, V>): Var<V>;
40
- /**
41
- * Declares one scalar parameter under a mandatory name literal — the
42
- * key of the typed params object `execute` takes.
43
- */
44
- param<const Name extends string, V>(name: Name, field: FieldRef<keyof Rels & string, string, V>): Param<Name, V>;
45
- /**
46
- * Declares one set parameter (the IR's `ParamSet`): bound at execution
47
- * to a readonly array; a binding position matches on set membership.
48
- */
49
- paramSet<const Name extends string, V>(name: Name, field: FieldRef<keyof Rels & string, string, V>): ParamSet<Name, V>;
50
- /**
51
- * Declares one Allen-mask parameter (`MaskTerm::Param`): the temporal
52
- * relation as a bind-time 13-bit mask argument.
53
- */
54
- allenParam<const Name extends string>(name: Name): MaskParam<Name>;
55
+ type HeadShape = readonly AnyField[] | undefined;
56
+ /**
57
+ * One finished rule as a plain value: the runtime data plus the inferred
58
+ * row/params carrier (and, for a RECURSIVE rule, the head's positional
59
+ * field descriptors the signature `idb` joins pair against).
60
+ * `.rule(...)` consumes it; hosts never build one by hand.
61
+ */
62
+ interface RuleValue<Row, P extends ParamsRecord, Head extends HeadShape = undefined> {
63
+ readonly rule: RuleData;
64
+ readonly [inferred]?: {
65
+ readonly row: Row;
66
+ readonly params: P;
67
+ readonly head: Head;
68
+ };
69
+ }
70
+ /** Any finished rule value. */
71
+ type AnyRuleValue = RuleValue<unknown, ParamsRecord, HeadShape>;
72
+ /** The positional head-field tuple of a recursive rule's names-only select. */
73
+ type HeadFieldsOf<Env extends EnvShape, S extends readonly string[]> = {
74
+ readonly [I in keyof S]: Env[S[I] & keyof Env];
75
+ };
76
+ /** Reads an inferred-head carrier off a rule value or rec reference. */
77
+ type HeadOf<T> = InferredOf<T> extends {
78
+ readonly head: infer H extends readonly AnyField[];
79
+ } ? H : undefined;
80
+ /**
81
+ * A recursive predicate REFERENCE — the shape `idb()` targets carry: the
82
+ * name (type-level identity: a recursive rule's own `idb` accepts only its
83
+ * own name — the self-recursion cut), the runtime data (value identity),
84
+ * the params its attached rules have used so far, and the head signature
85
+ * its FIRST rule sealed (thread the value `.rule(...)` returns into an
86
+ * `idb` and the program's `Params` type stays exact AND the idb join is
87
+ * arity- and domain-checked against the head).
88
+ */
89
+ interface RecRef<Name extends string, P extends ParamsRecord, Head extends HeadShape = HeadShape> {
90
+ readonly name: Name;
91
+ readonly data: RecData;
92
+ readonly [inferred]?: {
93
+ readonly params: P;
94
+ readonly head: Head;
95
+ };
96
+ }
97
+ /** One `idb` position's judgment: the var must be bound by a relation atom, domain-equal to the head column when the head is carried. */
98
+ type IdbVarOk<Env extends EnvShape, T, F> = T extends Var<infer N extends string> ? N extends keyof Env ? F extends AnyField ? JoinOk<Env[N], F> : true : false : false;
99
+ /**
100
+ * The validated `idb` variable tuple: every var must already be bound by a
101
+ * relation atom of the rule; and when the target carries its head
102
+ * signature (the threaded rec handle), the tuple must match the head's
103
+ * arity and every position must be domain-equal to its head column — the
104
+ * same wall `JoinOk` holds for EDB atoms. An unthreaded handle carries no
105
+ * head; its joins stay boundness-checked here and arity/domain-judged at
106
+ * prepare (the engine's law stands behind both tiers).
107
+ */
108
+ type CheckIdbVars<Env extends EnvShape, V, Head extends HeadShape = undefined> = Head extends readonly AnyField[] ? V extends readonly unknown[] ? V["length"] extends Head["length"] ? {
109
+ readonly [I in keyof V]: IdbVarOk<Env, V[I], Head[I & keyof Head]> extends true ? V[I] : never;
110
+ } : {
111
+ readonly [I in keyof V]: never;
112
+ } : never : {
113
+ readonly [I in keyof V]: IdbVarOk<Env, V[I], undefined> extends true ? V[I] : never;
114
+ };
115
+ /**
116
+ * The term/predicate/aggregate constructor vocabulary every rule builder
117
+ * carries — pure value builders, environment-free: the chain's `.where`,
118
+ * `.match`, and `.select` seams judge their output against the rule
119
+ * environment.
120
+ */
121
+ interface TermOps {
122
+ /** Declares/names one variable: typed by the field it first binds; reuse joins. */
123
+ readonly var: typeof makeVar;
124
+ /** Names one scalar parameter: typed by its use; the key of the execute params object. */
125
+ readonly param: typeof makeParam;
126
+ /** Names one ∈-set parameter (the IR's `ParamSet`): bound to a readonly array at execution. */
127
+ readonly inSet: typeof makeSetParam;
128
+ /** Names one Allen-mask parameter (`MaskTerm::Param`): a bind-time 13-bit mask number. */
129
+ readonly maskParam: typeof makeMaskParam;
130
+ /** The measure of an interval-typed variable: `|[s, e)| = e − s`, u64. */
131
+ readonly duration: typeof makeDuration;
132
+ readonly eq: typeof eq;
133
+ readonly ne: typeof ne;
134
+ readonly lt: typeof lt;
135
+ readonly le: typeof le;
136
+ readonly gt: typeof gt;
137
+ readonly ge: typeof ge;
138
+ readonly pointIn: typeof pointIn;
139
+ readonly covers: typeof covers;
140
+ readonly allen: typeof allen;
141
+ readonly and: typeof and;
142
+ readonly or: typeof or;
143
+ readonly not: typeof not;
144
+ readonly count: typeof count;
145
+ readonly countDistinct: typeof countDistinct;
146
+ readonly sum: typeof sum;
147
+ readonly min: typeof min;
148
+ readonly max: typeof max;
149
+ readonly argMax: typeof argMax;
150
+ readonly argMin: typeof argMin;
151
+ readonly pack: typeof pack;
152
+ }
153
+ /** The rule builder a `query(S).rule(...)` callback receives: the ops plus the first atom. */
154
+ interface QueryRuleScope<Rels extends SchemaRelations> extends TermOps {
155
+ /** The first EDB atom of the rule: fields bind vars, params, ∈-sets, or bare literals; absence is the wildcard (same-named vars within the record join domain-equal). */
156
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<RelationFields<R>>>(relation: R, bindings: B & CheckBindings<Record<never, never>, RelationFields<R>, B>): QueryRuleChain<Rels, EnvOfMatch<Record<never, never>, RelationFields<R>, B>, BindParamsShape<RelationFields<R>, B>>;
157
+ }
158
+ /** The chain of a plain query rule: more atoms, residual predicates, then the head. */
159
+ interface QueryRuleChain<Rels extends SchemaRelations, Env extends EnvShape, P extends ParamsRecord> {
160
+ /** One more positive EDB atom — var reuse joins, domain-equal by the environment check. */
161
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<RelationFields<R>>>(relation: R, bindings: B & CheckBindings<Env, RelationFields<R>, B>): QueryRuleChain<Rels, EnvOfMatch<Env, RelationFields<R>, B>, Flatten<P & BindParamsShape<RelationFields<R>, B>>>;
162
+ /** One residual predicate: a comparison, an `and`/`or` tree, or a negated atom (`r.not`). */
163
+ where<const C extends AnyCond>(cond: CheckCond<Env, C> & C): QueryRuleChain<Rels, Env, Flatten<P & CondParamsShape<Env, C>>>;
164
+ /** The head projection: var names, the measure, and aggregates; written order = answer column order. */
165
+ select<const S extends readonly SelectEntry[]>(...entries: CheckSelect<Env, S> & S): RuleValue<RowOfSelect<Env, S>, P>;
166
+ }
167
+ /** The rule builder an OUTPUT rule of a `program()` receives: a query rule plus finished-stratum `idb` atoms. */
168
+ interface OutputRuleScope<Rels extends SchemaRelations> extends TermOps {
169
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<RelationFields<R>>>(relation: R, bindings: B & CheckBindings<Record<never, never>, RelationFields<R>, B>): OutputRuleChain<Rels, EnvOfMatch<Record<never, never>, RelationFields<R>, B>, BindParamsShape<RelationFields<R>, B>>;
170
+ }
171
+ /** The chain of an output rule: atoms, predicates, `idb` joins over the program's recs, then the head. */
172
+ interface OutputRuleChain<Rels extends SchemaRelations, Env extends EnvShape, P extends ParamsRecord> {
173
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<RelationFields<R>>>(relation: R, bindings: B & CheckBindings<Env, RelationFields<R>, B>): OutputRuleChain<Rels, EnvOfMatch<Env, RelationFields<R>, B>, Flatten<P & BindParamsShape<RelationFields<R>, B>>>;
174
+ where<const C extends AnyCond>(cond: CheckCond<Env, C> & C): OutputRuleChain<Rels, Env, Flatten<P & CondParamsShape<Env, C>>>;
55
175
  /**
56
- * Declares one IDB predicate with a named, field-typed head; its rules
57
- * are given in the declaration through a callback receiving the
58
- * predicate's own reference (self-recursion is `self.match({...})`).
59
- * `.match` on the returned value uses it as a body atom elsewhere.
176
+ * One `idb` atom over a FINISHED stratum (any rec of this program): a
177
+ * positional join against the rec's head. An idb atom is a join
178
+ * position every variable must already be bound by a relation atom of
179
+ * the rule (the theory's own domain relation; the rec's answers are
180
+ * theory values, so the join is identity). Threading the rec value the
181
+ * last `.rule(...)` returned carries its rules' params into `Params`
182
+ * AND its head signature, so the join is arity- and domain-checked
183
+ * against the head at compile time.
60
184
  */
61
- predicate<const Cols extends PredicateColumnsInput, const Rules extends readonly PredicateRuleInput<ColumnValues<Cols>>[]>(name: string, columns: Cols, rules: (self: PredicateSelf<ColumnValues<Cols>>) => Rules): Predicate<ColumnValues<Cols>, PredicateParams<Rules>>;
185
+ idb<Target extends RecRef<string, ParamsRecord>, const V extends readonly Var<string>[]>(target: Target, ...vars: CheckIdbVars<Env, V, HeadOf<Target>> & V): OutputRuleChain<Rels, Env, Flatten<P & ParamsOf<Target>>>;
186
+ select<const S extends readonly SelectEntry[]>(...entries: CheckSelect<Env, S> & S): RuleValue<RowOfSelect<Env, S>, P>;
187
+ }
188
+ /** The rule builder a RECURSIVE rule (`rec.rule(...)`) receives. */
189
+ interface RecRuleScope<Rels extends SchemaRelations, Self extends string> extends TermOps {
190
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<RelationFields<R>>>(relation: R, bindings: B & CheckBindings<Record<never, never>, RelationFields<R>, B>): RecRuleChain<Rels, Self, EnvOfMatch<Record<never, never>, RelationFields<R>, B>, BindParamsShape<RelationFields<R>, B>>;
62
191
  }
63
192
  /**
64
- * What the build callback returns: `rules` is an array of conjunctions
65
- * (multiple rules = set union answers are SETS, no order/limit exists;
66
- * the host sorts); `select` is the head record non-aggregate entries are
67
- * the implicit group key.
193
+ * The chain of a recursive rule. Its `idb` accepts ONLY the rec itself —
194
+ * the self-recursion cut as a type-level boundary (mutual recursion is
195
+ * unwritable; a finished lower stratum is folded by the OUTPUT rules)
196
+ * and its `select` takes bound variable NAMES only: aggregates and the
197
+ * measure are unrepresentable in a recursive head (the strata judge's
198
+ * `AggregationThroughCycle`/`MeasureInRecursiveHead`, made unwritable).
68
199
  */
69
- interface QueryBuild {
70
- readonly rules: readonly (readonly AnyBodyItem[])[];
71
- readonly select: SelectShape;
72
- }
73
- /** One classified select column as runtime data. */
74
- type SelectEntryData = {
75
- readonly kind: "var";
76
- readonly over: AnyVar;
77
- } | {
78
- readonly kind: "measure";
79
- readonly over: AnyVar;
80
- } | {
81
- readonly kind: "aggregate";
82
- readonly aggregate: AggregateData;
83
- };
84
- /** One answer column: its name (the row object key) and its entry. */
85
- interface SelectColumn {
86
- readonly name: string;
87
- readonly entry: SelectEntryData;
200
+ interface RecRuleChain<Rels extends SchemaRelations, Self extends string, Env extends EnvShape, P extends ParamsRecord> {
201
+ match<R extends QueryRelation<Rels>, const B extends MatchShape<RelationFields<R>>>(relation: R, bindings: B & CheckBindings<Env, RelationFields<R>, B>): RecRuleChain<Rels, Self, EnvOfMatch<Env, RelationFields<R>, B>, Flatten<P & BindParamsShape<RelationFields<R>, B>>>;
202
+ where<const C extends AnyCond>(cond: CheckCond<Env, C> & C): RecRuleChain<Rels, Self, Env, Flatten<P & CondParamsShape<Env, C>>>;
203
+ /** The self-recursive atom: `idb(self, ...boundVars)` — only this rec's own reference is accepted (threaded, its head arity- and domain-checks the join). */
204
+ idb<Target extends RecRef<Self, ParamsRecord>, const V extends readonly Var<string>[]>(target: Target, ...vars: CheckIdbVars<Env, V, HeadOf<Target>> & V): RecRuleChain<Rels, Self, Env, P>;
205
+ /** The recursive head: bound variable names only (the creation quarantine, restated for fixpoint topology); the value carries the head's field descriptors for `idb` pairing. */
206
+ select<const S extends readonly string[]>(...names: CheckNameSelect<Env, S> & S): RuleValue<RowOfNameSelect<Env, S>, P, HeadFieldsOf<Env, S>>;
88
207
  }
89
- /** A query's runtime description — everything lowering and execution read. */
208
+ /** A query's runtime description — everything lowering, the wire marshal, and answer decode read. */
90
209
  interface QueryData {
91
- readonly registry: QueryRegistry;
92
- readonly rules: readonly (readonly AnyBodyItem[])[];
210
+ /** The program's recursive predicates in declaration order (empty for a plain query); `PredId` = index. */
211
+ readonly recs: readonly RecData[];
212
+ /** The output rules in written order (multiple rules = set union). */
213
+ readonly rules: readonly RuleData[];
214
+ /** The head columns (every rule derives the same head; written order = answer column order). */
93
215
  readonly select: readonly SelectColumn[];
216
+ /** The registered params in first-use order across the program walk (= dense `ParamId`s). */
217
+ readonly params: readonly ParamEntry[];
94
218
  }
95
219
  /**
96
220
  * An inert query value. `Row` is the inferred answer-row object type;
97
- * `Params` the inferred execute-params object type. Prepare with
98
- * `db.prepare(q)`; nothing here touches an engine.
221
+ * `Params` the inferred execute-params object type exactly the params
222
+ * the rules use. Prepare with `db.prepare(q)`; nothing here touches an
223
+ * engine.
99
224
  */
100
225
  interface Query<Rels extends SchemaRelations, Row, Params extends ParamsRecord> {
101
226
  readonly schema: Schema<Rels>;
102
227
  readonly data: QueryData;
103
- readonly [phantom]?: {
228
+ /** One more rule — the query's answers are the SET UNION of its rules' answers; every rule derives the same head. */
229
+ rule<RV extends AnyRuleValue>(build: (r: QueryRuleScope<Rels>) => RV): Query<Rels, Row | RowOf<RV>, Flatten<Params & ParamsOf<RV>>>;
230
+ readonly [inferred]?: {
104
231
  readonly row: Row;
105
232
  readonly params: Params;
106
233
  };
107
234
  }
108
- /** Any query value, whatever its schema and inferred types. */
109
- type AnyQuery = Query<SchemaRelations, unknown, ParamsRecord>;
235
+ /**
236
+ * Any query value as lowering and the runtime consume it: the theory it
237
+ * was built against and its runtime description — every `Query` (typed or
238
+ * program-built) carries exactly this.
239
+ */
240
+ interface AnyQuery {
241
+ readonly schema: AnySchema;
242
+ readonly data: QueryData;
243
+ }
110
244
  /** Extracts a query value's inferred answer-row type. */
111
- type QueryRow<Q extends AnyQuery> = Exclude<Q[typeof phantom], undefined>["row"];
245
+ type QueryRow<Q extends AnyQuery> = RowOf<Q>;
112
246
  /** Extracts a query value's inferred execute-params type. */
113
- type QueryParams<Q extends AnyQuery> = Exclude<Q[typeof phantom], undefined>["params"];
114
- /** The params object type a build result implies (union over every rule item). */
115
- type BuildParams<R extends QueryBuild> = ParamsShape<ItemParams<R["rules"][number][number]>>;
247
+ type QueryParams<Q extends AnyQuery> = ParamsOf<Q>;
248
+ /** The entry value of `query(S)`: the first `.rule` mints the query. */
249
+ interface QueryStart<Rels extends SchemaRelations> {
250
+ rule<RV extends AnyRuleValue>(build: (r: QueryRuleScope<Rels>) => RV): Query<Rels, RowOf<RV>, ParamsOf<RV>>;
251
+ }
116
252
  /**
117
- * Builds a query as a typed value: runs `build` inside a fresh scope,
118
- * classifies the select record (written order = answer column order),
119
- * validates negation safety across every rule (the predicates' rules
120
- * included), and freezes. Rule counts, strata legality, and every deeper
121
- * roster stay the engine's judge at prepare.
253
+ * The one runtime chain every context shares non-generic on purpose: the
254
+ * typed chain interfaces (`QueryRuleChain`/`OutputRuleChain`/`RecRuleChain`)
255
+ * apply at the scope factories' boundaries, and the runtime beneath them is
256
+ * one plain value walk. Context gates the two context-bound verbs: `idb`
257
+ * (a program construct self-only inside a rec, any rec of the program in
258
+ * the output, refused in a plain query) and the recursive `select`
259
+ * (bound variable names only — the creation quarantine).
122
260
  */
123
- declare function query<Rels extends SchemaRelations, const R extends QueryBuild>(theory: Schema<Rels>, build: ($: Scope<Rels>) => R): Query<Rels, RowOf<R["select"]>, BuildParams<R>>;
261
+ interface RawChain {
262
+ match(relation: AnyRelation, bindings: Readonly<Record<string, unknown>>): RawChain;
263
+ where(cond: AnyCond): RawChain;
264
+ idb(target: RecRef<string, ParamsRecord>, ...vars: readonly Var<string>[]): RawChain;
265
+ select(...entries: readonly SelectEntry[]): RuleValue<never, never>;
266
+ }
267
+ /** The runtime rule-builder shape beneath every typed scope. */
268
+ interface RawScope extends TermOps {
269
+ match(relation: AnyRelation, bindings: Readonly<Record<string, unknown>>): RawChain;
270
+ }
271
+ /** Which rule family a chain builds — gates `idb` and the recursive select. */
272
+ type ChainContext = {
273
+ readonly kind: "query";
274
+ } | {
275
+ readonly kind: "rec";
276
+ readonly self: RecData;
277
+ } | {
278
+ readonly kind: "output";
279
+ readonly program: ProgramState;
280
+ };
281
+ /** Builds one runtime rule-builder over a context. */
282
+ declare function makeRawScope(context: ChainContext): RawScope;
283
+ /** Builds one output-rule builder over a program's recs. */
284
+ declare function makeOutputRuleScope<Rels extends SchemaRelations>(program: ProgramState): OutputRuleScope<Rels>;
285
+ /** One program's build-time registry: its recs in declaration order, sealed when the output is declared. */
286
+ interface ProgramState {
287
+ readonly recs: RecData[];
288
+ sealed: boolean;
289
+ }
290
+ /** Assembles one typed query value (rules already completed). */
291
+ declare function makeQuery<Rels extends SchemaRelations, Row, P extends ParamsRecord>(theory: Schema<Rels>, recs: readonly RecData[], rules: readonly RuleData[]): Query<Rels, Row, P>;
292
+ /**
293
+ * Opens a query over a schema: `query(S).rule(r => ...)`. Each `.rule`
294
+ * adds one conjunctive rule; multiple rules are the set union (answers are
295
+ * SETS — no order or limit exists anywhere; hosts sort).
296
+ */
297
+ declare function query<Rels extends SchemaRelations>(theory: Schema<Rels>): QueryStart<Rels>;
124
298
  /**
125
299
  * Tags one host literal at a FIELD position (atom bindings): the field's
126
- * structural type directs the tag, never a guess. At an interval field a
300
+ * structural kind directs the tag, never a guess. At an interval field a
127
301
  * bigint literal tags as the ELEMENT type — the IR's membership typing
128
302
  * rule (point membership), an interval-shaped literal as the interval
129
- * (value equality). A closed-reference literal is its branded id, tagged
130
- * u64 after a roster re-verification (queries cross ids, never handle
131
- * names).
303
+ * (value equality). A closed-reference literal is its bare handle id,
304
+ * tagged u64 after a roster verification.
305
+ */
306
+ declare function taggedLiteral(context: string, field: AnyField, value: unknown): TaggedValue;
307
+ /**
308
+ * Tags one host literal at a COMPARISON or PARAM position, where the
309
+ * SIBLING anchors the type: a measure sibling is u64, an interval-field
310
+ * sibling contributes its element domain (so both a point literal in
311
+ * `covers` and a `span` literal in `allen` tag correctly), a scalar
312
+ * sibling its own type. At `pointIn` the operand order is interval-left,
313
+ * point-right (`ir::CmpOp::PointIn`), so an interval-shaped literal
314
+ * beside a scalar element-typed sibling is the LEGAL lhs of
315
+ * `covers(span(...), t)` and tags as the interval of the sibling's
316
+ * element domain; under every other operator an interval shape against a
317
+ * scalar sibling stays refused (the engine's IllegalComparison — the
318
+ * bug-hunt fix, preserved op-aware).
132
319
  */
133
- declare function taggedLiteral(context: string, field: FieldData, value: unknown): TaggedValue;
320
+ declare function taggedCmpLiteral(context: string, sibling: AnyField | "measure", value: unknown, op: CmpKind | "binding"): TaggedValue;
134
321
  /**
135
322
  * Lowers a query value to the bridge's `ProgramIr` — pure and stable: the
136
- * declared predicates in declaration order (`PredId` = index), the output
137
- * predicate (built from `rules` + `select`) appended last. Relations lower
138
- * by declaration ordinal, the law the engine's own manifest pins;
139
- * `db.prepare` re-verifies the alignment against the live manifest before
140
- * sending.
323
+ * recs in declaration order (`PredId` = index), the output predicate
324
+ * (rules + head) appended last. Relations lower by declaration ordinal,
325
+ * the law the engine's own manifest pins; `db.prepare` re-verifies the
326
+ * alignment against the live manifest before sending. Every registered
327
+ * param must carry a field anchor by now — an unanchorable param (its
328
+ * every use beside a literal) is refused here, naming it.
141
329
  */
142
330
  declare function lowerQuery(q: AnyQuery): ProgramIr;
143
- export type { AnyQuery, BuildParams, Query, QueryBuild, QueryData, QueryParams, QueryRow, Scope, SelectColumn, SelectEntryData };
144
- export { lowerQuery, query, taggedLiteral };
331
+ export type { AnyQuery, AnyRuleValue, HeadFieldsOf, HeadOf, HeadShape, OutputRuleChain, OutputRuleScope, ParamsOf, ProgramState, Query, QueryData, QueryParams, QueryRelation, QueryRow, QueryRuleChain, QueryRuleScope, QueryStart, RawChain, RawScope, RecRef, RecRuleChain, RecRuleScope, RowOf, RuleValue, TermOps };
332
+ export { lowerQuery, makeOutputRuleScope, makeQuery, makeRawScope, query, taggedCmpLiteral, taggedLiteral };
145
333
  //# sourceMappingURL=lower.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lower.d.ts","sourceRoot":"","sources":["../../src/query/lower.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AACtE,OAAO,KAAK,EAQX,SAAS,EAET,WAAW,EAEX,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EACX,WAAW,EAQX,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EACX,YAAY,EACZ,SAAS,EACT,qBAAqB,EAErB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAEX,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