litedbmodel 2.0.0 → 2.0.2
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/dist/scp/authoring-sql.d.ts +78 -0
- package/dist/scp/authoring-sql.d.ts.map +1 -1
- package/dist/scp/authoring-sql.js +110 -2
- package/dist/scp/authoring-sql.js.map +1 -1
- package/dist/scp/catalog.d.ts +5 -2
- package/dist/scp/catalog.d.ts.map +1 -1
- package/dist/scp/catalog.js +32 -1
- package/dist/scp/catalog.js.map +1 -1
- package/dist/scp/codegen.d.ts +143 -85
- package/dist/scp/codegen.d.ts.map +1 -1
- package/dist/scp/codegen.js +374 -90
- package/dist/scp/codegen.js.map +1 -1
- package/dist/scp/coltype.d.ts +41 -0
- package/dist/scp/coltype.d.ts.map +1 -0
- package/dist/scp/coltype.js +188 -0
- package/dist/scp/coltype.js.map +1 -0
- package/dist/scp/dialect.d.ts +12 -3
- package/dist/scp/dialect.d.ts.map +1 -1
- package/dist/scp/dialect.js +12 -3
- package/dist/scp/dialect.js.map +1 -1
- package/dist/scp/find-filter-guard.d.ts +68 -0
- package/dist/scp/find-filter-guard.d.ts.map +1 -0
- package/dist/scp/find-filter-guard.js +88 -0
- package/dist/scp/find-filter-guard.js.map +1 -0
- package/dist/scp/fragment/assemble.d.ts +61 -0
- package/dist/scp/fragment/assemble.d.ts.map +1 -0
- package/dist/scp/fragment/assemble.js +156 -0
- package/dist/scp/fragment/assemble.js.map +1 -0
- package/dist/scp/fragment/compile-pg.d.ts +107 -0
- package/dist/scp/fragment/compile-pg.d.ts.map +1 -0
- package/dist/scp/fragment/compile-pg.js +142 -0
- package/dist/scp/fragment/compile-pg.js.map +1 -0
- package/dist/scp/fragment/index.d.ts +16 -0
- package/dist/scp/fragment/index.d.ts.map +1 -0
- package/dist/scp/fragment/index.js +34 -0
- package/dist/scp/fragment/index.js.map +1 -0
- package/dist/scp/fragment/model.d.ts +119 -0
- package/dist/scp/fragment/model.d.ts.map +1 -0
- package/dist/scp/fragment/model.js +66 -0
- package/dist/scp/fragment/model.js.map +1 -0
- package/dist/scp/fragment/pg-array-type.d.ts +13 -0
- package/dist/scp/fragment/pg-array-type.d.ts.map +1 -0
- package/dist/scp/fragment/pg-array-type.js +34 -0
- package/dist/scp/fragment/pg-array-type.js.map +1 -0
- package/dist/scp/guard.d.ts +2 -6
- package/dist/scp/guard.d.ts.map +1 -1
- package/dist/scp/guard.js +19 -22
- package/dist/scp/guard.js.map +1 -1
- package/dist/scp/index.cjs +18695 -3921
- package/dist/scp/index.d.ts +41 -24
- package/dist/scp/index.d.ts.map +1 -1
- package/dist/scp/index.js +134 -49
- package/dist/scp/index.js.map +1 -1
- package/dist/scp/index.mjs +4830 -1432
- package/dist/scp/makesql/authoring-compile.d.ts +90 -0
- package/dist/scp/makesql/authoring-compile.d.ts.map +1 -0
- package/dist/scp/makesql/authoring-compile.js +494 -0
- package/dist/scp/makesql/authoring-compile.js.map +1 -0
- package/dist/scp/makesql/compile-crud.d.ts +133 -0
- package/dist/scp/makesql/compile-crud.d.ts.map +1 -0
- package/dist/scp/makesql/compile-crud.js +288 -0
- package/dist/scp/makesql/compile-crud.js.map +1 -0
- package/dist/scp/makesql/compile-relation.d.ts +157 -0
- package/dist/scp/makesql/compile-relation.d.ts.map +1 -0
- package/dist/scp/makesql/compile-relation.js +425 -0
- package/dist/scp/makesql/compile-relation.js.map +1 -0
- package/dist/scp/makesql/compile-select.d.ts +52 -0
- package/dist/scp/makesql/compile-select.d.ts.map +1 -0
- package/dist/scp/makesql/compile-select.js +58 -0
- package/dist/scp/makesql/compile-select.js.map +1 -0
- package/dist/scp/makesql/compile.d.ts +63 -0
- package/dist/scp/makesql/compile.d.ts.map +1 -0
- package/dist/scp/makesql/compile.js +99 -0
- package/dist/scp/makesql/compile.js.map +1 -0
- package/dist/scp/makesql/handler.d.ts +58 -0
- package/dist/scp/makesql/handler.d.ts.map +1 -0
- package/dist/scp/makesql/handler.js +113 -0
- package/dist/scp/makesql/handler.js.map +1 -0
- package/dist/scp/makesql/index.d.ts +33 -0
- package/dist/scp/makesql/index.d.ts.map +1 -0
- package/dist/scp/makesql/index.js +114 -0
- package/dist/scp/makesql/index.js.map +1 -0
- package/dist/scp/makesql/ir.d.ts +42 -0
- package/dist/scp/makesql/ir.d.ts.map +1 -0
- package/dist/scp/makesql/ir.js +66 -0
- package/dist/scp/makesql/ir.js.map +1 -0
- package/dist/scp/makesql/json-array.d.ts +84 -0
- package/dist/scp/makesql/json-array.d.ts.map +1 -0
- package/dist/scp/makesql/json-array.js +118 -0
- package/dist/scp/makesql/json-array.js.map +1 -0
- package/dist/scp/makesql/json-batch.d.ts +102 -0
- package/dist/scp/makesql/json-batch.d.ts.map +1 -0
- package/dist/scp/makesql/json-batch.js +269 -0
- package/dist/scp/makesql/json-batch.js.map +1 -0
- package/dist/scp/makesql/makesql.d.ts +99 -0
- package/dist/scp/makesql/makesql.d.ts.map +1 -0
- package/dist/scp/makesql/makesql.js +122 -0
- package/dist/scp/makesql/makesql.js.map +1 -0
- package/dist/scp/makesql/outtype.d.ts +44 -0
- package/dist/scp/makesql/outtype.d.ts.map +1 -0
- package/dist/scp/makesql/outtype.js +197 -0
- package/dist/scp/makesql/outtype.js.map +1 -0
- package/dist/scp/makesql/pool-executor.d.ts +47 -0
- package/dist/scp/makesql/pool-executor.d.ts.map +1 -0
- package/dist/scp/makesql/pool-executor.js +50 -0
- package/dist/scp/makesql/pool-executor.js.map +1 -0
- package/dist/scp/makesql/static-bundle.d.ts +187 -0
- package/dist/scp/makesql/static-bundle.d.ts.map +1 -0
- package/dist/scp/makesql/static-bundle.js +1113 -0
- package/dist/scp/makesql/static-bundle.js.map +1 -0
- package/dist/scp/makesql/tx.d.ts +216 -0
- package/dist/scp/makesql/tx.d.ts.map +1 -0
- package/dist/scp/makesql/tx.js +788 -0
- package/dist/scp/makesql/tx.js.map +1 -0
- package/dist/scp/makesql/writeouttype.d.ts +66 -0
- package/dist/scp/makesql/writeouttype.d.ts.map +1 -0
- package/dist/scp/makesql/writeouttype.js +195 -0
- package/dist/scp/makesql/writeouttype.js.map +1 -0
- package/dist/scp/relation.d.ts +86 -74
- package/dist/scp/relation.d.ts.map +1 -1
- package/dist/scp/relation.js +186 -120
- package/dist/scp/relation.js.map +1 -1
- package/dist/scp/runtime.d.ts +158 -211
- package/dist/scp/runtime.d.ts.map +1 -1
- package/dist/scp/runtime.js +250 -515
- package/dist/scp/runtime.js.map +1 -1
- package/dist/scp/typed-object.d.ts +12 -1
- package/dist/scp/typed-object.d.ts.map +1 -1
- package/dist/scp/typed-object.js +25 -4
- package/dist/scp/typed-object.js.map +1 -1
- package/docs/proposal/litedbmodel-v2-scp-architecture.md +51 -0
- package/docs/proposal/v0-coverage-matrix.md +157 -0
- package/docs/proposal/v2-completeness-plan.md +90 -0
- package/docs/proposal/v2-sql-parity-checklist.md +162 -0
- package/package.json +3 -3
- package/dist/scp/bridge.d.ts +0 -64
- package/dist/scp/bridge.d.ts.map +0 -1
- package/dist/scp/bridge.js +0 -329
- package/dist/scp/bridge.js.map +0 -1
- package/dist/scp/compile-dialect.d.ts +0 -39
- package/dist/scp/compile-dialect.d.ts.map +0 -1
- package/dist/scp/compile-dialect.js +0 -62
- package/dist/scp/compile-dialect.js.map +0 -1
- package/dist/scp/compile-sqlite.d.ts +0 -114
- package/dist/scp/compile-sqlite.d.ts.map +0 -1
- package/dist/scp/compile-sqlite.js +0 -149
- package/dist/scp/compile-sqlite.js.map +0 -1
- package/dist/scp/ir.d.ts +0 -92
- package/dist/scp/ir.d.ts.map +0 -1
- package/dist/scp/ir.js +0 -28
- package/dist/scp/ir.js.map +0 -1
- package/dist/scp/render.d.ts +0 -40
- package/dist/scp/render.d.ts.map +0 -1
- package/dist/scp/render.js +0 -170
- package/dist/scp/render.js.map +0 -1
- package/dist/scp/write-plan.d.ts +0 -161
- package/dist/scp/write-plan.d.ts.map +0 -1
- package/dist/scp/write-plan.js +0 -528
- package/dist/scp/write-plan.js.map +0 -1
- package/dist/scp/write-runtime.d.ts +0 -80
- package/dist/scp/write-runtime.d.ts.map +0 -1
- package/dist/scp/write-runtime.js +0 -167
- package/dist/scp/write-runtime.js.map +0 -1
package/dist/scp/runtime.d.ts
CHANGED
|
@@ -1,241 +1,214 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* litedbmodel v2 SCP — the thin TS runtime (WS3, #23;
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* over an ABSENT optional input would fail-closed with `UNKNOWN_BINDING`. So the runtime:
|
|
19
|
-
*
|
|
20
|
-
* 1. Backend-Compiles every SQL node up front ({@link import('./bridge').compileNode}) to a
|
|
21
|
-
* WS1 `CompiledOperation` (SQL text + fragment tree + closed-set param slots).
|
|
22
|
-
* 2. Rewrites the IR into a SURROGATE graph: each SQL node keeps its `id` / wiring / `map`
|
|
23
|
-
* shape, but its ports collapse to ONE synthetic `__scope` port — a bc `{obj:…}` that
|
|
24
|
-
* re-exports every binding head the op references (`input` names, wire node ids, the
|
|
25
|
-
* `map` element `as`). bc evaluates `__scope` in ITS scope (so `input`, sibling results
|
|
26
|
-
* and the map element all resolve through bc's own machinery) and hands the plain scope
|
|
27
|
-
* to the handler. No SQL-structural port is ever evaluated by bc.
|
|
28
|
-
* 3. Each handler renders its pre-compiled op against `ports.__scope` via WS1's normative
|
|
29
|
-
* {@link renderOperation} (fragment select + array expand + Expression eval), binds the
|
|
30
|
-
* params through the driver, executes REAL SQL, and returns the row list (assembly).
|
|
2
|
+
* litedbmodel v2 SCP — the thin TS runtime on the STATIC makeSQL bundle (WS3, #23; makeSQL
|
|
3
|
+
* flip, epic #43/#45 Phase B; spec §3 / §10 / §11).
|
|
4
|
+
*
|
|
5
|
+
* makeSQL is the SOLE SCP compile/execute path. A behavior method compiles (SYMBOLICALLY — no
|
|
6
|
+
* concrete input) to a {@link SqlBundle}:
|
|
7
|
+
* - a READ bundle carries a {@link ReadGraph} — the surrogate bc `ComponentGraphIR` (each SQL
|
|
8
|
+
* node → a `makeSQL` node) + per-node static statement templates. bc `runBehavior` drives
|
|
9
|
+
* map iteration / wire binding / Φ output; the makeSQL handler renders each node's statements
|
|
10
|
+
* (value-specs + skip evaluated per-input) and executes real SQL ("bc composes, makeSQL
|
|
11
|
+
* executes"). Read-relation batch ops ride the bundle too.
|
|
12
|
+
* - a WRITE bundle carries a single `makeSQL` statement (the base write) + the derived gate-first
|
|
13
|
+
* {@link TransactionPlan} for a Command with write-time relations.
|
|
14
|
+
*
|
|
15
|
+
* The reduced spine (`CompiledOperation` + `FragmentTree` + `renderOperation`) is RETIRED — this
|
|
16
|
+
* module carries no reduced IR. Reads execute via {@link import('./makesql/static-bundle')} (bc
|
|
17
|
+
* `runBehavior` + makeSQL handler); writes via {@link import('./makesql/tx')} (gate-first tx-DAG).
|
|
31
18
|
*
|
|
32
19
|
* ## Input normalization (SSoT — defaults live in the schema, not code)
|
|
33
20
|
*
|
|
34
|
-
* An OPTIONAL
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* (`required !== true` ⇒ optional), NOT an ad-hoc `?? null` in engine code: the schema is
|
|
38
|
-
* the single source of truth for which ports are optional.
|
|
21
|
+
* An OPTIONAL input head the caller omits is normalized to `null` (present-as-null) so a SKIP
|
|
22
|
+
* presence expression drops its fragment (absent-key SKIP). "Optional" comes from the bundle's
|
|
23
|
+
* `optionalHeads` (schema-optional + SKIP-guarded + every `refOpt` head) — the SSoT.
|
|
39
24
|
*/
|
|
40
|
-
import { type
|
|
25
|
+
import { type Scope, type Value } from 'behavior-contracts';
|
|
41
26
|
import type { BehaviorModelContract } from './authoring';
|
|
42
|
-
import type { CompiledOperation } from './ir';
|
|
43
27
|
import { SqlFailure } from './errors';
|
|
44
|
-
import { type RelationDecl, type RelationOp
|
|
28
|
+
import { type RelationDecl, type RelationOp } from './relation';
|
|
45
29
|
import { type ReadOptions } from './typed-object';
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
30
|
+
import type { DialectName } from './dialect';
|
|
31
|
+
import type { FindFilterSource } from './find-filter-guard';
|
|
32
|
+
import type { ColumnTypeResolver } from './coltype';
|
|
33
|
+
import { type ReadGraph, type StaticStatement, type SqliteDb as StaticSqliteDb, type SqlExecutorAsync } from './makesql/static-bundle';
|
|
34
|
+
import { type TransactionPlan, type TransactionResult } from './makesql/tx';
|
|
35
|
+
import { type InsertManyBuildOptions } from './makesql/compile-crud';
|
|
36
|
+
import type { UpdateManyBuildOptions } from '../drivers/types';
|
|
48
37
|
import { type EntityWritesDefinition, type LifecycleContract, type WriteLifecyclePhase } from './writes';
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* The minimal synchronous SQLite driver surface the runtime needs (better-sqlite3
|
|
52
|
-
* `Database`). `all` returns the row list of a SELECT / RETURNING statement; `run` executes
|
|
53
|
-
* a non-returning write and reports `changes` + `lastInsertRowid`. In-process, synchronous
|
|
54
|
-
* — the sanctioned in-proc substitute for a docker integration DB (#23 AC).
|
|
55
|
-
*/
|
|
56
|
-
export interface SqliteDb {
|
|
57
|
-
prepare(sql: string): {
|
|
58
|
-
all(...params: unknown[]): unknown[];
|
|
59
|
-
run(...params: unknown[]): {
|
|
60
|
-
changes: number;
|
|
61
|
-
lastInsertRowid: number | bigint;
|
|
62
|
-
};
|
|
63
|
-
reader?: boolean;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Build the SQL handler registry: one handler per SQL Catalog name (spec §11 item 4).
|
|
68
|
-
*
|
|
69
|
-
* Exported so the mode-3 codegen path (WS7f) binds the IDENTICAL SQL handlers into bc's
|
|
70
|
-
* generated `bind(handlers)` accessor — the generated module bakes the surrogate IR literal and
|
|
71
|
-
* calls the SAME `runBehavior`, so pairing it with THIS handler builder makes the codegen output
|
|
72
|
-
* byte-identical to {@link executeBundle} by construction (not a parallel reimplementation).
|
|
73
|
-
*/
|
|
74
|
-
export declare function buildHandlers(db: SqliteDb, compiled: Record<string, CompiledOperation>, dialect: Dialect): Handlers;
|
|
75
|
-
/**
|
|
76
|
-
* Normalize the caller input to `null` (present-as-null) for every OPTIONAL binding the
|
|
77
|
-
* caller omitted, so a SKIP guard using `refOpt` evaluates to `false` and drops its
|
|
78
|
-
* fragment (absent-key SKIP). "Optional" is determined from the SSoT, NOT an ad-hoc code
|
|
79
|
-
* default — a head is optional iff EITHER (a) the component's Input Port schema marks the
|
|
80
|
-
* port `required !== true`, OR (b) the head is SKIP-guarded in a compiled fragment (the
|
|
81
|
-
* SKIP fragment declares its driving input optional — spec §7). A REQUIRED, non-SKIP head
|
|
82
|
-
* that is missing is left absent so a real wiring bug surfaces loudly as bc's
|
|
83
|
-
* `UNKNOWN_BINDING` rather than being silently defaulted.
|
|
84
|
-
*/
|
|
85
|
-
export declare function normalizeInput(component: Component, optionalHeads: Set<string>, input: Scope): Scope;
|
|
38
|
+
/** The minimal synchronous SQLite driver surface the runtime needs (better-sqlite3 `Database`). */
|
|
39
|
+
export type SqliteDb = StaticSqliteDb;
|
|
86
40
|
/** Execute options: the driver and the entry component (method) to run. */
|
|
87
41
|
export interface ExecuteOptions {
|
|
88
42
|
/** The synchronous SQLite driver (better-sqlite3 `Database`). */
|
|
89
43
|
readonly db: SqliteDb;
|
|
90
44
|
/** The behavior method (component) name to run (default: the first component). */
|
|
91
45
|
readonly entry?: string;
|
|
92
|
-
/**
|
|
93
|
-
* The model's read-relation declarations (spec §4/§5). Compiled ONCE into the bundle's
|
|
94
|
-
* relation ops so the typed-object read surface ({@link read}) can batch-resolve both
|
|
95
|
-
* declarative-select and lazy relations via the SAME compiled op.
|
|
96
|
-
*/
|
|
46
|
+
/** The model's read-relation declarations (spec §4/§5), compiled ONCE into the bundle. */
|
|
97
47
|
readonly relations?: readonly RelationDecl[];
|
|
98
|
-
/**
|
|
99
|
-
* The target SQL dialect (spec §4/§10). Defaults to `'sqlite'` (the in-process runtime seam
|
|
100
|
-
* is synchronous SQLite). A `'postgres'`/`'mysql'` bundle is Backend-Compiled dialect-tagged
|
|
101
|
-
* for the dialect golden + a language runtime; the `?`→`$N` (PG) conversion is applied at
|
|
102
|
-
* render time. The SSoT dialect strategy governs every dialect divergence.
|
|
103
|
-
*/
|
|
48
|
+
/** The target SQL dialect (spec §4/§10). Defaults to `'sqlite'` (the in-process runtime seam). */
|
|
104
49
|
readonly dialect?: DialectName;
|
|
105
50
|
}
|
|
106
51
|
/**
|
|
107
|
-
* The
|
|
108
|
-
*
|
|
109
|
-
*
|
|
52
|
+
* The compiled bundle of ONE behavior method (spec §8) — pure serializable JSON a thin
|
|
53
|
+
* per-language runtime (bc + a SQL handler) can execute WITHOUT re-implementing litedbmodel's
|
|
54
|
+
* compile.
|
|
110
55
|
*
|
|
111
|
-
* - `
|
|
112
|
-
* `
|
|
113
|
-
*
|
|
114
|
-
* `
|
|
115
|
-
* - `
|
|
116
|
-
* `where` fragment tree with existence rules, `params` static slots, `assembly`). Param
|
|
117
|
-
* slots stay as Expression IR (`{coalesce:[…]}`, `{ref:[…]}`) so bc runtime-core owns
|
|
118
|
-
* value/SKIP evaluation per language (they are NOT pre-evaluated to literals).
|
|
119
|
-
* - `optionalHeads` — the input heads normalized to present-as-null (absent-key SKIP), so a
|
|
120
|
-
* consumer runtime reproduces the same normalization from the bundle (not from TS state).
|
|
56
|
+
* - READ (`readGraph` present): the surrogate `ComponentGraphIR` + per-node makeSQL statement
|
|
57
|
+
* templates; bc `runBehavior` owns orchestration, the makeSQL handler renders + executes.
|
|
58
|
+
* - WRITE (`statement` present): the single base-write makeSQL template; for a Command with
|
|
59
|
+
* write-time relations, `transaction` carries the derived gate-first plan.
|
|
60
|
+
* - `relations` — STATIC read-relation batch ops (spec §8 relation ops), keyed by name.
|
|
121
61
|
*
|
|
122
|
-
* `dialect` is the target SQL dialect (
|
|
123
|
-
*
|
|
124
|
-
* placeholders — the `?`→`$N` conversion is the render-time final one-pass, so the bundle stays
|
|
125
|
-
* uniform and dialect-tagged.
|
|
62
|
+
* `dialect` is the target SQL dialect (compiled ONCE, TS-side); a PG bundle's `?`→`$N` conversion
|
|
63
|
+
* is the render-time final pass, so the bundle stays uniform and dialect-tagged.
|
|
126
64
|
*/
|
|
127
65
|
export interface SqlBundle {
|
|
128
|
-
readonly irVersion: number;
|
|
129
|
-
readonly exprVersion: number;
|
|
130
66
|
readonly dialect: DialectName;
|
|
131
|
-
/** The
|
|
132
|
-
readonly
|
|
133
|
-
/**
|
|
134
|
-
readonly
|
|
67
|
+
/** The behavior (component) name. */
|
|
68
|
+
readonly name: string;
|
|
69
|
+
/** READ bundles: the portable read graph (surrogate IR + per-node makeSQL statements). */
|
|
70
|
+
readonly readGraph?: ReadGraph;
|
|
71
|
+
/** WRITE bundles: the single base-write makeSQL statement template. */
|
|
72
|
+
readonly statement?: StaticStatement;
|
|
135
73
|
/** Optional input heads normalized to present-as-null (absent-key SKIP). */
|
|
136
|
-
readonly optionalHeads: string[];
|
|
137
|
-
/**
|
|
138
|
-
* Pre-compiled read-relation batch ops (spec §8 `relation ops`), keyed by relation name.
|
|
139
|
-
* Derived ONCE (TS-side) from the model relation declarations, dialect-aware (SQLite).
|
|
140
|
-
* Pure JSON (each op's `query` is a {@link CompiledOperation}) so a thin per-language
|
|
141
|
-
* runtime gets the relation batch SQL for free (WS7). BOTH read surfaces (declarative
|
|
142
|
-
* select + lazy) resolve through these ops — the identical compiled op.
|
|
143
|
-
*/
|
|
74
|
+
readonly optionalHeads: readonly string[];
|
|
75
|
+
/** Pre-compiled STATIC read-relation batch ops, keyed by relation name (pure JSON). */
|
|
144
76
|
readonly relations: Record<string, RelationOp>;
|
|
77
|
+
/** The derived write-time-relations transaction plan (present ONLY for a write Command bundle). */
|
|
78
|
+
readonly transaction?: TransactionPlan;
|
|
145
79
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
80
|
+
* Codegen typed-de-box `outputType` for a WRITE bundle (spec §4.1 / §9): the bc portable type of
|
|
81
|
+
* the write's {@link TransactionResult} (entity / returnedRows rows typed via the schema SoT). A
|
|
82
|
+
* READ bundle carries its outType/outputType inside `readGraph.ir` instead; a write bundle has no
|
|
83
|
+
* such surrogate, so its output type rides HERE and is attached to the write's `makeSqlComponentIR`
|
|
84
|
+
* node/component by {@link bundleToPortableIR}. Present ONLY when a column-type resolver was
|
|
85
|
+
* supplied at compile (additive/back-compat: absent → the write IR stays un-annotated, as before).
|
|
152
86
|
*/
|
|
153
|
-
readonly
|
|
87
|
+
readonly outputType?: unknown;
|
|
154
88
|
}
|
|
155
89
|
/**
|
|
156
|
-
* Execute a published behavior contract (WS2 {@link BehaviorModelContract}) end-to-end
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* This is α's vertical slice: authoring → IR → Backend-Compile → thin runtime → real
|
|
161
|
-
* SQLite → assembly. The returned Value is the component's `output` (Φ merge) with each SQL
|
|
162
|
-
* node's slot filled by its executed row list.
|
|
90
|
+
* Execute a published behavior contract (WS2 {@link BehaviorModelContract}) end-to-end via the
|
|
91
|
+
* static makeSQL bundle. Returns the component's output (a read Φ output / row list, or a write's
|
|
92
|
+
* RETURNING rows / `[{changes, lastInsertRowid}]` summary).
|
|
163
93
|
*
|
|
164
|
-
* @throws {SqlFailure} a mapped driver failure re-surfaced at the boundary
|
|
165
|
-
* node re-throws through `runPlan` as `OP_FAILED`; the runtime unwraps it back to the
|
|
166
|
-
* structured {@link SqlFailure} so the caller sees `kind` / `policy` / `sqliteCode`).
|
|
94
|
+
* @throws {SqlFailure} a mapped driver failure re-surfaced at the boundary.
|
|
167
95
|
*/
|
|
168
96
|
export declare function executeBehavior(contract: BehaviorModelContract, input: Scope, options: ExecuteOptions): Value;
|
|
169
97
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* emits pure JSON: no TS runtime state is captured, so `JSON.stringify(bundle)` round-trips
|
|
174
|
-
* losslessly and a thin per-language runtime can execute it with bc runtime-core + a SQL
|
|
175
|
-
* handler alone (proven by the bundle round-trip test).
|
|
98
|
+
* Compile ONE behavior method into the serializable STATIC {@link SqlBundle} (spec §8) — the
|
|
99
|
+
* published multi-language artifact. SYMBOLIC (no concrete input). A read method compiles to a
|
|
100
|
+
* {@link ReadGraph}; a single-write method to a `makeSQL` statement. Pure JSON throughout.
|
|
176
101
|
*/
|
|
177
|
-
export declare function compileBundle(contract: BehaviorModelContract, entry?: string, relations?: readonly RelationDecl[], dialectName?: DialectName): SqlBundle;
|
|
102
|
+
export declare function compileBundle(contract: BehaviorModelContract, entry?: string, relations?: readonly RelationDecl[], dialectName?: DialectName, findFilterModel?: FindFilterSource, resolveColumnType?: ColumnTypeResolver): SqlBundle;
|
|
178
103
|
/**
|
|
179
|
-
* Execute a {@link SqlBundle} (the §8 published artifact) end-to-end
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* bundle + bc runtime-core, never re-running litedbmodel's Backend-Compile. The bundle
|
|
184
|
-
* round-trip test parses this from JSON (no TS state) to prove self-sufficiency (WS7).
|
|
104
|
+
* Execute a {@link SqlBundle} (the §8 published artifact) end-to-end via the static makeSQL
|
|
105
|
+
* runtime + REAL SQLite. Read bundles run the read graph via bc `runBehavior`; single-statement
|
|
106
|
+
* write bundles run the write (RETURNING rows / summary). The SAME code path a thin per-language
|
|
107
|
+
* runtime follows — it consumes ONLY the serialized bundle + bc, never re-running the compile.
|
|
185
108
|
*
|
|
186
109
|
* @throws {SqlFailure} a mapped driver failure re-surfaced at the boundary.
|
|
187
110
|
*/
|
|
188
111
|
export declare function executeBundle(bundle: SqlBundle, input: Scope, options: ExecuteOptions): Value;
|
|
112
|
+
/** Async execute options: the pooled async SQL executor + the entry component (method) to run. */
|
|
113
|
+
export interface AsyncExecuteOptions {
|
|
114
|
+
/** The pooled async SQL executor (build via `pgPoolExecutor` / `mysqlPoolExecutor`). */
|
|
115
|
+
readonly exec: SqlExecutorAsync;
|
|
116
|
+
/** The behavior method (component) name to run (default: the first component). */
|
|
117
|
+
readonly entry?: string;
|
|
118
|
+
/** The model's read-relation declarations (spec §4/§5), compiled ONCE into the bundle. */
|
|
119
|
+
readonly relations?: readonly RelationDecl[];
|
|
120
|
+
/** The target SQL dialect (spec §4/§10). For the live async path this is `'postgres'`/`'mysql'`. */
|
|
121
|
+
readonly dialect?: DialectName;
|
|
122
|
+
}
|
|
189
123
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
124
|
+
* Execute a READ {@link SqlBundle} end-to-end via the ASYNC PG / MySQL execution model (#40): bc
|
|
125
|
+
* `runBehaviorAsync` drives map iteration / wire binding / Φ output and dispatches independent
|
|
126
|
+
* sibling read nodes in bounded parallel against the pooled async executor. This is the PRODUCTION
|
|
127
|
+
* live-DB read entry point — the async twin of {@link executeBundle} for read bundles.
|
|
128
|
+
*
|
|
129
|
+
* Byte-identical composition (SAME IR, SAME per-node SQL text + params, SAME Φ output) to the
|
|
130
|
+
* serial `executeBundle`; concurrency changes only the wall-clock. A single-relation (zero-sibling)
|
|
131
|
+
* read graph runs exactly one query, so it is identical to the serial path either way.
|
|
196
132
|
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
133
|
+
* A single-statement WRITE bundle is NOT accepted here — the write-tx path stays sync + serial
|
|
134
|
+
* (`executeBundle` / `executeTransactionBundle`); this async path is READ-only.
|
|
135
|
+
*
|
|
136
|
+
* @throws {SqlFailure} a mapped driver failure re-surfaced at the boundary.
|
|
199
137
|
*/
|
|
200
|
-
export declare function
|
|
138
|
+
export declare function executeBundleAsync(bundle: SqlBundle, input: Scope, options: AsyncExecuteOptions): Promise<Value>;
|
|
139
|
+
/**
|
|
140
|
+
* Compile + execute a READ behavior method via the ASYNC PG / MySQL execution model (#40). The
|
|
141
|
+
* async twin of {@link executeBehavior} for reads: compile the contract to a {@link SqlBundle}
|
|
142
|
+
* (SYMBOLIC), then run its read graph through {@link executeBundleAsync}.
|
|
143
|
+
*
|
|
144
|
+
* @throws {SqlFailure} a mapped driver failure re-surfaced at the boundary.
|
|
145
|
+
*/
|
|
146
|
+
export declare function executeBehaviorAsync(contract: BehaviorModelContract, input: Scope, options: AsyncExecuteOptions): Promise<Value>;
|
|
147
|
+
/**
|
|
148
|
+
* Compile a Command method + its `entityWrites` save contract into a {@link SqlBundle} carrying
|
|
149
|
+
* the derived, gate-first write-time-relations {@link TransactionPlan} (spec §6/§8). The base
|
|
150
|
+
* write op is compiled ONCE (the SAME `compileWriteNode` — complete tuned SQL + deferred
|
|
151
|
+
* Expression-IR params); {@link deriveTransactionPlan} lowers the lifecycle's §6 effect arrays
|
|
152
|
+
* around it into the ordered statement list. Pure JSON; a WS7 runtime honors the SAME plan.
|
|
153
|
+
*/
|
|
154
|
+
export declare function compileWriteBundle(contract: BehaviorModelContract, entry: string, writes: EntityWritesDefinition, phase: WriteLifecyclePhase, dialectName?: DialectName, resolveColumnType?: ColumnTypeResolver): SqlBundle;
|
|
201
155
|
/**
|
|
202
156
|
* One member of a COMPOSITE (multi-write) Command (WS8a, #28 — spec §6 nested write / §14 tx-DAG):
|
|
203
157
|
* a named base write (its sole Insert/Update/Delete node in `entry`) carrying its OWN save-contract
|
|
204
158
|
* `effects`. A later member references an earlier member's RETURNING row via `$.ref.<name>.<field>`.
|
|
205
159
|
*/
|
|
206
160
|
export interface CompositeWriteEntry {
|
|
207
|
-
/** The Command method whose sole base-write node is this member's body. */
|
|
208
161
|
readonly entry: string;
|
|
209
|
-
/** The member's stable name (downstream members address its row as `$.ref.<name>.<field>`). */
|
|
210
162
|
readonly name: string;
|
|
211
|
-
/** The member's write-time-relations lifecycle for this phase (its gates/derive/edges/emits). */
|
|
212
163
|
readonly lifecycle: LifecycleContract;
|
|
213
164
|
}
|
|
214
165
|
/**
|
|
215
|
-
*
|
|
216
|
-
* gate-first, TOPOLOGICALLY-ORDERED transaction plan (spec §6 nested write / §14
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* constraint and derives the correct ordered plan (deterministic, stable tie-break; a cycle or
|
|
221
|
-
* dangling ref is ESCALATED). The plan is pure JSON — the 5 language runtimes execute it verbatim
|
|
222
|
-
* (they already bind each statement's `binds` row into scope for downstream `$.ref` resolution).
|
|
223
|
-
*
|
|
224
|
-
* @throws if an entry is missing/not a single-write node, or the DAG cannot be derived (cycle /
|
|
225
|
-
* dangling `$.ref` / missing RETURNING on a referenced write) — all fail-closed.
|
|
166
|
+
* Compile a COMPOSITE (multi-write) Command into a {@link SqlBundle} carrying ONE derived,
|
|
167
|
+
* gate-first, TOPOLOGICALLY-ORDERED transaction plan (spec §6 nested write / §14). Each entry
|
|
168
|
+
* contributes a named base write + its effects; a later member depends on an earlier via
|
|
169
|
+
* `$.ref.<name>.*`. {@link deriveTransactionPlan} builds the DAG + gate-first constraint and
|
|
170
|
+
* derives the ordered plan; a cycle / dangling ref is ESCALATED. Pure JSON.
|
|
226
171
|
*/
|
|
227
172
|
export declare function compileCompositeWriteBundle(contract: BehaviorModelContract, entries: readonly CompositeWriteEntry[], phase: WriteLifecyclePhase, dialectName?: DialectName): SqlBundle;
|
|
173
|
+
/**
|
|
174
|
+
* Compile a `createMany` into a batch write {@link SqlBundle} carrying a gate-free
|
|
175
|
+
* {@link TransactionPlan}. Heterogeneous column-set groups become MULTIPLE ordered INSERT
|
|
176
|
+
* statements — byte-identical to what `DBModel._insert` emits per group (via `compileInsertMany`).
|
|
177
|
+
*
|
|
178
|
+
* `pk` (the target PK descriptor) is REQUIRED when the createMany carries a RETURNING clause on the
|
|
179
|
+
* MySQL dialect: a batch INSERT persists N rows, so the MySQL RETURNING emulation must re-select ALL
|
|
180
|
+
* N (a range on the AUTO_INCREMENT column, or the client-supplied PK values), not a single `id`.
|
|
181
|
+
*/
|
|
182
|
+
export declare function compileCreateManyBundle(name: string, options: InsertManyBuildOptions & {
|
|
183
|
+
pk?: {
|
|
184
|
+
columns: readonly string[];
|
|
185
|
+
autoInc: string | null;
|
|
186
|
+
};
|
|
187
|
+
}, dialectName?: DialectName, resolveColumnType?: ColumnTypeResolver): SqlBundle;
|
|
188
|
+
/**
|
|
189
|
+
* Compile an `updateMany` into a batch write {@link SqlBundle} (one UNNEST/JSON/CASE statement,
|
|
190
|
+
* byte-identical to `compileUpdateMany` driving the v1 `buildUpdateMany` / JSON-batch builder).
|
|
191
|
+
*/
|
|
192
|
+
export declare function compileUpdateManyBundle(name: string, options: UpdateManyBuildOptions, dialectName?: DialectName): SqlBundle;
|
|
193
|
+
/**
|
|
194
|
+
* Compile a `deleteMany` into a batch write {@link SqlBundle} — a PK-set IN-list DELETE (single-key)
|
|
195
|
+
* or one DELETE per composite-key group, driven by the v1 `DBConditions` builder (`compileDeleteMany`).
|
|
196
|
+
*/
|
|
197
|
+
export declare function compileDeleteManyBundle(name: string, options: {
|
|
198
|
+
tableName: string;
|
|
199
|
+
keyColumns: string[];
|
|
200
|
+
keys: Record<string, unknown>[];
|
|
201
|
+
returning?: string;
|
|
202
|
+
}, dialectName?: DialectName): SqlBundle;
|
|
228
203
|
/**
|
|
229
204
|
* Execute a COMPOSITE (multi-write) Command end-to-end as ONE real SQLite transaction with gate-
|
|
230
|
-
* first short-circuit + DAG-ordered statements (spec §6 / §14)
|
|
231
|
-
* bundle with the derived tx-DAG plan, then run {@link executeTransactionBundle}.
|
|
205
|
+
* first short-circuit + DAG-ordered statements (spec §6 / §14).
|
|
232
206
|
*/
|
|
233
207
|
export declare function executeCompositeCommand(contract: BehaviorModelContract, entries: readonly CompositeWriteEntry[], phase: WriteLifecyclePhase, input: Scope, options: ExecuteOptions): TransactionResult;
|
|
234
208
|
/**
|
|
235
209
|
* Execute a Command end-to-end as ONE real SQLite transaction with gate-first short-circuit
|
|
236
|
-
* (spec §6):
|
|
237
|
-
*
|
|
238
|
-
* ("write-time relations が自動導出 → 1 tx", spec §2.3).
|
|
210
|
+
* (spec §6): compile the Command + its save contract into a {@link SqlBundle} with a transaction
|
|
211
|
+
* plan, then run {@link executeTransactionBundle}. The v2 public write path.
|
|
239
212
|
*
|
|
240
213
|
* @throws {SqlFailure} a mapped driver failure (the transaction ROLLBACKs first).
|
|
241
214
|
*/
|
|
@@ -244,52 +217,26 @@ export declare function executeCommand(contract: BehaviorModelContract, writes:
|
|
|
244
217
|
}): TransactionResult;
|
|
245
218
|
/**
|
|
246
219
|
* Execute a {@link SqlBundle}'s derived transaction plan (spec §6/§8) as ONE real SQLite
|
|
247
|
-
* transaction.
|
|
248
|
-
*
|
|
249
|
-
* re-deriving the plan. The bundle round-trip test parses this from JSON (no TS state) to prove
|
|
250
|
-
* WS7 self-sufficiency.
|
|
220
|
+
* transaction. The SAME code path a thin per-language runtime follows: it consumes ONLY the
|
|
221
|
+
* serialized {@link TransactionPlan} (pure JSON) + a SQL driver, never re-deriving the plan.
|
|
251
222
|
*
|
|
252
|
-
* @throws if the bundle carries no transaction plan
|
|
253
|
-
* bundle), or {@link SqlFailure} on a mapped driver failure.
|
|
223
|
+
* @throws if the bundle carries no transaction plan, or {@link SqlFailure} on a driver failure.
|
|
254
224
|
*/
|
|
255
225
|
export declare function executeTransactionBundle(bundle: SqlBundle, input: Scope, options: ExecuteOptions): TransactionResult;
|
|
256
226
|
/** Options for the typed-object {@link read} surface: base execution + relation read opts. */
|
|
257
227
|
export interface ReadRuntimeOptions<R = Record<string, unknown>> extends ExecuteOptions, ReadOptions<R> {
|
|
258
228
|
}
|
|
259
229
|
/**
|
|
260
|
-
* The v2 typed-object read surface (spec §4/§5/§12): run a read behavior whose output is a
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* the whole page (staged, no N+1) and attached as an OWN prop.
|
|
266
|
-
* - Every OTHER declared relation is LAZY: a prototype getter that, on `await result.author`,
|
|
267
|
-
* fires the SAME compiled relation op over the sibling set (batched — still no N+1).
|
|
268
|
-
* - `options.hydrate` recovers host objects (`(raw) => new Domain(raw)`) — the consumer-side
|
|
269
|
-
* method-UX recovery. It stays in the runtime and never enters the bundle.
|
|
270
|
-
*
|
|
271
|
-
* Both surfaces share the ONE compiled relation op in the bundle (spec §5). The base row list
|
|
272
|
-
* is produced by the SAME {@link executeBundle} path (bc runtime-core + SQL handlers), so the
|
|
273
|
-
* read query itself is fully IR-driven; relations are the runtime's staged-batch concern.
|
|
230
|
+
* The v2 typed-object read surface (spec §4/§5/§12): run a read behavior whose output is a row
|
|
231
|
+
* list (a Select), then wrap each raw row in a plain TYPED-OBJECT with read relations attached.
|
|
232
|
+
* A relation named in `options.with` is declaratively batch-prefetched; every other declared
|
|
233
|
+
* relation is lazy (a prototype getter firing the SAME compiled op over the sibling set). Both
|
|
234
|
+
* surfaces share the ONE compiled relation op in the bundle.
|
|
274
235
|
*
|
|
275
|
-
* @throws if the behavior output is not a row list (the typed-object surface is for reads).
|
|
236
|
+
* @throws if the behavior output is not a row list (the typed-object read surface is for reads).
|
|
276
237
|
*/
|
|
277
238
|
export declare function read<R = Record<string, unknown>>(contract: BehaviorModelContract, input: Scope, options: ReadRuntimeOptions<R>): R[];
|
|
278
239
|
/** {@link read} against an already-compiled {@link SqlBundle} (the published §8 artifact). */
|
|
279
240
|
export declare function readBundle<R = Record<string, unknown>>(bundle: SqlBundle, input: Scope, options: ReadRuntimeOptions<R>): R[];
|
|
280
|
-
/**
|
|
281
|
-
* Resolve ONE relation for a page of parent rows by driving bc's PLAN mechanism (spec §5:
|
|
282
|
-
* `deriveExecutionPlan` — result path → stage groups + concurrency). This is the staged-batch
|
|
283
|
-
* path: it builds a bc component with a single `map.batched` node over the parent rows and
|
|
284
|
-
* runs it through {@link runBehavior} (the SAME multi-language execution core WS7 languages
|
|
285
|
-
* use). Because the map is `batched`, bc evaluates every parent's key port and invokes the
|
|
286
|
-
* relation handler EXACTLY ONCE with `{items:[…]}` — so the relation op fires ONE batched
|
|
287
|
-
* query for the whole page (structurally no N+1, enforced by bc's batch contract). The
|
|
288
|
-
* handler runs the IDENTICAL compiled {@link RelationOp} the declarative-select and lazy
|
|
289
|
-
* surfaces use, and `into` attaches each parent's resolved child(ren).
|
|
290
|
-
*
|
|
291
|
-
* Returns the parent rows augmented with the relation under `op.name` (per cardinality).
|
|
292
|
-
*/
|
|
293
|
-
export declare function resolveRelationViaPlan(op: RelationOp, parents: readonly Record<string, unknown>[], db: RelationDriver): Record<string, unknown>[];
|
|
294
241
|
export { SqlFailure };
|
|
295
242
|
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/scp/runtime.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/scp/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAa,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAKL,KAAK,SAAS,EAEd,KAAK,eAAe,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