@bjornpagen/bumbledb 0.4.0 → 0.6.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 +191 -92
  2. package/README.md +9 -7
  3. package/dist/closed.d.ts +30 -2
  4. package/dist/closed.d.ts.map +1 -1
  5. package/dist/closed.js +66 -20
  6. package/dist/closed.js.map +1 -1
  7. package/dist/db.d.ts +33 -6
  8. package/dist/db.d.ts.map +1 -1
  9. package/dist/db.js +89 -72
  10. package/dist/db.js.map +1 -1
  11. package/dist/exhume.d.ts.map +1 -1
  12. package/dist/exhume.js +1 -14
  13. package/dist/exhume.js.map +1 -1
  14. package/dist/face.d.ts +1 -1
  15. package/dist/face.d.ts.map +1 -1
  16. package/dist/face.js +2 -1
  17. package/dist/face.js.map +1 -1
  18. package/dist/fields.d.ts +18 -1
  19. package/dist/fields.d.ts.map +1 -1
  20. package/dist/fields.js +44 -16
  21. package/dist/fields.js.map +1 -1
  22. package/dist/index.d.ts +18 -10
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +13 -6
  25. package/dist/index.js.map +1 -1
  26. package/dist/law.d.ts +2 -1
  27. package/dist/law.d.ts.map +1 -1
  28. package/dist/law.js +15 -14
  29. package/dist/law.js.map +1 -1
  30. package/dist/lower.d.ts.map +1 -1
  31. package/dist/lower.js +1 -7
  32. package/dist/lower.js.map +1 -1
  33. package/dist/marshal.d.ts.map +1 -1
  34. package/dist/marshal.js +15 -27
  35. package/dist/marshal.js.map +1 -1
  36. package/dist/native.d.ts +21 -2
  37. package/dist/native.d.ts.map +1 -1
  38. package/dist/native.js +20 -3
  39. package/dist/native.js.map +1 -1
  40. package/dist/order.d.ts +36 -0
  41. package/dist/order.d.ts.map +1 -0
  42. package/dist/order.js +135 -0
  43. package/dist/order.js.map +1 -0
  44. package/dist/query/atom.d.ts +140 -206
  45. package/dist/query/atom.d.ts.map +1 -1
  46. package/dist/query/atom.js +33 -52
  47. package/dist/query/atom.js.map +1 -1
  48. package/dist/query/find.d.ts +116 -0
  49. package/dist/query/find.d.ts.map +1 -0
  50. package/dist/query/{select.js → find.js} +22 -22
  51. package/dist/query/find.js.map +1 -0
  52. package/dist/query/lower.d.ts +124 -162
  53. package/dist/query/lower.d.ts.map +1 -1
  54. package/dist/query/lower.js +462 -507
  55. package/dist/query/lower.js.map +1 -1
  56. package/dist/query/predicate.d.ts +22 -14
  57. package/dist/query/predicate.d.ts.map +1 -1
  58. package/dist/query/predicate.js +45 -20
  59. package/dist/query/predicate.js.map +1 -1
  60. package/dist/query/run.d.ts +3 -3
  61. package/dist/query/run.d.ts.map +1 -1
  62. package/dist/query/run.js +10 -11
  63. package/dist/query/run.js.map +1 -1
  64. package/dist/query/scope.d.ts +124 -83
  65. package/dist/query/scope.d.ts.map +1 -1
  66. package/dist/query/scope.js +77 -70
  67. package/dist/query/scope.js.map +1 -1
  68. package/dist/relation.d.ts +9 -22
  69. package/dist/relation.d.ts.map +1 -1
  70. package/dist/relation.js +9 -28
  71. package/dist/relation.js.map +1 -1
  72. package/dist/schema.d.ts.map +1 -1
  73. package/dist/schema.js +7 -31
  74. package/dist/schema.js.map +1 -1
  75. package/dist/statements.d.ts +5 -2
  76. package/dist/statements.d.ts.map +1 -1
  77. package/dist/statements.js +30 -35
  78. package/dist/statements.js.map +1 -1
  79. package/package.json +2 -5
  80. package/src/closed.ts +73 -28
  81. package/src/db.ts +126 -88
  82. package/src/exhume.ts +1 -15
  83. package/src/face.ts +4 -3
  84. package/src/fields.ts +58 -16
  85. package/src/index.ts +19 -13
  86. package/src/law.ts +15 -14
  87. package/src/lower.ts +2 -9
  88. package/src/marshal.ts +15 -31
  89. package/src/native.ts +22 -4
  90. package/src/order.ts +156 -0
  91. package/src/query/atom.ts +186 -276
  92. package/src/query/find.ts +212 -0
  93. package/src/query/lower.ts +614 -749
  94. package/src/query/predicate.ts +47 -20
  95. package/src/query/run.ts +11 -13
  96. package/src/query/scope.ts +165 -132
  97. package/src/relation.ts +9 -51
  98. package/src/schema.ts +7 -33
  99. package/src/statements.ts +33 -38
  100. package/dist/query/select.d.ts +0 -128
  101. package/dist/query/select.d.ts.map +0 -1
  102. package/dist/query/select.js.map +0 -1
  103. package/src/query/select.ts +0 -215
