litedbmodel 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/README.md +8 -1
  2. package/dist/DBConditions.d.ts.map +1 -1
  3. package/dist/DBConditions.js +16 -1
  4. package/dist/DBConditions.js.map +1 -1
  5. package/dist/DBHandler.d.ts.map +1 -1
  6. package/dist/DBHandler.js +6 -0
  7. package/dist/DBHandler.js.map +1 -1
  8. package/dist/DBModel.d.ts +84 -2
  9. package/dist/DBModel.d.ts.map +1 -1
  10. package/dist/DBModel.js +312 -29
  11. package/dist/DBModel.js.map +1 -1
  12. package/dist/decorators.d.ts +52 -0
  13. package/dist/decorators.d.ts.map +1 -1
  14. package/dist/decorators.js +83 -0
  15. package/dist/decorators.js.map +1 -1
  16. package/dist/drivers/mysql.d.ts.map +1 -1
  17. package/dist/drivers/mysql.js +6 -2
  18. package/dist/drivers/mysql.js.map +1 -1
  19. package/dist/drivers/postgres.d.ts.map +1 -1
  20. package/dist/drivers/postgres.js +6 -2
  21. package/dist/drivers/postgres.js.map +1 -1
  22. package/dist/drivers/sqlite.d.ts.map +1 -1
  23. package/dist/drivers/sqlite.js +12 -2
  24. package/dist/drivers/sqlite.js.map +1 -1
  25. package/dist/index.cjs +10741 -0
  26. package/dist/index.d.cts +1 -0
  27. package/dist/scp/coltype.d.ts +26 -1
  28. package/dist/scp/coltype.d.ts.map +1 -1
  29. package/dist/scp/coltype.js +82 -15
  30. package/dist/scp/coltype.js.map +1 -1
  31. package/dist/scp/connection-routing.d.ts +312 -0
  32. package/dist/scp/connection-routing.d.ts.map +1 -0
  33. package/dist/scp/connection-routing.js +394 -0
  34. package/dist/scp/connection-routing.js.map +1 -0
  35. package/dist/scp/dbmodel-runtime.d.ts +101 -0
  36. package/dist/scp/dbmodel-runtime.d.ts.map +1 -0
  37. package/dist/scp/dbmodel-runtime.js +174 -0
  38. package/dist/scp/dbmodel-runtime.js.map +1 -0
  39. package/dist/scp/decorator-adapter.d.ts +196 -0
  40. package/dist/scp/decorator-adapter.d.ts.map +1 -0
  41. package/dist/scp/decorator-adapter.js +286 -0
  42. package/dist/scp/decorator-adapter.js.map +1 -0
  43. package/dist/scp/emit/emitter.d.ts +108 -0
  44. package/dist/scp/emit/emitter.d.ts.map +1 -0
  45. package/dist/scp/emit/emitter.js +782 -0
  46. package/dist/scp/emit/emitter.js.map +1 -0
  47. package/dist/scp/emit/endpoint.d.ts +248 -0
  48. package/dist/scp/emit/endpoint.d.ts.map +1 -0
  49. package/dist/scp/emit/endpoint.js +20 -0
  50. package/dist/scp/emit/endpoint.js.map +1 -0
  51. package/dist/scp/emit/index.d.ts +11 -0
  52. package/dist/scp/emit/index.d.ts.map +1 -0
  53. package/dist/scp/emit/index.js +13 -0
  54. package/dist/scp/emit/index.js.map +1 -0
  55. package/dist/scp/errors.d.ts +45 -1
  56. package/dist/scp/errors.d.ts.map +1 -1
  57. package/dist/scp/errors.js +47 -1
  58. package/dist/scp/errors.js.map +1 -1
  59. package/dist/scp/exec-context.d.ts +390 -0
  60. package/dist/scp/exec-context.d.ts.map +1 -0
  61. package/dist/scp/exec-context.js +540 -0
  62. package/dist/scp/exec-context.js.map +1 -0
  63. package/dist/scp/grouping.d.ts +32 -0
  64. package/dist/scp/grouping.d.ts.map +1 -0
  65. package/dist/scp/grouping.js +0 -0
  66. package/dist/scp/grouping.js.map +1 -0
  67. package/dist/scp/index.cjs +6814 -15731
  68. package/dist/scp/index.d.cts +1 -0
  69. package/dist/scp/index.d.mts +1 -0
  70. package/dist/scp/index.d.ts +47 -49
  71. package/dist/scp/index.d.ts.map +1 -1
  72. package/dist/scp/index.js +174 -152
  73. package/dist/scp/index.js.map +1 -1
  74. package/dist/scp/index.mjs +5561 -3704
  75. package/dist/scp/leaf-transport.d.ts +50 -0
  76. package/dist/scp/leaf-transport.d.ts.map +1 -0
  77. package/dist/scp/leaf-transport.js +92 -0
  78. package/dist/scp/leaf-transport.js.map +1 -0
  79. package/dist/scp/leaves.d.ts +174 -0
  80. package/dist/scp/leaves.d.ts.map +1 -0
  81. package/dist/scp/leaves.js +287 -0
  82. package/dist/scp/leaves.js.map +1 -0
  83. package/dist/scp/limit-config.d.ts +118 -0
  84. package/dist/scp/limit-config.d.ts.map +1 -0
  85. package/dist/scp/limit-config.js +126 -0
  86. package/dist/scp/limit-config.js.map +1 -0
  87. package/dist/scp/makesql/compile-relation.d.ts +49 -23
  88. package/dist/scp/makesql/compile-relation.d.ts.map +1 -1
  89. package/dist/scp/makesql/compile-relation.js +101 -76
  90. package/dist/scp/makesql/compile-relation.js.map +1 -1
  91. package/dist/scp/makesql/compile-select.d.ts +45 -10
  92. package/dist/scp/makesql/compile-select.d.ts.map +1 -1
  93. package/dist/scp/makesql/compile-select.js +50 -10
  94. package/dist/scp/makesql/compile-select.js.map +1 -1
  95. package/dist/scp/makesql/handler.d.ts +1 -1
  96. package/dist/scp/makesql/handler.d.ts.map +1 -1
  97. package/dist/scp/makesql/index.d.ts +7 -9
  98. package/dist/scp/makesql/index.d.ts.map +1 -1
  99. package/dist/scp/makesql/index.js +17 -28
  100. package/dist/scp/makesql/index.js.map +1 -1
  101. package/dist/scp/makesql/json-array.d.ts +65 -0
  102. package/dist/scp/makesql/json-array.d.ts.map +1 -1
  103. package/dist/scp/makesql/json-array.js +99 -10
  104. package/dist/scp/makesql/json-array.js.map +1 -1
  105. package/dist/scp/makesql/json-batch.d.ts.map +1 -1
  106. package/dist/scp/makesql/json-batch.js +15 -18
  107. package/dist/scp/makesql/json-batch.js.map +1 -1
  108. package/dist/scp/makesql/makesql.d.ts +1 -1
  109. package/dist/scp/makesql/makesql.d.ts.map +1 -1
  110. package/dist/scp/makesql/mysql-returning.d.ts +93 -0
  111. package/dist/scp/makesql/mysql-returning.d.ts.map +1 -0
  112. package/dist/scp/makesql/mysql-returning.js +215 -0
  113. package/dist/scp/makesql/mysql-returning.js.map +1 -0
  114. package/dist/scp/makesql/outtype.d.ts +40 -54
  115. package/dist/scp/makesql/outtype.d.ts.map +1 -1
  116. package/dist/scp/makesql/outtype.js +46 -204
  117. package/dist/scp/makesql/outtype.js.map +1 -1
  118. package/dist/scp/makesql/pool-executor.d.ts +86 -34
  119. package/dist/scp/makesql/pool-executor.d.ts.map +1 -1
  120. package/dist/scp/makesql/pool-executor.js +179 -39
  121. package/dist/scp/makesql/pool-executor.js.map +1 -1
  122. package/dist/scp/makesql/tx.d.ts +107 -22
  123. package/dist/scp/makesql/tx.d.ts.map +1 -1
  124. package/dist/scp/makesql/tx.js +451 -97
  125. package/dist/scp/makesql/tx.js.map +1 -1
  126. package/dist/scp/makesql/writeouttype.d.ts +4 -4
  127. package/dist/scp/makesql/writeouttype.d.ts.map +1 -1
  128. package/dist/scp/makesql/writeouttype.js +5 -3
  129. package/dist/scp/makesql/writeouttype.js.map +1 -1
  130. package/dist/scp/middleware.d.ts +287 -0
  131. package/dist/scp/middleware.d.ts.map +1 -0
  132. package/dist/scp/middleware.js +358 -0
  133. package/dist/scp/middleware.js.map +1 -0
  134. package/dist/scp/relation.d.ts +65 -8
  135. package/dist/scp/relation.d.ts.map +1 -1
  136. package/dist/scp/relation.js +154 -93
  137. package/dist/scp/relation.js.map +1 -1
  138. package/dist/scp/tx-options.d.ts +136 -0
  139. package/dist/scp/tx-options.d.ts.map +1 -0
  140. package/dist/scp/tx-options.js +184 -0
  141. package/dist/scp/tx-options.js.map +1 -0
  142. package/dist/scp/write-bundle.d.ts +131 -0
  143. package/dist/scp/write-bundle.d.ts.map +1 -0
  144. package/dist/scp/write-bundle.js +160 -0
  145. package/dist/scp/write-bundle.js.map +1 -0
  146. package/dist/types.d.ts +7 -0
  147. package/dist/types.d.ts.map +1 -1
  148. package/dist/types.js.map +1 -1
  149. package/docs/BENCHMARK.md +54 -97
  150. package/docs/COMPARISON.md +14 -8
  151. package/docs/benchmark-chart.svg +310 -248
  152. package/docs/design/phase-a-execution-context.md +139 -0
  153. package/package.json +14 -13
  154. package/dist/scp/authoring-sql.d.ts +0 -134
  155. package/dist/scp/authoring-sql.d.ts.map +0 -1
  156. package/dist/scp/authoring-sql.js +0 -191
  157. package/dist/scp/authoring-sql.js.map +0 -1
  158. package/dist/scp/authoring.d.ts +0 -218
  159. package/dist/scp/authoring.d.ts.map +0 -1
  160. package/dist/scp/authoring.js +0 -351
  161. package/dist/scp/authoring.js.map +0 -1
  162. package/dist/scp/catalog.d.ts +0 -95
  163. package/dist/scp/catalog.d.ts.map +0 -1
  164. package/dist/scp/catalog.js +0 -245
  165. package/dist/scp/catalog.js.map +0 -1
  166. package/dist/scp/codegen.d.ts +0 -201
  167. package/dist/scp/codegen.d.ts.map +0 -1
  168. package/dist/scp/codegen.js +0 -605
  169. package/dist/scp/codegen.js.map +0 -1
  170. package/dist/scp/find-filter-guard.d.ts +0 -68
  171. package/dist/scp/find-filter-guard.d.ts.map +0 -1
  172. package/dist/scp/find-filter-guard.js +0 -88
  173. package/dist/scp/find-filter-guard.js.map +0 -1
  174. package/dist/scp/guard.d.ts +0 -43
  175. package/dist/scp/guard.d.ts.map +0 -1
  176. package/dist/scp/guard.js +0 -140
  177. package/dist/scp/guard.js.map +0 -1
  178. package/dist/scp/makesql/authoring-compile.d.ts +0 -90
  179. package/dist/scp/makesql/authoring-compile.d.ts.map +0 -1
  180. package/dist/scp/makesql/authoring-compile.js +0 -505
  181. package/dist/scp/makesql/authoring-compile.js.map +0 -1
  182. package/dist/scp/makesql/static-bundle.d.ts +0 -196
  183. package/dist/scp/makesql/static-bundle.d.ts.map +0 -1
  184. package/dist/scp/makesql/static-bundle.js +0 -1244
  185. package/dist/scp/makesql/static-bundle.js.map +0 -1
  186. package/dist/scp/runtime.d.ts +0 -243
  187. package/dist/scp/runtime.d.ts.map +0 -1
  188. package/dist/scp/runtime.js +0 -422
  189. package/dist/scp/runtime.js.map +0 -1
