@bjornpagen/bumbledb 1.3.1 → 2.0.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 +153 -77
- package/README.md +107 -41
- package/dist/alternatives.d.ts +5 -6
- package/dist/alternatives.d.ts.map +1 -1
- package/dist/alternatives.js +5 -6
- package/dist/alternatives.js.map +1 -1
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +85 -0
- package/dist/bin.js.map +1 -0
- package/dist/capacity.d.ts +14 -17
- package/dist/capacity.d.ts.map +1 -1
- package/dist/capacity.js +7 -7
- package/dist/capacity.js.map +1 -1
- package/dist/changes.d.ts +32 -40
- package/dist/changes.d.ts.map +1 -1
- package/dist/changes.js +86 -104
- package/dist/changes.js.map +1 -1
- package/dist/closed.d.ts +2 -2
- package/dist/closed.d.ts.map +1 -1
- package/dist/closed.js +5 -5
- package/dist/closed.js.map +1 -1
- package/dist/codec.d.ts +13 -27
- package/dist/codec.d.ts.map +1 -1
- package/dist/codec.js +20 -21
- package/dist/codec.js.map +1 -1
- package/dist/compile.d.ts +26 -50
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +75 -64
- package/dist/compile.js.map +1 -1
- package/dist/database/database.d.ts +98 -0
- package/dist/database/database.d.ts.map +1 -0
- package/dist/database/database.js +249 -0
- package/dist/database/database.js.map +1 -0
- package/dist/database/driver.d.ts +40 -0
- package/dist/database/driver.d.ts.map +1 -0
- package/dist/database/driver.js +68 -0
- package/dist/database/driver.js.map +1 -0
- package/dist/database/fs.d.ts +12 -0
- package/dist/database/fs.d.ts.map +1 -0
- package/dist/database/fs.js +120 -0
- package/dist/database/fs.js.map +1 -0
- package/dist/database/generate.d.ts +26 -0
- package/dist/database/generate.d.ts.map +1 -0
- package/dist/database/generate.js +102 -0
- package/dist/database/generate.js.map +1 -0
- package/dist/database/hosted.d.ts +32 -0
- package/dist/database/hosted.d.ts.map +1 -0
- package/dist/database/hosted.js +44 -0
- package/dist/database/hosted.js.map +1 -0
- package/dist/database/io.d.ts +94 -0
- package/dist/database/io.d.ts.map +1 -0
- package/dist/database/io.js +35 -0
- package/dist/database/io.js.map +1 -0
- package/dist/database/mem.d.ts +26 -0
- package/dist/database/mem.d.ts.map +1 -0
- package/dist/database/mem.js +67 -0
- package/dist/database/mem.js.map +1 -0
- package/dist/database/migration.d.ts +55 -0
- package/dist/database/migration.d.ts.map +1 -0
- package/dist/database/migration.js +46 -0
- package/dist/database/migration.js.map +1 -0
- package/dist/database/s3.d.ts +36 -0
- package/dist/database/s3.d.ts.map +1 -0
- package/dist/database/s3.js +141 -0
- package/dist/database/s3.js.map +1 -0
- package/dist/db.d.ts +44 -128
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +163 -287
- package/dist/db.js.map +1 -1
- package/dist/engine.d.ts +7 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +2 -0
- package/dist/engine.js.map +1 -0
- package/dist/errors.d.ts +152 -46
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +107 -19
- package/dist/errors.js.map +1 -1
- package/dist/face.d.ts +5 -5
- package/dist/face.d.ts.map +1 -1
- package/dist/face.js +6 -6
- package/dist/face.js.map +1 -1
- package/dist/fields.d.ts +4 -5
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +3 -3
- package/dist/fields.js.map +1 -1
- package/dist/index.d.ts +60 -57
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -28
- package/dist/index.js.map +1 -1
- package/dist/judgment.d.ts +1 -1
- package/dist/judgment.js +1 -1
- package/dist/law.d.ts +16 -68
- package/dist/law.d.ts.map +1 -1
- package/dist/law.js +3 -3
- package/dist/law.js.map +1 -1
- package/dist/lower.d.ts +3 -3
- package/dist/lower.d.ts.map +1 -1
- package/dist/lower.js +35 -39
- package/dist/lower.js.map +1 -1
- package/dist/native/addon.d.ts +23 -0
- package/dist/native/addon.d.ts.map +1 -0
- package/dist/native/addon.js +15 -0
- package/dist/native/addon.js.map +1 -0
- package/dist/native/binding.d.ts +996 -0
- package/dist/native/json.d.ts +14 -0
- package/dist/native/json.d.ts.map +1 -0
- package/dist/native/json.js +73 -0
- package/dist/native/json.js.map +1 -0
- package/dist/native/load.d.ts +9 -0
- package/dist/native/load.d.ts.map +1 -0
- package/dist/native/load.js +30 -0
- package/dist/native/load.js.map +1 -0
- package/dist/native/op.d.ts +29 -0
- package/dist/native/op.d.ts.map +1 -0
- package/dist/native/op.js +50 -0
- package/dist/native/op.js.map +1 -0
- package/dist/query/atom.d.ts +13 -14
- package/dist/query/atom.d.ts.map +1 -1
- package/dist/query/atom.js +2 -2
- package/dist/query/atom.js.map +1 -1
- package/dist/query/compute.d.ts +4 -4
- package/dist/query/compute.d.ts.map +1 -1
- package/dist/query/compute.js +4 -4
- package/dist/query/compute.js.map +1 -1
- package/dist/query/find.d.ts +8 -8
- package/dist/query/find.d.ts.map +1 -1
- package/dist/query/find.js +1 -1
- package/dist/query/lower.d.ts +22 -17
- package/dist/query/lower.d.ts.map +1 -1
- package/dist/query/lower.js +230 -343
- package/dist/query/lower.js.map +1 -1
- package/dist/query/run.d.ts +5 -5
- package/dist/query/run.d.ts.map +1 -1
- package/dist/query/run.js +32 -15
- package/dist/query/run.js.map +1 -1
- package/dist/query/scope.d.ts +20 -28
- package/dist/query/scope.d.ts.map +1 -1
- package/dist/query/scope.js +7 -7
- package/dist/query/scope.js.map +1 -1
- package/dist/query/segments.d.ts +2 -2
- package/dist/query/segments.d.ts.map +1 -1
- package/dist/query/segments.js +3 -3
- package/dist/query/segments.js.map +1 -1
- package/dist/relation.d.ts +1 -1
- package/dist/relation.d.ts.map +1 -1
- package/dist/relation.js +4 -4
- package/dist/relation.js.map +1 -1
- package/dist/result.d.ts +15 -22
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +30 -39
- package/dist/result.js.map +1 -1
- package/dist/rows.d.ts +9 -33
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +8 -12
- package/dist/rows.js.map +1 -1
- package/dist/runtime.d.ts +17 -20
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +41 -205
- package/dist/runtime.js.map +1 -1
- package/dist/scalar.d.ts +4 -4
- package/dist/scalar.d.ts.map +1 -1
- package/dist/scalar.js +24 -8
- package/dist/scalar.js.map +1 -1
- package/dist/schema.d.ts +7 -18
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +18 -228
- package/dist/schema.js.map +1 -1
- package/dist/selection.d.ts +4 -4
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +5 -5
- package/dist/selection.js.map +1 -1
- package/dist/shape.d.ts +5 -5
- package/dist/shape.d.ts.map +1 -1
- package/dist/spec.d.ts +7 -79
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js.map +1 -1
- package/dist/statements.d.ts +3 -3
- package/dist/statements.d.ts.map +1 -1
- package/dist/statements.js +10 -10
- package/dist/statements.js.map +1 -1
- package/dist/uuid.d.ts +1 -1
- package/dist/uuid.d.ts.map +1 -1
- package/dist/uuid.js +1 -1
- package/dist/uuid.js.map +1 -1
- package/dist/values.d.ts +2 -2
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +2 -2
- package/dist/values.js.map +1 -1
- package/package.json +18 -18
- package/src/alternatives.ts +7 -8
- package/src/bin.ts +82 -0
- package/src/capacity.ts +20 -23
- package/src/changes.ts +134 -191
- package/src/closed.ts +5 -5
- package/src/codec.ts +35 -49
- package/src/compile.ts +91 -113
- package/src/database/database.ts +413 -0
- package/src/database/driver.ts +134 -0
- package/src/database/fs.ts +119 -0
- package/src/database/generate.ts +116 -0
- package/src/database/hosted.ts +102 -0
- package/src/database/io.ts +134 -0
- package/src/database/mem.ts +113 -0
- package/src/database/migration.ts +107 -0
- package/src/database/s3.ts +231 -0
- package/src/db.ts +290 -547
- package/src/engine.ts +14 -0
- package/src/errors.ts +118 -39
- package/src/face.ts +9 -9
- package/src/fields.ts +6 -7
- package/src/index.ts +92 -105
- package/src/judgment.ts +1 -1
- package/src/law.ts +18 -70
- package/src/lower.ts +61 -72
- package/src/native/addon.ts +54 -0
- package/src/native/binding.d.ts +996 -0
- package/src/native/json.ts +100 -0
- package/src/native/load.ts +31 -0
- package/src/native/op.ts +73 -0
- package/src/query/atom.ts +15 -16
- package/src/query/compute.ts +7 -7
- package/src/query/find.ts +8 -8
- package/src/query/lower.ts +270 -392
- package/src/query/run.ts +42 -21
- package/src/query/scope.ts +29 -37
- package/src/query/segments.ts +4 -4
- package/src/relation.ts +4 -4
- package/src/result.ts +53 -80
- package/src/rows.ts +18 -46
- package/src/runtime.ts +50 -277
- package/src/scalar.ts +32 -12
- package/src/schema.ts +23 -284
- package/src/selection.ts +6 -6
- package/src/shape.ts +5 -5
- package/src/spec.ts +7 -85
- package/src/statements.ts +11 -11
- package/src/uuid.ts +1 -1
- package/src/values.ts +4 -4
- package/dist/close.d.ts +0 -24
- package/dist/close.d.ts.map +0 -1
- package/dist/close.js +0 -34
- package/dist/close.js.map +0 -1
- package/dist/db-native.d.ts +0 -189
- package/dist/db-native.d.ts.map +0 -1
- package/dist/db-native.js +0 -13
- package/dist/db-native.js.map +0 -1
- package/dist/internal/log.d.ts +0 -26
- package/dist/internal/log.d.ts.map +0 -1
- package/dist/internal/log.js +0 -12
- package/dist/internal/log.js.map +0 -1
- package/dist/native.d.ts +0 -562
- package/dist/native.d.ts.map +0 -1
- package/dist/native.js +0 -123
- package/dist/native.js.map +0 -1
- package/dist/query/description.d.ts +0 -41
- package/dist/query/description.d.ts.map +0 -1
- package/dist/query/description.js +0 -311
- package/dist/query/description.js.map +0 -1
- package/dist/query/parse-ir.d.ts +0 -10
- package/dist/query/parse-ir.d.ts.map +0 -1
- package/dist/query/parse-ir.js +0 -280
- package/dist/query/parse-ir.js.map +0 -1
- package/dist/runtime-codes.d.ts +0 -2
- package/dist/runtime-codes.d.ts.map +0 -1
- package/dist/runtime-codes.js +0 -19
- package/dist/runtime-codes.js.map +0 -1
- package/dist/runtime-errors.d.ts +0 -138
- package/dist/runtime-errors.d.ts.map +0 -1
- package/dist/runtime-errors.js +0 -111
- package/dist/runtime-errors.js.map +0 -1
- package/dist/runtime-native.d.ts +0 -136
- package/dist/runtime-native.d.ts.map +0 -1
- package/dist/runtime-native.js +0 -5
- package/dist/runtime-native.js.map +0 -1
- package/dist/schema-file.d.ts +0 -7
- package/dist/schema-file.d.ts.map +0 -1
- package/dist/schema-file.js +0 -24
- package/dist/schema-file.js.map +0 -1
- package/pack-provenance.json +0 -7
- package/src/close.ts +0 -53
- package/src/db-native.ts +0 -235
- package/src/internal/log.ts +0 -46
- package/src/native.ts +0 -736
- package/src/query/description.ts +0 -424
- package/src/query/parse-ir.ts +0 -293
- package/src/runtime-codes.ts +0 -18
- package/src/runtime-errors.ts +0 -122
- package/src/runtime-native.ts +0 -181
- package/src/schema-file.ts +0 -38
package/src/engine.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The embedded engine: one `Db` over a local LMDB directory, for single-process use, tests and
|
|
3
|
+
* benches. Applications that want the durable log use `Database` from the package root.
|
|
4
|
+
*/
|
|
5
|
+
export type {
|
|
6
|
+
ApplyOutcome,
|
|
7
|
+
DbInspection,
|
|
8
|
+
JudgeOutcome,
|
|
9
|
+
PreparedQuery,
|
|
10
|
+
QueryReader,
|
|
11
|
+
Snapshot,
|
|
12
|
+
Witness
|
|
13
|
+
} from "./db.ts"
|
|
14
|
+
export { Db } from "./db.ts"
|
package/src/errors.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { Data, Schema } from "effect"
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* in `#runtime-errors.ts`; contradictions in SDK/native state remain defects.
|
|
2
|
+
* The SDK's errors. Authoring refusals throw synchronously while a schema, query or value is
|
|
3
|
+
* built; everything that runs as an Effect fails with `DbError { operation, reason }`; a native
|
|
4
|
+
* close that does not drain cleanly is a `CloseFailure` defect.
|
|
8
5
|
*/
|
|
6
|
+
import { Schema } from "effect"
|
|
9
7
|
|
|
10
|
-
/**
|
|
8
|
+
/** Where an authoring refusal points and what was expected there. */
|
|
11
9
|
export const AuthoringDiagnostic = Schema.Struct({
|
|
12
10
|
code: Schema.Literals([
|
|
13
11
|
"InvalidValue",
|
|
@@ -22,40 +20,121 @@ export const AuthoringDiagnostic = Schema.Struct({
|
|
|
22
20
|
})
|
|
23
21
|
export type AuthoringDiagnostic = typeof AuthoringDiagnostic.Type
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
23
|
+
/** A schema, query, parameter or value refused while it is being authored. */
|
|
24
|
+
export class AuthoringError extends Schema.TaggedError<AuthoringError>()("AuthoringError", {
|
|
25
|
+
message: Schema.String,
|
|
26
|
+
diagnostic: Schema.optional(AuthoringDiagnostic)
|
|
27
|
+
}) {}
|
|
28
|
+
|
|
29
|
+
/** The native addon for this host could not be loaded. */
|
|
30
|
+
export class NativeLoadError extends Schema.TaggedError<NativeLoadError>()("NativeLoadError", {
|
|
31
|
+
target: Schema.String,
|
|
32
|
+
message: Schema.String,
|
|
33
|
+
cause: Schema.Unknown
|
|
34
|
+
}) {}
|
|
35
|
+
|
|
36
|
+
const PlainReason = Schema.Struct({
|
|
37
|
+
_tag: Schema.Literals([
|
|
38
|
+
"RuntimeAlreadyLive",
|
|
39
|
+
"ForeignRuntime",
|
|
40
|
+
"ClosedHandle",
|
|
41
|
+
"HandleBusy",
|
|
42
|
+
"SpentHandle",
|
|
43
|
+
"QueueFull",
|
|
44
|
+
"Internal",
|
|
45
|
+
"DirectoryBusy",
|
|
46
|
+
"WriterBusy",
|
|
47
|
+
"InvalidPath",
|
|
48
|
+
"Cancelled",
|
|
49
|
+
"OutOfMemory"
|
|
50
|
+
])
|
|
51
|
+
})
|
|
52
|
+
const InvalidArgument = Schema.Struct({
|
|
53
|
+
_tag: Schema.Literal("InvalidArgument"),
|
|
54
|
+
detail: Schema.optional(
|
|
55
|
+
Schema.Struct({
|
|
56
|
+
message: Schema.String,
|
|
57
|
+
diagnostic: Schema.optional(AuthoringDiagnostic)
|
|
58
|
+
})
|
|
59
|
+
)
|
|
60
|
+
})
|
|
61
|
+
const InvalidValue = Schema.Struct({ _tag: Schema.Literal("InvalidValue"), message: Schema.String })
|
|
62
|
+
const Io = Schema.Struct({ _tag: Schema.Literal("Io"), kind: Schema.String, osCode: Schema.optional(Schema.Number) })
|
|
63
|
+
const ResourceLimit = Schema.Struct({
|
|
64
|
+
_tag: Schema.Literal("ResourceLimit"),
|
|
65
|
+
dimension: Schema.String,
|
|
66
|
+
used: Schema.BigInt,
|
|
67
|
+
requested: Schema.BigInt,
|
|
68
|
+
limit: Schema.BigInt
|
|
69
|
+
})
|
|
70
|
+
/** An engine refusal: the engine error's kind and message. */
|
|
71
|
+
const Engine = Schema.Struct({ _tag: Schema.Literal("Engine"), kind: Schema.String, message: Schema.String })
|
|
72
|
+
const Malformed = Schema.Struct({ _tag: Schema.Literal("Malformed"), path: Schema.String, message: Schema.String })
|
|
73
|
+
|
|
74
|
+
/** Why an operation failed: the addon's `RuntimeError`, plus authoring detail on `InvalidArgument`. */
|
|
75
|
+
export const DbReason = Schema.Union([PlainReason, InvalidArgument, InvalidValue, Io, ResourceLimit, Engine, Malformed])
|
|
76
|
+
export type DbReason = typeof DbReason.Type
|
|
77
|
+
|
|
78
|
+
/** The one runtime error: which operation failed, and why. */
|
|
79
|
+
export class DbError extends Schema.TaggedError<DbError>()("DbError", {
|
|
80
|
+
operation: Schema.String,
|
|
81
|
+
reason: DbReason
|
|
82
|
+
}) {
|
|
83
|
+
get code() {
|
|
84
|
+
return this.reason._tag
|
|
85
|
+
}
|
|
47
86
|
override get message(): string {
|
|
48
|
-
|
|
87
|
+
return `${this.operation}: ${this.code}`
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const decodeReason = Schema.decodeUnknownOption(DbReason)
|
|
92
|
+
|
|
93
|
+
/** Reads a native refusal (or any thrown value) as a `DbError` for `operation`. */
|
|
94
|
+
export function dbError(operation: string, cause: unknown): DbError {
|
|
95
|
+
if (cause instanceof DbError) return cause
|
|
96
|
+
if (cause instanceof AuthoringError) return argumentError(operation, cause)
|
|
97
|
+
const decoded = decodeReason(cause)
|
|
98
|
+
return new DbError({ operation, reason: decoded._tag === "Some" ? decoded.value : { _tag: "Internal" } })
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** An input refusal, keeping an authoring error's message and diagnostic. */
|
|
102
|
+
export function argumentError(operation: string, cause: unknown): DbError {
|
|
103
|
+
if (cause instanceof DbError) return cause
|
|
104
|
+
if (cause instanceof AuthoringError) {
|
|
49
105
|
const detail =
|
|
50
|
-
|
|
51
|
-
? cause.message
|
|
52
|
-
:
|
|
53
|
-
return
|
|
106
|
+
cause.diagnostic === undefined
|
|
107
|
+
? { message: cause.message }
|
|
108
|
+
: { message: cause.message, diagnostic: cause.diagnostic }
|
|
109
|
+
return new DbError({ operation, reason: { _tag: "InvalidArgument", detail } })
|
|
54
110
|
}
|
|
111
|
+
return new DbError({ operation, reason: { _tag: "InvalidArgument" } })
|
|
55
112
|
}
|
|
56
113
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
114
|
+
/** A contradiction between the SDK and the addon: a bug, reported as `Internal`. */
|
|
115
|
+
export function internalError(operation: string): DbError {
|
|
116
|
+
return new DbError({ operation, reason: { _tag: "Internal" } })
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const Outstanding = Schema.Struct({
|
|
120
|
+
phase: Schema.Literals(["Open", "Closing", "Closed"]),
|
|
121
|
+
queued: Schema.BigInt,
|
|
122
|
+
active: Schema.BigInt,
|
|
123
|
+
retained: Schema.BigInt,
|
|
124
|
+
owners: Schema.BigInt,
|
|
125
|
+
databases: Schema.BigInt,
|
|
126
|
+
natives: Schema.BigInt
|
|
127
|
+
})
|
|
128
|
+
export type OutstandingWork = typeof Outstanding.Type
|
|
129
|
+
const Close = Schema.Union([
|
|
130
|
+
Schema.Struct({ _tag: Schema.Literal("Closed") }),
|
|
131
|
+
Schema.Struct({ _tag: Schema.Literal("Incomplete"), outstanding: Outstanding }),
|
|
132
|
+
Schema.Struct({ _tag: Schema.Literal("Failed") })
|
|
133
|
+
])
|
|
134
|
+
export type CloseReport = typeof Close.Type
|
|
135
|
+
|
|
136
|
+
/** A native resource that did not drain cleanly when its scope closed. */
|
|
137
|
+
export class CloseFailure extends Schema.TaggedError<CloseFailure>()("CloseFailure", {
|
|
138
|
+
operation: Schema.String,
|
|
139
|
+
report: Close
|
|
140
|
+
}) {}
|
package/src/face.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { AnyClosed } from "
|
|
2
|
-
import { memberDescriptor, sealedFieldOf } from "
|
|
3
|
-
import { AuthoringError } from "
|
|
4
|
-
import { type AnyField, assertDeclarationRecord, type SignatureOf } from "
|
|
5
|
-
import type { Same } from "
|
|
6
|
-
import type { AnyRelation, FieldsShape } from "
|
|
7
|
-
import { type AnySelected, type FieldsOf, type SelectionBinding, selectionBindings } from "
|
|
8
|
-
import { renderLiteralSet } from "
|
|
9
|
-
import { arrayValue, recordValue } from "
|
|
1
|
+
import type { AnyClosed } from "./closed.ts"
|
|
2
|
+
import { memberDescriptor, sealedFieldOf } from "./closed.ts"
|
|
3
|
+
import { AuthoringError } from "./errors.ts"
|
|
4
|
+
import { type AnyField, assertDeclarationRecord, type SignatureOf } from "./fields.ts"
|
|
5
|
+
import type { Same } from "./judgment.ts"
|
|
6
|
+
import type { AnyRelation, FieldsShape } from "./relation.ts"
|
|
7
|
+
import { type AnySelected, type FieldsOf, type SelectionBinding, selectionBindings } from "./selection.ts"
|
|
8
|
+
import { renderLiteralSet } from "./spec.ts"
|
|
9
|
+
import { arrayValue, recordValue } from "./values.ts"
|
|
10
10
|
|
|
11
11
|
const emptySelection: readonly SelectionBinding[] = Object.freeze([])
|
|
12
12
|
|
package/src/fields.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { regex } from "arkregex"
|
|
2
|
-
import { AuthoringError } from "
|
|
3
|
-
import type { LiteralSpec } from "
|
|
4
|
-
import type { Uuid } from "
|
|
5
|
-
import { arrayValue, fieldValue, recordValue, taggedValueOf, U64_MAX } from "
|
|
2
|
+
import { AuthoringError } from "./errors.ts"
|
|
3
|
+
import type { LiteralSpec } from "./spec.ts"
|
|
4
|
+
import type { Uuid } from "./uuid.ts"
|
|
5
|
+
import { arrayValue, fieldValue, recordValue, taggedValueOf, U64_MAX } from "./values.ts"
|
|
6
6
|
|
|
7
7
|
const INTEGER_INDEX_NAME = regex("^(?:0|[1-9][0-9]*)$")
|
|
8
8
|
|
|
@@ -70,8 +70,7 @@ interface F64Field {
|
|
|
70
70
|
/**
|
|
71
71
|
* The application-owned 128-bit identity scalar: sixteen
|
|
72
72
|
* exact bytes, spelled as the canonical hyphenated UUID {@link Uuid}
|
|
73
|
-
* host value.
|
|
74
|
-
* identity, and key laws are declared statements.
|
|
73
|
+
* host value. Key laws are declared statements.
|
|
75
74
|
*/
|
|
76
75
|
interface UuidField {
|
|
77
76
|
readonly kind: "uuid"
|
|
@@ -335,7 +334,7 @@ const i64: I64Field = Object.freeze({ kind: "i64" })
|
|
|
335
334
|
/** Binary64. The native value boundary canonicalizes NaN and signed zero. */
|
|
336
335
|
const f64: F64Field = Object.freeze({ kind: "f64" })
|
|
337
336
|
|
|
338
|
-
/** The application-owned 128-bit identity scalar
|
|
337
|
+
/** The application-owned 128-bit identity scalar. */
|
|
339
338
|
const uuid: UuidField = Object.freeze({ kind: "uuid" })
|
|
340
339
|
|
|
341
340
|
const bool: BoolField = Object.freeze({ kind: "bool" })
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* lazy, scoped and bounded on the one native runtime. No Promise, sync,
|
|
6
|
-
* or disposal twin. The raw native bridge is not exported from this barrel.
|
|
2
|
+
* Typed schemas and queries, validated by the engine as they are defined, and the durable
|
|
3
|
+
* `Database` over an object store. Every database operation is a lazy, scoped Effect on the one
|
|
4
|
+
* native runtime; the embedded `Db` lives in `./engine`.
|
|
7
5
|
*/
|
|
8
6
|
|
|
9
|
-
export { alternatives } from "
|
|
7
|
+
export { alternatives } from "./alternatives.ts"
|
|
10
8
|
export type {
|
|
11
9
|
BoundsOnTarget,
|
|
12
10
|
CapacityWeight,
|
|
@@ -15,19 +13,19 @@ export type {
|
|
|
15
13
|
FieldRef,
|
|
16
14
|
UnitDimensionBan,
|
|
17
15
|
WeightOnSource
|
|
18
|
-
} from "
|
|
19
|
-
export { duration, ref, weigh, within } from "
|
|
20
|
-
export type { ChangeCounts, ChangeDraft, ChangeRecord } from "
|
|
21
|
-
export { ChangeSet } from "
|
|
16
|
+
} from "./capacity.ts"
|
|
17
|
+
export { duration, ref, weigh, within } from "./capacity.ts"
|
|
18
|
+
export type { ChangeCounts, ChangeDraft, ChangeRecord } from "./changes.ts"
|
|
19
|
+
export { ChangeSet } from "./changes.ts"
|
|
22
20
|
export type {
|
|
23
21
|
AnyClosed,
|
|
24
22
|
AxiomRow,
|
|
25
23
|
Axioms,
|
|
26
24
|
Closed,
|
|
27
25
|
PayloadField
|
|
28
|
-
} from "
|
|
29
|
-
export { closed, closedId } from "
|
|
30
|
-
export type { RowShape } from "
|
|
26
|
+
} from "./closed.ts"
|
|
27
|
+
export { closed, closedId } from "./closed.ts"
|
|
28
|
+
export type { RowShape } from "./codec.ts"
|
|
31
29
|
export {
|
|
32
30
|
decodeBoundaryField,
|
|
33
31
|
decodeBoundaryRows,
|
|
@@ -38,30 +36,48 @@ export {
|
|
|
38
36
|
fieldSchema,
|
|
39
37
|
rowSchema,
|
|
40
38
|
rowShape
|
|
41
|
-
} from "
|
|
42
|
-
export type {
|
|
43
|
-
export { Schema } from "#compile.ts"
|
|
39
|
+
} from "./codec.ts"
|
|
40
|
+
export type { SchemaId } from "./compile.ts"
|
|
44
41
|
export type {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} from "
|
|
56
|
-
export {
|
|
42
|
+
Consistency,
|
|
43
|
+
DatabaseOptions,
|
|
44
|
+
DatabasePool,
|
|
45
|
+
DatabaseReader,
|
|
46
|
+
PoolOptions,
|
|
47
|
+
SubmitOptions,
|
|
48
|
+
SubmitOutcome,
|
|
49
|
+
Tuning
|
|
50
|
+
} from "./database/database.ts"
|
|
51
|
+
export { Database, RequestId } from "./database/database.ts"
|
|
52
|
+
export { FsStore } from "./database/fs.ts"
|
|
53
|
+
export type {
|
|
54
|
+
Body,
|
|
55
|
+
Bucket,
|
|
56
|
+
ExecutorOptions,
|
|
57
|
+
IoRequest,
|
|
58
|
+
IoResponse,
|
|
59
|
+
IoResult,
|
|
60
|
+
Millis,
|
|
61
|
+
ObjectStore,
|
|
62
|
+
Reply,
|
|
63
|
+
Target
|
|
64
|
+
} from "./database/io.ts"
|
|
65
|
+
export type { Fault, MemStoreOptions } from "./database/mem.ts"
|
|
66
|
+
export { MemStore } from "./database/mem.ts"
|
|
67
|
+
export type { AnyMigration, Migrations, Populate } from "./database/migration.ts"
|
|
68
|
+
export { Migration } from "./database/migration.ts"
|
|
69
|
+
export type { S3Sender, S3StoreOptions } from "./database/s3.ts"
|
|
70
|
+
export { S3Store } from "./database/s3.ts"
|
|
71
|
+
export type { PreparedQuery, QueryReader } from "./db.ts"
|
|
72
|
+
export type { CloseReport, OutstandingWork } from "./errors.ts"
|
|
57
73
|
export {
|
|
58
74
|
AuthoringDiagnostic,
|
|
59
75
|
AuthoringError,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} from "
|
|
76
|
+
CloseFailure,
|
|
77
|
+
DbError,
|
|
78
|
+
dbError,
|
|
79
|
+
NativeLoadError
|
|
80
|
+
} from "./errors.ts"
|
|
65
81
|
export type {
|
|
66
82
|
AnyFace,
|
|
67
83
|
Arity,
|
|
@@ -76,8 +92,8 @@ export type {
|
|
|
76
92
|
ProjectedShape,
|
|
77
93
|
SameArity,
|
|
78
94
|
SameShapes
|
|
79
|
-
} from "
|
|
80
|
-
export { on } from "
|
|
95
|
+
} from "./face.ts"
|
|
96
|
+
export { on } from "./face.ts"
|
|
81
97
|
export type {
|
|
82
98
|
AnyClosedIdField,
|
|
83
99
|
AnyClosedRoster,
|
|
@@ -98,40 +114,26 @@ export type {
|
|
|
98
114
|
StrField,
|
|
99
115
|
U64Field,
|
|
100
116
|
UuidField
|
|
101
|
-
} from "
|
|
102
|
-
export { bool, bytes, f64, i64, interval, str, u64, uuid } from "
|
|
103
|
-
export type { Same, SameLen } from "
|
|
104
|
-
export type { ClassesOf, ClassWall, LawfulStatements, RelationClasses, SchemaClasses } from "
|
|
105
|
-
export type {
|
|
106
|
-
AtomIr,
|
|
107
|
-
AtomSourceIr,
|
|
108
|
-
CmpOpIr,
|
|
109
|
-
ComparisonIr,
|
|
110
|
-
ConditionTreeIr,
|
|
111
|
-
FindTermIr,
|
|
112
|
-
HeadTermIr,
|
|
113
|
-
InteriorIr,
|
|
114
|
-
QueryIr,
|
|
115
|
-
RecIr,
|
|
116
|
-
RuleIr,
|
|
117
|
-
ScalarExprIr,
|
|
118
|
-
TermIr,
|
|
119
|
-
Violation,
|
|
120
|
-
ViolationFact
|
|
121
|
-
} from "#native.ts"
|
|
122
|
-
export type { FindColumn } from "#query/atom.ts"
|
|
123
|
-
export { ALLEN } from "#query/atom.ts"
|
|
124
|
-
export type { AnyComputeExpr, ComputeExpr, ComputeValue, QueryNode } from "#query/compute.ts"
|
|
125
|
-
export { Compute } from "#query/compute.ts"
|
|
117
|
+
} from "./fields.ts"
|
|
118
|
+
export { bool, bytes, f64, i64, interval, str, u64, uuid } from "./fields.ts"
|
|
119
|
+
export type { Same, SameLen } from "./judgment.ts"
|
|
120
|
+
export type { ClassesOf, ClassWall, LawfulStatements, RelationClasses, SchemaClasses } from "./law.ts"
|
|
126
121
|
export type {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
122
|
+
EvidenceOut,
|
|
123
|
+
FactOut,
|
|
124
|
+
HeadOut,
|
|
125
|
+
MigrationOut,
|
|
126
|
+
OutcomeOut,
|
|
127
|
+
ReceiptOut,
|
|
128
|
+
RefusalOut,
|
|
129
|
+
SettledOut,
|
|
130
|
+
ViolationOut as Violation
|
|
131
|
+
} from "./native/binding.d.ts"
|
|
132
|
+
export type { FindColumn } from "./query/atom.ts"
|
|
133
|
+
export { ALLEN } from "./query/atom.ts"
|
|
134
|
+
export type { AnyComputeExpr, ComputeExpr, ComputeValue, QueryNode } from "./query/compute.ts"
|
|
135
|
+
export { Compute } from "./query/compute.ts"
|
|
136
|
+
export type { Agg, HeadRecordOf, RowOfFind } from "./query/find.ts"
|
|
135
137
|
export type {
|
|
136
138
|
AnyQuery,
|
|
137
139
|
AnyRuleValue,
|
|
@@ -148,8 +150,8 @@ export type {
|
|
|
148
150
|
RecRuleScope,
|
|
149
151
|
RuleValue,
|
|
150
152
|
TermOps
|
|
151
|
-
} from "
|
|
152
|
-
export { lowerQuery, query } from "
|
|
153
|
+
} from "./query/lower.ts"
|
|
154
|
+
export { lowerQuery, query } from "./query/lower.ts"
|
|
153
155
|
export type {
|
|
154
156
|
ClassedField,
|
|
155
157
|
Flatten,
|
|
@@ -162,9 +164,9 @@ export type {
|
|
|
162
164
|
SetParam,
|
|
163
165
|
Var,
|
|
164
166
|
VarsOf
|
|
165
|
-
} from "
|
|
166
|
-
export { v } from "
|
|
167
|
-
export type { IntervalVar, SegmentOp, Segments } from "
|
|
167
|
+
} from "./query/scope.ts"
|
|
168
|
+
export { v } from "./query/scope.ts"
|
|
169
|
+
export type { IntervalVar, SegmentOp, Segments } from "./query/segments.ts"
|
|
168
170
|
export type {
|
|
169
171
|
AnyRelation,
|
|
170
172
|
Fact,
|
|
@@ -172,15 +174,13 @@ export type {
|
|
|
172
174
|
Relation,
|
|
173
175
|
RelationField,
|
|
174
176
|
RelationFields
|
|
175
|
-
} from "
|
|
176
|
-
export { relation } from "
|
|
177
|
-
export type { CompleteResult } from "
|
|
178
|
-
export type { CellValue } from "
|
|
179
|
-
export { cellOf, factOfCells, flatRowsOf, keyCellsOf } from "
|
|
180
|
-
export type {
|
|
181
|
-
export {
|
|
182
|
-
export type { CloseReport, OutstandingWork } from "#runtime-errors.ts"
|
|
183
|
-
export { CloseFailure, DbError, dbError, runtimeErrorCodes } from "#runtime-errors.ts"
|
|
177
|
+
} from "./relation.ts"
|
|
178
|
+
export { relation } from "./relation.ts"
|
|
179
|
+
export type { CompleteResult } from "./result.ts"
|
|
180
|
+
export type { CellValue } from "./rows.ts"
|
|
181
|
+
export { cellOf, factOfCells, flatRowsOf, keyCellsOf } from "./rows.ts"
|
|
182
|
+
export type { BumbleOptions } from "./runtime.ts"
|
|
183
|
+
export { Bumble } from "./runtime.ts"
|
|
184
184
|
export type {
|
|
185
185
|
IntervalKind,
|
|
186
186
|
NumericCast,
|
|
@@ -191,32 +191,19 @@ export type {
|
|
|
191
191
|
ScalarNode,
|
|
192
192
|
ScalarResultKind,
|
|
193
193
|
ScalarValue
|
|
194
|
-
} from "
|
|
195
|
-
export type { AnySchema, Schema
|
|
196
|
-
export { schema } from "
|
|
197
|
-
export type { AnySelected, FieldsOf, Selected, SelectionBinding, SelectionInput } from "
|
|
198
|
-
export { select } from "
|
|
199
|
-
export type { Key, QueryTemplate, Rel } from "
|
|
200
|
-
export type {
|
|
201
|
-
CapacityBoundSpec,
|
|
202
|
-
CapacityWindowSpec,
|
|
203
|
-
FieldSpec,
|
|
204
|
-
LiteralSetSpec,
|
|
205
|
-
LiteralSpec,
|
|
206
|
-
RelationSpec,
|
|
207
|
-
RowSpec,
|
|
208
|
-
SchemaSpec,
|
|
209
|
-
SideSpec,
|
|
210
|
-
StatementSpec,
|
|
211
|
-
ValueSpec,
|
|
212
|
-
ValueTypeSpec
|
|
213
|
-
} from "#spec.ts"
|
|
194
|
+
} from "./scalar.ts"
|
|
195
|
+
export type { AnySchema, Schema, SchemaRelation, SchemaRelations } from "./schema.ts"
|
|
196
|
+
export { schema } from "./schema.ts"
|
|
197
|
+
export type { AnySelected, FieldsOf, Selected, SelectionBinding, SelectionInput } from "./selection.ts"
|
|
198
|
+
export { select } from "./selection.ts"
|
|
199
|
+
export type { Key, QueryTemplate, Rel } from "./shape.ts"
|
|
200
|
+
export type { CapacityBoundSpec, CapacityWindowSpec, LiteralSetSpec, LiteralSpec, ValueSpec } from "./spec.ts"
|
|
214
201
|
export type {
|
|
215
202
|
CapacityStatement,
|
|
216
203
|
ContainmentStatement,
|
|
217
204
|
KeyStatement,
|
|
218
205
|
MirrorsStatement,
|
|
219
206
|
Statement
|
|
220
|
-
} from "
|
|
221
|
-
export { capacity, contained, key, mirrors, renderStatement } from "
|
|
222
|
-
export { Uuid } from "
|
|
207
|
+
} from "./statements.ts"
|
|
208
|
+
export { capacity, contained, key, mirrors, renderStatement } from "./statements.ts"
|
|
209
|
+
export { Uuid } from "./uuid.ts"
|
package/src/judgment.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* {@link Same} is definitional equality by mutual extension — the ONE
|
|
5
5
|
* spelling of `A = B` at the type tier. {@link SameLen} is Peano equality
|
|
6
|
-
* on tuple lengths — zero equals zero,
|
|
6
|
+
* on tuple lengths — zero equals zero, n + 1 recurses on n,
|
|
7
7
|
* everything else is refused. An open array carries no Nat (its length is
|
|
8
8
|
* `number`), so it proves nothing.
|
|
9
9
|
*/
|
package/src/law.ts
CHANGED
|
@@ -1,68 +1,19 @@
|
|
|
1
|
-
import { AuthoringError } from "
|
|
1
|
+
import { AuthoringError } from "./errors.ts"
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* tiers are the same computation by construction.
|
|
9
|
-
*
|
|
10
|
-
* The three class laws (ratified; implemented exactly):
|
|
11
|
-
*
|
|
12
|
-
* 1. GENERATORS — a closed relation's synthetic id is a generator named
|
|
13
|
-
* `"Kind.id"` (the vocabulary mints its own row ids). Ordinary relations
|
|
14
|
-
* have no generator: the database issues no identity (`fresh` is deleted),
|
|
15
|
-
* and identity fields are ordinary application-owned values.
|
|
16
|
-
* 2. GENERATOR-LESS classes are named by their least member coordinate
|
|
17
|
-
* in relation-declaration × field-declaration order (readable off the
|
|
18
|
-
* relation record and each member's frozen field list at the VALUE
|
|
19
|
-
* tier — deterministic, pinned forever; the wire reads only this
|
|
20
|
-
* tier). At the TYPE tier the same class is carried as its
|
|
21
|
-
* member-coordinate SET (see {@link ClassOfCoord}): TypeScript's
|
|
22
|
-
* union member order is not observably deterministic, so a type-level
|
|
23
|
-
* least-member pick would drift between compilations — the set is the
|
|
24
|
-
* canonical deterministic spelling, the runtime name is always a
|
|
25
|
-
* member of it, and the join judgment is identical at both tiers.
|
|
26
|
-
* 3. BARE — a field in no law has NO class and pairs only with bare in
|
|
27
|
-
* queries (the deliberate sum-domain pointer stays legal).
|
|
28
|
-
*
|
|
29
|
-
* THE WALL: a class containing more than one generator is a contradiction
|
|
30
|
-
* (two mints cannot share a carrier) — a schema-level COMPILE error (the
|
|
31
|
-
* named, self-locating {@link ClassWall}: which generator coordinates
|
|
32
|
-
* collided, through which paired slots) with a construction-time runtime
|
|
33
|
-
* twin (`computeClasses` throws with the same content, naming the exact
|
|
34
|
-
* statement). The TARGET-KEY WALL ({@link TargetKeyWall},
|
|
35
|
-
* 60-containment-parity) rides the same constraint seam: a containment/
|
|
36
|
-
* mirrors/capacity target projection that resolves no key of its relation
|
|
37
|
-
* is the same kind of schema-level compile error, with `schema`'s
|
|
38
|
-
* `verifyTargetKeys` as its authoritative runtime twin.
|
|
39
|
-
*
|
|
40
|
-
* Every paired face of the statement tuple unions its positionwise field
|
|
41
|
-
* slots: containment (ψ-selected targets included — a selection changes
|
|
42
|
-
* pairing not at all), the `==` bijection, and capacity source/target pairs.
|
|
43
|
-
* `key` statements pair nothing (an FD constrains one relation's own
|
|
44
|
-
* rows; it identifies no carriers).
|
|
45
|
-
*
|
|
46
|
-
* The type tier reads pairs off the statement types' exact face data, so
|
|
47
|
-
* spell the statement list INLINE in `schema` (the `const` type
|
|
48
|
-
* parameter keeps the tuple precise). A widened `Statement[]` list
|
|
49
|
-
* degrades the TYPE tier to generators-only (no pair is readable off a
|
|
50
|
-
* widened type) — the runtime map stays complete and authoritative, and
|
|
51
|
-
* the wire lowering reads only the runtime map. Every loop below is
|
|
52
|
-
* tail-recursive with an accumulator, so the machinery rides TypeScript's
|
|
53
|
-
* tail-recursion elimination for large schemas (~40 relations, ~200 slots,
|
|
54
|
-
* ~123 statements); should a schema ever exceed the compiler's limits, tsc
|
|
55
|
-
* fails LOUDLY with its own instantiation-depth error — the map is never
|
|
56
|
-
* silently widened.
|
|
3
|
+
* The laws type the columns: `schema` computes each field's class from its statements at the type
|
|
4
|
+
* level and at runtime (a union-find over the same pairs). A closed id is a generator naming its
|
|
5
|
+
* class, a generator-less class is named by its least member coordinate, and a field in no law is
|
|
6
|
+
* bare. Two generators in one class, or a target projection that resolves no key, is a compile
|
|
7
|
+
* error with a runtime twin. Spell statements inline: a widened list degrades the type tier.
|
|
57
8
|
*/
|
|
58
9
|
|
|
59
|
-
import type { AnyClosed } from "
|
|
60
|
-
import { isClosedMember, sealedFieldsOf } from "
|
|
61
|
-
import type { AnyFace } from "
|
|
62
|
-
import type { Same } from "
|
|
63
|
-
import type { AnyRelation, RelationFields } from "
|
|
64
|
-
import type { SchemaRelation, SchemaRelations } from "
|
|
65
|
-
import { renderStatement, type Statement } from "
|
|
10
|
+
import type { AnyClosed } from "./closed.ts"
|
|
11
|
+
import { isClosedMember, sealedFieldsOf } from "./closed.ts"
|
|
12
|
+
import type { AnyFace } from "./face.ts"
|
|
13
|
+
import type { Same } from "./judgment.ts"
|
|
14
|
+
import type { AnyRelation, RelationFields } from "./relation.ts"
|
|
15
|
+
import type { SchemaRelation, SchemaRelations } from "./schema.ts"
|
|
16
|
+
import { renderStatement, type Statement } from "./statements.ts"
|
|
66
17
|
|
|
67
18
|
type RelationClasses = { readonly [field: string]: string | undefined }
|
|
68
19
|
|
|
@@ -277,16 +228,13 @@ type DecidableKeyData<D> = [D] extends [
|
|
|
277
228
|
* widened owner, a widened or union projection each make the roster
|
|
278
229
|
* UNKNOWABLE.
|
|
279
230
|
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* {@link TargetKeyWall} to silent (the degradation law: best effort
|
|
231
|
+
* A wrong answer here would be a false wall, so anything outside the
|
|
232
|
+
* whitelist degrades the WHOLE {@link TargetKeyWall} to silent (best effort
|
|
283
233
|
* degrades to silent, never to a wrong judgment), exactly as a widened
|
|
284
234
|
* FACE already silences its own judgment; the value tier stays
|
|
285
|
-
* authoritative.
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* reached — a degenerate spelling no shipped surface writes, recorded
|
|
289
|
-
* here as the tier's known boundary, not fixed.
|
|
235
|
+
* authoritative. Known limit: a generic type parameter CONSTRAINED to a
|
|
236
|
+
* union of tuples hangs tsc in the deferred-scan machinery; no shipped
|
|
237
|
+
* surface writes that spelling.
|
|
290
238
|
*/
|
|
291
239
|
type DecidableRoster<Stmts extends readonly Statement[]> = [true] extends [IsMulti<Stmts>]
|
|
292
240
|
? false
|