@@ -1,24 +1,38 @@
1
1
  /**
2
- * Query scope terms, LAW-TYPED edition: string-named variables and
3
- * parameters as plain frozen values. A `Var` is a NAME — it is typed by the
4
- * field slot it first binds (the descriptor AND the slot's law-computed
5
- * CLASS, read off the schema's class map through the rule builder's
6
- * environment), reuse of the name within one rule IS the join, and a
7
- * class-mismatched reuse is a compile error: a var joins only class-equal
8
- * slots, and BARE PAIRS ONLY WITH BARE (ruling 3 a slot in no law has no
9
- * class and never joins a classed slot; the deliberate sum-domain pointer
10
- * stays legal against other bare slots). Params are query-global by name
11
- * and typed BY USE: the field position or comparison sibling that anchors
12
- * a param types it, the query's inferred `Params` object is exactly the
13
- * params the rules use, and a param value that no rule uses simply never
14
- * registers — the query executes under its own inferred type (the
15
- * bug-hunt law). This module also owns the environment/typing utilities
16
- * the whole surface shares: the env shape (var name → classed slot), the
17
- * class-equality judgment {@link JoinOk} with its runtime twin
18
- * {@link fieldJoins}, and the record-folding helpers `Params` and `Row`
19
- * inference ride.
2
+ * Query scope terms, REFERENCE-IDENTITY edition: a query variable is an
3
+ * OBJECT, minted fresh by {@link v} over a relation's statically-known
4
+ * columns. `v(relation)` returns a record of fresh variables one per
5
+ * column, each typed at mint by its column's descriptor AND the mint
6
+ * coordinate (the owner relation name and the column name), so
7
+ * destructuring preserves every literal and every class
8
+ * (`const { id, holder } = v(Account)`). Variable IDENTITY is the object
9
+ * reference: reusing the same var value across binding positions IS the
10
+ * join, and a name-collision join is unrepresentable (two `v()` calls mint
11
+ * two distinct batches, so two same-named vars are two variables). Params
12
+ * stay STRING-named their names are the execute() params object's runtime
13
+ * keys, an honest load-bearing channel, not a lie.
14
+ *
15
+ * THE DESIGN THEOREM. {@link JoinOk} is an EQUALITY (kind, class, width,
16
+ * element, roster), so judging every binding position against the
17
+ * variable's MINT slot ({@link MintSlotOf}) makes all cross-binding joins
18
+ * mutually class-equal by transitivity the env/sibling checks the
19
+ * name-keyed edition needed are subsumed, deleted rather than ported. The
20
+ * one check representation cannot carry is BOUNDNESS (is this var positively
21
+ * bound in this rule): TypeScript types cannot see object identity, so
22
+ * boundness moves from the type tier to construction-time walls only — an
23
+ * explicit essential-vs-accidental concession; every runtime twin is
24
+ * preserved.
25
+ *
26
+ * This module also owns the environment/typing utilities the whole surface
27
+ * shares: the join descriptor {@link ClassedField}, the mint-slot machinery
28
+ * ({@link MintSlotOf}/{@link MintClassOf}), the class-equality judgment
29
+ * {@link JoinOk} with its runtime twin {@link fieldJoins}, and the
30
+ * record-folding helpers `Params` and `Row` inference ride.
20
31
  */
32
+ import type { AnyClosed } from "#closed.ts";
21
33
  import type { AnyField, Infer } from "#fields.ts";
34
+ import type { ClassLookup, ClassRecordOf, SchemaClasses } from "#law.ts";
35
+ import type { AnyRelation, RelationFields } from "#relation.ts";
22
36
  /**
23
37
  * The runtime discriminant of query term values. Host literals (bigints,
24
38
  * strings, interval objects) never carry it, so "is this position a term
@@ -33,16 +47,43 @@ declare const term: unique symbol;
33
47
  */
34
48
  declare const inferred: unique symbol;