@@ -1,505 +0,0 @@
1
- "use strict";
2
- /**
3
- * litedbmodel v2 SCP — the AUTHORING → `makeSQL` bundle path (Phase A of epic #43/#45).
4
- *
5
- * WS2 (`../authoring.ts`) lowers BOTH the SCP declaration blocks and the eager public
6
- * API through ONE bc compile path (`publishBehaviors` / `compileEager`) into ONE
7
- * portable `ComponentGraphIR` — a Component's body carries `componentRef` / `map` nodes
8
- * whose SQL-structural ports (`table`, `select`, `where`, `values.<field>`, `set.<field>`,
9
- * `order`, `limit`, …) are closed-set bc Expression IR (spec §7). Until now the ONLY
10
- * consumer of that authored IR was the REDUCED spine (`../bridge.ts` → `../compile-sqlite.ts`
11
- * → `CompiledOperation`).
12
- *
13
- * This module is the ADDITIVE makeSQL producer for the SAME authored IR: it reads a
14
- * node's ports STRUCTURALLY (exactly the closed-set decoding `../bridge.ts` performs —
15
- * same operators, same IN-sentinel, same SKIP-`cond` collapse, no invented opcode) and,
16
- * given the concrete Input Port values, routes WHERE / CRUD / relation through
17
- * `./compile*` + `./json-array` / `./json-batch` to emit a **`makeSQL` bundle** (composed
18
- * `makeSQL` components). The value slots are resolved HANDLER-SIDE (spec §11 item 4): a bc
19
- * `makeSQL` catalog leaf whose handler holds the concrete port values from bc's
20
- * `runBehavior` and calls `./compile*` to build the byte-tuned SQL — so the emitted SQL is
21
- * v1-tuned by construction (PG byte-match; MySQL/SQLite single-JSON-param parity).
22
- *
23
- * ## Single compile path (spec §9 — preserved)
24
- *
25
- * Both the eager public-API path (`compileEager`) and the declaration path
26
- * (`publishBehaviors`) produce byte-identical authored component IR (pinned by
27
- * `test/scp/authoring.test.ts`). Because {@link compileAuthoredBehavior} is a pure function
28
- * of that IR + the concrete input, feeding EITHER path's contract through it yields a
29
- * byte-identical `makeSQL` bundle — the single-compile-path invariant carries over to the
30
- * makeSQL target with no second interpreter.
31
- *
32
- * Coverage (Phase A): a read behavior (Select + belongsTo `.map` + hasMany-limit `.map`),
33
- * a write behavior (Insert), and a SKIP-optional condition. The three dialects share this
34
- * routing; PG stays byte-identical to v1, MySQL/SQLite use the single-JSON-param forms.
35
- */
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.assembleMakeSQL = void 0;
38
- exports.compileAuthoredNode = compileAuthoredNode;
39
- exports.compileRelationMap = compileRelationMap;
40
- exports.compileAuthoredBehavior = compileAuthoredBehavior;
41
- const behavior_contracts_1 = require("behavior-contracts");
42
- const tx_1 = require("./tx");
43
- const makesql_1 = require("./makesql");
44
- Object.defineProperty(exports, "assembleMakeSQL", { enumerable: true, get: function () { return makesql_1.assembleMakeSQL; } });
45
- const compile_select_1 = require("./compile-select");
46
- const compile_crud_1 = require("./compile-crud");
47
- const compile_relation_1 = require("./compile-relation");
48
- function isMap(n) {
49
- return 'map' in n;
50
- }
51
- /** A bc 0.7.3+ `FanoutNode` (connection fan-out). litedbmodel never emits these. */
52
- function isFanout(n) {
53
- return 'fanout' in n;
54
- }
55
- /** The catalog-name + ports of a `componentRef`/`map` body node (uniform view). */
56
- function nodeRef(n) {
57
- return isMap(n) ? { component: n.map.component, ports: n.map.ports } : { component: n.component, ports: n.ports };
58
- }
59
- /** A port that must be a literal string (`table`, `order`, `group`, `returning`). */
60
- function stringPort(ports, name) {
61
- const v = ports[name];
62
- if (v === undefined)
63
- return undefined;
64
- if (typeof v !== 'string') {
65
- throw new Error(`authoring-compile: port '${name}' must be a literal string in the IR (got ${JSON.stringify(v)})`);
66
- }
67
- return v;
68
- }
69
- /** A `{arr:[...]}` port → its element array (a bc-lowered literal array). */
70
- function arrPort(ports, name) {
71
- const v = ports[name];
72
- if (v === undefined)
73
- return undefined;
74
- if (typeof v === 'object' && v !== null && 'arr' in v && Array.isArray(v.arr)) {
75
- return v.arr;
76
- }
77
- throw new Error(`authoring-compile: port '${name}' must be an {arr:[...]} literal in the IR (got ${JSON.stringify(v)})`);
78
- }
79
- /** `select` string-array port → `string[]` (elements must be literals). */
80
- function stringArrayPort(ports, name) {
81
- const arr = arrPort(ports, name);
82
- if (arr === undefined)
83
- return undefined;
84
- return arr.map((e) => {
85
- if (typeof e !== 'string')
86
- throw new Error(`authoring-compile: '${name}' entries must be literal strings (got ${JSON.stringify(e)})`);
87
- return e;
88
- });
89
- }
90
- /** The single-key operator name of an Expression node, or undefined if not a 1-key object. */
91
- function opKey(node) {
92
- if (node === null || typeof node !== 'object' || Array.isArray(node))
93
- return undefined;
94
- const keys = Object.keys(node);
95
- return keys.length === 1 ? keys[0] : undefined;
96
- }
97
- /** The column name carried by a `ref`/`refOpt` path (its LAST segment — spec §7). */
98
- function columnOf(node, ctx) {
99
- const op = opKey(node);
100
- if (op !== 'ref' && op !== 'refOpt') {
101
- throw new Error(`authoring-compile: ${ctx}: the column operand must be a {ref:[...]} / {refOpt:[...]} path, got ${JSON.stringify(node)}`);
102
- }
103
- const path = node[op];
104
- if (!Array.isArray(path) || path.length === 0 || typeof path[path.length - 1] !== 'string') {
105
- throw new Error(`authoring-compile: ${ctx}: column ref path must be a non-empty string path`);
106
- }
107
- return path[path.length - 1];
108
- }
109
- /**
110
- * If a column operand is an IN-list membership marker (its `ref`/`refOpt` path head is
111
- * {@link IN_SENTINEL}), return the real column name; otherwise undefined. Same rule as
112
- * `../bridge.ts` — the sentinel keeps IN expressible with only `eq` + `ref`.
113
- */
114
- function inSentinelColumn(node) {
115
- const op = opKey(node);
116
- if (op !== 'ref' && op !== 'refOpt')
117
- return undefined;
118
- const path = node[op];
119
- if (Array.isArray(path) && path.length >= 2 && path[0] === tx_1.IN_SENTINEL && typeof path[path.length - 1] === 'string') {
120
- return path[path.length - 1];
121
- }
122
- return undefined;
123
- }
124
- /**
125
- * Coerce a bc-evaluated integer Value to a JS `number` for INLINE numeric SQL text
126
- * (`LIMIT n` / `OFFSET n`, which the original `_buildSelectSQL` inlines, not binds). bc's
127
- * value model encodes an integer LITERAL as `bigint`; a `{ref}` reading a JS number stays
128
- * a number. Both normalize to a JS number for the inline text.
129
- */
130
- function asInt(v) {
131
- if (typeof v === 'bigint')
132
- return Number(v);
133
- if (typeof v === 'number')
134
- return v;
135
- throw new Error(`authoring-compile: limit/offset must evaluate to an integer, got ${JSON.stringify(v)}`);
136
- }
137
- /** Read the two operands of a binary comparison node, fail-closed on arity. */
138
- function binOperands(node, op, at) {
139
- const args = node[op];
140
- if (!Array.isArray(args) || args.length !== 2) {
141
- throw new Error(`authoring-compile: ${at}: '${op}' expects exactly 2 operands`);
142
- }
143
- return [args[0], args[1]];
144
- }
145
- /**
146
- * bc comparison operator → the SQL operator text. v1 `DBConditions` expresses a
147
- * non-equality comparison as a CUSTOM-OP KEY carrying its own `?` placeholder
148
- * (`{ '<col> <op> ?': value }` → emits `<col> <op> ?` with the value pushed) — there is
149
- * NO `{ col: { '<op>': v } }` object form. `ne` against a non-null value maps to `<>`.
150
- */
151
- const CMP_OPS = { lt: '<', le: '<=', gt: '>', ge: '>=', ne: '<>' };
152
- // ============================================================================
153
- // WHERE member → v1 ConditionObject entry (value resolved against the concrete scope).
154
- //
155
- // A `{cond:[c, member, null]}` node is the SKIP-optional collapse: the inner `member`
156
- // contributes to the ConditionObject ONLY when `c` evaluates to a present binding
157
- // (non-null / true), byte-identical to the render.ts existence rule (dynamic-expansion
158
- // spec §2). This is where the makeSQL path realizes SKIP: an absent optional member adds
159
- // no column key at all (so v1 `DBConditions` emits neither its text nor its param).
160
- // ============================================================================
161
- /**
162
- * Fold ONE authored where-member Expression node into a v1 {@link ConditionObject},
163
- * evaluating its value operand against `scope`. Mutates `into` (the accumulator) so
164
- * declaration order (= SQL AND order) is preserved.
165
- */
166
- function foldWhereMember(node, scope, into, at) {
167
- const op = opKey(node);
168
- if (op === undefined) {
169
- throw new Error(`authoring-compile: ${at}: a where member must be a single-operator Expression node, got ${JSON.stringify(node)}`);
170
- }
171
- if (op === 'cond') {
172
- // SKIP-optional: {cond:[c, <member>, null]}. Present iff `c` is a present binding.
173
- const args = node.cond;
174
- if (!Array.isArray(args) || args.length !== 3 || args[2] !== null) {
175
- throw new Error(`authoring-compile: ${at}: a SKIP-optional condition must be {cond:[c, <member>, null]} (else = null)`);
176
- }
177
- const present = (0, behavior_contracts_1.evaluateExpression)(args[0], scope);
178
- if (present !== null && present !== false)
179
- foldWhereMember(args[1], scope, into, `${at}.cond.then`);
180
- return;
181
- }
182
- if (op === 'and') {
183
- // A flat AND group folds its members into the same ConditionObject (v1 default AND).
184
- const args = node.and;
185
- if (!Array.isArray(args) || args.length < 2)
186
- throw new Error(`authoring-compile: ${at}: 'and' group expects >= 2 members`);
187
- args.forEach((m, i) => foldWhereMember(m, scope, into, `${at}.and[${i}]`));
188
- return;
189
- }
190
- if (op === 'or') {
191
- // An OR group is v1's `__or__` list of sub-condition objects.
192
- const args = node.or;
193
- if (!Array.isArray(args) || args.length < 2)
194
- throw new Error(`authoring-compile: ${at}: 'or' group expects >= 2 members`);
195
- const branches = args.map((m, i) => {
196
- const sub = {};
197
- foldWhereMember(m, scope, sub, `${at}.or[${i}]`);
198
- return sub;
199
- });
200
- const existing = into.__or__ ?? [];
201
- into.__or__ = [...existing, ...branches];
202
- return;
203
- }
204
- if (op === 'eq') {
205
- const [col, val] = binOperands(node, op, at);
206
- const inCol = inSentinelColumn(col);
207
- if (inCol !== undefined) {
208
- // IN-list membership: v1 reads an array value as `IN (?, …)` (or the JSON single-param
209
- // form on MySQL/SQLite via `conditionsFor`); empty array degenerates to `1 = 0`.
210
- into[inCol] = (0, behavior_contracts_1.evaluateExpression)(val, scope);
211
- return;
212
- }
213
- const value = (0, behavior_contracts_1.evaluateExpression)(val, scope);
214
- // IS NULL: `eq(col, null)` → v1 emits `col IS NULL` for a null value.
215
- into[columnOf(col, at)] = value;
216
- return;
217
- }
218
- if (op in CMP_OPS) {
219
- const [col, val] = binOperands(node, op, at);
220
- const column = columnOf(col, at);
221
- const value = (0, behavior_contracts_1.evaluateExpression)(val, scope);
222
- // `ne(col, null)` ⇒ v1 `col IS NOT NULL` (custom-op key with no placeholder).
223
- if (op === 'ne' && value === null) {
224
- into[`${column} IS NOT NULL`] = true;
225
- return;
226
- }
227
- // v1 custom-op form: the KEY carries its own `?` (`{ '<col> <op> ?': value }`).
228
- into[`${column} ${CMP_OPS[op]} ?`] = value;
229
- return;
230
- }
231
- throw new Error(`authoring-compile: ${at}: unsupported where operator '${op}' (supported: eq/ne/lt/le/gt/ge/and/or/cond; IN via ${tx_1.IN_SENTINEL} column head; IS NULL via eq(col,null))`);
232
- }
233
- /** Fold the `where` port (`{arr:[...]}` of member nodes) into a v1 `ConditionObject`. */
234
- function foldWherePort(ports, scope, at) {
235
- const arr = arrPort(ports, 'where');
236
- const conditions = {};
237
- if (arr === undefined)
238
- return conditions;
239
- arr.forEach((m, i) => foldWhereMember(m, scope, conditions, `${at}.where[${i}]`));
240
- return conditions;
241
- }
242
- /**
243
- * Collect a flattened write record family (`<prefix>.<field>` ports) → an ordered
244
- * `Record<field, Value>` with each value slot evaluated against `scope`. Field order =
245
- * declaration (insertion) order of the ports — the SQL column order.
246
- */
247
- function collectFamily(ports, prefix, scope) {
248
- const out = {};
249
- for (const k of Object.keys(ports)) {
250
- if (k.startsWith(`${prefix}.`))
251
- out[k.slice(prefix.length + 1)] = (0, behavior_contracts_1.evaluateExpression)(ports[k], scope);
252
- }
253
- return out;
254
- }
255
- // ============================================================================
256
- // Node → makeSQL bundle (handler-side compile: concrete port values → ./compile*).
257
- // ============================================================================
258
- /**
259
- * Compile ONE authored catalog `componentRef`/`map` node into a `makeSQL` bundle, given
260
- * the concrete input `scope`. Routes WHERE / CRUD through `./compile*`. The value slots
261
- * are the bc-evaluated concrete values (handler-side), so the emitted SQL text/params
262
- * come STRAIGHT from the v1 builders (`compileSelect` / `compileInsert` / …) —
263
- * byte-parity by construction.
264
- */
265
- function compileAuthoredNode(node, scope, dialect) {
266
- const { component, ports } = nodeRef(node);
267
- const table = stringPort(ports, 'table');
268
- if (table === undefined)
269
- throw new Error(`authoring-compile: ${component} node requires a literal 'table' port`);
270
- const at = `${component}`;
271
- switch (component) {
272
- case 'Select': {
273
- const select = stringArrayPort(ports, 'select');
274
- const conditions = foldWherePort(ports, scope, at);
275
- return (0, compile_select_1.compileSelect)({
276
- dialect,
277
- tableName: table,
278
- select: select ? select.join(', ') : undefined,
279
- conditions,
280
- order: stringPort(ports, 'order'),
281
- group: stringPort(ports, 'group'),
282
- limit: ports.limit !== undefined ? asInt((0, behavior_contracts_1.evaluateExpression)(ports.limit, scope)) : undefined,
283
- offset: ports.offset !== undefined ? asInt((0, behavior_contracts_1.evaluateExpression)(ports.offset, scope)) : undefined,
284
- });
285
- }
286
- case 'Insert': {
287
- const values = collectFamily(ports, 'values', scope);
288
- if (Object.keys(values).length === 0)
289
- throw new Error(`authoring-compile: Insert requires at least one 'values.<field>' port`);
290
- const returning = stringPort(ports, 'returning');
291
- // A single authored Insert is ONE row → the ORIGINAL single-row `buildInsert`
292
- // (`VALUES (?, …)`, byte-identical to v1). The JSON single-param batch form is
293
- // reserved for multi-row `createMany` (spec §43/§45), not the authoring single
294
- // Insert. Columns are CANONICAL (alphabetical) sorted — the v2 write-path SSoT
295
- // (`DBModel._insert` single-record fast path aligns to the same order).
296
- const columns = Object.keys(values).sort();
297
- return (0, compile_crud_1.compileInsert)(dialect, { tableName: table, columns, records: [values], returning });
298
- }
299
- case 'Update': {
300
- const set = collectFamily(ports, 'set', scope);
301
- if (Object.keys(set).length === 0)
302
- throw new Error(`authoring-compile: Update requires at least one 'set.<field>' port`);
303
- const conditions = foldWherePort(ports, scope, at);
304
- return (0, compile_crud_1.compileUpdateSingle)({
305
- dialect,
306
- tableName: table,
307
- serializedValues: set,
308
- conditions,
309
- returning: stringPort(ports, 'returning'),
310
- });
311
- }
312
- case 'Delete': {
313
- const conditions = foldWherePort(ports, scope, at);
314
- return (0, compile_crud_1.compileDelete)({ dialect, tableName: table, conditions, returning: stringPort(ports, 'returning') });
315
- }
316
- default:
317
- throw new Error(`authoring-compile: catalog component '${component}' has no makeSQL compile (SQL CRUD only: Select/Insert/Update/Delete)`);
318
- }
319
- }
320
- /**
321
- * Compile a relation `.map` node into a batch-load `makeSQL` bundle. The map's inner
322
- * `where` names the target key column (`eq($p.<k>, …)`); the batch key VALUES are the
323
- * distinct `parentKey` values across `parentRows`. Extra (non-key) where members become
324
- * the relation's merged `conditions` filter.
325
- *
326
- * @param parentKey the parent-row field whose values key the batch (e.g. `author_id`).
327
- */
328
- function compileRelationMap(node, input, dialect, parentKey) {
329
- const ports = node.map.ports;
330
- const table = stringPort(ports, 'table');
331
- if (table === undefined)
332
- throw new Error(`authoring-compile: relation map requires a literal 'table' port`);
333
- const select = stringArrayPort(ports, 'select');
334
- const order = stringPort(ports, 'order');
335
- // The target key column = the single eq-member column of the relation `where`.
336
- const whereArr = arrPort(ports, 'where') ?? [];
337
- let targetKey;
338
- const filters = {};
339
- whereArr.forEach((m, i) => {
340
- const op = opKey(m);
341
- if (op === 'eq') {
342
- const [col] = binOperands(m, 'eq', `relationMap.where[${i}]`);
343
- const inCol = inSentinelColumn(col);
344
- const name = inCol ?? columnOf(col, `relationMap.where[${i}]`);
345
- if (targetKey === undefined) {
346
- targetKey = name; // first eq is the join key
347
- return;
348
- }
349
- }
350
- // Any further member is a relation filter (folded against an empty scope — filters
351
- // here are static; dynamic relation filters are out of Phase A scope).
352
- foldWhereMember(m, {}, filters, `relationMap.where[${i}]`);
353
- });
354
- if (targetKey === undefined)
355
- throw new Error(`authoring-compile: relation map 'where' must carry a key eq(...) member`);
356
- const values = distinctKeys(input.parentRows, parentKey);
357
- const base = {
358
- dialect,
359
- tableName: table,
360
- conditions: Object.keys(filters).length > 0 ? filters : undefined,
361
- order,
362
- targetKey,
363
- values,
364
- };
365
- // Unlimited honors the per-column projection (v1 `WHERE key IN … [ORDER BY]`); the
366
- // per-parent-limit ROW_NUMBER/LATERAL shape projects the outer `*` (the compile-relation
367
- // anchor — v1 `SELECT * FROM ranked`), so `select` is not forwarded to the limited path.
368
- return input.limit !== undefined
369
- ? (0, compile_relation_1.compileSingleKeyLimited)({ ...base, limit: input.limit })
370
- : (0, compile_relation_1.compileSingleKeyUnlimited)({ ...base, select: select ? select.join(', ') : undefined });
371
- }
372
- /** Distinct, non-null parent-key values in first-seen order (the batch IN-list source). */
373
- function distinctKeys(rows, key) {
374
- const seen = new Set();
375
- const out = [];
376
- for (const r of rows) {
377
- const v = r[key];
378
- if (v === null || v === undefined)
379
- continue;
380
- if (!seen.has(v)) {
381
- seen.add(v);
382
- out.push(v);
383
- }
384
- }
385
- return out;
386
- }
387
- /**
388
- * Compile the PRIMARY read/write query of an authored behavior method into a `makeSQL`
389
- * bundle, given the concrete Input Port `scope`. The "primary" node is the method's root
390
- * catalog `componentRef` (the Select the relations map over, or the write). Relation
391
- * `.map` nodes are returned unresolved (their batch keys come from executing `primary`
392
- * first — {@link compileRelationMap}).
393
- *
394
- * This is a PURE function of the authored component IR + the input, so `publishBehaviors`
395
- * (declaration) and `compileEager` (eager) — which produce byte-identical component IR —
396
- * yield a byte-identical `primary` bundle (single-compile-path invariant, spec §9).
397
- */
398
- function compileAuthoredBehavior(contract, scope, dialect, entry) {
399
- const component = entry
400
- ? contract.components.find((c) => c.name === entry)
401
- : contract.components[0];
402
- if (component === undefined) {
403
- throw new Error(`authoring-compile: entry component '${entry ?? '<first>'}' not found in contract`);
404
- }
405
- // The primary node is the first catalog `componentRef` (root); `map` nodes are relations.
406
- const relations = [];
407
- let primaryNode;
408
- for (const n of component.body) {
409
- if ('cond' in n)
410
- continue; // pure Expression node (a shared SKIP guard), no SQL.
411
- if (isFanout(n)) {
412
- // bc 0.7.3+ `FanoutNode`. litedbmodel never emits fanout — reject fail-closed rather
413
- // than mistake it for the primary catalog `componentRef`.
414
- throw new Error(`authoring-compile: behavior '${component.name}' node '${n.id}' is a fanout node, not supported by litedbmodel (bc FanoutNode)`);
415
- }
416
- if (isMap(n)) {
417
- relations.push(n);
418
- continue;
419
- }
420
- if (primaryNode === undefined)
421
- primaryNode = n;
422
- }
423
- if (primaryNode === undefined) {
424
- throw new Error(`authoring-compile: behavior '${component.name}' has no primary catalog node`);
425
- }
426
- const normalized = normalizeInput(component, scope);
427
- return {
428
- name: component.name,
429
- primary: compileAuthoredNode(primaryNode, normalized, dialect),
430
- relations,
431
- };
432
- }
433
- /**
434
- * Normalize the caller input to present-as-null for every OPTIONAL Input Port the caller
435
- * omitted, so a SKIP-optional guard reading that port (`ne($.status, null)`) evaluates
436
- * against a present `null` (→ the guard is false → the member drops) rather than throwing
437
- * `UNKNOWN_BINDING`. This is the SAME absent-key SKIP rule the reduced runtime applies
438
- * (`../runtime.ts` `normalizeInput`), driven by the SSoT — never an ad-hoc code default. A
439
- * head is OPTIONAL iff EITHER (a) the component's Input Port schema marks it `required !==
440
- * true`, OR (b) it drives a SKIP `cond` guard (bc infers erased-type ports as `required`,
441
- * so a SKIP-guarded head declares its driving input optional — spec §7). A REQUIRED,
442
- * non-SKIP head that is missing is left ABSENT so a real wiring bug surfaces loudly as
443
- * bc's `UNKNOWN_BINDING`, not a silent default.
444
- */
445
- function normalizeInput(component, input) {
446
- const optional = new Set();
447
- for (const [port, schema] of Object.entries(component.inputPorts)) {
448
- if (schema.required !== true)
449
- optional.add(port);
450
- }
451
- for (const n of component.body)
452
- skipGuardHeads(n, optional);
453
- const out = { ...input };
454
- for (const head of optional) {
455
- if (!(head in out))
456
- out[head] = null;
457
- }
458
- return out;
459
- }
460
- /**
461
- * Collect the input heads that DRIVE a SKIP `cond` guard anywhere in a body node's ports
462
- * (the `c` of a `{cond:[c, member, null]}` where-member). Those heads are optional (their
463
- * absence must present as `null` so the guard drops the member). Reads the guard condition
464
- * expression's `ref`/`refOpt` PATH HEADS structurally — no evaluation.
465
- */
466
- function skipGuardHeads(n, into) {
467
- if ('cond' in n)
468
- return; // a shared pure Expression node, not a catalog SQL node
469
- if (isFanout(n))
470
- return; // bc FanoutNode carries no where-ports SKIP guard (litedbmodel never emits it)
471
- const ports = isMap(n) ? n.map.ports : n.ports;
472
- const where = ports.where;
473
- if (typeof where !== 'object' || where === null || !('arr' in where))
474
- return;
475
- const arr = where.arr;
476
- if (!Array.isArray(arr))
477
- return;
478
- for (const m of arr) {
479
- if (opKey(m) === 'cond') {
480
- const cond = m.cond;
481
- if (Array.isArray(cond) && cond.length === 3)
482
- collectRefHeads(cond[0], into);
483
- }
484
- }
485
- }
486
- /** Collect every `ref`/`refOpt` path HEAD reachable in an Expression IR node. */
487
- function collectRefHeads(node, into) {
488
- if (node === null || typeof node !== 'object')
489
- return;
490
- if (Array.isArray(node)) {
491
- for (const e of node)
492
- collectRefHeads(e, into);
493
- return;
494
- }
495
- const op = opKey(node);
496
- if (op === 'ref' || op === 'refOpt') {
497
- const path = node[op];
498
- if (Array.isArray(path) && path.length > 0 && typeof path[0] === 'string')
499
- into.add(path[0]);
500
- return;
501
- }
502
- for (const v of Object.values(node))
503
- collectRefHeads(v, into);
504
- }
505
- //# sourceMappingURL=authoring-compile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authoring-compile.js","sourceRoot":"","sources":["../../../src/scp/makesql/authoring-compile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;AA6PH,kDAoDC;AA6BD,gDAgDC;AA0CD,0DAuCC;AA7cD,2DAAgF;AAGhF,6BAAmC;AAGnC,uCAA4C;AA0gBnC,gGA1gBA,yBAAe,OA0gBA;AAzgBxB,qDAAiD;AACjD,iDAAmF;AACnF,yDAG4B;AAY5B,SAAS,KAAK,CAAC,CAA4B;IACzC,OAAO,KAAK,IAAI,CAAC,CAAC;AACpB,CAAC;AAED,oFAAoF;AACpF,SAAS,QAAQ,CAAC,CAA4B;IAC5C,OAAO,QAAQ,IAAI,CAAC,CAAC;AACvB,CAAC;AAED,mFAAmF;AACnF,SAAS,OAAO,CAAC,CAAU;IACzB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK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