litedbmodel 2.2.2 → 2.2.4

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 (180) hide show
  1. package/README.md +2 -1
  2. package/dist/DBModel.d.ts.map +1 -1
  3. package/dist/DBModel.js +3 -0
  4. package/dist/DBModel.js.map +1 -1
  5. package/dist/Middleware.d.ts +19 -2
  6. package/dist/Middleware.d.ts.map +1 -1
  7. package/dist/Middleware.js +1 -0
  8. package/dist/Middleware.js.map +1 -1
  9. package/dist/decorators.d.ts.map +1 -1
  10. package/dist/decorators.js +8 -0
  11. package/dist/decorators.js.map +1 -1
  12. package/dist/drivers/MysqlHelper.d.ts +1 -1
  13. package/dist/drivers/MysqlHelper.d.ts.map +1 -1
  14. package/dist/drivers/MysqlHelper.js.map +1 -1
  15. package/dist/drivers/PostgresHelper.d.ts +1 -1
  16. package/dist/drivers/PostgresHelper.d.ts.map +1 -1
  17. package/dist/drivers/PostgresHelper.js.map +1 -1
  18. package/dist/drivers/SqliteHelper.d.ts +1 -1
  19. package/dist/drivers/SqliteHelper.d.ts.map +1 -1
  20. package/dist/drivers/SqliteHelper.js.map +1 -1
  21. package/dist/index.cjs +105 -74
  22. package/dist/scp/connection-routing.d.ts +38 -1
  23. package/dist/scp/connection-routing.d.ts.map +1 -1
  24. package/dist/scp/connection-routing.js +64 -5
  25. package/dist/scp/connection-routing.js.map +1 -1
  26. package/dist/scp/dbmodel-runtime.d.ts +2 -1
  27. package/dist/scp/dbmodel-runtime.d.ts.map +1 -1
  28. package/dist/scp/dbmodel-runtime.js +2 -1
  29. package/dist/scp/dbmodel-runtime.js.map +1 -1
  30. package/dist/scp/decorator-adapter.d.ts +22 -0
  31. package/dist/scp/decorator-adapter.d.ts.map +1 -1
  32. package/dist/scp/decorator-adapter.js +26 -0
  33. package/dist/scp/decorator-adapter.js.map +1 -1
  34. package/dist/scp/emit/emitter.d.ts +21 -10
  35. package/dist/scp/emit/emitter.d.ts.map +1 -1
  36. package/dist/scp/emit/emitter.js +119 -51
  37. package/dist/scp/emit/emitter.js.map +1 -1
  38. package/dist/scp/emit/endpoint.d.ts +3 -8
  39. package/dist/scp/emit/endpoint.d.ts.map +1 -1
  40. package/dist/scp/exec-context.d.ts +39 -17
  41. package/dist/scp/exec-context.d.ts.map +1 -1
  42. package/dist/scp/exec-context.js +69 -35
  43. package/dist/scp/exec-context.js.map +1 -1
  44. package/dist/scp/grouping.d.ts.map +1 -1
  45. package/dist/scp/grouping.js +0 -0
  46. package/dist/scp/grouping.js.map +1 -1
  47. package/dist/scp/index.cjs +257 -670
  48. package/dist/scp/index.d.ts +6 -11
  49. package/dist/scp/index.d.ts.map +1 -1
  50. package/dist/scp/index.js +10 -28
  51. package/dist/scp/index.js.map +1 -1
  52. package/dist/scp/index.mjs +257 -658
  53. package/dist/scp/leaf-transport.d.ts +127 -39
  54. package/dist/scp/leaf-transport.d.ts.map +1 -1
  55. package/dist/scp/leaf-transport.js +30 -24
  56. package/dist/scp/leaf-transport.js.map +1 -1
  57. package/dist/scp/leaves.d.ts +57 -20
  58. package/dist/scp/leaves.d.ts.map +1 -1
  59. package/dist/scp/leaves.js +224 -65
  60. package/dist/scp/leaves.js.map +1 -1
  61. package/dist/scp/makesql/compile-select.d.ts +28 -1
  62. package/dist/scp/makesql/compile-select.d.ts.map +1 -1
  63. package/dist/scp/makesql/compile-select.js +19 -17
  64. package/dist/scp/makesql/compile-select.js.map +1 -1
  65. package/dist/scp/makesql/index.d.ts +2 -2
  66. package/dist/scp/makesql/index.d.ts.map +1 -1
  67. package/dist/scp/makesql/index.js +4 -6
  68. package/dist/scp/makesql/index.js.map +1 -1
  69. package/dist/scp/makesql/tx.d.ts +43 -89
  70. package/dist/scp/makesql/tx.d.ts.map +1 -1
  71. package/dist/scp/makesql/tx.js +45 -496
  72. package/dist/scp/makesql/tx.js.map +1 -1
  73. package/dist/scp/makesql/writeouttype.d.ts +5 -7
  74. package/dist/scp/makesql/writeouttype.d.ts.map +1 -1
  75. package/dist/scp/makesql/writeouttype.js +13 -19
  76. package/dist/scp/makesql/writeouttype.js.map +1 -1
  77. package/dist/scp/middleware.d.ts +4 -4
  78. package/dist/scp/middleware.d.ts.map +1 -1
  79. package/dist/scp/middleware.js +2 -2
  80. package/dist/scp/middleware.js.map +1 -1
  81. package/dist/scp/relation.d.ts +31 -12
  82. package/dist/scp/relation.d.ts.map +1 -1
  83. package/dist/scp/relation.js +16 -6
  84. package/dist/scp/relation.js.map +1 -1
  85. package/dist/scp/typed-object.d.ts +23 -19
  86. package/dist/scp/typed-object.d.ts.map +1 -1
  87. package/dist/scp/typed-object.js +24 -30
  88. package/dist/scp/typed-object.js.map +1 -1
  89. package/dist/scp/write-bundle.d.ts +21 -70
  90. package/dist/scp/write-bundle.d.ts.map +1 -1
  91. package/dist/scp/write-bundle.js +16 -80
  92. package/dist/scp/write-bundle.js.map +1 -1
  93. package/dist/types.d.ts +12 -0
  94. package/dist/types.d.ts.map +1 -1
  95. package/dist/types.js.map +1 -1
  96. package/docs/BENCHMARK.md +26 -22
  97. package/docs/COMPARISON.md +8 -4
  98. package/docs/api/README.md +1 -1
  99. package/docs/api/classes/Conditions.md +10 -10
  100. package/docs/api/classes/DBHandler.md +17 -17
  101. package/docs/api/classes/DBModel.md +111 -104
  102. package/docs/api/classes/LimitExceededError.md +8 -8
  103. package/docs/api/classes/Middleware.md +18 -18
  104. package/docs/api/classes/SqlRaw.md +6 -6
  105. package/docs/api/classes/SqlRef.md +7 -7
  106. package/docs/api/classes/Values.md +6 -6
  107. package/docs/api/classes/WriteInReadOnlyContextError.md +5 -5
  108. package/docs/api/classes/WriteOutsideTransactionError.md +5 -5
  109. package/docs/api/functions/belongsTo.md +2 -2
  110. package/docs/api/functions/closeAllPools.md +2 -2
  111. package/docs/api/functions/condsToRecord.md +2 -2
  112. package/docs/api/functions/createMiddleware.md +2 -2
  113. package/docs/api/functions/createPostgresDriver.md +2 -2
  114. package/docs/api/functions/createSqliteDriver.md +2 -2
  115. package/docs/api/functions/dbCast.md +3 -3
  116. package/docs/api/functions/dbCastIn.md +2 -2
  117. package/docs/api/functions/dbDynamic.md +3 -3
  118. package/docs/api/functions/dbFalse.md +2 -2
  119. package/docs/api/functions/dbImmediate.md +2 -2
  120. package/docs/api/functions/dbIn.md +2 -2
  121. package/docs/api/functions/dbNotNull.md +2 -2
  122. package/docs/api/functions/dbNow.md +2 -2
  123. package/docs/api/functions/dbNull.md +2 -2
  124. package/docs/api/functions/dbRaw.md +2 -2
  125. package/docs/api/functions/dbTrue.md +2 -2
  126. package/docs/api/functions/dbUuid.md +3 -3
  127. package/docs/api/functions/dbUuidIn.md +2 -2
  128. package/docs/api/functions/formatLocalDate.md +25 -0
  129. package/docs/api/functions/formatUTCDate.md +25 -0
  130. package/docs/api/functions/getDBConfig.md +2 -2
  131. package/docs/api/functions/getDBHandler.md +2 -2
  132. package/docs/api/functions/getTransactionConnection.md +2 -2
  133. package/docs/api/functions/getTransactionContext.md +2 -2
  134. package/docs/api/functions/hasMany.md +2 -2
  135. package/docs/api/functions/hasOne.md +2 -2
  136. package/docs/api/functions/initDBHandler.md +2 -2
  137. package/docs/api/functions/isAnySqlFragment.md +2 -2
  138. package/docs/api/functions/isConnectionError.md +26 -0
  139. package/docs/api/functions/isSqlCondition.md +2 -2
  140. package/docs/api/functions/isSqlFragment.md +2 -2
  141. package/docs/api/functions/isSqlRaw.md +2 -2
  142. package/docs/api/functions/isSqlRef.md +2 -2
  143. package/docs/api/functions/isSqlTypedFragment.md +2 -2
  144. package/docs/api/functions/model.md +6 -42
  145. package/docs/api/functions/parentRef.md +2 -2
  146. package/docs/api/functions/sql.md +7 -7
  147. package/docs/api/globals.md +57 -22
  148. package/docs/api/interfaces/Column.md +31 -31
  149. package/docs/api/interfaces/ColumnOptions.md +5 -4
  150. package/docs/api/interfaces/CreatedMiddlewareClass.md +7 -7
  151. package/docs/api/interfaces/DBConfig.md +13 -11
  152. package/docs/api/interfaces/DBConfigOptions.md +8 -8
  153. package/docs/api/interfaces/DeleteOptions.md +4 -4
  154. package/docs/api/interfaces/InsertOptions.md +8 -8
  155. package/docs/api/interfaces/LimitConfig.md +4 -4
  156. package/docs/api/interfaces/MiddlewareConfig.md +15 -15
  157. package/docs/api/interfaces/ModelOptions.md +8 -7
  158. package/docs/api/interfaces/PkeyResult.md +4 -4
  159. package/docs/api/interfaces/SelectOptions.md +17 -16
  160. package/docs/api/interfaces/SqlCondition.md +6 -6
  161. package/docs/api/interfaces/SqlFragment.md +5 -5
  162. package/docs/api/interfaces/SqlTypedFragment.md +7 -7
  163. package/docs/api/interfaces/TransactionOptions.md +7 -7
  164. package/docs/api/interfaces/UpdateManyOptions.md +4 -4
  165. package/docs/api/interfaces/UpdateOptions.md +4 -4
  166. package/docs/architecture.md +452 -0
  167. package/docs/benchmark-chart.svg +225 -249
  168. package/docs/design/phase-a-execution-context.md +2 -0
  169. package/package.json +20 -5
  170. package/dist/scp/writes.d.ts +0 -251
  171. package/dist/scp/writes.d.ts.map +0 -1
  172. package/dist/scp/writes.js +0 -176
  173. package/dist/scp/writes.js.map +0 -1
  174. package/docs/proposal/contracts-architecture-feasibility.md +0 -328
  175. package/docs/proposal/contracts-architecture.md +0 -579
  176. package/docs/proposal/litedbmodel-v2-scp-architecture.md +0 -433
  177. package/docs/proposal/sql-dynamic-expansion-spec.md +0 -175
  178. package/docs/proposal/v0-coverage-matrix.md +0 -157
  179. package/docs/proposal/v2-completeness-plan.md +0 -90
  180. package/docs/proposal/v2-sql-parity-checklist.md +0 -162
