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
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ /**
3
+ * litedbmodel v2 SCP — the **tx-completeness contract** (Phase B-1 / #81): the TransactionOptions
4
+ * shape, the guard errors, the per-dialect isolation-level SQL, and the retryable-error classifier.
5
+ *
6
+ * This module is the **API REFERENCE** for Phase B — the 4 native ports (rust #82 / go #83 / py #84
7
+ * / php #85) mirror THIS contract exactly (option field names + defaults, guard-error semantics,
8
+ * isolation-level→SQL mapping per dialect, retryable-error classification, retry-loop policy). It is
9
+ * dialect-neutral and driver-agnostic on purpose: `withTransactionAsync` (exec-context.ts) consumes
10
+ * it; nothing here touches a connection.
11
+ *
12
+ * It builds ON the Phase A {@link import('./exec-context').ExecutionContext} + owned-connection
13
+ * ownership (`withTransactionAsync`); it does NOT re-implement connection ownership — it layers the
14
+ * options/guards/retry/isolation on top of that seam. It mirrors v1 `src/DBModel.ts`
15
+ * (`transaction` :2787, `checkWriteAllowed` :886, `isRetryableError` :2865) but on the SCP seam.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.WriteInReadOnlyContextError = exports.WriteOutsideTransactionError = void 0;
19
+ exports.isolationPhrase = isolationPhrase;
20
+ exports.beginStatements = beginStatements;
21
+ exports.resolveTxOptions = resolveTxOptions;
22
+ exports.isRetryableTxError = isRetryableTxError;
23
+ exports.sleep = sleep;
24
+ exports.runInTransactionScope = runInTransactionScope;
25
+ exports.withReadOnly = withReadOnly;
26
+ exports.isInTransaction = isInTransaction;
27
+ exports.isReadOnly = isReadOnly;
28
+ exports.checkWriteAllowed = checkWriteAllowed;
29
+ const types_1 = require("../types");
30
+ Object.defineProperty(exports, "WriteOutsideTransactionError", { enumerable: true, get: function () { return types_1.WriteOutsideTransactionError; } });
31
+ Object.defineProperty(exports, "WriteInReadOnlyContextError", { enumerable: true, get: function () { return types_1.WriteInReadOnlyContextError; } });
32
+ /** The canonical SQL phrase for an {@link IsolationLevel} (e.g. `SERIALIZABLE`). */
33
+ function isolationPhrase(level) {
34
+ switch (level) {
35
+ case 'read committed':
36
+ return 'READ COMMITTED';
37
+ case 'repeatable read':
38
+ return 'REPEATABLE READ';
39
+ case 'serializable':
40
+ return 'SERIALIZABLE';
41
+ default: {
42
+ // Fail-CLOSED on an unknown level (a corrupt/forward-incompatible value must NOT silently run
43
+ // at the engine default — that would hide a mis-set isolation). Mirrors the tx gate's policy.
44
+ const bad = level;
45
+ throw new Error(`scp tx: unknown isolation level '${String(bad)}'`);
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * The tx-start statements for `dialect` at `isolation` (in issue order). Per-dialect because the
51
+ * three engines express per-transaction isolation DIFFERENTLY:
52
+ *
53
+ * - **postgres**: `BEGIN ISOLATION LEVEL <phrase>` — one statement, the level rides the BEGIN.
54
+ * - **mysql**: `SET TRANSACTION ISOLATION LEVEL <phrase>` MUST precede `BEGIN` (it scopes the very
55
+ * NEXT transaction only), so this returns TWO statements: the SET, then a bare `BEGIN`.
56
+ * - **sqlite**: SQLite has NO per-transaction isolation-level knob. Its isolation is a
57
+ * process/PRAGMA-level property (`journal_mode=WAL` gives snapshot reads; the default rollback
58
+ * journal serializes writers), NOT something a `BEGIN` clause selects. So an isolation request on
59
+ * SQLite is a HARD ERROR here — we do NOT silently drop it (that would fake honoring the level).
60
+ * The conformance/bench SQLite path never passes `isolation`, so it always emits a bare `BEGIN`.
61
+ *
62
+ * With no `isolation`, every dialect emits a single bare `BEGIN` (the Phase A behavior, byte-identical).
63
+ */
64
+ function beginStatements(dialect, isolation) {
65
+ if (isolation === undefined)
66
+ return ['BEGIN'];
67
+ const phrase = isolationPhrase(isolation);
68
+ switch (dialect) {
69
+ case 'postgres':
70
+ return [`BEGIN ISOLATION LEVEL ${phrase}`];
71
+ case 'mysql':
72
+ // The SET scopes ONLY the next tx; it must be issued before BEGIN, on the SAME connection.
73
+ return [`SET TRANSACTION ISOLATION LEVEL ${phrase}`, 'BEGIN'];
74
+ case 'sqlite':
75
+ throw new Error(`scp tx: SQLite does not support a per-transaction isolation level ('${isolation}'). ` +
76
+ `SQLite isolation is a connection/PRAGMA property (e.g. journal_mode=WAL for snapshot reads), ` +
77
+ `not a BEGIN clause — set it on the connection, and omit TransactionOptions.isolation for SQLite.`);
78
+ default: {
79
+ const bad = dialect;
80
+ throw new Error(`scp tx: unknown dialect '${String(bad)}'`);
81
+ }
82
+ }
83
+ }
84
+ /** Apply the Phase B defaults (v1-parity: retryOnError=true, retryLimit=3, retryDuration=200). */
85
+ function resolveTxOptions(opts = {}) {
86
+ return {
87
+ isolation: opts.isolation,
88
+ retryOnError: opts.retryOnError ?? true,
89
+ retryLimit: opts.retryLimit ?? 3,
90
+ retryDuration: opts.retryDuration ?? 200,
91
+ rollbackOnly: opts.rollbackOnly ?? false,
92
+ useWriterAfterTransaction: opts.useWriterAfterTransaction ?? true,
93
+ };
94
+ }
95
+ // ── Retryable-error classification (per dialect) ──────────────────────────────
96
+ /**
97
+ * Is `error` a RETRYABLE transaction failure — a deadlock, a serialization failure, or a broken
98
+ * connection — for which re-running the whole transaction can succeed? Classification is by the
99
+ * driver's stable error CODE first (PG `SQLSTATE`, MySQL `errno`), with the v1 message substrings as
100
+ * a fallback (mirrors v1 `DBModel.isRetryableError` :2865). A data conflict (unique/FK/check) is NOT
101
+ * retryable — re-running would fail identically.
102
+ *
103
+ * Codes (per dialect):
104
+ * - **postgres** SQLSTATE: `40001` serialization_failure, `40P01` deadlock_detected.
105
+ * - **mysql** errno: `1213` ER_LOCK_DEADLOCK, `1205` ER_LOCK_WAIT_TIMEOUT.
106
+ * - **connection errors** (either dialect): via {@link isConnectionError} — a dropped/reset/refused
107
+ * connection is retryable (reconnect on the next attempt).
108
+ */
109
+ function isRetryableTxError(error, isConnectionError) {
110
+ if (!(error instanceof Error))
111
+ return false;
112
+ if (isConnectionError(error))
113
+ return true;
114
+ // PG: SQLSTATE on `error.code` (5-char string). MySQL: errno on `error.errno` (number) or `code`.
115
+ const e = error;
116
+ const pgState = typeof e.code === 'string' ? e.code : typeof e.sqlState === 'string' ? e.sqlState : '';
117
+ if (pgState === '40001' || pgState === '40P01')
118
+ return true; // serialization_failure / deadlock_detected
119
+ const myErrno = typeof e.errno === 'number' ? e.errno : typeof e.code === 'number' ? e.code : undefined;
120
+ if (myErrno === 1213 || myErrno === 1205)
121
+ return true; // ER_LOCK_DEADLOCK / ER_LOCK_WAIT_TIMEOUT
122
+ // Fallback: the v1 message substrings (driver-version-independent phrasing).
123
+ const message = error.message || '';
124
+ return (message.includes('The transaction might succeed if retried') ||
125
+ message.includes('try restarting transaction') ||
126
+ message.includes('could not serialize access due to concurrent update') ||
127
+ message.includes('could not serialize access') ||
128
+ message.includes('Deadlock found') ||
129
+ message.includes('deadlock detected') ||
130
+ message.includes('Lock wait timeout exceeded'));
131
+ }
132
+ /** Sleep `ms` (the retry backoff). */
133
+ function sleep(ms) {
134
+ return new Promise((resolve) => setTimeout(resolve, ms));
135
+ }
136
+ // ── write=tx guards (mirror v1 `checkWriteAllowed`, DBModel.ts:886) ────────────
137
+ const node_async_hooks_1 = require("node:async_hooks");
138
+ /**
139
+ * Ambient "inside an active transaction" marker (§ write=tx guard). Set by the tx runtime while a
140
+ * transaction body runs — {@link isInTransaction} reads it, {@link checkWriteAllowed} enforces it.
141
+ * This is the guard-facing mirror of the exec-context ALS connection pin: the pin proves per-
142
+ * execution ownership; THIS marker proves the write is inside a caller-opened tx scope. The native
143
+ * ports mark the SAME scope in their task-local / contextvar / `context.Context`.
144
+ */
145
+ const txActiveStore = new node_async_hooks_1.AsyncLocalStorage();
146
+ /** Ambient "read-only context" marker (mirror v1 `withWriter`): a write here is REJECTED. */
147
+ const readOnlyStore = new node_async_hooks_1.AsyncLocalStorage();
148
+ /** Run `fn` with the "inside a transaction" marker set (called by the tx runtime around the body). */
149
+ function runInTransactionScope(fn) {
150
+ return txActiveStore.run(true, fn);
151
+ }
152
+ /**
153
+ * Run `fn` in a READ-ONLY context (mirror v1 `DBModel.withWriter`): reads are allowed, but ANY write
154
+ * inside `fn` throws {@link WriteInReadOnlyContextError}. Use for a read-your-writes / writer-pinned
155
+ * read scope that must never accidentally mutate.
156
+ */
157
+ function withReadOnly(fn) {
158
+ return readOnlyStore.run(true, fn);
159
+ }
160
+ /** True if the current async scope is inside an active transaction (guard/nested detection). */
161
+ function isInTransaction() {
162
+ return txActiveStore.getStore() === true;
163
+ }
164
+ /** True if the current async scope is a read-only context ({@link withReadOnly}). */
165
+ function isReadOnly() {
166
+ return readOnlyStore.getStore() === true;
167
+ }
168
+ /**
169
+ * Enforce the write=tx guard (mirror v1 `DBModel._checkWriteAllowed`, DBModel.ts:886-896): a write
170
+ * inside a {@link withReadOnly} scope throws {@link WriteInReadOnlyContextError}; a write with NO
171
+ * active transaction throws {@link WriteOutsideTransactionError}. Called at every write ENTRY
172
+ * (create/update/delete/upsert/batch) BEFORE any SQL is issued. The order matches v1: read-only is
173
+ * checked first (a read-only scope is the more specific rejection).
174
+ *
175
+ * @param operation the write op name (INSERT/UPDATE/DELETE/UPSERT/BATCH) — carried in the error.
176
+ * @param modelName optional model/table name — carried in the error for diagnosis.
177
+ */
178
+ function checkWriteAllowed(operation, modelName) {
179
+ if (isReadOnly())
180
+ throw new types_1.WriteInReadOnlyContextError(operation, modelName);
181
+ if (!isInTransaction())
182
+ throw new types_1.WriteOutsideTransactionError(operation, modelName);
183
+ }
184
+ //# sourceMappingURL=tx-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tx-options.js","sourceRoot":"","sources":["../../src/scp/tx-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAkBH,0CAeC;AAiBD,0CAoBC;AA0DD,4CASC;AAiBD,gDAsBC;AAGD,sBAEC;AAmBD,sDAEC;AAOD,oCAEC;AAGD,0CAEC;AAGD,gCAEC;AAYD,8CAGC;AA1OD,oCAAqF;AAG5E,6GAHA,oCAA4B,OAGA;AAAE,4GAHA,mCAA2B,OAGA;AAYlE,oFAAoF;AACpF,SAAgB,eAAe,CAAC,KAAqB;IACnD,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,gBAAgB;YACnB,OAAO,gBAAgB,CAAC;QAC1B,KAAK,i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,SAAS,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * litedbmodel v2 SCP — the WRITE bundle surface (spec §6 / §8 / §13 / §14).
3
+ *
4
+ * A write compiles (SYMBOLICALLY — no concrete input) to a {@link SqlBundle}: the base write
5
+ * statement plus the derived, gate-first {@link TransactionPlan} the tx runtime executes. The bundle
6
+ * is pure serializable JSON, so ALL FIVE language runtimes execute the SAME plan through the SAME
7
+ * per-statement tx loop.
8
+ *
9
+ * Two shapes, one plan derivation:
10
+ * - **Command** ({@link compileWriteBundle} / {@link compileCompositeWriteBundle}) — one (or several
11
+ * named) base write(s) + an `entityWrites` save contract; `deriveTransactionPlan` lowers the §6
12
+ * effect arrays around them into the ordered, gate-first statement list.
13
+ * - **Batch** ({@link compileCreateManyBundle} / {@link compileUpdateManyBundle} /
14
+ * {@link compileDeleteManyBundle}) — ONE logical op producing N grouped statements, lowered to a
15
+ * gate-free plan by `deriveBatchPlan`. The batch SQL is byte-copied from the v1 builders.
16
+ *
17
+ * READS are NOT here. A read is declared on the `@behavior` / `@leaf` authoring surface and lowered by
18
+ * `bc generate` into a native module per language; the TS runtime seam for such a module is
19
+ * `bind(leafHandlers(ctx))` (see `./leaves`). There is no runtime read-compile.
20
+ */
21
+ import type { Scope } from 'behavior-contracts/runtime';
22
+ import type { SqliteDriver } from './exec-context';
23
+ import { SqlFailure } from './errors';
24
+ import type { DialectName } from './dialect';
25
+ import type { ColumnTypeResolver } from './coltype';
26
+ import { type TxOp, type TransactionPlan, type TransactionResult } from './makesql/tx';
27
+ import { type InsertManyBuildOptions } from './makesql/compile-crud';
28
+ import type { UpdateManyBuildOptions } from '../drivers/types';
29
+ import { type EntityWritesDefinition, type LifecycleContract, type WriteLifecyclePhase } from './writes';
30
+ /** The minimal synchronous SQLite driver surface the write runtime needs (better-sqlite3 `Database`). */
31
+ export type SqliteDb = SqliteDriver;
32
+ /** Execute options for a bundle's transaction plan: the synchronous driver. */
33
+ export interface ExecuteOptions {
34
+ /** The synchronous SQLite driver (better-sqlite3 `Database`). */
35
+ readonly db: SqliteDb;
36
+ /** The target SQL dialect (spec §4/§10). Defaults to `'sqlite'` (the in-process runtime seam). */
37
+ readonly dialect?: DialectName;
38
+ }
39
+ /**
40
+ * The compiled write bundle of ONE logical operation (spec §8) — pure serializable JSON a thin
41
+ * per-language runtime can execute WITHOUT re-implementing litedbmodel's compile.
42
+ *
43
+ * `dialect` is the target SQL dialect (compiled ONCE, TS-side); a PG bundle's `?`→`$N` conversion is
44
+ * the render-time final pass, so the bundle stays uniform and dialect-tagged.
45
+ */
46
+ export interface SqlBundle {
47
+ readonly dialect: DialectName;
48
+ /** The operation (component) name. */
49
+ readonly name: string;
50
+ /** The base-write statement template (the plan's first body statement). */
51
+ readonly statement: TxOp;
52
+ /** The derived transaction plan — gate-first for a Command, gate-free for a batch. */
53
+ readonly transaction: TransactionPlan;
54
+ /**
55
+ * Codegen typed-de-box `outputType` (spec §4.1 / §9): the bc portable type of the write's
56
+ * {@link TransactionResult} (entity / returnedRows rows typed via the schema SoT). Present ONLY when
57
+ * a column-type resolver was supplied at compile (additive: absent → un-annotated).
58
+ */
59
+ readonly outputType?: unknown;
60
+ }
61
+ /**
62
+ * Compile a base write + its `entityWrites` save contract into a {@link SqlBundle} carrying the
63
+ * derived, gate-first write-time-relations {@link TransactionPlan} (spec §6/§8). `base` is the
64
+ * complete tuned write statement the `makesql` write compiler ({@link
65
+ * import('./makesql/tx').compileWriteNode}) emits; {@link deriveTransactionPlan} lowers the
66
+ * lifecycle's §6 effect arrays around it into the ordered statement list. Pure JSON; a per-language
67
+ * runtime honors the SAME plan.
68
+ */
69
+ export declare function compileWriteBundle(name: string, base: TxOp, writes: EntityWritesDefinition, phase: WriteLifecyclePhase, dialectName?: DialectName, resolveColumnType?: ColumnTypeResolver): SqlBundle;
70
+ /**
71
+ * One member of a COMPOSITE (multi-write) Command (WS8a, #28 — spec §6 nested write / §14 tx-DAG):
72
+ * a named base write carrying its OWN save-contract `effects`. A later member references an earlier
73
+ * member's RETURNING row via `$.ref.<name>.<field>`.
74
+ */
75
+ export interface CompositeWriteEntry {
76
+ /** The member name a later member references as `$.ref.<name>.<field>`. */
77
+ readonly name: string;
78
+ /** The member's complete tuned base write statement. */
79
+ readonly base: TxOp;
80
+ /** The member's own save-contract effects. */
81
+ readonly lifecycle: LifecycleContract;
82
+ }
83
+ /**
84
+ * Compile a COMPOSITE (multi-write) Command into a {@link SqlBundle} carrying ONE derived, gate-first,
85
+ * TOPOLOGICALLY-ORDERED transaction plan (spec §6 nested write / §14). Each entry contributes a named
86
+ * base write + its effects; a later member depends on an earlier via `$.ref.<name>.*`.
87
+ * {@link deriveTransactionPlan} builds the DAG + gate-first constraint and derives the ordered plan; a
88
+ * cycle / dangling ref is ESCALATED. Pure JSON.
89
+ */
90
+ export declare function compileCompositeWriteBundle(entries: readonly CompositeWriteEntry[], phase: WriteLifecyclePhase, dialectName?: DialectName): SqlBundle;
91
+ /**
92
+ * Compile a `createMany` into a batch write {@link SqlBundle} carrying a gate-free
93
+ * {@link TransactionPlan}. Heterogeneous column-set groups become MULTIPLE ordered INSERT statements —
94
+ * byte-identical to what `DBModel._insert` emits per group (via `compileInsertMany`).
95
+ *
96
+ * `pk` (the target PK descriptor) is REQUIRED when the createMany carries a RETURNING clause on the
97
+ * MySQL dialect: a batch INSERT persists N rows, so the MySQL RETURNING emulation must re-select ALL
98
+ * N (a range on the AUTO_INCREMENT column, or the client-supplied PK values), not a single `id`.
99
+ */
100
+ export declare function compileCreateManyBundle(name: string, options: InsertManyBuildOptions & {
101
+ pk?: {
102
+ columns: readonly string[];
103
+ autoInc: string | null;
104
+ };
105
+ }, dialectName?: DialectName, resolveColumnType?: ColumnTypeResolver): SqlBundle;
106
+ /**
107
+ * Compile an `updateMany` into a batch write {@link SqlBundle} (one UNNEST/JSON/CASE statement,
108
+ * byte-identical to `compileUpdateMany` driving the v1 `buildUpdateMany` / JSON-batch builder).
109
+ */
110
+ export declare function compileUpdateManyBundle(name: string, options: UpdateManyBuildOptions, dialectName?: DialectName): SqlBundle;
111
+ /**
112
+ * Compile a `deleteMany` into a batch write {@link SqlBundle} — a PK-set IN-list DELETE (single-key)
113
+ * or one DELETE per composite-key group, driven by the v1 `DBConditions` builder (`compileDeleteMany`).
114
+ * An EMPTY key set produces an empty plan (nothing to delete), never a synthesized always-false DELETE.
115
+ */
116
+ export declare function compileDeleteManyBundle(name: string, options: {
117
+ tableName: string;
118
+ keyColumns: string[];
119
+ keys: Record<string, unknown>[];
120
+ returning?: string;
121
+ }, dialectName?: DialectName): SqlBundle;
122
+ /**
123
+ * Execute a {@link SqlBundle}'s derived transaction plan (spec §6/§8) as ONE real SQLite transaction.
124
+ * The SAME code path a thin per-language runtime follows: it consumes ONLY the serialized
125
+ * {@link TransactionPlan} (pure JSON) + a SQL driver, never re-deriving the plan.
126
+ *
127
+ * @throws {SqlFailure} on a driver failure (the transaction ROLLBACKs first).
128
+ */
129
+ export declare function executeTransactionBundle(bundle: SqlBundle, input: Scope, options: ExecuteOptions): TransactionResult;
130
+ export { SqlFailure };
131
+ //# sourceMappingURL=write-bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-bundle.d.ts","sourceRoot":"","sources":["../../src/scp/write-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAKL,KAAK,IAAI,EACT,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK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BAA2B,CACzC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,KAAK,EAAE,mBAAmB,EAC1B,WAAW,GAAE,WAAsB,GAClC,SAAS,CAOX;AAkBD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,sBAAsB,GAAG;IAAE,EAAE,CAAC,EAAE;QAAE,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CAAE,EACjG,WAAW,GAAE,WAAsB,EACnC,iBAAiB,CAAC,EAAE,kBAAkB,GACrC,SAAS,CAwBX;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,sBAAsB,EAC/B,WAAW,GAAE,WAAsB,GAClC,SAAS,CAIX;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EACzG,WAAW,GAAE,WAAsB,GAClC,SAAS,CAQX;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,GAAG,iBAAiB,CAEpH;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ /**
3
+ * litedbmodel v2 SCP — the WRITE bundle surface (spec §6 / §8 / §13 / §14).
4
+ *
5
+ * A write compiles (SYMBOLICALLY — no concrete input) to a {@link SqlBundle}: the base write
6
+ * statement plus the derived, gate-first {@link TransactionPlan} the tx runtime executes. The bundle
7
+ * is pure serializable JSON, so ALL FIVE language runtimes execute the SAME plan through the SAME
8
+ * per-statement tx loop.
9
+ *
10
+ * Two shapes, one plan derivation:
11
+ * - **Command** ({@link compileWriteBundle} / {@link compileCompositeWriteBundle}) — one (or several
12
+ * named) base write(s) + an `entityWrites` save contract; `deriveTransactionPlan` lowers the §6
13
+ * effect arrays around them into the ordered, gate-first statement list.
14
+ * - **Batch** ({@link compileCreateManyBundle} / {@link compileUpdateManyBundle} /
15
+ * {@link compileDeleteManyBundle}) — ONE logical op producing N grouped statements, lowered to a
16
+ * gate-free plan by `deriveBatchPlan`. The batch SQL is byte-copied from the v1 builders.
17
+ *
18
+ * READS are NOT here. A read is declared on the `@behavior` / `@leaf` authoring surface and lowered by
19
+ * `bc generate` into a native module per language; the TS runtime seam for such a module is
20
+ * `bind(leafHandlers(ctx))` (see `./leaves`). There is no runtime read-compile.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.SqlFailure = void 0;
24
+ exports.compileWriteBundle = compileWriteBundle;
25
+ exports.compileCompositeWriteBundle = compileCompositeWriteBundle;
26
+ exports.compileCreateManyBundle = compileCreateManyBundle;
27
+ exports.compileUpdateManyBundle = compileUpdateManyBundle;
28
+ exports.compileDeleteManyBundle = compileDeleteManyBundle;
29
+ exports.executeTransactionBundle = executeTransactionBundle;
30
+ const errors_1 = require("./errors");
31
+ Object.defineProperty(exports, "SqlFailure", { enumerable: true, get: function () { return errors_1.SqlFailure; } });
32
+ const tx_1 = require("./makesql/tx");
33
+ const compile_crud_1 = require("./makesql/compile-crud");
34
+ const mysql_returning_1 = require("./makesql/mysql-returning");
35
+ const makesql_1 = require("./makesql/makesql");
36
+ const writeouttype_1 = require("./makesql/writeouttype");
37
+ const writes_1 = require("./writes");
38
+ /** Diagnostics label for a base write (its SQL verb). */
39
+ function writeLabelOf(sql) {
40
+ const m = /^\s*(INSERT|UPDATE|DELETE)/i.exec(sql);
41
+ return m === null ? 'Write' : m[1][0].toUpperCase() + m[1].slice(1).toLowerCase();
42
+ }
43
+ // ── Write-time relations: the Command bundle (WS5, #25 — spec §6) ──────────────
44
+ /**
45
+ * Compile a base write + its `entityWrites` save contract into a {@link SqlBundle} carrying the
46
+ * derived, gate-first write-time-relations {@link TransactionPlan} (spec §6/§8). `base` is the
47
+ * complete tuned write statement the `makesql` write compiler ({@link
48
+ * import('./makesql/tx').compileWriteNode}) emits; {@link deriveTransactionPlan} lowers the
49
+ * lifecycle's §6 effect arrays around it into the ordered statement list. Pure JSON; a per-language
50
+ * runtime honors the SAME plan.
51
+ */
52
+ function compileWriteBundle(name, base, writes, phase, dialectName = 'sqlite', resolveColumnType) {
53
+ const lifecycle = (0, writes_1.lifecycleFor)(writes, phase);
54
+ if (lifecycle === undefined) {
55
+ throw new Error(`scp write: the '${phase}' lifecycle is not declared in the entityWrites save contract`);
56
+ }
57
+ const plan = (0, tx_1.deriveTransactionPlan)(phase, [{ op: base, label: writeLabelOf(base.sql) }], lifecycle, dialectName);
58
+ const bundle = { dialect: dialectName, name, statement: base, transaction: plan };
59
+ // Codegen typed de-box (spec §4.1/§9): when the schema/DDL column-type SoT is supplied, annotate the
60
+ // bundle with the TransactionResult `outputType` so the typed emitters materialize a concrete struct
61
+ // for the result. Fail-closed inside `annotateWriteBundleOutType`.
62
+ return resolveColumnType === undefined ? bundle : (0, writeouttype_1.annotateWriteBundleOutType)(bundle, resolveColumnType);
63
+ }
64
+ /**
65
+ * Compile a COMPOSITE (multi-write) Command into a {@link SqlBundle} carrying ONE derived, gate-first,
66
+ * TOPOLOGICALLY-ORDERED transaction plan (spec §6 nested write / §14). Each entry contributes a named
67
+ * base write + its effects; a later member depends on an earlier via `$.ref.<name>.*`.
68
+ * {@link deriveTransactionPlan} builds the DAG + gate-first constraint and derives the ordered plan; a
69
+ * cycle / dangling ref is ESCALATED. Pure JSON.
70
+ */
71
+ function compileCompositeWriteBundle(entries, phase, dialectName = 'sqlite') {
72
+ if (entries.length < 2) {
73
+ throw new Error('scp write: a composite write bundle needs at least 2 named write members (use compileWriteBundle for a single write).');
74
+ }
75
+ const bases = entries.map((e) => ({ op: e.base, label: `${writeLabelOf(e.base.sql)} ${e.name}`, name: e.name, effects: e.lifecycle.effects }));
76
+ const plan = (0, tx_1.deriveTransactionPlan)(phase, bases, { effects: {} }, dialectName);
77
+ return { dialect: dialectName, name: entries[0].name, statement: entries[0].base, transaction: plan };
78
+ }
79
+ // ── Batch writes: createMany / updateMany / deleteMany ─────────────────────────
80
+ //
81
+ // A batch write is ONE LOGICAL operation that produces N grouped SQL statements (createMany with a
82
+ // heterogeneous column-set groups records into one INSERT per group, mirroring `DBModel._insert`;
83
+ // updateMany is one UNNEST/JSON/CASE statement; deleteMany is a PK-set IN-list DELETE). The batch
84
+ // compilers (`compileInsertMany`/`compileUpdateMany`/`compileDeleteMany`) copy the v1 builders
85
+ // byte-for-byte; here they are lowered into a gate-free {@link TransactionPlan} of body statements
86
+ // ({@link deriveBatchPlan}), so ALL FIVE runtimes execute the multi-statement batch through the SAME
87
+ // per-statement tx loop with no runtime change.
88
+ /** Flatten a batch compiler's `MakeSQL` component to a concrete `{ sql, params }` op. */
89
+ function flattenBatchOp(node, label) {
90
+ const assembled = (0, makesql_1.assembleMakeSQL)(node);
91
+ return { sql: assembled.sql, params: assembled.params, label };
92
+ }
93
+ /**
94
+ * Compile a `createMany` into a batch write {@link SqlBundle} carrying a gate-free
95
+ * {@link TransactionPlan}. Heterogeneous column-set groups become MULTIPLE ordered INSERT statements —
96
+ * byte-identical to what `DBModel._insert` emits per group (via `compileInsertMany`).
97
+ *
98
+ * `pk` (the target PK descriptor) is REQUIRED when the createMany carries a RETURNING clause on the
99
+ * MySQL dialect: a batch INSERT persists N rows, so the MySQL RETURNING emulation must re-select ALL
100
+ * N (a range on the AUTO_INCREMENT column, or the client-supplied PK values), not a single `id`.
101
+ */
102
+ function compileCreateManyBundle(name, options, dialectName = 'sqlite', resolveColumnType) {
103
+ const components = (0, compile_crud_1.compileInsertMany)(dialectName, options);
104
+ const ops = components.map((c, i) => {
105
+ const flat = flattenBatchOp(c, `createMany group ${i}`);
106
+ // On MySQL, annotate a RETURNING batch INSERT with the PK hint so the driver emulation re-selects
107
+ // every inserted row of the group by the real PK.
108
+ if (dialectName === 'mysql' && options.pk !== undefined && options.returning !== undefined) {
109
+ // The batch TxOp carries no writeMeta, so pass the upsert conflict key (upsertMany) explicitly —
110
+ // the driver re-selects the upserted rows by it (the AUTO_INCREMENT range is wrong on a conflict).
111
+ const onConflict = options.onConflict !== undefined && options.onConflict.length > 0 ? options.onConflict.join(',') : undefined;
112
+ return { ...flat, ...(0, mysql_returning_1.mysqlPkHint)({ sql: flat.sql, params: flat.params, pk: options.pk }, onConflict) };
113
+ }
114
+ return flat;
115
+ });
116
+ const plan = (0, tx_1.deriveBatchPlan)('create', ops);
117
+ // `ops` is never empty here: `deriveBatchPlan` throws on zero ops, and a `createMany` always groups
118
+ // into >=1 INSERT. Fail LOUDLY rather than emitting an empty `sql` fallback (an empty-ops batch bundle
119
+ // is a compile bug, not a default — 'defaults in schema, not code').
120
+ const head = ops[0];
121
+ if (head === undefined) {
122
+ throw new Error(`scp write: compileCreateManyBundle('${name}') produced no INSERT statements (empty createMany grouping) — an empty-ops batch bundle is a compile bug, not a silent empty-SQL default.`);
123
+ }
124
+ const bundle = { dialect: dialectName, name, statement: { sql: head.sql, params: head.params }, transaction: plan };
125
+ return resolveColumnType === undefined ? bundle : (0, writeouttype_1.annotateWriteBundleOutType)(bundle, resolveColumnType);
126
+ }
127
+ /**
128
+ * Compile an `updateMany` into a batch write {@link SqlBundle} (one UNNEST/JSON/CASE statement,
129
+ * byte-identical to `compileUpdateMany` driving the v1 `buildUpdateMany` / JSON-batch builder).
130
+ */
131
+ function compileUpdateManyBundle(name, options, dialectName = 'sqlite') {
132
+ const op = flattenBatchOp((0, compile_crud_1.compileUpdateMany)(dialectName, options), 'updateMany');
133
+ const plan = (0, tx_1.deriveBatchPlan)('update', [op]);
134
+ return { dialect: dialectName, name, statement: { sql: op.sql, params: op.params }, transaction: plan };
135
+ }
136
+ /**
137
+ * Compile a `deleteMany` into a batch write {@link SqlBundle} — a PK-set IN-list DELETE (single-key)
138
+ * or one DELETE per composite-key group, driven by the v1 `DBConditions` builder (`compileDeleteMany`).
139
+ * An EMPTY key set produces an empty plan (nothing to delete), never a synthesized always-false DELETE.
140
+ */
141
+ function compileDeleteManyBundle(name, options, dialectName = 'sqlite') {
142
+ const components = (0, compile_crud_1.compileDeleteMany)({ dialect: dialectName, ...options });
143
+ const ops = components.map((c, i) => flattenBatchOp(c, `deleteMany group ${i}`));
144
+ if (ops.length === 0) {
145
+ return { dialect: dialectName, name, statement: { sql: '', params: [] }, transaction: { phase: 'remove', entityFrom: null, statements: [], onIdempotentHit: 'rollback' } };
146
+ }
147
+ const plan = (0, tx_1.deriveBatchPlan)('remove', ops);
148
+ return { dialect: dialectName, name, statement: { sql: ops[0].sql, params: ops[0].params }, transaction: plan };
149
+ }
150
+ /**
151
+ * Execute a {@link SqlBundle}'s derived transaction plan (spec §6/§8) as ONE real SQLite transaction.
152
+ * The SAME code path a thin per-language runtime follows: it consumes ONLY the serialized
153
+ * {@link TransactionPlan} (pure JSON) + a SQL driver, never re-deriving the plan.
154
+ *
155
+ * @throws {SqlFailure} on a driver failure (the transaction ROLLBACKs first).
156
+ */
157
+ function executeTransactionBundle(bundle, input, options) {
158
+ return (0, tx_1.executeTransaction)(options.db, bundle.transaction, input, bundle.dialect);
159
+ }
160
+ //# sourceMappingURL=write-bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-bundle.js","sourceRoot":"","sources":["../../src/scp/write-bundle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAmFH,gDAkBC;AAuBD,kEAWC;AA2BD,0DA6BC;AAMD,0DAQC;AAOD,0DAYC;AASD,4DAEC;AAvOD,qCAAsC;AAyO7B,2FAzOA,mBAAU,OAyOA;AAtOnB,qCAQsB;AACtB,yDAKgC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AAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,CAAC;IAC7K,CAAC;IACD,MAAM,IAAI,GAAG,IAAA,oBAAe,EAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAClH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,wBAAwB,CAAC,MAAiB,EAAE,KAAY,EAAE,OAAuB;IAC/F,OAAO,IAAA,uBAAkB,EAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;AACnF,CAAC"}
package/dist/types.d.ts CHANGED
@@ -93,7 +93,14 @@ export interface SelectOptions {
93
93
  group?: string;
94
94
  tableName?: string;
95
95
  append?: string;
96
+ /** Lock the selected rows EXCLUSIVELY (` FOR UPDATE`). Mutually exclusive with {@link forShare}. */
96
97
  forUpdate?: boolean;
98
+ /**
99
+ * Lock the selected rows for SHARE (` FOR SHARE`): concurrent readers may take the same shared
100
+ * lock, writers block until this transaction ends. The read-side twin of {@link forUpdate} (and
101
+ * mutually exclusive with it). PostgreSQL / MySQL only — SQLite parses no locking clause.
102
+ */
103
+ forShare?: boolean;
97
104
  /**
98
105
  * JOIN clause to add to the query.
99
106
  * Can include parameters using ? placeholders.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.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