@bjornpagen/bumbledb 0.14.0 → 0.17.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.
- package/COOKBOOK.md +58 -62
- package/README.md +82 -56
- package/dist/capacity.d.ts +24 -136
- package/dist/capacity.d.ts.map +1 -1
- package/dist/capacity.js +18 -40
- package/dist/capacity.js.map +1 -1
- package/dist/closed.d.ts +0 -156
- package/dist/closed.d.ts.map +1 -1
- package/dist/closed.js +0 -104
- package/dist/closed.js.map +1 -1
- package/dist/db.d.ts +93 -290
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +713 -556
- package/dist/db.js.map +1 -1
- package/dist/face.d.ts +0 -133
- package/dist/face.d.ts.map +1 -1
- package/dist/face.js +0 -33
- package/dist/face.js.map +1 -1
- package/dist/fields.d.ts +1 -145
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +2 -91
- package/dist/fields.js.map +1 -1
- package/dist/index.d.ts +13 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -20
- package/dist/index.js.map +1 -1
- package/dist/law.d.ts +111 -93
- package/dist/law.d.ts.map +1 -1
- package/dist/law.js +23 -27
- package/dist/law.js.map +1 -1
- package/dist/lower.d.ts +9 -35
- package/dist/lower.d.ts.map +1 -1
- package/dist/lower.js +8 -53
- package/dist/lower.js.map +1 -1
- package/dist/marshal.d.ts +0 -65
- package/dist/marshal.d.ts.map +1 -1
- package/dist/marshal.js +0 -72
- package/dist/marshal.js.map +1 -1
- package/dist/native.d.ts +97 -390
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +39 -61
- package/dist/native.js.map +1 -1
- package/dist/query/atom.d.ts +10 -276
- package/dist/query/atom.d.ts.map +1 -1
- package/dist/query/atom.js +1 -96
- package/dist/query/atom.js.map +1 -1
- package/dist/query/find.d.ts +10 -76
- package/dist/query/find.d.ts.map +1 -1
- package/dist/query/find.js +0 -30
- package/dist/query/find.js.map +1 -1
- package/dist/query/lower.d.ts +64 -146
- package/dist/query/lower.d.ts.map +1 -1
- package/dist/query/lower.js +19 -256
- package/dist/query/lower.js.map +1 -1
- package/dist/query/parse-ir.d.ts +0 -7
- package/dist/query/parse-ir.d.ts.map +1 -1
- package/dist/query/parse-ir.js +1 -13
- package/dist/query/parse-ir.js.map +1 -1
- package/dist/query/run.d.ts +0 -36
- package/dist/query/run.d.ts.map +1 -1
- package/dist/query/run.js +0 -44
- package/dist/query/run.js.map +1 -1
- package/dist/query/scope.d.ts +24 -180
- package/dist/query/scope.d.ts.map +1 -1
- package/dist/query/scope.js +2 -66
- package/dist/query/scope.js.map +1 -1
- package/dist/relation.d.ts +2 -50
- package/dist/relation.d.ts.map +1 -1
- package/dist/relation.js +2 -37
- package/dist/relation.js.map +1 -1
- package/dist/schema.d.ts +13 -63
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +118 -92
- package/dist/schema.js.map +1 -1
- package/dist/spec.d.ts +1 -140
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js +1 -68
- package/dist/spec.js.map +1 -1
- package/dist/statements.d.ts +6 -137
- package/dist/statements.d.ts.map +1 -1
- package/dist/statements.js +16 -119
- package/dist/statements.js.map +1 -1
- package/package.json +3 -3
- package/src/capacity.ts +26 -140
- package/src/closed.ts +5 -206
- package/src/db.ts +997 -854
- package/src/face.ts +0 -142
- package/src/fields.ts +4 -172
- package/src/index.ts +32 -35
- package/src/law.ts +201 -129
- package/src/lower.ts +8 -53
- package/src/marshal.ts +1 -85
- package/src/native.ts +192 -413
- package/src/query/atom.ts +26 -313
- package/src/query/find.ts +24 -110
- package/src/query/lower.ts +132 -377
- package/src/query/parse-ir.ts +1 -14
- package/src/query/run.ts +0 -45
- package/src/query/scope.ts +25 -186
- package/src/relation.ts +2 -66
- package/src/schema.ts +143 -122
- package/src/spec.ts +1 -160
- package/src/statements.ts +22 -174
- package/dist/exhume.d.ts +0 -143
- package/dist/exhume.d.ts.map +0 -1
- package/dist/exhume.js +0 -166
- package/dist/exhume.js.map +0 -1
- package/src/exhume.ts +0 -267
package/dist/lower.js
CHANGED
|
@@ -3,18 +3,16 @@
|
|
|
3
3
|
* data (`#spec.ts`), which the napi bridge marshals verbatim. Lowering is
|
|
4
4
|
* TOTAL on well-typed inputs — no validation lives here beyond what the
|
|
5
5
|
* types and the construction boundaries already guarantee — and it is the
|
|
6
|
-
* only place statement internals are read for the wire.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* only place statement internals are read for the wire. In particular,
|
|
7
|
+
* lowering never emits an engine-refused containment target: it accepts
|
|
8
|
+
* only `schema` outputs, and `schema`'s target-key wall already
|
|
9
|
+
* refused any non-key target projection (60-containment-parity —
|
|
10
|
+
* totality INHERITED, not re-checked). Ordering is declaration order
|
|
11
|
+
* throughout, and every output object is built with one fixed key order,
|
|
12
|
+
* so serialization is deterministic (byte-stable).
|
|
9
13
|
*/
|
|
10
14
|
import * as errors from "@superbuilders/errors";
|
|
11
15
|
import { isClosedMember } from "#closed.ts";
|
|
12
|
-
/**
|
|
13
|
-
* Lowers one field descriptor's structural type to the wire
|
|
14
|
-
* {@link ValueTypeSpec}: the S1 kind tags map 1:1 onto the `ValueType`
|
|
15
|
-
* vocabulary (`str` spells `string`, `bytes` spells `fixedBytes` with its
|
|
16
|
-
* width label as `len`; intervals carry element and width labels through).
|
|
17
|
-
*/
|
|
18
16
|
function valueTypeOf(field) {
|
|
19
17
|
switch (field.kind) {
|
|
20
18
|
case "bool":
|
|
@@ -31,16 +29,6 @@ function valueTypeOf(field) {
|
|
|
31
29
|
return { kind: "interval", element: field.element, width: field.width };
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Lowers one field descriptor to its {@link FieldSpec}: the structural
|
|
36
|
-
* type, the structural fresh mark (`fresh` is the literal `true` exactly
|
|
37
|
-
* on a fresh-marked u64 — on an unmarked one the property holds the marked
|
|
38
|
-
* descriptor, never `true`), and the wire's `newtype` — the COMPUTED class
|
|
39
|
-
* name `schema()` derived from the statement list (the laws type the
|
|
40
|
-
* columns), `undefined` on a bare field. The engine reads newtypes for
|
|
41
|
-
* handle resolution and the coherence check only and DROPS them at
|
|
42
|
-
* descriptor lowering — class names are never fingerprinted.
|
|
43
|
-
*/
|
|
44
32
|
function lowerField(name, field, newtype) {
|
|
45
33
|
return {
|
|
46
34
|
name,
|
|
@@ -49,7 +37,6 @@ function lowerField(name, field, newtype) {
|
|
|
49
37
|
fresh: "fresh" in field && field.fresh === true
|
|
50
38
|
};
|
|
51
39
|
}
|
|
52
|
-
/** Lowers one face to a `SideSpec`: names only, σ as (field, set) pairs. */
|
|
53
40
|
function lowerFace(face) {
|
|
54
41
|
return {
|
|
55
42
|
relation: face.owner.name,
|
|
@@ -59,12 +46,6 @@ function lowerFace(face) {
|
|
|
59
46
|
})
|
|
60
47
|
};
|
|
61
48
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Lowers one statement. `mirrors` stays ONE spec statement
|
|
64
|
-
* (`bidirectional: true`) — the engine performs the `==` lowering to two
|
|
65
|
-
* adjacent containments, `source <= target` first, exactly as the macro
|
|
66
|
-
* does.
|
|
67
|
-
*/
|
|
68
49
|
function lowerStatement(statement) {
|
|
69
50
|
const data = statement.data;
|
|
70
51
|
switch (data.kind) {
|
|
@@ -94,29 +75,12 @@ function lowerStatement(statement) {
|
|
|
94
75
|
};
|
|
95
76
|
}
|
|
96
77
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Lowers one ordinary relation to its `RelationSpec` fragment: fields in
|
|
99
|
-
* declaration order, each carrying its law-computed class name as the
|
|
100
|
-
* `newtype` (`classes` — the schema's class record for this relation;
|
|
101
|
-
* bare fields carry `undefined`), `closed: undefined` (the option is the
|
|
102
|
-
* kind — one sum, R7).
|
|
103
|
-
*/
|
|
104
78
|
function lowerRelation(relation, classes) {
|
|
105
79
|
const fields = relation.data.fields.map(function lowerDeclared(declared) {
|
|
106
80
|
return lowerField(declared.name, declared.field, classes[declared.name]);
|
|
107
81
|
});
|
|
108
82
|
return { name: relation.name, fields, closed: undefined };
|
|
109
83
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Lowers one closed relation to its `RelationSpec` fragment: declared
|
|
112
|
-
* intrinsic columns only (the engine materializes the synthetic `id`) and
|
|
113
|
-
* the fused closedness sum (R7) — the handle newtype (the COMPUTED class
|
|
114
|
-
* name of the id's generator class, `"Kind.id"`, always present: a closed
|
|
115
|
-
* id is a generator; every referencing field shares it by law, which is
|
|
116
|
-
* how the engine resolves a handle literal back to its roster) together
|
|
117
|
-
* with the ground axioms in declaration order (row id = index); the
|
|
118
|
-
* literals were already lowered at `closed()` construction.
|
|
119
|
-
*/
|
|
120
84
|
function lowerClosed(member, classes) {
|
|
121
85
|
const fields = member.data.columns.map(function lowerColumn(column) {
|
|
122
86
|
return lowerField(column.name, column.field, classes[column.name]);
|
|
@@ -130,16 +94,7 @@ function lowerClosed(member, classes) {
|
|
|
130
94
|
}
|
|
131
95
|
return { name: member.name, fields, closed: { newtype, rows } };
|
|
132
96
|
}
|
|
133
|
-
/** The frozen empty class record a relation outside the schema's map lowers under (nothing classed). */
|
|
134
97
|
const noClasses = Object.freeze({});
|
|
135
|
-
/**
|
|
136
|
-
* Lowers a whole theory to the `SchemaSpec` the bridge takes: relations in
|
|
137
|
-
* record declaration order, DECLARED statements only in written order (the
|
|
138
|
-
* engine materializes the fresh-implied and closed auto-keys itself), and
|
|
139
|
-
* every field's `newtype` slot fed from the schema's law-computed class
|
|
140
|
-
* map — the ONE domain authority (fingerprint-neutral: the engine drops
|
|
141
|
-
* newtypes at descriptor lowering).
|
|
142
|
-
*/
|
|
143
98
|
function lower(theory) {
|
|
144
99
|
const relations = Object.entries(theory.relations).map(function lowerMember([name, member]) {
|
|
145
100
|
const classes = theory.classes[name] ?? noClasses;
|
|
@@ -150,5 +105,5 @@ function lower(theory) {
|
|
|
150
105
|
});
|
|
151
106
|
return { relations, statements: theory.statements.map(lowerStatement) };
|
|
152
107
|
}
|
|
153
|
-
export { lower
|
|
108
|
+
export { lower };
|
|
154
109
|
//# sourceMappingURL=lower.js.map
|
package/dist/lower.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lower.js","sourceRoot":"","sources":["../src/lower.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lower.js","sourceRoot":"","sources":["../src/lower.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAiB3C,SAAS,WAAW,CAAC,KAAe;IACnC,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,MAAM;YACV,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;QACxB,KAAK,KAAK;YACT,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;QACvB,KAAK,KAAK;YACT,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;QACvB,KAAK,KAAK;YACT,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;QAC1B,KAAK,OAAO;YACX,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,CAAA;QAChD,KAAK,UAAU;YACd,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAA;IACzE,CAAC;AACF,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,KAAe,EAAE,OAA2B;IAC7E,OAAO;QACN,IAAI;QACJ,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC;QAC7B,OAAO;QACP,KAAK,EAAE,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI;KAC/C,CAAA;AACF,CAAC;AAED,SAAS,SAAS,CAAC,IAAc;IACh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AI,EAAE,EAAE,CAAA;AAChE,CAAC;AAED,MAAM,SAAS,GAAoB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AAEpD,SAAS,KAAK,CAAC,MAAiB;IAC/B,MAAM,SAAS,GAAmB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,SAAS,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC;QACzG,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,SAAS,CAAA;QACjD,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACpC,CAAC;QACD,OAAO,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;IACF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAA;AACxE,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/marshal.d.ts
CHANGED
|
@@ -29,80 +29,15 @@
|
|
|
29
29
|
import type { AnyField, ClosedRoster } from "./fields.js";
|
|
30
30
|
import type { FactValue } from "./native.js";
|
|
31
31
|
import type { AnyRelation, Fact, FreshKeys, RelationData } from "./relation.js";
|
|
32
|
-
/**
|
|
33
|
-
* The fresh-mark probe: `true` exactly for a `.fresh`-marked u64 descriptor
|
|
34
|
-
* (the S1 kernel's one structural mark — an unmarked u64's `fresh` property
|
|
35
|
-
* holds the MARKED descriptor, so the probe compares against the literal
|
|
36
|
-
* `true`, never truthiness).
|
|
37
|
-
*/
|
|
38
32
|
declare function isFreshField(field: AnyField): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The key object `get` reads through. THE PRIMARY-KEY RULE: `get` always
|
|
41
|
-
* reads through the PRIMARY candidate key — the first-declared one in the
|
|
42
|
-
* engine's materialized statement order (fresh-implied keys first, closed
|
|
43
|
-
* auto-keys second, declared `key()` statements last), so a fresh-bearing
|
|
44
|
-
* relation's primary key is always its fresh field. When `R` carries a
|
|
45
|
-
* fresh field the type demands exactly that field; otherwise the primary
|
|
46
|
-
* key lives in the schema's statement list, which the type system cannot
|
|
47
|
-
* see (the schema's statement list is not carried in the schema's type,
|
|
48
|
-
* only in the KeyStatement values themselves), so the type admits any partial fact
|
|
49
|
-
* and the projection is verified at runtime — a missing key field throws
|
|
50
|
-
* naming the projection.
|
|
51
|
-
*/
|
|
52
33
|
type KeyFact<R extends AnyRelation> = [FreshKeys<R>] extends [never] ? Partial<Fact<R>> : {
|
|
53
34
|
[K in FreshKeys<R>]: Fact<R>[K];
|
|
54
35
|
};
|
|
55
|
-
/**
|
|
56
|
-
* Reprojects any host object to a string-indexed record — the boundary
|
|
57
|
-
* through which generic fact objects (whose type parameters carry no index
|
|
58
|
-
* signature) enter the name-directed marshaling below, without a cast. An
|
|
59
|
-
* ALLOCATION-FREE IDENTITY (the admission predicate is the type
|
|
60
|
-
* reprojection; the value passes through untouched): every consumer
|
|
61
|
-
* downstream — `rowOf`, `keyRowOf`, the query param marshal — only READS
|
|
62
|
-
* properties, so no copy is warranted.
|
|
63
|
-
*/
|
|
64
36
|
declare function recordOf(fact: object): Readonly<Record<string, unknown>>;
|
|
65
|
-
/**
|
|
66
|
-
* The read half of the closed bijection: one u64 row id back to its handle
|
|
67
|
-
* NAME (`Number(cell)` is safe — the sealed extension holds at most 256
|
|
68
|
-
* rows, engine law). An id outside the roster THROWS pointed, never a
|
|
69
|
-
* silent fallback and never `undefined`: the state is reachable only in a
|
|
70
|
-
* store whose closed-typed column was never pinned by its containment law,
|
|
71
|
-
* and the error names that missing piece.
|
|
72
|
-
*/
|
|
73
37
|
declare function handleOf(context: string, closed: ClosedRoster, cell: FactValue): string;
|
|
74
|
-
/**
|
|
75
|
-
* Marshals one host cell at its field position to the natural wire value,
|
|
76
|
-
* schema-directed by the field descriptor's structural kind (never
|
|
77
|
-
* guessed). A closed-referencing cell arrives as its handle NAME and
|
|
78
|
-
* lowers through {@link closedCellOf} — the arm precedes the switch
|
|
79
|
-
* because a closed reference is structurally a u64 descriptor plus the
|
|
80
|
-
* roster (the same precedence `Infer` pins at the type level). Everything
|
|
81
|
-
* else is bare, so the runtime values ARE the wire's natural JS values;
|
|
82
|
-
* widths and domain labels are the engine's own judgment at the write
|
|
83
|
-
* boundary.
|
|
84
|
-
*/
|
|
85
38
|
declare function cellOf(context: string, field: AnyField, value: unknown): FactValue;
|
|
86
|
-
/**
|
|
87
|
-
* Marshals one complete fact object to its positional row, in field
|
|
88
|
-
* declaration order (= ordinal ids). Every declared field must be present.
|
|
89
|
-
* Mint with `tx.reserve` first; insert takes complete facts.
|
|
90
|
-
*/
|
|
91
39
|
declare function rowOf(relation: RelationData, fact: Readonly<Record<string, unknown>>): FactValue[];
|
|
92
|
-
/**
|
|
93
|
-
* Marshals a key object through a key statement's projection, in the
|
|
94
|
-
* statement's projection order (what the engine's keyed point reads take).
|
|
95
|
-
* A key field absent from the object throws naming the primary projection
|
|
96
|
-
* (the {@link KeyFact} rule's runtime half).
|
|
97
|
-
*/
|
|
98
40
|
declare function keyRowOf(relation: RelationData, projection: readonly string[], key: Readonly<Record<string, unknown>>): FactValue[];
|
|
99
|
-
/**
|
|
100
|
-
* Unmarshals one positional row to the relation's named, frozen fact object
|
|
101
|
-
* of bare structural values — the inverse of {@link rowOf},
|
|
102
|
-
* ordinal-directed by the same declaration order. Closed-referencing cells
|
|
103
|
-
* lift id → handle NAME through {@link handleOf} (the read half of the
|
|
104
|
-
* bijection), so every fact a user sees speaks the roster's vocabulary.
|
|
105
|
-
*/
|
|
106
41
|
declare function factOf<R extends AnyRelation>(relation: R, row: readonly FactValue[]): Fact<R>;
|
|
107
42
|
export type { KeyFact };
|
|
108
43
|
export { cellOf, factOf, handleOf, isFreshField, keyRowOf, recordOf, rowOf };
|
package/dist/marshal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marshal.d.ts","sourceRoot":"","sources":["../src/marshal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E
|
|
1
|
+
{"version":3,"file":"marshal.d.ts","sourceRoot":"","sources":["../src/marshal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E,iBAAS,YAAY,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAE9C;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAChB;KAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAA;AAEtC,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAKjE;AAyBD,iBAAS,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAWhF;AAED,iBAAS,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,CA6C3E;AAED,iBAAS,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,EAAE,CAQ3F;AAED,iBAAS,QAAQ,CAChB,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACpC,SAAS,EAAE,CAgBb;AAWD,iBAAS,MAAM,CAAC,CAAC,SAAS,WAAW,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAsBtF;AAED,YAAY,EAAE,OAAO,EAAE,CAAA;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/marshal.js
CHANGED
|
@@ -28,37 +28,15 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import * as errors from "@superbuilders/errors";
|
|
30
30
|
import { isIntervalValue, literalShapeError, rosterOf } from "#fields.ts";
|
|
31
|
-
/**
|
|
32
|
-
* The fresh-mark probe: `true` exactly for a `.fresh`-marked u64 descriptor
|
|
33
|
-
* (the S1 kernel's one structural mark — an unmarked u64's `fresh` property
|
|
34
|
-
* holds the MARKED descriptor, so the probe compares against the literal
|
|
35
|
-
* `true`, never truthiness).
|
|
36
|
-
*/
|
|
37
31
|
function isFreshField(field) {
|
|
38
32
|
return "fresh" in field && field.fresh === true;
|
|
39
33
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Reprojects any host object to a string-indexed record — the boundary
|
|
42
|
-
* through which generic fact objects (whose type parameters carry no index
|
|
43
|
-
* signature) enter the name-directed marshaling below, without a cast. An
|
|
44
|
-
* ALLOCATION-FREE IDENTITY (the admission predicate is the type
|
|
45
|
-
* reprojection; the value passes through untouched): every consumer
|
|
46
|
-
* downstream — `rowOf`, `keyRowOf`, the query param marshal — only READS
|
|
47
|
-
* properties, so no copy is warranted.
|
|
48
|
-
*/
|
|
49
34
|
function recordOf(fact) {
|
|
50
35
|
if (!isStringIndexed(fact)) {
|
|
51
36
|
throw errors.new("fact object is not string-indexable");
|
|
52
37
|
}
|
|
53
38
|
return fact;
|
|
54
39
|
}
|
|
55
|
-
/**
|
|
56
|
-
* The trusted admission seam of {@link recordOf}: every JS object IS
|
|
57
|
-
* string-indexable (property reads on absent names yield `undefined`,
|
|
58
|
-
* which every consumer already guards), so the predicate verifies the one
|
|
59
|
-
* checkable fact — objecthood — and admits the value at the indexed type
|
|
60
|
-
* without a copy or a cast.
|
|
61
|
-
*/
|
|
62
40
|
function isStringIndexed(value) {
|
|
63
41
|
return typeof value === "object" || typeof value === "function";
|
|
64
42
|
}
|
|
@@ -78,14 +56,6 @@ function closedCellOf(context, closed, name) {
|
|
|
78
56
|
}
|
|
79
57
|
return BigInt(id);
|
|
80
58
|
}
|
|
81
|
-
/**
|
|
82
|
-
* The read half of the closed bijection: one u64 row id back to its handle
|
|
83
|
-
* NAME (`Number(cell)` is safe — the sealed extension holds at most 256
|
|
84
|
-
* rows, engine law). An id outside the roster THROWS pointed, never a
|
|
85
|
-
* silent fallback and never `undefined`: the state is reachable only in a
|
|
86
|
-
* store whose closed-typed column was never pinned by its containment law,
|
|
87
|
-
* and the error names that missing piece.
|
|
88
|
-
*/
|
|
89
59
|
function handleOf(context, closed, cell) {
|
|
90
60
|
if (typeof cell !== "bigint") {
|
|
91
61
|
throw literalShapeError(context, `a ${closed.name} handle id (bigint)`, cell);
|
|
@@ -96,17 +66,6 @@ function handleOf(context, closed, cell) {
|
|
|
96
66
|
}
|
|
97
67
|
return handle;
|
|
98
68
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Marshals one host cell at its field position to the natural wire value,
|
|
101
|
-
* schema-directed by the field descriptor's structural kind (never
|
|
102
|
-
* guessed). A closed-referencing cell arrives as its handle NAME and
|
|
103
|
-
* lowers through {@link closedCellOf} — the arm precedes the switch
|
|
104
|
-
* because a closed reference is structurally a u64 descriptor plus the
|
|
105
|
-
* roster (the same precedence `Infer` pins at the type level). Everything
|
|
106
|
-
* else is bare, so the runtime values ARE the wire's natural JS values;
|
|
107
|
-
* widths and domain labels are the engine's own judgment at the write
|
|
108
|
-
* boundary.
|
|
109
|
-
*/
|
|
110
69
|
function cellOf(context, field, value) {
|
|
111
70
|
const roster = rosterOf(field);
|
|
112
71
|
if (roster !== undefined) {
|
|
@@ -133,13 +92,6 @@ function cellOf(context, field, value) {
|
|
|
133
92
|
if (typeof value !== "string") {
|
|
134
93
|
throw literalShapeError(context, "string", value);
|
|
135
94
|
}
|
|
136
|
-
/**
|
|
137
|
-
* A lone surrogate would be lossily replaced with U+FFFD at the
|
|
138
|
-
* bridge's UTF-8 crossing — the stored fact would differ from the
|
|
139
|
-
* written one, and distinct JS strings would collapse to one fact.
|
|
140
|
-
* The bijection law refuses it here, the one seam every write and
|
|
141
|
-
* lookup lowers through.
|
|
142
|
-
*/
|
|
143
95
|
if (!value.isWellFormed()) {
|
|
144
96
|
throw literalShapeError(context, "well-formed string", value);
|
|
145
97
|
}
|
|
@@ -159,11 +111,6 @@ function cellOf(context, field, value) {
|
|
|
159
111
|
}
|
|
160
112
|
}
|
|
161
113
|
}
|
|
162
|
-
/**
|
|
163
|
-
* Marshals one complete fact object to its positional row, in field
|
|
164
|
-
* declaration order (= ordinal ids). Every declared field must be present.
|
|
165
|
-
* Mint with `tx.reserve` first; insert takes complete facts.
|
|
166
|
-
*/
|
|
167
114
|
function rowOf(relation, fact) {
|
|
168
115
|
return relation.fields.map(function marshalCell(declared) {
|
|
169
116
|
const value = fact[declared.name];
|
|
@@ -173,12 +120,6 @@ function rowOf(relation, fact) {
|
|
|
173
120
|
return cellOf(`relation ${relation.name} field ${declared.name}`, declared.field, value);
|
|
174
121
|
});
|
|
175
122
|
}
|
|
176
|
-
/**
|
|
177
|
-
* Marshals a key object through a key statement's projection, in the
|
|
178
|
-
* statement's projection order (what the engine's keyed point reads take).
|
|
179
|
-
* A key field absent from the object throws naming the primary projection
|
|
180
|
-
* (the {@link KeyFact} rule's runtime half).
|
|
181
|
-
*/
|
|
182
123
|
function keyRowOf(relation, projection, key) {
|
|
183
124
|
return projection.map(function marshalKeyCell(fieldName) {
|
|
184
125
|
const declared = relation.fields.find(function byName(candidate) {
|
|
@@ -194,24 +135,11 @@ function keyRowOf(relation, projection, key) {
|
|
|
194
135
|
return cellOf(`relation ${relation.name} key field ${fieldName}`, declared.field, value);
|
|
195
136
|
});
|
|
196
137
|
}
|
|
197
|
-
/**
|
|
198
|
-
* The read-side trusted seam: a decoded row carrying every declared field
|
|
199
|
-
* IS a fact of its relation — the engine admitted the row, and the values
|
|
200
|
-
* are BARE structural values, so nothing is asserted beyond presence (no
|
|
201
|
-
* brand exists to re-derive; the store is the proof carrier).
|
|
202
|
-
*/
|
|
203
138
|
function isCompleteFact(relation, decoded) {
|
|
204
139
|
return relation.data.fields.every(function present(declared) {
|
|
205
140
|
return decoded[declared.name] !== undefined;
|
|
206
141
|
});
|
|
207
142
|
}
|
|
208
|
-
/**
|
|
209
|
-
* Unmarshals one positional row to the relation's named, frozen fact object
|
|
210
|
-
* of bare structural values — the inverse of {@link rowOf},
|
|
211
|
-
* ordinal-directed by the same declaration order. Closed-referencing cells
|
|
212
|
-
* lift id → handle NAME through {@link handleOf} (the read half of the
|
|
213
|
-
* bijection), so every fact a user sees speaks the roster's vocabulary.
|
|
214
|
-
*/
|
|
215
143
|
function factOf(relation, row) {
|
|
216
144
|
const data = relation.data;
|
|
217
145
|
if (row.length !== data.fields.length) {
|
package/dist/marshal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marshal.js","sourceRoot":"","sources":["../src/marshal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIzE
|
|
1
|
+
{"version":3,"file":"marshal.js","sourceRoot":"","sources":["../src/marshal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIzE,SAAS,YAAY,CAAC,KAAe;IACpC,OAAO,OAAO,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAA;AAChD,CAAC;AAMD,SAAS,QAAQ,CAAC,IAAY;IAC7B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAA;IACxD,CAAC;IACD,OAAO,IAAI,CAAA;AACZ,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAA;AAChE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,YAAY,CAAC,OAAe,EAAE,MAAoB,EAAE,IAAY;IACxE,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,MAAM,MAAM,CAAC,GAAG,CACf,GAAG,OAAO,MAAM,IAAI,wBAAwB,MAAM,CAAC,IAAI,oBAAoB,MAAM,CAAC,OAAO,C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