@@ -10,8 +10,8 @@
10
10
  * catalog leaf + handler + compile. Pure-JSON bundle, multi-language ready.
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.countingDriver = exports.executeTransactionAsync = exports.executeTransaction = exports.literalize = exports.deriveBatchPlan = exports.deriveTransactionPlan = exports.rowsHaveDbToken = exports.mysqlJsonTableColumn = exports.sqliteUpdateManyJson = exports.mysqlUpdateManyJson = exports.sqliteInsertJson = exports.mysqlInsertJson = exports.conditionsFor = exports.JsonArrayConditions = exports.encodeJsonArrayParam = exports.inListPredicate = exports.inListJson = exports.compileCompositeKeyStaticLimited = exports.compileCompositeKeyLimited = exports.compileCompositeKeyStaticUnlimited = exports.compileCompositeKeyUnlimited = exports.compileSingleKeyLimited = exports.compileSingleKeyUnlimited = exports.PG_ARRAY_CAST_TOKEN = exports.resolvePgArrayCast = exports.inferPgArrayType = exports.compileDeleteMany = exports.compileDelete = exports.compileUpdateSingle = exports.compileUpdateMany = exports.compileInsertMany = exports.compileInsert = exports.builderFor = exports.compileSelect = exports.noCastFormatter = exports.pgCastFormatter = exports.formatterFor = exports.andTrailing = exports.whereClause = exports.compileWhere = exports.makeSqlHandlerSync = exports.makeSqlHandler = exports.renderPorts = exports.renderPlaceholders = exports.composeMakeSQL = exports.assembleMakeSQL = exports.isMakeSQL = exports.LITEDBMODEL_MAKESQL_CATALOG = exports.makeSqlCatalogEntry = exports.MAKESQL = void 0;
14
- exports.mysqlPoolFactory = exports.pgPoolFactory = exports.mysqlConnectionPool = exports.pgConnectionPool = exports.mysqlDeboxPoolOptions = exports.configurePgDeboxTypeParsers = exports.bindReselect = exports.buildMysqlReselect = exports.stripMysqlPkHint = exports.mysqlPkHint = exports.IN_SENTINEL = exports.pgTypeSpecimen = exports.compileWriteNode = exports.renderTxStatement = void 0;
13
+ exports.pgTypeSpecimen = exports.compileWriteNode = exports.renderTxStatement = exports.executeTransactionAsync = exports.literalize = exports.deriveBatchPlan = exports.rowsHaveDbToken = exports.mysqlJsonTableColumn = exports.sqliteUpdateManyJson = exports.mysqlUpdateManyJson = exports.sqliteInsertJson = exports.mysqlInsertJson = exports.conditionsFor = exports.JsonArrayConditions = exports.encodeJsonArrayParam = exports.inListPredicate = exports.inListJson = exports.compileCompositeKeyStaticLimited = exports.compileCompositeKeyLimited = exports.compileCompositeKeyStaticUnlimited = exports.compileCompositeKeyUnlimited = exports.compileSingleKeyLimited = exports.compileSingleKeyUnlimited = exports.PG_ARRAY_CAST_TOKEN = exports.resolvePgArrayCast = exports.inferPgArrayType = exports.compileDeleteMany = exports.compileDelete = exports.compileUpdateSingle = exports.compileUpdateMany = exports.compileInsertMany = exports.compileInsert = exports.builderFor = exports.compileSelect = exports.noCastFormatter = exports.pgCastFormatter = exports.formatterFor = exports.andTrailing = exports.whereClause = exports.compileWhere = exports.makeSqlHandlerSync = exports.makeSqlHandler = exports.renderPorts = exports.renderPlaceholders = exports.composeMakeSQL = exports.assembleMakeSQL = exports.isMakeSQL = exports.LITEDBMODEL_MAKESQL_CATALOG = exports.makeSqlCatalogEntry = exports.MAKESQL = void 0;
14
+ exports.mysqlPoolFactory = exports.pgPoolFactory = exports.mysqlConnectionPool = exports.pgConnectionPool = exports.mysqlDeboxPoolOptions = exports.configurePgDeboxTypeParsers = exports.bindReselect = exports.buildMysqlReselect = exports.stripMysqlPkHint = exports.mysqlPkHint = exports.IN_SENTINEL = exports.ENTITY_ROOT = void 0;
15
15
  // Catalog leaf + assembly core.