35
49
  /**
36
- * A query variable — a NAME. Its type comes from the field it first binds
37
- * in the rule (the builder's environment); reusing the name joins, and a
38
- * cross-domain reuse is a compile error. Identity is the name, strictly
39
- * rule-scoped: the same name in two rules names two unrelated variables
40
- * (exactly as the IR scopes `VarId`).
50
+ * What a query atom matches over: an ordinary relation or a CLOSED
51
+ * vocabulary (ψ query atoms the engine folds a resolvable closed atom
52
+ * into a plan-constant member set at prepare, or joins the L1-resident
53
+ * virtual image when the shape does not fold; the SDK never pre-folds and
54
+ * never knows which transparency is the contract).
41
55
  */
42
- interface Var<Name extends string = string> {
56
+ type MatchOwner = AnyRelation | AnyClosed;
57
+ /**
58
+ * The matchable field block of an atom owner: a relation's declared
59
+ * fields; a closed relation's SEALED shape — the synthetic `id` (the
60
+ * value's OWN roster-carrying descriptor, at its precise type) first, then
61
+ * the declared payload columns read through the typed `columns` carrier.
62
+ * The runtime twin is `sealedFieldsOf` in `#closed.ts`.
63
+ */
64
+ type MatchFields<R extends MatchOwner> = R extends AnyClosed ? {
65
+ readonly id: R["id"];
66
+ } & R["columns"] : R extends AnyRelation ? RelationFields<R> : never;
67
+ /**
68
+ * A query variable — an OBJECT minted by {@link v}. Identity is the object
69
+ * reference: reuse of the same value across binding positions is the join,
70
+ * strictly rule-scoped (each rule numbers its own dense `VarId`s). The type
71
+ * carries the mint COORDINATE — `RN` the owner relation name literal, `K`
72
+ * the column name literal — and `F` the mint descriptor, so the mint slot
73
+ * (descriptor + law-computed class) is recoverable at every binding
74
+ * position for the join judgment.
75
+ */
76
+ interface Var<F extends AnyField = AnyField, RN extends string = string, K extends string = string> {
43
77
  readonly [term]: "var";
44
- readonly name: Name;
78
+ readonly owner: MatchOwner & {
79
+ readonly name: RN;
80
+ };
81
+ readonly column: K;
82
+ readonly field: F;
83
+ readonly label: string;
45
84
  }
85
+ /** Any query variable, whatever its descriptor and mint coordinate. */
86
+ type AnyVar = Var;
46
87
  /**
47
88
  * A scalar query parameter — `r.param("root")`. The name is the key of the
48
89
  * typed params object `execute` takes; the type is the element type of the
@@ -77,61 +118,72 @@ interface MaskParam<Name extends string = string> {
77
118
  /**
78
119
  * The measure of an interval-typed variable (`ir::Term::Measure`):
79
120
  * `|[s, e)| = e − s`, u64 — legal as one side of an order comparison, as a
80
- * select entry, and as the input of `sum`/`min`/`max`; every other position
81
- * is unwritable, exactly as the IR rejects it typed. A ray has no finite
82
- * measure the engine's `MeasureOfRay` execution error; exclude rays first
83
- * (`allen` against a bounded window).
121
+ * find entry, and as the input of `sum`/`min`/`max`; every other position
122
+ * is unwritable, exactly as the IR rejects it typed. Carries the interval
123
+ * variable it measures BY REFERENCE.
84
124
  */
85
- interface Duration<Name extends string = string> {
125
+ interface Duration<V extends AnyVar = AnyVar> {
86
126
  readonly [term]: "duration";
87
- readonly name: Name;
127
+ readonly over: V;
88
128
  }
89
129
  /** Any scope term value. */
90
130
  type AnyTerm = Var | Param | SetParam | MaskParam | Duration;
91
131
  /** Narrows an unknown position value to a scope term (vs a host literal). */
92
132
  declare function isTerm(value: unknown): value is AnyTerm;
93
- /** Builds one variable term. */
94
- declare function makeVar<const Name extends string>(name: Name): Var<Name>;
95
- /** The record `makeVars` mints: one own frozen `Var<Name>` per requested name, each typed exactly. */
96
- type VarsRecord<Names extends string> = {
97
- readonly [N in Names]: Var<N>;
133
+ /**
134
+ * The record of fresh variables `v(owner)` mints — one per statically-known
135
+ * column, each typed by its column's descriptor and mint coordinate.
136
+ */
137
+ type VarsOf<R extends MatchOwner> = {
138
+ readonly [K in keyof MatchFields<R> & string]: Var<MatchFields<R>[K], R["name"], K>;
98
139
  };
99
140
  /**
100
- * Mints several variables at once `const { service, w } = r.vars("service",
101
- * "w")`: tuple-to-object, each name typed exactly (`Var<"service">`),
102
- * inference identical to the one-at-a-time `r.var` spelling (one lowering,
103
- * two entry flavors). Each key is defined as an OWN property (a name like
104
- * `"__proto__"` is a record key like any other, never a prototype write),
105
- * and a duplicate name in one call is a construction error: each name mints
106
- * one variable write it once and reuse the binding.
141
+ * Mints a FRESH batch of query variables over an atom owner's
142
+ * statically-known columns one variable per sealed column
143
+ * (`sealedFieldsOf`: a closed owner mints `id` first, then payload columns),
144
+ * each frozen and each defined by OWN-property definition (object-protocol
145
+ * column names must work, the `closed()` precedent). Every `v()` call mints
146
+ * new objects, so two batches are two variables; property access within one
147
+ * batch is stable by construction (the record is an eager frozen record,
148
+ * never a Proxy). Variable identity is the object reference: destructure
149
+ * what you need (`const { id, holder } = v(Account)`) and reuse a value
150
+ * across binding positions to join.
107
151
  */
108
- declare function makeVars<const Names extends readonly string[]>(...names: Names): VarsRecord<Names[number]>;
152
+ declare function v<R extends MatchOwner>(owner: R): VarsOf<R>;
109
153
  /** Builds one scalar-parameter term. */
110
154
  declare function makeParam<const Name extends string>(name: Name): Param<Name>;
111
155
  /** Builds one set-parameter term. */
112
156
  declare function makeSetParam<const Name extends string>(name: Name): SetParam<Name>;
113
157
  /** Builds one Allen-mask-parameter term. */
114
158
  declare function makeMaskParam<const Name extends string>(name: Name): MaskParam<Name>;
115
- /** Builds one measure term over an interval-typed variable's name. */
116
- declare function makeDuration<const Name extends string>(name: Name): Duration<Name>;
159
+ /** Builds one measure term over an interval-typed variable reference. */
160
+ declare function makeDuration<const V extends AnyVar>(over: V): Duration<V>;
117
161
  /**
118
162
  * One bound field slot: the field's descriptor plus the slot's
119
163
  * law-computed CLASS (`undefined` = bare — the slot is in no law). The one
120
- * shape the rule environment carries per variable, at the TYPE level (env
121
- * entries hold the schema type's class-map lookups) and at RUNTIME alike
122
- * (the rule's `varFields` record holds exactly this shape, read off the
123
- * schema value's frozen class map) — one shape, two tiers, one walk.
164
+ * shape every join judgment compares, at the TYPE level (a variable's mint
165
+ * slot, a binding position's slot) and at RUNTIME alike.
124
166
  */
125
167
  interface ClassedField {
126
168
  readonly field: AnyField;
127
169
  readonly class: string | undefined;
128
170
  }
129
171
  /**
130
- * A rule's typing environment: variable name the classed slot it first
131
- * bound. Purely a TYPE the runtime twin is the rule's `varFields`
132
- * record, and the two are built by the same walk.
172
+ * A variable's law-computed CLASS at the TYPE level: its column's class,
173
+ * read off the schema type's class map through the mint coordinate the
174
+ * variable carries (`RN.K`). `undefined` = bare.
175
+ */
176
+ type MintClassOf<Classes extends SchemaClasses, V> = V extends Var<AnyField, infer RN extends string, infer K extends string> ? ClassLookup<ClassRecordOf<Classes, RN>, K> : never;
177
+ /**
178
+ * A variable's MINT slot: the descriptor it was minted at plus its
179
+ * law-computed class. The one slot every binding position judges against —
180
+ * because {@link JoinOk} is an equality, judging each position against the
181
+ * mint slot makes every cross-binding join transitively class-equal.
133
182
  */
134
- type EnvShape = Record<string, ClassedField>;
183
+ type MintSlotOf<Classes extends SchemaClasses, V extends AnyVar> = {
184
+ readonly field: V["field"];
185
+ readonly class: MintClassOf<Classes, V>;
186
+ };
135
187
  /** A params object type — what `execute` takes and inference carries. */
136
188
  type ParamsRecord = Readonly<Record<string, unknown>>;
137
189
  /** Flattens an intersection into one displayed object type (hover legibility). */
@@ -153,7 +205,9 @@ type WidthOf<F extends AnyField> = F extends {
153
205
  type ElementOf<F extends AnyField> = F extends {
154
206
  readonly element: infer E;
155
207
  } ? E : undefined;
156
- /** Reads a closed reference's handle union; `undefined` on every non-closed kind (the roster IS descriptor structure). */
208
+ /**
209
+ * Reads a closed reference's handle union; `undefined` on every non-closed kind (the roster IS descriptor structure).
210
+ */
157
211
  type RosterOf<F extends AnyField> = F extends {
158
212
  readonly closed: {
159
213
  readonly handles: readonly (infer H extends string)[];
@@ -163,13 +217,10 @@ type RosterOf<F extends AnyField> = F extends {
163
217
  * The join judgment: two bound slots join iff their descriptors' structure
164
218
  * agrees (kind, width label, interval element, and the closed ROSTER — a
165
219
  * closed reference pairs only with the same vocabulary, never with a bare
166
- * u64: the roster keys every closed judgment downstream, so a join across
167
- * it would decode/order/translate incoherently by binding order) AND their
168
- * law-computed classes agree same class name joins, and bare
169
- * (`undefined`) pairs only with bare (ruling 3: a field in no law has no
170
- * class; a bare↔classed pairing refuses). The class names come off the
171
- * SCHEMA type's class map — the statements are the typing; no descriptor
172
- * label beyond the roster exists to compare.
220
+ * u64) AND their law-computed classes agree same class name joins, and
221
+ * bare (`undefined`) pairs only with bare (ruling 3). The class names come
222
+ * off the SCHEMA type's class map; no descriptor label beyond the roster
223
+ * exists to compare.
173
224
  */
174
225
  type JoinOk<A extends ClassedField, B extends ClassedField> = [
175
226
  A["field"]["kind"],
@@ -188,29 +239,23 @@ type JoinOk<A extends ClassedField, B extends ClassedField> = [
188
239
  * The runtime twin of {@link JoinOk}: two bound slots join iff descriptor
189
240
  * structure and class agree — the same comparison the type tier makes,
190
241
  * judged on the honest runtime values (the descriptor, the roster by VALUE
191
- * IDENTITY vocabulary identity is value identity and the schema
192
- * value's frozen class map). The rule builders throw through this on a
193
- * class-unequal variable reuse, so the wall holds for untyped callers too,
194
- * not only where the compiler can see.
242
+ * IDENTITY, and the schema value's frozen class map). The rule builders
243
+ * throw through this on a class-unequal reuse, so the wall holds for untyped
244
+ * callers too.
195
245
  */
196
246
  declare function fieldJoins(a: ClassedField, b: ClassedField): boolean;
197
247
  /**
198
248
  * Renders one bound slot for join-mismatch diagnostics — the structural
199
249
  * kind in the schema grammar's spelling (a closed reference names its
200
- * vocabulary: the roster is part of the structure being compared) plus the
201
- * slot's law-computed class (`u64 in class Holder.id`; a lawless slot
202
- * renders `bare`).
250
+ * vocabulary) plus the slot's law-computed class (`u64 in class Holder.id`;
251
+ * a lawless slot renders `bare`).
203
252
  */
204
253
  declare function renderFieldKind(slot: ClassedField): string;
205
254
  /**
206
255
  * What a PARAM anchored at field `F` accepts at execution: the field's
207
256
  * bare value type, exactly — at a CLOSED-reference field that is the
208
257
  * handle-name union (`"DirectPass" | "Failed"`), translated name → row id
209
- * at execute through the one roster-verification point
210
- * (`taggedHandleId`). At an interval field the engine resolves the
211
- * bivalent anchor to the INTERVAL reading (value equality) — the point
212
- * reading of a param is spelled `pointIn(r.param(...), w)`, whose sibling
213
- * anchors it element-typed.
258
+ * at execute through the one roster-verification point (`taggedHandleId`).
214
259
  */
215
260
  type ParamValueAt<F extends AnyField> = Infer<F>;
216
261
  /** Reads a value's inferred-types carrier (rules, queries, recs). */
@@ -221,13 +266,9 @@ type InferredOf<T> = T extends {
221
266
  * One registered parameter of a query, as the wire marshal reads it: the
222
267
  * name, the wire shape, the field descriptor (or the measure) that anchored
223
268
  * it, and the comparison op the anchor came from (`"binding"` for atom
224
- * positions) the op keeps literal tagging op-aware at `pointIn`
225
- * (the bug-hunt fix, preserved). `anchor` is `undefined` only on a query
226
- * built but not yet anchored by any rule; lowering and the wire both refuse
227
- * that state typed. `members` is present exactly on a MEMBERSHIP-ARRAY
228
- * entry (a literal set at a closed field, folded into the program): the
229
- * SDK itself translates and supplies the set at every execute — the entry
230
- * is never read from, and never demanded of, the host's params object.
269
+ * positions). `anchor` is `undefined` only on a query built but not yet
270
+ * anchored by any rule. `members` is present exactly on a MEMBERSHIP-ARRAY
271
+ * entry.
231
272
  */
232
273
  interface ParamEntry {
233
274
  readonly name: string;
@@ -236,6 +277,6 @@ interface ParamEntry {
236
277
  readonly op: "binding" | "eq" | "ne" | "lt" | "le" | "gt" | "ge" | "pointIn" | "allen";
237
278
  readonly members: readonly string[] | undefined;
238
279
  }
239
- export type { AnyTerm, ClassedField, Duration, EnvShape, Flatten, InferredOf, JoinOk, MaskParam, Param, ParamEntry, ParamsRecord, ParamValueAt, SetParam, ShapeOf, UnionToIntersection, Var, VarsRecord };
240
- export { fieldJoins, inferred, isTerm, makeDuration, makeMaskParam, makeParam, makeSetParam, makeVar, makeVars, renderFieldKind, term };
280
+ export type { AnyTerm, AnyVar, ClassedField, Duration, Flatten, InferredOf, JoinOk, MaskParam, MatchFields, MatchOwner, MintClassOf, MintSlotOf, Param, ParamEntry, ParamsRecord, ParamValueAt, SetParam, ShapeOf, UnionToIntersection, Var, VarsOf };
281
+ export { fieldJoins, inferred, isTerm, makeDuration, makeMaskParam, makeParam, makeSetParam, renderFieldKind, term, v };
241
282
  //# sourceMappingURL=scope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/query/scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEjD;;;;GAIG;AACH,QAAA,MAAM,IAAI,EAAE,OAAO,MAAsC,CAAA;AAEzD;;;;;GAKG;AACH,QAAA,MAAM,QAAQ,EAAE,OAAO,MAA0C,CAAA;AAEjE;;;;;;GAMG;AACH,UAAU,GAAG,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM;IACzC,QAAQ,CAA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rB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;IACxC,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;IACjD,QAAQ,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAA;IACtF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;CAC/C;AAED,YAAY,EACX,OAAO,EACP,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,UAAU,EACV,MAAM,EACN,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,KAAK,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,GAAG,EACH,MAAM,EACN,CAAA;AACD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA"}
@@ -1,24 +1,37 @@
1
1
  /**
2
- * Query scope terms, LAW-TYPED edition: string-named variables and
3
- * parameters as plain frozen values. A `Var` is a NAME — it is typed by the
4
- * field slot it first binds (the descriptor AND the slot's law-computed
5
- * CLASS, read off the schema's class map through the rule builder's
6
- * environment), reuse of the name within one rule IS the join, and a
7
- * class-mismatched reuse is a compile error: a var joins only class-equal
8
- * slots, and BARE PAIRS ONLY WITH BARE (ruling 3 a slot in no law has no
9
- * class and never joins a classed slot; the deliberate sum-domain pointer
10
- * stays legal against other bare slots). Params are query-global by name
11
- * and typed BY USE: the field position or comparison sibling that anchors
12
- * a param types it, the query's inferred `Params` object is exactly the
13
- * params the rules use, and a param value that no rule uses simply never
14
- * registers — the query executes under its own inferred type (the
15
- * bug-hunt law). This module also owns the environment/typing utilities
16
- * the whole surface shares: the env shape (var name → classed slot), the
17
- * class-equality judgment {@link JoinOk} with its runtime twin
18
- * {@link fieldJoins}, and the record-folding helpers `Params` and `Row`
19
- * inference ride.
2
+ * Query scope terms, REFERENCE-IDENTITY edition: a query variable is an
3
+ * OBJECT, minted fresh by {@link v} over a relation's statically-known
4
+ * columns. `v(relation)` returns a record of fresh variables one per
5
+ * column, each typed at mint by its column's descriptor AND the mint
6
+ * coordinate (the owner relation name and the column name), so
7
+ * destructuring preserves every literal and every class
8
+ * (`const { id, holder } = v(Account)`). Variable IDENTITY is the object
9
+ * reference: reusing the same var value across binding positions IS the
10
+ * join, and a name-collision join is unrepresentable (two `v()` calls mint
11
+ * two distinct batches, so two same-named vars are two variables). Params
12
+ * stay STRING-named their names are the execute() params object's runtime
13
+ * keys, an honest load-bearing channel, not a lie.
14
+ *
15
+ * THE DESIGN THEOREM. {@link JoinOk} is an EQUALITY (kind, class, width,
16
+ * element, roster), so judging every binding position against the
17
+ * variable's MINT slot ({@link MintSlotOf}) makes all cross-binding joins
18
+ * mutually class-equal by transitivity the env/sibling checks the
19
+ * name-keyed edition needed are subsumed, deleted rather than ported. The
20
+ * one check representation cannot carry is BOUNDNESS (is this var positively
21
+ * bound in this rule): TypeScript types cannot see object identity, so
22
+ * boundness moves from the type tier to construction-time walls only — an
23
+ * explicit essential-vs-accidental concession; every runtime twin is
24
+ * preserved.
25
+ *
26
+ * This module also owns the environment/typing utilities the whole surface
27
+ * shares: the join descriptor {@link ClassedField}, the mint-slot machinery
28
+ * ({@link MintSlotOf}/{@link MintClassOf}), the class-equality judgment
29
+ * {@link JoinOk} with its runtime twin {@link fieldJoins}, and the
30
+ * record-folding helpers `Params` and `Row` inference ride.
20
31
  */
21
32
  import * as errors from "@superbuilders/errors";
33
+ import { sealedFieldsOf } from "#closed.ts";
34
+ import { rosterOf } from "#fields.ts";
22
35
  /**
23
36
  * The runtime discriminant of query term values. Host literals (bigints,
24
37
  * strings, interval objects) never carry it, so "is this position a term
@@ -36,51 +49,46 @@ const inferred = Symbol("bumbledb.query.inferred");
36
49
  function isTerm(value) {
37
50
  return typeof value === "object" && value !== null && term in value;
38
51
  }
39
- /** Builds one variable term. */
40
- function makeVar(name) {
41
- const value = { [term]: "var", name };
42
- return Object.freeze(value);
43
- }
44
52
  /**
45
- * The trusted seam of the vars mint: every requested name reads back as an
46
- * own var term of exactly that nameverified before the record is
47
- * admitted at the {@link VarsRecord} type (a name riding the
48
- * object-protocol accessor instead of an own definition would fail exactly
49
- * this check).
53
+ * The trusted admission seam of the variable-record mint (the pattern's
54
+ * home is `isTypedScope` in `#query/lower.ts`): the checkable fact one own
55
+ * enumerable variable per sealed column is verified before the record is
56
+ * admitted at its computed {@link VarsOf} type.
50
57
  */
51
- function varsMinted(record, names) {
52
- return names.every(function varMinted(name) {
53
- if (!Object.hasOwn(record, name)) {
54
- return false;
55
- }
56
- const value = record[name];
57
- return isTerm(value) && value[term] === "var" && value.name === name;
58
+ function varsMinted(owner, record) {
59
+ return sealedFieldsOf(owner).every(function columnMinted(declared) {
60
+ return Object.hasOwn(record, declared.name);
58
61
  });
59
62
  }
60
63
  /**
61
- * Mints several variables at once `const { service, w } = r.vars("service",
62
- * "w")`: tuple-to-object, each name typed exactly (`Var<"service">`),
63
- * inference identical to the one-at-a-time `r.var` spelling (one lowering,
64
- * two entry flavors). Each key is defined as an OWN property (a name like
65
- * `"__proto__"` is a record key like any other, never a prototype write),
66
- * and a duplicate name in one call is a construction error: each name mints
67
- * one variable write it once and reuse the binding.
64
+ * Mints a FRESH batch of query variables over an atom owner's
65
+ * statically-known columns one variable per sealed column
66
+ * (`sealedFieldsOf`: a closed owner mints `id` first, then payload columns),
67
+ * each frozen and each defined by OWN-property definition (object-protocol
68
+ * column names must work, the `closed()` precedent). Every `v()` call mints
69
+ * new objects, so two batches are two variables; property access within one
70
+ * batch is stable by construction (the record is an eager frozen record,
71
+ * never a Proxy). Variable identity is the object reference: destructure
72
+ * what you need (`const { id, holder } = v(Account)`) and reuse a value
73
+ * across binding positions to join.
68
74
  */
69
- function makeVars(...names) {
70
- const out = {};
71
- const seen = new Set();
72
- for (const name of names) {
73
- if (seen.has(name)) {
74
- throw errors.new(`vars: duplicate name ${name} — each name mints one variable; write it once and reuse the binding`);
75
- }
76
- seen.add(name);
77
- Object.defineProperty(out, name, { value: makeVar(name), enumerable: true });
75
+ function v(owner) {
76
+ const record = {};
77
+ for (const declared of sealedFieldsOf(owner)) {
78
+ const variable = Object.freeze({
79
+ [term]: "var",
80
+ owner,
81
+ column: declared.name,
82
+ field: declared.field,
83
+ label: `${owner.name}.${declared.name}`
84
+ });
85
+ Object.defineProperty(record, declared.name, { value: variable, enumerable: true });
78
86
  }
79
- Object.freeze(out);
80
- if (!varsMinted(out, names)) {
81
- throw errors.new("vars: variable minting incomplete");
87
+ Object.freeze(record);
88
+ if (!varsMinted(owner, record)) {
89
+ throw errors.new(`v(${owner.name}): variable-record minting incomplete`);
82
90
  }
83
- return out;
91
+ return record;
84
92
  }
85
93
  /** Builds one scalar-parameter term. */
86
94
  function makeParam(name) {
@@ -97,27 +105,26 @@ function makeMaskParam(name) {
97
105
  const value = { [term]: "maskParam", name };
98
106
  return Object.freeze(value);
99
107
  }
100
- /** Builds one measure term over an interval-typed variable's name. */
101
- function makeDuration(name) {
102
- const value = { [term]: "duration", name };
108
+ /** Builds one measure term over an interval-typed variable reference. */
109
+ function makeDuration(over) {
110
+ const value = { [term]: "duration", over };
103
111
  return Object.freeze(value);
104
112
  }
105
113
  /**
106
114
  * The runtime twin of {@link JoinOk}: two bound slots join iff descriptor
107
115
  * structure and class agree — the same comparison the type tier makes,
108
116
  * judged on the honest runtime values (the descriptor, the roster by VALUE
109
- * IDENTITY vocabulary identity is value identity and the schema
110
- * value's frozen class map). The rule builders throw through this on a
111
- * class-unequal variable reuse, so the wall holds for untyped callers too,
112
- * not only where the compiler can see.
117
+ * IDENTITY, and the schema value's frozen class map). The rule builders
118
+ * throw through this on a class-unequal reuse, so the wall holds for untyped
119
+ * callers too.
113
120
  */
114
121
  function fieldJoins(a, b) {
115
122
  const widthA = "width" in a.field ? a.field.width : undefined;
116
123
  const widthB = "width" in b.field ? b.field.width : undefined;
117
124
  const elementA = "element" in a.field ? a.field.element : undefined;
118
125
  const elementB = "element" in b.field ? b.field.element : undefined;
119
- const rosterA = "closed" in a.field ? a.field.closed : undefined;
120
- const rosterB = "closed" in b.field ? b.field.closed : undefined;
126
+ const rosterA = rosterOf(a.field);
127
+ const rosterB = rosterOf(b.field);
121
128
  return (a.field.kind === b.field.kind &&
122
129
  a.class === b.class &&
123
130
  widthA === widthB &&
@@ -127,15 +134,15 @@ function fieldJoins(a, b) {
127
134
  /**
128
135
  * Renders one bound slot for join-mismatch diagnostics — the structural
129
136
  * kind in the schema grammar's spelling (a closed reference names its
130
- * vocabulary: the roster is part of the structure being compared) plus the
131
- * slot's law-computed class (`u64 in class Holder.id`; a lawless slot
132
- * renders `bare`).
137
+ * vocabulary) plus the slot's law-computed class (`u64 in class Holder.id`;
138
+ * a lawless slot renders `bare`).
133
139
  */
134
140
  function renderFieldKind(slot) {
135
141
  const field = slot.field;
136
142
  let base = field.kind;
137
- if ("closed" in field) {
138
- base = `u64 referencing ${field.closed.name}`;
143
+ const roster = rosterOf(field);
144
+ if (roster !== undefined) {
145
+ base = `u64 referencing ${roster.name}`;
139
146
  }
140
147
  if (field.kind === "bytes") {
141
148
  base = `bytes<${field.width}>`;
@@ -145,5 +152,5 @@ function renderFieldKind(slot) {
145
152
  }
146
153
  return slot.class === undefined ? `${base} (bare)` : `${base} in class ${slot.class}`;
147
154
  }
148
- export { fieldJoins, inferred, isTerm, makeDuration, makeMaskParam, makeParam, makeSetParam, makeVar, makeVars, renderFieldKind, term };
155
+ export { fieldJoins, inferred, isTerm, makeDuration, makeMaskParam, makeParam, makeSetParam, renderFieldKind, term, v };
149
156
  //# sourceMappingURL=scope.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scope.js","source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