@bjornpagen/bumbledb 0.1.0 → 0.3.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 +1450 -0
- package/README.md +69 -30
- package/dist/closed.d.ts +157 -38
- package/dist/closed.d.ts.map +1 -1
- package/dist/closed.js +232 -47
- package/dist/closed.js.map +1 -1
- package/dist/count.d.ts +64 -17
- package/dist/count.d.ts.map +1 -1
- package/dist/count.js +37 -14
- package/dist/count.js.map +1 -1
- package/dist/db.d.ts +27 -8
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +33 -10
- package/dist/db.js.map +1 -1
- package/dist/exhume.d.ts +12 -11
- package/dist/exhume.d.ts.map +1 -1
- package/dist/exhume.js +7 -6
- package/dist/exhume.js.map +1 -1
- package/dist/face.d.ts +135 -30
- package/dist/face.d.ts.map +1 -1
- package/dist/face.js +44 -19
- package/dist/face.js.map +1 -1
- package/dist/fields.d.ts +130 -130
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +60 -94
- package/dist/fields.js.map +1 -1
- package/dist/index.d.ts +29 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -14
- package/dist/index.js.map +1 -1
- package/dist/law.d.ts +224 -0
- package/dist/law.d.ts.map +1 -0
- package/dist/law.js +224 -0
- package/dist/law.js.map +1 -0
- package/dist/lower.d.ts +17 -7
- package/dist/lower.d.ts.map +1 -1
- package/dist/lower.js +66 -24
- package/dist/lower.js.map +1 -1
- package/dist/marshal.d.ts +36 -21
- package/dist/marshal.d.ts.map +1 -1
- package/dist/marshal.js +41 -25
- package/dist/marshal.js.map +1 -1
- package/dist/native.d.ts +6 -2
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +2 -2
- package/dist/native.js.map +1 -1
- package/dist/query/atom.d.ts +370 -174
- package/dist/query/atom.d.ts.map +1 -1
- package/dist/query/atom.js +75 -172
- package/dist/query/atom.js.map +1 -1
- package/dist/query/lower.d.ts +312 -109
- package/dist/query/lower.d.ts.map +1 -1
- package/dist/query/lower.js +906 -387
- package/dist/query/lower.js.map +1 -1
- package/dist/query/predicate.d.ts +70 -88
- package/dist/query/predicate.d.ts.map +1 -1
- package/dist/query/predicate.js +118 -72
- package/dist/query/predicate.js.map +1 -1
- package/dist/query/run.d.ts +19 -16
- package/dist/query/run.d.ts.map +1 -1
- package/dist/query/run.js +31 -24
- package/dist/query/run.js.map +1 -1
- package/dist/query/scope.d.ts +178 -127
- package/dist/query/scope.d.ts.map +1 -1
- package/dist/query/scope.js +111 -108
- package/dist/query/scope.js.map +1 -1
- package/dist/query/select.d.ts +102 -80
- package/dist/query/select.d.ts.map +1 -1
- package/dist/query/select.js +39 -34
- package/dist/query/select.js.map +1 -1
- package/dist/relation.d.ts +48 -38
- package/dist/relation.d.ts.map +1 -1
- package/dist/relation.js +24 -19
- package/dist/relation.js.map +1 -1
- package/dist/schema.d.ts +41 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +34 -9
- package/dist/schema.js.map +1 -1
- package/dist/spec.d.ts +7 -5
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js.map +1 -1
- package/dist/statements.d.ts +91 -36
- package/dist/statements.d.ts.map +1 -1
- package/dist/statements.js +42 -12
- package/dist/statements.js.map +1 -1
- package/package.json +4 -3
- package/src/closed.ts +448 -95
- package/src/count.ts +112 -18
- package/src/db.ts +45 -17
- package/src/exhume.ts +12 -11
- package/src/face.ts +211 -41
- package/src/fields.ts +199 -234
- package/src/index.ts +78 -61
- package/src/law.ts +519 -0
- package/src/lower.ts +82 -27
- package/src/marshal.ts +48 -30
- package/src/native.ts +8 -4
- package/src/query/atom.ts +525 -374
- package/src/query/lower.ts +1469 -538
- package/src/query/predicate.ts +208 -161
- package/src/query/run.ts +35 -25
- package/src/query/scope.ts +264 -218
- package/src/query/select.ts +168 -93
- package/src/relation.ts +47 -47
- package/src/schema.ts +69 -18
- package/src/spec.ts +7 -5
- package/src/statements.ts +124 -41
- package/dist/brand.d.ts +0 -59
- package/dist/brand.d.ts.map +0 -1
- package/dist/brand.js +0 -47
- package/dist/brand.js.map +0 -1
- package/src/brand.ts +0 -82
package/dist/fields.d.ts
CHANGED
|
@@ -1,134 +1,139 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Field
|
|
3
|
-
* (`docs/architecture/70-api.md`): `bool`, `u64`, `i64`,
|
|
4
|
-
* `interval(u64|i64[, width])`, each a plain frozen value
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `.fresh` exists only on
|
|
14
|
-
*
|
|
15
|
-
*
|
|
2
|
+
* Field descriptors — the value half of the `schema!` field grammar
|
|
3
|
+
* (`docs/architecture/70-api.md`), MINIMAL edition: `bool`, `u64`, `i64`,
|
|
4
|
+
* `str`, `bytes(n)`, `interval(u64|i64[, width])`, each a plain frozen value
|
|
5
|
+
* that IS its own descriptor type — `{ kind, width?, element?, fresh? }` —
|
|
6
|
+
* honest at runtime and in the type alike. A field's VALUE type is its bare
|
|
7
|
+
* structural type (`u64` → `bigint`, `str` → `string`, `bytes(n)` →
|
|
8
|
+
* `Uint8Array`, intervals → `{ start, end }`): no brands, no phantoms, no
|
|
9
|
+
* minting casts. A descriptor carries STRUCTURE ONLY — domains are never
|
|
10
|
+
* declared anywhere (the owner ruling: THE LAWS TYPE THE COLUMNS): a
|
|
11
|
+
* field's domain is COMPUTED by `schema()` from the statement list, where
|
|
12
|
+
* the dependencies themselves induce the equivalence classes. The macro's
|
|
13
|
+
* refusals are reproduced representationally: `.fresh` exists only on u64,
|
|
14
|
+
* and no field-level constraint vocabulary of any kind exists —
|
|
15
|
+
* `unique`/`fk` are unwritable, not rejected.
|
|
16
16
|
*/
|
|
17
|
-
import type {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import type { LiteralSpec } from "#spec.ts";
|
|
18
|
+
/**
|
|
19
|
+
* A half-open interval `[start, end)` as a plain value object — the ONE
|
|
20
|
+
* interval value type, whatever the field's element type or width label.
|
|
21
|
+
* The ray is representable (`end` = the element type's MAX_END); widths
|
|
22
|
+
* and signedness are NOT modeled on the value — they are descriptor-type
|
|
23
|
+
* labels the engine judges at the typed write boundary. Interval fields
|
|
24
|
+
* derive no order (the Rust refusal, `docs/architecture/10-data-model.md`),
|
|
25
|
+
* so no comparators exist on the value type.
|
|
26
|
+
*/
|
|
27
|
+
interface IntervalValue {
|
|
28
|
+
readonly start: bigint;
|
|
29
|
+
readonly end: bigint;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Constructs an interval literal — the `start..end` spelling. Half-open
|
|
33
|
+
* and nonempty by construction: `start >= end` is a typed construction
|
|
34
|
+
* error (parse, don't validate — the same invariant Rust's
|
|
35
|
+
* `Interval::new` enforces at the host boundary). The value is bare and
|
|
36
|
+
* structural: it is assignable to any interval field.
|
|
37
|
+
*/
|
|
38
|
+
declare function span(start: bigint, end: bigint): IntervalValue;
|
|
20
39
|
/**
|
|
21
40
|
* A closed relation's roster as seen from a referencing field: the handle
|
|
22
|
-
* namespace `where()` selections and ground axioms resolve bare
|
|
23
|
-
* through (the macro's own rule: a handle is legal exactly on a field
|
|
24
|
-
*
|
|
41
|
+
* namespace `where()` selections and ground axioms resolve bare handle ids
|
|
42
|
+
* through (the macro's own rule: a handle is legal exactly on a field that
|
|
43
|
+
* references a closed relation).
|
|
25
44
|
*/
|
|
26
45
|
interface ClosedRoster {
|
|
27
46
|
readonly name: string;
|
|
28
47
|
readonly handles: readonly string[];
|
|
29
48
|
}
|
|
49
|
+
/** The `bool` field descriptor: value type `boolean`. No `.fresh` (macro parity). */
|
|
50
|
+
interface BoolField {
|
|
51
|
+
readonly kind: "bool";
|
|
52
|
+
}
|
|
53
|
+
/** The `str` field descriptor: value type `string`. No `.fresh` (macro parity). */
|
|
54
|
+
interface StrField {
|
|
55
|
+
readonly kind: "str";
|
|
56
|
+
}
|
|
30
57
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
58
|
+
* A `fresh`-marked u64 field descriptor — `id: u64.fresh`. The mark is a
|
|
59
|
+
* structural label (`fresh: true`) in the descriptor type AND on the
|
|
60
|
+
* runtime value; it implies the key `R(field) -> R`, which the ENGINE
|
|
61
|
+
* materializes (`SchemaDescriptor::materialized_statements`), and it makes
|
|
62
|
+
* the field a GENERATOR — `schema()` names its equivalence class by the
|
|
63
|
+
* declaration coordinate (`"Account.id"`). Terminal: no builder property
|
|
64
|
+
* survives the mark.
|
|
35
65
|
*/
|
|
36
|
-
interface
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
39
|
-
readonly minted: Minted;
|
|
40
|
-
readonly closed: ClosedRoster | undefined;
|
|
66
|
+
interface FreshU64Field {
|
|
67
|
+
readonly kind: "u64";
|
|
68
|
+
readonly fresh: true;
|
|
41
69
|
}
|
|
42
70
|
/**
|
|
43
|
-
* The
|
|
44
|
-
*
|
|
71
|
+
* The `u64` field descriptor. `.fresh` marks the field as engine-minted —
|
|
72
|
+
* the property doubles as the mark itself: on an unmarked descriptor it
|
|
73
|
+
* holds the marked descriptor, on a marked one it IS the literal `true`
|
|
74
|
+
* (one structural property, read either way).
|
|
45
75
|
*/
|
|
46
|
-
interface
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
}
|
|
50
|
-
/** Extracts a field value's host value type from its phantom. */
|
|
51
|
-
type FieldValue<F> = F extends Field<infer V> ? V : never;
|
|
52
|
-
/** Any field value, whatever its host value type. */
|
|
53
|
-
type AnyField = Field<unknown>;
|
|
54
|
-
/** The `bool` field: host type `boolean`. No `.newtype`, no `.fresh` (macro parity). */
|
|
55
|
-
interface BoolField extends Field<boolean> {
|
|
56
|
-
readonly data: FieldData<false>;
|
|
76
|
+
interface U64Field {
|
|
77
|
+
readonly kind: "u64";
|
|
78
|
+
readonly fresh: FreshU64Field;
|
|
57
79
|
}
|
|
58
|
-
/** The `
|
|
59
|
-
interface
|
|
60
|
-
readonly
|
|
80
|
+
/** The `i64` field descriptor. Terminal: `.fresh` is legal on u64 only. */
|
|
81
|
+
interface I64Field {
|
|
82
|
+
readonly kind: "i64";
|
|
61
83
|
}
|
|
62
84
|
/**
|
|
63
|
-
* A `
|
|
64
|
-
*
|
|
65
|
-
* `
|
|
66
|
-
*
|
|
67
|
-
* explicit duplicate of it (macro parity).
|
|
85
|
+
* A `bytes<N>` field descriptor. The width is a descriptor-type label
|
|
86
|
+
* (load-bearing: the engine enforces it at the write boundary) and the
|
|
87
|
+
* value type is bare `Uint8Array`. No order is derived — no comparators
|
|
88
|
+
* exist on the value type (the engine refuses order on bytes).
|
|
68
89
|
*/
|
|
69
|
-
interface
|
|
70
|
-
readonly
|
|
90
|
+
interface BytesField<Width extends number = number> {
|
|
91
|
+
readonly kind: "bytes";
|
|
92
|
+
readonly width: Width;
|
|
71
93
|
}
|
|
72
94
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* fields, so bare-u64 fresh is unwritable).
|
|
95
|
+
* An interval field descriptor — `interval(i64)` general (rays
|
|
96
|
+
* representable), `interval(u64, w)` the fixed-width family. Element and
|
|
97
|
+
* width are descriptor-type labels; the value type is always the bare
|
|
98
|
+
* {@link IntervalValue}.
|
|
78
99
|
*/
|
|
79
|
-
interface
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
82
|
-
|
|
83
|
-
/** The bare `u64` field; `.newtype(name)` declares a branded u64 newtype. */
|
|
84
|
-
interface U64Field extends Field<bigint> {
|
|
85
|
-
readonly data: FieldData<false>;
|
|
86
|
-
newtype<const Name extends string>(name: Name): U64Newtype<Name>;
|
|
87
|
-
}
|
|
88
|
-
/** A declared i64 newtype. Terminal: `fresh` is legal on u64 only. */
|
|
89
|
-
interface I64Newtype<Name extends string> extends Field<Brand<bigint, Name>> {
|
|
90
|
-
readonly data: FieldData<false>;
|
|
91
|
-
}
|
|
92
|
-
/** The bare `i64` field; `.newtype(name)` declares a branded i64 newtype. */
|
|
93
|
-
interface I64Field extends Field<bigint> {
|
|
94
|
-
readonly data: FieldData<false>;
|
|
95
|
-
newtype<const Name extends string>(name: Name): I64Newtype<Name>;
|
|
96
|
-
}
|
|
97
|
-
/** A declared `bytes<N>` newtype (no order derived — no comparators exist). */
|
|
98
|
-
interface BytesNewtype<Name extends string> extends Field<Brand<Uint8Array, Name>> {
|
|
99
|
-
readonly data: FieldData<false>;
|
|
100
|
-
}
|
|
101
|
-
/** A `bytes<N>` field; `.newtype(name)` declares a branded bytes newtype. */
|
|
102
|
-
interface BytesField extends Field<Uint8Array> {
|
|
103
|
-
readonly data: FieldData<false>;
|
|
104
|
-
newtype<const Name extends string>(name: Name): BytesNewtype<Name>;
|
|
105
|
-
}
|
|
106
|
-
/** A declared interval newtype — Rust: `interval<i64> as ActiveDuring`. */
|
|
107
|
-
interface IntervalNewtype<Name extends string> extends Field<Interval<Name>> {
|
|
108
|
-
readonly data: FieldData<false>;
|
|
109
|
-
}
|
|
110
|
-
/** An interval field; `.newtype(name)` brands the whole `{ start, end }` object. */
|
|
111
|
-
interface IntervalField extends Field<IntervalValue> {
|
|
112
|
-
readonly data: FieldData<false>;
|
|
113
|
-
newtype<const Name extends string>(name: Name): IntervalNewtype<Name>;
|
|
100
|
+
interface IntervalField<Element extends "u64" | "i64" = "u64" | "i64", Width extends bigint | undefined = bigint | undefined> {
|
|
101
|
+
readonly kind: "interval";
|
|
102
|
+
readonly element: Element;
|
|
103
|
+
readonly width: Width;
|
|
114
104
|
}
|
|
115
105
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
106
|
+
* A closed relation's reference field descriptor (`Kind.id`) — a u64
|
|
107
|
+
* descriptor carrying the closed linkage: the roster resolves bare handle
|
|
108
|
+
* ids in selections and ground axioms, and `schema()` names the id's
|
|
109
|
+
* generator class `"Kind.id"`. Terminal: no `.fresh` — a vocabulary's rows
|
|
110
|
+
* are ground axioms, never minted.
|
|
121
111
|
*/
|
|
122
|
-
|
|
112
|
+
interface ClosedIdField {
|
|
113
|
+
readonly kind: "u64";
|
|
114
|
+
readonly closed: ClosedRoster;
|
|
115
|
+
}
|
|
116
|
+
/** Any field descriptor, whatever its kind or marks. */
|
|
117
|
+
type AnyField = BoolField | StrField | U64Field | FreshU64Field | I64Field | BytesField | IntervalField | ClosedIdField;
|
|
123
118
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
119
|
+
* The bare structural VALUE type of a field descriptor — the one total
|
|
120
|
+
* definition every fact, result row, and query term reads: `bool` →
|
|
121
|
+
* `boolean`, `str` → `string`, `u64`/`i64` → `bigint`, `bytes<N>` →
|
|
122
|
+
* `Uint8Array`, intervals → {@link IntervalValue}.
|
|
128
123
|
*/
|
|
129
|
-
|
|
130
|
-
readonly
|
|
131
|
-
}
|
|
124
|
+
type Infer<F extends AnyField> = F extends {
|
|
125
|
+
readonly kind: "bool";
|
|
126
|
+
} ? boolean : F extends {
|
|
127
|
+
readonly kind: "str";
|
|
128
|
+
} ? string : F extends {
|
|
129
|
+
readonly kind: "u64";
|
|
130
|
+
} ? bigint : F extends {
|
|
131
|
+
readonly kind: "i64";
|
|
132
|
+
} ? bigint : F extends {
|
|
133
|
+
readonly kind: "bytes";
|
|
134
|
+
} ? Uint8Array : F extends {
|
|
135
|
+
readonly kind: "interval";
|
|
136
|
+
} ? IntervalValue : never;
|
|
132
137
|
/**
|
|
133
138
|
* Rejects a declaration name that JavaScript would re-order. Declaration
|
|
134
139
|
* order = ordinal ids is the law relations, columns, and schemas all lean
|
|
@@ -140,48 +145,43 @@ interface ClosedIdField<Name extends string> extends Field<Brand<bigint, Name>>
|
|
|
140
145
|
* error.
|
|
141
146
|
*/
|
|
142
147
|
declare function assertDeclarationOrderKey(where: string, name: string): void;
|
|
143
|
-
/**
|
|
144
|
-
* Builds one frozen {@link FieldData}. Internal seam shared by the field
|
|
145
|
-
* constructors here and by `closed()` (which mints {@link ClosedIdField}
|
|
146
|
-
* values against its own roster).
|
|
147
|
-
*/
|
|
148
|
-
declare function fieldData<Minted extends boolean>(type: ValueTypeSpec, newtype: string | undefined, minted: Minted, closed: ClosedRoster | undefined): FieldData<Minted>;
|
|
149
|
-
/** The one `u64` field constructor value. */
|
|
148
|
+
/** The one `u64` constructor value. */
|
|
150
149
|
declare const u64: U64Field;
|
|
151
|
-
/** The one `i64`
|
|
150
|
+
/** The one `i64` constructor value. */
|
|
152
151
|
declare const i64: I64Field;
|
|
153
|
-
/** The one `bool`
|
|
152
|
+
/** The one `bool` constructor value. */
|
|
154
153
|
declare const bool: BoolField;
|
|
155
|
-
/** The one `str`
|
|
154
|
+
/** The one `str` constructor value. */
|
|
156
155
|
declare const str: StrField;
|
|
157
156
|
/**
|
|
158
|
-
* The `bytes<N>` field constructor. The width is mandatory and
|
|
159
|
-
* type; `
|
|
160
|
-
* range at declaration (`docs/architecture/70-api.md`
|
|
161
|
-
* grammar: N ∈ 1..=64 — bare `bytes` does not parse), the
|
|
162
|
-
* boundary's analog being construction.
|
|
157
|
+
* The `bytes<N>` field constructor. The width is mandatory and a
|
|
158
|
+
* descriptor-type label; `width` is validated to 1..=64 here because the
|
|
159
|
+
* grammar pins that range at declaration (`docs/architecture/70-api.md`
|
|
160
|
+
* § the `schema!` grammar: N ∈ 1..=64 — bare `bytes` does not parse), the
|
|
161
|
+
* macro-expansion boundary's analog being construction.
|
|
163
162
|
*/
|
|
164
|
-
declare function bytes(
|
|
163
|
+
declare function bytes<const Width extends number>(width: Width): BytesField<Width>;
|
|
165
164
|
/**
|
|
166
165
|
* The interval field constructor — `interval(u64)` / `interval(i64)` for
|
|
167
166
|
* the general type (rays representable), `interval(u64, w)` for the
|
|
168
|
-
* fixed-width family whose width IS
|
|
169
|
-
* the u64/i64
|
|
170
|
-
* >= 1` is validated here because the grammar pins it at declaration
|
|
167
|
+
* fixed-width family whose width IS a descriptor-type label. The element is
|
|
168
|
+
* spelled with the u64/i64 constructor values themselves, never a string.
|
|
169
|
+
* `width >= 1` is validated here because the grammar pins it at declaration
|
|
171
170
|
* (`docs/architecture/70-api.md`: w ≥ 1; `interval<u64, 0>` is an
|
|
172
171
|
* expansion error naming the field).
|
|
173
172
|
*/
|
|
174
|
-
declare function interval
|
|
173
|
+
declare function interval<Element extends U64Field | I64Field>(element: Element): IntervalField<Element["kind"], undefined>;
|
|
174
|
+
declare function interval<Element extends U64Field | I64Field, const Width extends bigint>(element: Element, width: Width): IntervalField<Element["kind"], Width>;
|
|
175
175
|
/**
|
|
176
176
|
* Lowers one host literal at its field position to the wire
|
|
177
177
|
* {@link LiteralSpec} — the selection-literal machine ground axioms and
|
|
178
178
|
* `where()` bindings both ride (one machine, same errors — the macro's own
|
|
179
179
|
* rule). A value on a closed-reference field resolves to its handle NAME
|
|
180
|
-
* (the id is
|
|
180
|
+
* (the id is verified against the roster: an out-of-roster id is a
|
|
181
181
|
* construction error); everything else lowers to a plain value tagged by
|
|
182
|
-
* the field's structural
|
|
182
|
+
* the field's structural kind.
|
|
183
183
|
*/
|
|
184
|
-
declare function literalOf(field:
|
|
185
|
-
export type { AnyField, BoolField, BytesField,
|
|
186
|
-
export { assertDeclarationOrderKey, bool, bytes,
|
|
184
|
+
declare function literalOf(field: AnyField, value: unknown): LiteralSpec;
|
|
185
|
+
export type { AnyField, BoolField, BytesField, ClosedIdField, ClosedRoster, FreshU64Field, I64Field, Infer, IntervalField, IntervalValue, StrField, U64Field };
|
|
186
|
+
export { assertDeclarationOrderKey, bool, bytes, i64, interval, literalOf, span, str, u64 };
|
|
187
187
|
//# sourceMappingURL=fields.d.ts.map
|
package/dist/fields.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA;;;;;;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70-api.md`): `bool`, `u64`, `i64`,
|
|
4
|
-
* `interval(u64|i64[, width])`, each a plain frozen value
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `.fresh` exists only on
|
|
14
|
-
*
|
|
15
|
-
*
|
|
2
|
+
* Field descriptors — the value half of the `schema!` field grammar
|
|
3
|
+
* (`docs/architecture/70-api.md`), MINIMAL edition: `bool`, `u64`, `i64`,
|
|
4
|
+
* `str`, `bytes(n)`, `interval(u64|i64[, width])`, each a plain frozen value
|
|
5
|
+
* that IS its own descriptor type — `{ kind, width?, element?, fresh? }` —
|
|
6
|
+
* honest at runtime and in the type alike. A field's VALUE type is its bare
|
|
7
|
+
* structural type (`u64` → `bigint`, `str` → `string`, `bytes(n)` →
|
|
8
|
+
* `Uint8Array`, intervals → `{ start, end }`): no brands, no phantoms, no
|
|
9
|
+
* minting casts. A descriptor carries STRUCTURE ONLY — domains are never
|
|
10
|
+
* declared anywhere (the owner ruling: THE LAWS TYPE THE COLUMNS): a
|
|
11
|
+
* field's domain is COMPUTED by `schema()` from the statement list, where
|
|
12
|
+
* the dependencies themselves induce the equivalence classes. The macro's
|
|
13
|
+
* refusals are reproduced representationally: `.fresh` exists only on u64,
|
|
14
|
+
* and no field-level constraint vocabulary of any kind exists —
|
|
15
|
+
* `unique`/`fk` are unwritable, not rejected.
|
|
16
16
|
*/
|
|
17
17
|
import * as errors from "@superbuilders/errors";
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Constructs an interval literal — the `start..end` spelling. Half-open
|
|
20
|
+
* and nonempty by construction: `start >= end` is a typed construction
|
|
21
|
+
* error (parse, don't validate — the same invariant Rust's
|
|
22
|
+
* `Interval::new` enforces at the host boundary). The value is bare and
|
|
23
|
+
* structural: it is assignable to any interval field.
|
|
24
|
+
*/
|
|
25
|
+
function span(start, end) {
|
|
26
|
+
if (start >= end) {
|
|
27
|
+
throw errors.new(`interval is half-open and nonempty: start must be < end (got ${start}..${end})`);
|
|
28
|
+
}
|
|
29
|
+
return Object.freeze({ start, end });
|
|
30
|
+
}
|
|
19
31
|
/**
|
|
20
32
|
* The typed shape refusal of the selection-literal machine — reached only
|
|
21
33
|
* through ill-typed input (the well-typed surfaces make it unrepresentable).
|
|
@@ -33,10 +45,10 @@ function isIntervalLiteral(value) {
|
|
|
33
45
|
typeof value.end === "bigint");
|
|
34
46
|
}
|
|
35
47
|
/**
|
|
36
|
-
* Resolves one closed-handle literal: the
|
|
37
|
-
*
|
|
38
|
-
* construction error, the belt the type level
|
|
39
|
-
*
|
|
48
|
+
* Resolves one closed-handle literal: the handle id (a bare bigint) back to
|
|
49
|
+
* its handle NAME through the roster — an out-of-roster id is a
|
|
50
|
+
* construction error, the belt the type level deliberately does not provide
|
|
51
|
+
* (structural values make any bigint spellable here; the roster judges).
|
|
40
52
|
*/
|
|
41
53
|
function handleLiteral(closed, value) {
|
|
42
54
|
if (typeof value !== "bigint") {
|
|
@@ -73,99 +85,53 @@ function assertDeclarationOrderKey(where, name) {
|
|
|
73
85
|
throw errors.new(`${where}: name ${name} is an integer index — JavaScript object keys re-order integer indices, breaking the declaration-order law; use a non-numeric name`);
|
|
74
86
|
}
|
|
75
87
|
}
|
|
88
|
+
/** The one fresh-marked u64 descriptor (the `.fresh` property of the unmarked one). */
|
|
89
|
+
const freshU64 = Object.freeze({ kind: "u64", fresh: true });
|
|
90
|
+
/** The one `u64` constructor value. */
|
|
91
|
+
const u64 = Object.freeze({ kind: "u64", fresh: freshU64 });
|
|
92
|
+
/** The one `i64` constructor value. */
|
|
93
|
+
const i64 = Object.freeze({ kind: "i64" });
|
|
94
|
+
/** The one `bool` constructor value. */
|
|
95
|
+
const bool = Object.freeze({ kind: "bool" });
|
|
96
|
+
/** The one `str` constructor value. */
|
|
97
|
+
const str = Object.freeze({ kind: "str" });
|
|
76
98
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
99
|
+
* The `bytes<N>` field constructor. The width is mandatory and a
|
|
100
|
+
* descriptor-type label; `width` is validated to 1..=64 here because the
|
|
101
|
+
* grammar pins that range at declaration (`docs/architecture/70-api.md`
|
|
102
|
+
* § the `schema!` grammar: N ∈ 1..=64 — bare `bytes` does not parse), the
|
|
103
|
+
* macro-expansion boundary's analog being construction.
|
|
80
104
|
*/
|
|
81
|
-
function
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
/** The one `u64` field constructor value. */
|
|
85
|
-
const u64 = Object.freeze({
|
|
86
|
-
data: fieldData({ kind: "u64" }, undefined, false, undefined),
|
|
87
|
-
newtype(name) {
|
|
88
|
-
const fresh = Object.freeze({
|
|
89
|
-
data: fieldData({ kind: "u64" }, name, true, undefined)
|
|
90
|
-
});
|
|
91
|
-
return Object.freeze({
|
|
92
|
-
data: fieldData({ kind: "u64" }, name, false, undefined),
|
|
93
|
-
fresh
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
/** The one `i64` field constructor value. */
|
|
98
|
-
const i64 = Object.freeze({
|
|
99
|
-
data: fieldData({ kind: "i64" }, undefined, false, undefined),
|
|
100
|
-
newtype(name) {
|
|
101
|
-
return Object.freeze({ data: fieldData({ kind: "i64" }, name, false, undefined) });
|
|
105
|
+
function bytes(width) {
|
|
106
|
+
if (!Number.isInteger(width) || width < 1 || width > 64) {
|
|
107
|
+
throw errors.new(`bytes width must be an integer in 1..=64 (got ${width}) — docs/architecture/70-api.md pins the range at declaration`);
|
|
102
108
|
}
|
|
103
|
-
});
|
|
104
|
-
/** The one `bool` field constructor value. */
|
|
105
|
-
const bool = Object.freeze({
|
|
106
|
-
data: fieldData({ kind: "bool" }, undefined, false, undefined)
|
|
107
|
-
});
|
|
108
|
-
/** The one `str` field constructor value. */
|
|
109
|
-
const str = Object.freeze({
|
|
110
|
-
data: fieldData({ kind: "string" }, undefined, false, undefined)
|
|
111
|
-
});
|
|
112
|
-
/**
|
|
113
|
-
* The `bytes<N>` field constructor. The width is mandatory and part of the
|
|
114
|
-
* type; `len` is validated to 1..=64 here because the grammar pins that
|
|
115
|
-
* range at declaration (`docs/architecture/70-api.md` § the `schema!`
|
|
116
|
-
* grammar: N ∈ 1..=64 — bare `bytes` does not parse), the macro-expansion
|
|
117
|
-
* boundary's analog being construction.
|
|
118
|
-
*/
|
|
119
|
-
function bytes(len) {
|
|
120
|
-
if (!Number.isInteger(len) || len < 1 || len > 64) {
|
|
121
|
-
throw errors.new(`bytes width must be an integer in 1..=64 (got ${len}) — docs/architecture/70-api.md pins the range at declaration`);
|
|
122
|
-
}
|
|
123
|
-
return Object.freeze({
|
|
124
|
-
data: fieldData({ kind: "fixedBytes", len }, undefined, false, undefined),
|
|
125
|
-
newtype(name) {
|
|
126
|
-
return Object.freeze({ data: fieldData({ kind: "fixedBytes", len }, name, false, undefined) });
|
|
127
|
-
}
|
|
128
|
-
});
|
|
109
|
+
return Object.freeze({ kind: "bytes", width });
|
|
129
110
|
}
|
|
130
|
-
/**
|
|
131
|
-
* The interval field constructor — `interval(u64)` / `interval(i64)` for
|
|
132
|
-
* the general type (rays representable), `interval(u64, w)` for the
|
|
133
|
-
* fixed-width family whose width IS the type. The element is spelled with
|
|
134
|
-
* the u64/i64 field constructor values themselves, never a string. `width
|
|
135
|
-
* >= 1` is validated here because the grammar pins it at declaration
|
|
136
|
-
* (`docs/architecture/70-api.md`: w ≥ 1; `interval<u64, 0>` is an
|
|
137
|
-
* expansion error naming the field).
|
|
138
|
-
*/
|
|
139
111
|
function interval(element, width) {
|
|
140
|
-
const elementKind = element.
|
|
112
|
+
const elementKind = element.kind;
|
|
141
113
|
if (elementKind !== "u64" && elementKind !== "i64") {
|
|
142
114
|
throw errors.new(`interval element must be the u64 or i64 field constructor (got ${elementKind})`);
|
|
143
115
|
}
|
|
144
116
|
if (width !== undefined && width < 1n) {
|
|
145
117
|
throw errors.new(`interval width must be >= 1 (got ${width}) — docs/architecture/70-api.md pins w >= 1 at declaration`);
|
|
146
118
|
}
|
|
147
|
-
|
|
148
|
-
return Object.freeze({
|
|
149
|
-
data: fieldData(type, undefined, false, undefined),
|
|
150
|
-
newtype(name) {
|
|
151
|
-
return Object.freeze({ data: fieldData(type, name, false, undefined) });
|
|
152
|
-
}
|
|
153
|
-
});
|
|
119
|
+
return Object.freeze({ kind: "interval", element: elementKind, width });
|
|
154
120
|
}
|
|
155
121
|
/**
|
|
156
122
|
* Lowers one host literal at its field position to the wire
|
|
157
123
|
* {@link LiteralSpec} — the selection-literal machine ground axioms and
|
|
158
124
|
* `where()` bindings both ride (one machine, same errors — the macro's own
|
|
159
125
|
* rule). A value on a closed-reference field resolves to its handle NAME
|
|
160
|
-
* (the id is
|
|
126
|
+
* (the id is verified against the roster: an out-of-roster id is a
|
|
161
127
|
* construction error); everything else lowers to a plain value tagged by
|
|
162
|
-
* the field's structural
|
|
128
|
+
* the field's structural kind.
|
|
163
129
|
*/
|
|
164
130
|
function literalOf(field, value) {
|
|
165
|
-
if (
|
|
131
|
+
if ("closed" in field) {
|
|
166
132
|
return handleLiteral(field.closed, value);
|
|
167
133
|
}
|
|
168
|
-
switch (field.
|
|
134
|
+
switch (field.kind) {
|
|
169
135
|
case "bool": {
|
|
170
136
|
if (typeof value !== "boolean") {
|
|
171
137
|
throw literalShapeError("boolean", value);
|
|
@@ -184,21 +150,21 @@ function literalOf(field, value) {
|
|
|
184
150
|
}
|
|
185
151
|
return { kind: "value", value: { kind: "i64", value } };
|
|
186
152
|
}
|
|
187
|
-
case "
|
|
153
|
+
case "str": {
|
|
188
154
|
if (typeof value !== "string") {
|
|
189
155
|
throw literalShapeError("string", value);
|
|
190
156
|
}
|
|
191
157
|
return { kind: "value", value: { kind: "string", value } };
|
|
192
158
|
}
|
|
193
|
-
case "
|
|
159
|
+
case "bytes": {
|
|
194
160
|
if (!(value instanceof Uint8Array)) {
|
|
195
161
|
throw literalShapeError("Uint8Array", value);
|
|
196
162
|
}
|
|
197
163
|
return { kind: "value", value: { kind: "fixedBytes", value } };
|
|
198
164
|
}
|
|
199
165
|
case "interval":
|
|
200
|
-
return intervalLiteral(field.
|
|
166
|
+
return intervalLiteral(field.element, value);
|
|
201
167
|
}
|
|
202
168
|
}
|
|
203
|
-
export { assertDeclarationOrderKey, bool, bytes,
|
|
169
|
+
export { assertDeclarationOrderKey, bool, bytes, i64, interval, literalOf, span, str, u64 };
|
|
204
170
|
//# sourceMappingURL=fields.js.map
|
package/dist/fields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAiB/C;;;;;;GAMG;AACH,SAAS,IAAI,CAAC,KAAa,EAAE,GAAW;IACvC,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;QAClB,MAAM,MAAM,CAAC,GAAG,CAAC,gEAAgE,KAAK,KAAK,GAAG,GAAG,CAAC,CAAA;IACnG,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;AACrC,CAAC;AAkHD;;;GAGG;AACH,SAAS,iBAAiB,CAAC,QAAgB,EAAE,KAAc;IAC1D,OAAO,MAAM,CAAC,GAAG,CAAC,8CAA8C,QAAQ,SAAS,OAAO,KAAK,EAAE,CAAC,CAAA;AACjG,CAAC;AAED,yEAAyE;AACzE,SAAS,iBAAiB,CAAC,KAAc;IACxC,OAAO,CACN,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,OAAO,IAAI,KAAK;QAChB,KAAK,IAAI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