16
16
  var makesql_1 = require("./makesql");
17
17
  Object.defineProperty(exports, "MAKESQL", { enumerable: true, get: function () { return makesql_1.MAKESQL; } });
@@ -72,17 +72,15 @@ Object.defineProperty(exports, "mysqlUpdateManyJson", { enumerable: true, get: f
72
72
  Object.defineProperty(exports, "sqliteUpdateManyJson", { enumerable: true, get: function () { return json_batch_1.sqliteUpdateManyJson; } });
73
73
  Object.defineProperty(exports, "mysqlJsonTableColumn", { enumerable: true, get: function () { return json_batch_1.mysqlJsonTableColumn; } });
74
74
  Object.defineProperty(exports, "rowsHaveDbToken", { enumerable: true, get: function () { return json_batch_1.rowsHaveDbToken; } });
75
- // Write-time relations → makeSQL transaction plan + 1-tx runtime (epic #43/#45 Phase B).
75
+ // Write descriptor → makeSQL statement, batch plan derivation, and the live async 1-tx runtime.
76
76
  var tx_1 = require("./tx");
77
- Object.defineProperty(exports, "deriveTransactionPlan", { enumerable: true, get: function () { return tx_1.deriveTransactionPlan; } });
78
77
  Object.defineProperty(exports, "deriveBatchPlan", { enumerable: true, get: function () { return tx_1.deriveBatchPlan; } });
79
78
  Object.defineProperty(exports, "literalize", { enumerable: true, get: function () { return tx_1.literalize; } });
80
- Object.defineProperty(exports, "executeTransaction", { enumerable: true, get: function () { return tx_1.executeTransaction; } });
81
79
  Object.defineProperty(exports, "executeTransactionAsync", { enumerable: true, get: function () { return tx_1.executeTransactionAsync; } });
82
- Object.defineProperty(exports, "countingDriver", { enumerable: true, get: function () { return tx_1.countingDriver; } });
83
80
  Object.defineProperty(exports, "renderTxStatement", { enumerable: true, get: function () { return tx_1.renderTxStatement; } });
84
81
  Object.defineProperty(exports, "compileWriteNode", { enumerable: true, get: function () { return tx_1.compileWriteNode; } });
85
82
  Object.defineProperty(exports, "pgTypeSpecimen", { enumerable: true, get: function () { return tx_1.pgTypeSpecimen; } });
83
+ Object.defineProperty(exports, "ENTITY_ROOT", { enumerable: true, get: function () { return tx_1.ENTITY_ROOT; } });
86
84
  Object.defineProperty(exports, "IN_SENTINEL", { enumerable: true, get: function () { return tx_1.IN_SENTINEL; } });
87
85
  // MySQL has no RETURNING: the pk-hint format + the write→re-select derivation the mysql connection
88
86
  // adapter (and the 4 native driver ports) share. ONE home for "MySQL cannot RETURN rows".
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scp/makesql/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;AAEH,gCAAgC;AAChC,qCAOmB;AANjB,kGAAA,OAAO,OAAA;AACP,8GAAA,mBAAmB,OAAA;AACnB,sHAAA,2BAA2B,OAAA;AAC3B,oGAAA,SAAS,OAAA;AACT,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AAIhB,wCAAwC;AACxC,qCAKmB;AAJjB,6GAAA,kBAAkB,OAAA;AAClB,sGAAA,WAAW,OAAA;AACX,yGAAA,cAAc,OAAA;AACd,6GAAA,kBAAkB,OAAA;AAIpB,yCAAyC;AACzC,qCAOmB;AANjB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,gBAAgB,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAAE,8GAAA,aAAa,OAAA;AAAE,iHAAA,gBAAgB,OAAA"}
@@ -1,42 +1,31 @@
1
1
  /**
2
- * litedbmodel v2 SCP — write-time relations → ordered SQL transaction plan, re-expressed on
3
- * the `makeSQL` model (epic #43/#45 Phase B; spec §6 / §14). This REPLACES the reduced-spine
4
- * `../write-plan.ts` + `../write-runtime.ts` (`CompiledOperation` + `renderOperation` +
5
- * FragmentTree). No reduced IR is emitted anywhere: every statement's SQL is COMPLETE tuned
6
- * text (byte-identical to what the v1 write path sends — `SELECT 1 …`, `INSERT … ON CONFLICT
7
- * DO NOTHING`, `UPDATE … SET c = c + ?`, the outbox INSERT), and its `params` are closed-set
8
- * bc Expression IR refs resolved at execute time against the accumulated transaction scope.
2
+ * litedbmodel v2 SCP — the write descriptor → makeSQL statement compiler ({@link compileWriteNode}),
3
+ * the BATCH transaction-plan derivation ({@link deriveBatchPlan}), and the live async 1-tx runtime
4
+ * ({@link executeTransactionAsync}). No reduced IR is emitted anywhere: every statement's SQL is
5
+ * COMPLETE tuned text (byte-identical to what the v1 write path sends — `INSERT … ON CONFLICT DO
6
+ * NOTHING`, `UPDATE … SET c = ?`, `DELETE FROM … WHERE …`), and its `params` are closed-set bc
7
+ * Expression IR refs resolved at execute time against the transaction scope.
9
8
  *
10
9
  * A statement op is exactly a `makeSQL` template: `{ sql, params }` where `sql` carries `?`
11
10
  * placeholders and `params` are Expression IR (`{ref:[…]}` / a literal / a `{obj:{…}}` payload)
12
11
  * that bc evaluates per statement — then the concrete values assemble + render + bind through
13
12
  * the SAME `assembleMakeSQL` / `renderPlaceholders` the read path uses.
14
13
  *
15
- * ## Gate-first is a real execution behavior (spec §6 "Gate First")
14
+ * A BATCH write (createMany / updateMany / deleteMany) is ONE logical op that produces N grouped
15
+ * statements; {@link deriveBatchPlan} lowers those into a gate-free {@link TransactionPlan}
16
+ * (`entityFrom` null, every statement `role:'body'`), run in the declared order as ONE transaction.
17
+ * The single-row and read paths are lowered by `bc generate` into a native module per language and
18
+ * never reach this runtime; there is no runtime read-compile and no runtime single-write compile.
16
19
  *
17
- * Each gate statement carries a {@link GateRule} the runtime evaluates AFTER executing it: a
18
- * failing gate short-circuits — the remaining statements never execute and the tx ROLLBACKs.
19
- *
20
- * ## Path lowering (spec §6) — `$.input.*` / `$.entity.*` / `$.ref.<w>.*` → closed-set refs
21
- *
22
- * `$.input.<f>` → `{ref:['<f>']}` (bc flat input scope)
23
- * `$.entity.<f>` → `{ref:['__entity','<f>']}` (the sole body write's RETURNING row)
24
- * `$.ref.<w>.<f>` → `{ref:['<w>','<f>']}` (a named upstream write's RETURNING row)
25
- *
26
- * ## tx-DAG derivation (spec §6 / §14) — gate-first + data-dependency topo order
27
- *
28
- * Statements form a data-dependency DAG (`$.ref.<w>.*` consumes an earlier write's RETURNING
29
- * row via `TxStatement.binds`) with a gate-first constraint. A deterministic Kahn topo sort
30
- * (stable ascending declaration `seq` tie-break) orders them into a single-transaction plan.
31
- * Underivable shapes (cycle, dangling `$.ref`, referenced write without RETURNING, duplicate
32
- * bind, composite `$.entity`) are LOUD rejects — never a silently mis-ordered plan.
20
+ * Every statement executes: a plan either commits or raises. There is no gate that inspects a
21
+ * statement's result and short-circuits the rest — no plan in this repository ever carried one, so
22
+ * the interpretation was removed rather than kept as a path nothing reaches (#256).
33
23
  */
34
24
  import { type Scope } from 'behavior-contracts/runtime';
35
25
  import { type ColumnTypeResolver } from '../coltype';
36
26
  import { type Dialect as MakeSQLDialect } from './handler';
37
- import { type ExecutionContext, type PooledAsyncContext, type SqliteDriver } from '../exec-context';
27
+ import { type PooledAsyncContext } from '../exec-context';
38
28
  import { type TransactionOptions } from '../tx-options';
39
- import { type LifecycleContract, type LifecycleEffects, type WriteLifecyclePhase } from '../writes';
40
29
  /** A closed-set bc Expression IR node used as a `makeSQL` deferred param (ref / literal / obj). */
41
30
  export type TxExpr = unknown;
42
31
  /**
@@ -106,10 +95,19 @@ export interface TxOp {
106
95
  readonly batch?: boolean;
107
96
  };
108
97
  }
109
- /** The role a transaction statement plays (drives the runtime's gate-first interpretation). */
110
- export type StatementRole = 'gate:requires' | 'gate:idempotency' | 'gate:unique' | 'body' | 'derive' | 'edge' | 'emit';
111
- /** The gate rule the runtime evaluates on a gate statement's result to decide short-circuit. */
112
- export type GateRule = 'existsElseRollback' | 'insertedElseRollback' | 'insertedElseNoop';
98
+ /** The role a transaction statement plays (drives the runtime's §6 derivation order). */
99
+ export type StatementRole = 'body' | 'derive' | 'edge' | 'emit';
100
+ /**
101
+ * The write intent a {@link TransactionPlan} carries. It labels the plan the BATCH compilers derive
102
+ * (`createMany` ⇒ `create`, `updateMany` ⇒ `update`, `deleteMany` ⇒ `remove`) so a consumer can tell
103
+ * the three apart without re-reading the SQL.
104
+ */
105
+ export type WriteLifecyclePhase = 'create' | 'update' | 'remove';
106
+ /**
107
+ * The reserved scope key the tx runtime binds the plan's `entityFrom` row under, so a later statement
108
+ * that references the written row resolves against it. Reserved: no input field may use this name.
109
+ */
110
+ export declare const ENTITY_ROOT = "__entity";
113
111
  /** One ordered statement of a transaction plan (pure JSON — a makeSQL template + its role). */
114
112
  export interface TxStatement {
115
113
  /** Stable statement id (ordering key + diagnostics). */
@@ -118,23 +116,28 @@ export interface TxStatement {
118
116
  readonly role: StatementRole;
119
117
  /** The compiled makeSQL op (complete `sql` + deferred Expression-IR `params`). */
120
118
  readonly op: TxOp;
121
- /** For a gate statement: the short-circuit rule. Absent for body/derive/edge/emit. */
122
- readonly gate?: GateRule;
123
119
  /** For a composite body statement: the name under which this RETURNING row is exposed. */
124
120
  readonly binds?: string;
125
121
  /** Human label (diagnostics; e.g. `requires users`, `derive users.post_count`). */
126
122
  readonly label: string;
127
123
  }
128
- /** How the runtime resolves an idempotency short-circuit hit (a duplicate request). */
129
- export type IdempotentHitPolicy = 'rollback';
130
- /** A derived write-time-relations transaction plan (pure JSON — ordered gate-first statements). */
124
+ /** A derived write-time-relations transaction plan (pure JSON — ordered statements). */
131
125
  export interface TransactionPlan {
132
126
  readonly phase: WriteLifecyclePhase;
133
127
  readonly entityFrom: string | null;
134
128
  readonly statements: readonly TxStatement[];
135
- readonly onIdempotentHit: IdempotentHitPolicy;
136
129
  }
137
- /** The reserved column-ref path head that marks an IN-list membership (mirrors the bridge). */
130
+ /**
131
+ * Is this plan a BATCH (createMany / updateMany / deleteMany) rather than a single/composite Command?
132
+ * A batch is ref-free: nothing exposes a row for a later statement to read, so `entityFrom` is null and
133
+ * every statement is a plain `body` with no `binds`.
134
+ *
135
+ * It decides two things that MUST agree, which is why it is ONE function and not a test each side
136
+ * spells for itself: the runtime accumulates `returnedRows` only for a batch, and the codegen out-type
137
+ * ({@link ./writeouttype}) includes the `returnedRows` field only for a batch. Two spellings that drift
138
+ * would type a field the runtime does not fill, or drop one it does (#259).
139
+ */
140
+ export declare function isBatchPlan(plan: TransactionPlan): boolean;
138
141
  export declare const IN_SENTINEL = "@in";
139
142
  type WriteComponent = 'Insert' | 'Update' | 'Delete' | 'Select';
140
143
  interface WriteNodeLike {
@@ -171,22 +174,6 @@ export declare function pkPort(ports: Record<string, unknown>): {
171
174
  * are CANONICAL (alphabetical) sorted — the v2 write-path SSoT (matches `DBModel._insert`).
172
175
  */
173
176
  export declare function compileWriteNode(node: WriteNodeLike, dialect?: MakeSQLDialect, resolveColumnType?: ColumnTypeResolver): TxOp;
174
- /** The base write op the Command declares (`Insert`/`Update`/`Delete` with `onWrite`). */
175
- export interface BaseWrite {
176
- /** The compiled base write makeSQL op (complete `sql` + deferred Expression-IR `params`). */
177
- readonly op: TxOp;
178
- readonly label: string;
179
- /** The write's stable NAME (composite scope) — referenced downstream as `$.ref.<name>.*`. */
180
- readonly name?: string;
181
- /** The write's OWN save-contract effects (composite scope). */
182
- readonly effects?: LifecycleEffects;
183
- }
184
- /**
185
- * Derive the ORDERED, gate-first {@link TransactionPlan} from a Command's base write(s) + its
186
- * lifecycle save contract (spec §6 / §14). Single base write = fixed §6 group; multiple named
187
- * base writes = a topologically-ordered gate-first tx DAG (`$.ref.<name>.*` data dependencies).
188
- */
189
- export declare function deriveTransactionPlan(phase: WriteLifecyclePhase, bases: readonly BaseWrite[], lifecycle: LifecycleContract, dialect?: MakeSQLDialect): TransactionPlan;
190
177
  /**
191
178
  * Lower a list of CONCRETE batch-write ops (createMany / updateMany / deleteMany — each already
192
179
  * compiled by driving the v1 builders in `compile-crud`, so its `sql` is byte-identical to v1 and
@@ -205,53 +192,20 @@ export declare function deriveBatchPlan(phase: WriteLifecyclePhase, ops: readonl
205
192
  params: readonly unknown[];
206
193
  label?: string;
207
194
  }[]): TransactionPlan;
208
- /**
209
- * The minimal synchronous SQLite driver surface the tx runtime needs (better-sqlite3) — the
210
- * backward-compat public seam. Internally the tx runs through the {@link ExecutionContext} seam
211
- * (`../exec-context`); a raw driver passed here is wrapped via {@link contextForDriver}. Aliased to
212
- * {@link SqliteDriver}.
213
- */
214
- export type SqliteDb = SqliteDriver;
215
- /** A tx entry accepts either a raw {@link SqliteDb} or a full {@link ExecutionContext}. */
216
- export type DbOrContext = SqliteDb | ExecutionContext;
217
- /** Why a transaction did not commit (a gate short-circuit outcome; not a driver error). */
218
- export type ShortCircuitReason = 'requires_absent' | 'unique_collision' | 'idempotent_duplicate';
219
195
  /** The structured outcome of executing a {@link TransactionPlan}. */
220
196
  export interface TransactionResult {
221
197
  readonly committed: boolean;
222
- readonly shortCircuit?: {
223
- readonly statementId: string;
224
- readonly reason: ShortCircuitReason;
225
- };
226
198
  readonly entity: Record<string, unknown> | null;
227
199
  readonly executed: readonly string[];
228
200
  /**
229
201
  * For a BATCH write (createMany/updateMany/deleteMany — a gate-free plan with `entityFrom:null`):
230
202
  * the RETURNING rows of every body statement, ordered by statement. Present ONLY when a body
231
- * statement RETURNED rows and the plan has no `$.entity` (batch mode); absent for a gate-first
203
+ * statement RETURNED rows and the plan has no `$.entity` (batch mode); absent for a
232
204
  * single/composite Command (which exposes its written row via `entity`). This carries v1
233
205
  * `createMany`'s "all created rows" result across the multi-statement batch.
234
206
  */
235
207
  readonly returnedRows?: readonly (readonly Record<string, unknown>[])[];
236
208
  }
237
- /**
238
- * Execute a derived {@link TransactionPlan} as ONE real SQLite transaction with gate-first
239
- * short-circuit. Accepts a raw {@link SqliteDb} (wrapped via {@link contextForDriver}) or a full
240
- * {@link ExecutionContext}. The transaction derives a tx-scoped ctx (`withConnection(conn, true)`)
241
- * that PINS one connection so BEGIN, every body statement, and COMMIT/ROLLBACK all run on the SAME
242
- * connection (§3, per-execution ownership). For the single-DB SQLite driver the pinned connection
243
- * is the sole connection; the ownership shows its teeth on the pooled async path
244
- * ({@link import('../exec-context').withTransactionAsync}), which this mirrors.
245
- */
246
- export declare function executeTransaction(db: DbOrContext, plan: TransactionPlan, input: Scope, dialect?: MakeSQLDialect): TransactionResult;
247
- /**
248
- * A counting {@link SqliteDb} wrapper: forwards every call to the wrapped driver but records
249
- * each PREPARED SQL string. Tests use it to PROVE gate-first short-circuit.
250
- */
251
- export declare function countingDriver(db: SqliteDb): {
252
- db: SqliteDb;
253
- prepared: string[];
254
- };
255
209
  /** Render one statement op to its dialect SQL text + params (exposed for golden tests). */
256
210
  export declare function renderTxStatement(op: TxOp, scope: Scope, dialect?: MakeSQLDialect): {
257
211
  sql: string;
@@ -273,8 +227,8 @@ export interface WriteExecOptions extends TransactionOptions {
273
227
  readonly guard?: boolean;
274
228
  }
275
229
  /**
276
- * Execute a derived {@link TransactionPlan} on a live PG / MySQL connection with gate-first
277
- * short-circuit and **per-execution connection ownership** (§3). The live-DB WRITE entry (#86).
230
+ * Execute a derived {@link TransactionPlan} on a live PG / MySQL connection with **per-execution
231
+ * connection ownership** (§3). The live-DB WRITE entry (#86).
278
232
  *
279
233
  * ## Ambient-tx JOIN vs. its own envelope (the #86 core)
280
234
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../src/scp/makesql/tx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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