@prisma/orm-family-sql 8.0.0-rc.18-dev.4 → 8.0.0-rc.18-dev.6

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 (51) hide show
  1. package/dist/builder.d.mts +1 -1
  2. package/dist/builder__runtime.d.mts +3 -3
  3. package/dist/builder__runtime.mjs +1 -1
  4. package/dist/builder__types.d.mts +3 -2
  5. package/dist/collection-methods-BnR4UjcW-tiz3frtf.d.mts +77 -0
  6. package/dist/collection-methods-BnR4UjcW-tiz3frtf.d.mts.map +1 -0
  7. package/dist/collection-methods-DoBrRR69.d.mts +1 -0
  8. package/dist/{db-BmrN9nRS-DEogPltL.d.mts → db-BmrN9nRS-CDq1n2be.d.mts} +3 -2
  9. package/dist/db-BmrN9nRS-CDq1n2be.d.mts.map +1 -0
  10. package/dist/{prepared-statement-Bs9TKj5u-CInk8vXF.d.mts → index-UHjF-U84.d.mts} +212 -162
  11. package/dist/index-UHjF-U84.d.mts.map +1 -0
  12. package/dist/{index-reference-CflkzYSd.d.mts → index-reference-DJX-CNsb-D2qUlYq2.d.mts} +12 -3
  13. package/dist/index-reference-DJX-CNsb-D2qUlYq2.d.mts.map +1 -0
  14. package/dist/{index-reference-D693Lu-E.mjs → index-reference-DR62gjQS.mjs} +16 -3
  15. package/dist/index-reference-DR62gjQS.mjs.map +1 -0
  16. package/dist/index-reference-ZZrszBDq.d.mts +1 -0
  17. package/dist/orm-client.d.mts +57 -11
  18. package/dist/orm-client.d.mts.map +1 -1
  19. package/dist/orm-client.mjs +120 -2
  20. package/dist/orm-client.mjs.map +1 -1
  21. package/dist/{query-lane-context-C2AXsoFa-COSQOvZz.d.mts → query-lane-context-C42-u9L1-Bxa4DkI_.d.mts} +7 -2
  22. package/dist/query-lane-context-C42-u9L1-Bxa4DkI_.d.mts.map +1 -0
  23. package/dist/query-lane-context-DW5q2RAY.d.mts +1 -0
  24. package/dist/relational-core.d.mts +3 -3
  25. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  26. package/dist/relational-core__codec-descriptor-registry.d.mts +1 -1
  27. package/dist/relational-core__collection-methods.d.mts +3 -0
  28. package/dist/relational-core__collection-methods.mjs +1 -0
  29. package/dist/relational-core__index-reference.d.mts +3 -2
  30. package/dist/relational-core__index-reference.mjs +2 -2
  31. package/dist/relational-core__query-lane-context.d.mts +2 -2
  32. package/dist/relational-core__types.d.mts +2 -2
  33. package/dist/runtime.d.mts +4 -4
  34. package/dist/runtime.mjs +362 -44
  35. package/dist/runtime.mjs.map +1 -1
  36. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  37. package/dist/transaction-state-DR3nKTmH-BZ-54Zu0.d.mts +115 -0
  38. package/dist/transaction-state-DR3nKTmH-BZ-54Zu0.d.mts.map +1 -0
  39. package/dist/types-BkA6tyT-.d.mts +1 -0
  40. package/dist/{types-D09NAayg-CNrpjo7Z.d.mts → types-Cl4MLNrS-lbf-K25i.d.mts} +3 -3
  41. package/dist/{types-D09NAayg-CNrpjo7Z.d.mts.map → types-Cl4MLNrS-lbf-K25i.d.mts.map} +1 -1
  42. package/package.json +19 -18
  43. package/dist/db-BmrN9nRS-DEogPltL.d.mts.map +0 -1
  44. package/dist/index-qr6LA3dl.d.mts +0 -84
  45. package/dist/index-qr6LA3dl.d.mts.map +0 -1
  46. package/dist/index-reference-CflkzYSd.d.mts.map +0 -1
  47. package/dist/index-reference-D693Lu-E.mjs.map +0 -1
  48. package/dist/prepared-statement-Bs9TKj5u-CInk8vXF.d.mts.map +0 -1
  49. package/dist/query-lane-context-BsZs5lvB.d.mts +0 -1
  50. package/dist/query-lane-context-C2AXsoFa-COSQOvZz.d.mts.map +0 -1
  51. package/dist/types-DAkmn9FV.d.mts +0 -1
@@ -4,29 +4,45 @@ import { r as SqlOperationDescriptors } from "./index-We-mbWnZ.mjs";
4
4
  import { E as CodecRef$1, Pt as SqlCodecCallContext, S as Codec$1, h as AnyQueryAst, ht as LoweredStatement, k as ContractCodecRegistry, mt as LoweredParam } from "./types-Sh5HuaZE-CqThc46M.mjs";
5
5
  import { c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, r as SqlConnection } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
6
6
  import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
7
- import { a as CodecValue, i as CodecTypesBase, l as RawCodecInferer, o as Expression, t as AffectedCount } from "./expression-Ck1wys3N-RNyviMcU.mjs";
7
+ import { i as CodecTypesBase, l as RawCodecInferer } from "./expression-Ck1wys3N-RNyviMcU.mjs";
8
8
  import "./expression-DWcDQHh9.mjs";
9
9
  import { m as MarkerReadResult, t as Adapter } from "./ast-Dp6lQXUX.mjs";
10
10
  import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-eskZJbmm.mjs";
11
11
  import "./plan-_8dKi13Q.mjs";
12
- import { n as ExecutionContext } from "./query-lane-context-C2AXsoFa-COSQOvZz.mjs";
13
- import "./query-lane-context-BsZs5lvB.mjs";
14
- import { h as RuntimeScope } from "./types-D09NAayg-CNrpjo7Z.mjs";
15
- import "./types-DAkmn9FV.mjs";
12
+ import { n as CollectionMethodContribution } from "./collection-methods-BnR4UjcW-tiz3frtf.mjs";
13
+ import { n as ExecutionContext, t as CodecDescriptorRegistry } from "./query-lane-context-C42-u9L1-Bxa4DkI_.mjs";
14
+ import "./query-lane-context-DW5q2RAY.mjs";
15
+ import { _ as SqlOrmPlan, h as RuntimeScope } from "./types-Cl4MLNrS-lbf-K25i.mjs";
16
+ import "./types-BkA6tyT-.mjs";
17
+ import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-DR3nKTmH-BZ-54Zu0.mjs";
16
18
  import { i as SqlParamRefMutator } from "./middleware-YsFLC19Y-xhimGDiS.mjs";
17
19
  import "./middleware-DOKGNt72.mjs";
20
+ import "./collection-methods-DoBrRR69.mjs";
18
21
  import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
19
- import { Contract, JsonValue, PlanMeta } from "@prisma/orm-framework/contract/types";
20
- import { ActivityContext, ActivityEndedResult, ActivityFinalizedResult, AsyncIterableResult, ExecuteInterceptResult, ExecutionPlan, MutationDefaultGeneratorContributor, QueryInterceptResult, RuntimeActivity, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeMiddleware } from "@prisma/orm-framework/components/runtime";
22
+ import { Contract, PlanMeta } from "@prisma/orm-framework/contract/types";
23
+ import { Activity, Activity as Activity$1, ActivityContext, ActivityEndedResult, ActivityEndedResult as ActivityEndedResult$1, ActivityFinalizedResult, ActivityFinalizedResult as ActivityFinalizedResult$1, ActivityInterceptResult, ActivityInterceptResult as ActivityInterceptResult$1, ActivityParent, ActivityParent as ActivityParent$1, AsyncIterableResult, ClientActivity, ClientActivity as ClientActivity$1, ClientActivityEnd, ClientActivityEnd as ClientActivityEnd$1, ClientActivityEnded, ClientActivityKind, ClientActivityKind as ClientActivityKind$1, ClientActivityResult, ClientActivityResult as ClientActivityResult$1, ExecuteInterceptResult, ExecuteInterceptResult as ExecuteInterceptResult$1, ExecutionPlan, MutationDefaultGeneratorContributor, QueryInterceptResult, QueryInterceptResult as QueryInterceptResult$1, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeLog as Log, RuntimeMiddleware, StartActivity, StartActivity as StartActivity$1, StatementActivity, StatementEnded, TransactionActivity, TransactionEnded } from "@prisma/orm-framework/components/runtime";
21
24
  import { ExecutionStack, RuntimeAdapterDescriptor, RuntimeAdapterInstance, RuntimeDriverDescriptor, RuntimeDriverInstance, RuntimeExtensionDescriptor, RuntimeExtensionInstance, RuntimeTargetDescriptor, RuntimeTargetInstance } from "@prisma/orm-framework/components/execution";
22
- //#region ../../../2-sql/5-runtime/dist/prepared-statement-Bs9TKj5u.d.mts
23
- //#region src/codecs/encoding.d.ts
24
- interface ParamMetadata {
25
- readonly codec: CodecRef$1 | undefined;
26
- readonly name: string | undefined;
25
+ //#region ../../../2-sql/5-runtime/dist/activity-handle-ZJxB73iI.d.mts
26
+ //#region src/codecs/decoding.d.ts
27
+ type ColumnRef = {
28
+ table: string;
29
+ column: string;
30
+ };
31
+ type ListDecoder = (wireValue: unknown, decodeElement: (value: unknown) => Promise<unknown>) => Promise<readonly unknown[]> | readonly unknown[];
32
+ interface DecodeContext {
33
+ readonly aliases: ReadonlyArray<string> | undefined;
34
+ readonly codecs: ReadonlyMap<string, Codec$1>;
35
+ readonly columnRefs: ReadonlyMap<string, ColumnRef>;
36
+ readonly includeAliases: ReadonlySet<string>;
37
+ readonly manyAliases: ReadonlySet<string>;
38
+ /**
39
+ * Where {@link DecodeContext.aliases} came from, which decides how a row
40
+ * that lacks one of them reads: a projection the builder wrote is the
41
+ * runtime's own doing, while a row spec is the author's declaration about a
42
+ * statement the runtime never inspected.
43
+ */
44
+ readonly aliasSource: 'projection' | 'row-spec';
27
45
  }
28
- declare function deriveParamMetadata(ast: AnyQueryAst): readonly ParamMetadata[];
29
- declare function encodeParamsWithMetadata(values: readonly unknown[], metadata: readonly ParamMetadata[], ctx: SqlCodecCallContext, contractCodecs?: ContractCodecRegistry): Promise<readonly unknown[]>;
30
46
  //#endregion
31
47
  //#region src/middleware/sql-middleware.d.ts
32
48
  interface SqlMiddlewareContext extends ActivityContext {
@@ -42,9 +58,9 @@ interface DraftPlan {
42
58
  }
43
59
  interface SqlMiddleware<TCodecMap extends Record<string, unknown> = Record<string, unknown>> extends RuntimeMiddleware<SqlExecutionPlan, SqlParamRefMutator<TCodecMap>> {
44
60
  readonly familyId?: 'sql';
45
- activityStarted?(activity: RuntimeActivity, ctx: SqlMiddlewareContext): Promise<void>;
46
- activityEnded?(activity: RuntimeActivity, result: ActivityEndedResult, ctx: SqlMiddlewareContext): Promise<void>;
47
- activityFinalized?(activity: RuntimeActivity, result: ActivityFinalizedResult, ctx: SqlMiddlewareContext): Promise<void>;
61
+ activityStarted?(activity: Activity, ctx: SqlMiddlewareContext): Promise<void>;
62
+ activityEnded?(activity: Activity, result: ActivityEndedResult, ctx: SqlMiddlewareContext): Promise<void>;
63
+ activityFinalized?(activity: Activity, result: ActivityFinalizedResult, ctx: SqlMiddlewareContext): Promise<void>;
48
64
  /**
49
65
  * Rewrite the query AST before it is lowered to SQL. Middlewares run in
50
66
  * registration order; each sees the predecessor's output, so rewrites
@@ -73,101 +89,55 @@ interface SqlMiddleware<TCodecMap extends Record<string, unknown> = Record<strin
73
89
  intercept?: {
74
90
  onQuery?(plan: SqlExecutionPlan, ctx: SqlMiddlewareContext): Promise<QueryInterceptResult | undefined>;
75
91
  onExecute?(plan: SqlExecutionPlan, ctx: SqlMiddlewareContext): Promise<ExecuteInterceptResult | undefined>;
92
+ onActivity?(activity: ClientActivity, ctx: SqlMiddlewareContext): Promise<ActivityInterceptResult | undefined>;
76
93
  };
77
94
  onRow?(row: Record<string, unknown>, plan: SqlExecutionPlan, ctx: SqlMiddlewareContext): Promise<void>;
78
95
  }
79
96
  //#endregion
80
- //#region src/codecs/decoding.d.ts
81
- type ColumnRef = {
82
- table: string;
83
- column: string;
84
- };
85
- type ListDecoder = (wireValue: unknown, decodeElement: (value: unknown) => Promise<unknown>) => Promise<readonly unknown[]> | readonly unknown[];
86
- interface DecodeContext {
87
- readonly aliases: ReadonlyArray<string> | undefined;
88
- readonly codecs: ReadonlyMap<string, Codec$1>;
89
- readonly columnRefs: ReadonlyMap<string, ColumnRef>;
90
- readonly includeAliases: ReadonlySet<string>;
91
- readonly manyAliases: ReadonlySet<string>;
92
- /**
93
- * Where {@link DecodeContext.aliases} came from, which decides how a row
94
- * that lacks one of them reads: a projection the builder wrote is the
95
- * runtime's own doing, while a row spec is the author's declaration about a
96
- * statement the runtime never inspected.
97
- */
98
- readonly aliasSource: 'projection' | 'row-spec';
97
+ //#region src/codecs/encoding.d.ts
98
+ interface ParamMetadata {
99
+ readonly codec: CodecRef$1 | undefined;
100
+ readonly name: string | undefined;
99
101
  }
102
+ declare function deriveParamMetadata(ast: AnyQueryAst): readonly ParamMetadata[];
103
+ declare function encodeParamsWithMetadata(values: readonly unknown[], metadata: readonly ParamMetadata[], ctx: SqlCodecCallContext, contractCodecs?: ContractCodecRegistry): Promise<readonly unknown[]>;
100
104
  //#endregion
101
- //#region src/prepared/types.d.ts
102
- type ParamSpec<CT extends CodecTypesBase = CodecTypesBase> = (keyof CT & string) | {
103
- readonly codecId: keyof CT & string;
104
- readonly typeParams?: JsonValue;
105
- readonly nullable?: boolean;
106
- };
107
- type Declaration<CT extends CodecTypesBase = CodecTypesBase> = Readonly<Record<string, ParamSpec<CT>>>;
108
- type DeclaredCodecId<S> = S extends string ? S : S extends {
109
- readonly codecId: infer C extends string;
110
- } ? C : never;
111
- type DeclaredNullable<S> = S extends {
112
- readonly nullable: true;
113
- } ? true : false;
114
- type BindSiteParams<D> = { readonly [K in keyof D]: Expression<{
115
- codecId: DeclaredCodecId<D[K]>;
116
- nullable: DeclaredNullable<D[K]>;
117
- }>; };
118
- type ParamsFromDeclaration<D, CT extends CodecTypesBase> = { readonly [K in keyof D]: CodecValue<DeclaredCodecId<D[K]>, DeclaredNullable<D[K]>, CT>; };
119
- type PrepareCallback<D, Row> = (params: BindSiteParams<D>) => SqlQueryPlan<Row>;
120
- interface PreparedStatement<Params, Row> {
105
+ //#region src/prepared/prepared-statement.d.ts
106
+ interface PreparedStatementInternals {
121
107
  readonly sql: string;
122
108
  readonly ast: AnyQueryAst;
123
109
  readonly meta: PlanMeta;
124
110
  readonly slots: readonly LoweredParam[];
125
- readonly _params?: Params;
126
- readonly _row?: Row;
127
- query(target: RuntimeQueryable, params: Params, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
111
+ readonly decodeContext: DecodeContext;
112
+ readonly paramMetadata: readonly ParamMetadata[];
128
113
  }
129
- /**
130
- * A prepared statement whose plan declares statement statistics rather than
131
- * rows. It carries the same lowered statement and bind slots as its
132
- * row-streaming sibling and differs in one way: it is consumed by executing
133
- * it, which resolves the statistics the statement reports.
134
- */
135
- interface PreparedExecution<Params> {
114
+ declare class PreparedStatementImpl<Params, Row> implements PreparedStatement<Params, Row>, PreparedStatementInternals {
136
115
  readonly sql: string;
137
116
  readonly ast: AnyQueryAst;
138
117
  readonly meta: PlanMeta;
139
118
  readonly slots: readonly LoweredParam[];
140
- readonly _params?: Params;
141
- execute(target: RuntimeQueryable, params: Params, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
119
+ readonly decodeContext: DecodeContext;
120
+ readonly paramMetadata: readonly ParamMetadata[];
121
+ constructor(internals: PreparedStatementInternals);
122
+ query(target: RuntimeScope, params: Params, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
142
123
  }
143
124
  /**
144
- * The prepared handle a plan earns, keyed on the result the plan declares:
145
- * statistics prepare into a {@link PreparedExecution}, rows into a
146
- * {@link PreparedStatement}. The two faces share no consumption method, so a
147
- * handle cannot be read the wrong way round.
148
- *
149
- * The key is `AffectedCount`'s brand rather than the statistics shape, so a
150
- * row spec free to declare a column named `affectedRows` cannot select the
151
- * execution face by coincidence. This is the same fact `prepare()` reads at
152
- * runtime from the AST's declared result — one decision, stated twice.
125
+ * The statistics-reporting sibling of {@link PreparedStatementImpl}. A plan
126
+ * declaring an affected-row count prepares into one of these, which carries
127
+ * the same lowered statement and bind slots and is consumed by executing it.
153
128
  *
154
- * `never` is answered first because it satisfies every `extends`: a builder
155
- * state that projects nothing types its rows as `never`, and such a plan
156
- * declares rows in its AST, so it earns the statement face the runtime builds
157
- * for it.
129
+ * The two classes are separate so the consumption a plan did not declare is
130
+ * absent from the value, not merely from its type.
158
131
  */
159
- type PreparedFor<Params, Row> = [Row] extends [never] ? PreparedStatement<Params, Row> : [Row] extends [AffectedCount] ? PreparedExecution<Params> : PreparedStatement<Params, Row>;
160
- //#endregion
161
- //#region src/prepared/prepared-execute.d.ts
162
- declare const preparedStatementExecute: unique symbol;
163
- interface PreparedStatementExecuteTarget extends RuntimeQueryable {
164
- [preparedStatementExecute]<Params>(statement: PreparedExecution<Params>, params: Params, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
165
- }
166
- //#endregion
167
- //#region src/prepared/prepared-query.d.ts
168
- declare const preparedStatementQuery: unique symbol;
169
- interface PreparedStatementQueryTarget extends RuntimeQueryable {
170
- [preparedStatementQuery]<Params, Row>(statement: PreparedStatement<Params, Row>, params: Params, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
132
+ declare class PreparedExecutionImpl<Params> implements PreparedExecution<Params>, PreparedStatementInternals {
133
+ readonly sql: string;
134
+ readonly ast: AnyQueryAst;
135
+ readonly meta: PlanMeta;
136
+ readonly slots: readonly LoweredParam[];
137
+ readonly decodeContext: DecodeContext;
138
+ readonly paramMetadata: readonly ParamMetadata[];
139
+ constructor(internals: PreparedStatementInternals);
140
+ execute(target: RuntimeScope, params: Params, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
171
141
  }
172
142
  //#endregion
173
143
  //#region src/runtime-spi.d.ts
@@ -234,6 +204,7 @@ type RuntimeParameterizedCodecDescriptor<P = Record<string, unknown>> = CodecDes
234
204
  interface SqlStaticContributions extends Pick<MutationDefaultGeneratorContributor, 'mutationDefaultGenerators'> {
235
205
  readonly codecs: () => ReadonlyArray<AnyCodecDescriptor>;
236
206
  readonly queryOperations?: () => SqlOperationDescriptors;
207
+ readonly collectionMethods?: () => ReadonlyArray<CollectionMethodContribution>;
237
208
  }
238
209
  interface SqlRuntimeTargetDescriptor<TTargetId extends string = string, TTargetInstance extends RuntimeTargetInstance<'sql', TTargetId> = RuntimeTargetInstance<'sql', TTargetId>> extends RuntimeTargetDescriptor<'sql', TTargetId, TTargetInstance>, SqlStaticContributions {}
239
210
  interface SqlRuntimeAdapterDescriptor<TTargetId extends string = string, TAdapterInstance extends RuntimeAdapterInstance<'sql', TTargetId> = SqlRuntimeAdapterInstance<TTargetId>> extends RuntimeAdapterDescriptor<'sql', TTargetId, TAdapterInstance>, SqlStaticContributions {
@@ -277,37 +248,8 @@ declare function createExecutionContext<TContract extends Contract<SqlStorage> =
277
248
  readonly driver?: RuntimeDriverDescriptor<'sql', TTargetId, unknown, SqlRuntimeDriverInstance<TTargetId>>;
278
249
  }): ExecutionContext<TContract>;
279
250
  //#endregion
280
- //#region src/transaction-state.d.ts
281
- /**
282
- * What the database did with a transaction the runtime wrapped. `withTransaction` and the ORM read it to tell a failed `COMMIT` or `ROLLBACK` from an `activityEnded` hook that threw after the database had already settled the transaction.
283
- */
284
- declare const transactionSettlement: unique symbol;
285
- interface TransactionSettlementState {
286
- /** The driver's `COMMIT` resolved. */
287
- readonly committed: boolean;
288
- /** The driver's `ROLLBACK` resolved. */
289
- readonly rolledBack: boolean;
290
- /** Passes an `activityEnded` error the caller does not receive to the transaction's log, so it is not lost. */
291
- logDroppedError(error: unknown): void;
292
- }
293
- interface SettledTransactionTarget {
294
- readonly [transactionSettlement]: TransactionSettlementState;
295
- }
296
- declare function settlementOf(transaction: object): TransactionSettlementState | undefined;
297
- /**
298
- * How the last transaction start on a connection the runtime made went. `withTransaction` releases the connection after a start the `activityStarted` hooks refused before any `BEGIN` was sent, and destroys it after any other start failure.
299
- */
300
- declare const transactionStart: unique symbol;
301
- interface TransactionStart {
302
- refusedBeforeBegin: boolean;
303
- }
304
- interface TransactionStartTarget {
305
- readonly [transactionStart]: TransactionStart;
306
- }
307
- declare function createTransactionStart(): TransactionStart;
308
- //#endregion
309
251
  //#region src/sql-runtime.d.ts
310
- type Log = RuntimeLog;
252
+ type Log$1 = RuntimeLog;
311
253
  /**
312
254
  * When `close()` starts refusing new runtime-scope work. `'when-idle'` (the default) waits until the runtime has been idle for one turn of the event loop, so work that keeps it busy from the close onward is admitted; use it for an owner with one caller, such as a per-request connection. `'at-once'` refuses from the call of `close()`; use it for an owner that many callers share. Both wait for work already in flight.
313
255
  */
@@ -319,7 +261,7 @@ interface RuntimeOptions<TContract extends Contract<SqlStorage> = Contract<SqlSt
319
261
  readonly verifyMarker?: VerifyMarkerOption;
320
262
  readonly middleware?: readonly SqlMiddleware[];
321
263
  readonly mode?: 'strict' | 'permissive';
322
- readonly log?: Log;
264
+ readonly log?: Log$1;
323
265
  readonly closeRefusal?: CloseRefusal | undefined;
324
266
  }
325
267
  /**
@@ -363,6 +305,22 @@ interface RuntimeQueryable extends RuntimeScope {}
363
305
  interface TransactionContext extends RuntimeQueryable {
364
306
  readonly invalidated: boolean;
365
307
  }
308
+ /**
309
+ * The route a client activity's statements and transaction take to the database. A subclass whose statements run on its own sessions, such as role sessions, builds one and starts activities on it with `startActivityOnRoute`.
310
+ */
311
+ interface ActivityRoute {
312
+ readonly scope: 'runtime' | 'connection' | 'transaction';
313
+ /** The parent of an activity started on the route itself. */
314
+ parent(): ActivityParent | undefined;
315
+ query<Row>(plan: SqlOrmPlan<Row>, options: ActivityExecuteOptions): AsyncIterableResult<Row>;
316
+ execute(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, options: ActivityExecuteOptions): Promise<SqlStatementStats>;
317
+ preparedQuery<Params, Row>(statement: PreparedStatementImpl<Params, Row>, params: Params, options: ActivityExecuteOptions): AsyncIterableResult<Row>;
318
+ preparedExecute<Params>(statement: PreparedExecutionImpl<Params>, params: Params, options: ActivityExecuteOptions): Promise<SqlStatementStats>;
319
+ /** Begins a transaction beneath `parent`; absent where the route is a transaction. */
320
+ readonly transaction: ((parent: ActivityParent) => Promise<RuntimeTransaction>) | undefined;
321
+ /** Whether an open activity on the route is runtime work that `close()` waits for. */
322
+ readonly runtimeWork: boolean;
323
+ }
366
324
  /**
367
325
  * Abstract family-layer base for SQL runtimes. Subclass to build a target runtime
368
326
  * (e.g. `PostgresRuntimeImpl`); app code should consume the `Runtime` interface returned
@@ -431,6 +389,24 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
431
389
  execute(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
432
390
  [preparedStatementQuery]<Params, Row>(ps: PreparedStatement<Params, Row>, params: Params, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
433
391
  [preparedStatementExecute]<Params>(ps: PreparedExecution<Params>, params: Params, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
392
+ readonly [activitySource]: ActivitySource;
393
+ /**
394
+ * Starts a client activity whose statements and transaction run on `route`, beneath `parent` or, without one, beneath `route.parent()`.
395
+ */
396
+ protected startActivityOnRoute<K extends ClientActivityKind>(route: ActivityRoute, activity: StartActivity<K>, parent: ActivityParent | undefined): Promise<ActivityHandle<K>>;
397
+ /** The content hash of the statement `plan` would send on a queryable of `scope` beneath `parent`. */
398
+ protected planContentHashFor(plan: SqlQueryPlan | SqlExecutionPlan, scope: ActivityRoute['scope'], parent: ActivityParent | undefined): Promise<string>;
399
+ /** An activity route whose statements run on `queryable`. */
400
+ protected queryableRoute(queryable: SqlQueryable, scope: ActivityRoute['scope'], parent: () => ActivityParent | undefined, options: Pick<ActivityRoute, 'transaction' | 'runtimeWork'>): ActivityRoute;
401
+ /** The activity route of a held connection that `owner` wraps: its statements run on `connection`, and its transactions begin there. */
402
+ protected connectionRoute(connection: SqlConnection, owner: TransactionStartTarget): ActivityRoute;
403
+ private beginTransactionBeneathOn;
404
+ /** The `activitySource` member of a held connection that `owner()` wraps. */
405
+ protected connectionActivitySource(connection: SqlConnection, owner: () => TransactionStartTarget): ActivitySource;
406
+ private activityHandle;
407
+ private beginOwnedTransactionBeneath;
408
+ /** Begins a transaction with `begin` on a connection the transaction owns; see `beginOwnedTransaction`. */
409
+ protected ownTransaction(connection: Pick<RuntimeConnection, 'release' | 'destroy'>, begin: () => Promise<RuntimeTransaction>): Promise<RuntimeTransaction>;
434
410
  /**
435
411
  * Returns the raw driver connection. The connection is a `SqlQueryable` — SQL
436
412
  * issued on it runs below the middleware/codec/telemetry pipeline. It carries
@@ -439,6 +415,8 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
439
415
  */
440
416
  protected acquireRawConnection(): Promise<SqlConnection>;
441
417
  private setupDriverExecution;
418
+ private beginActivityWork;
419
+ private warnWhenWaitingOnlyForActivities;
442
420
  private beginOperation;
443
421
  private parentOf;
444
422
  protected getListDecoder(): ListDecoder;
@@ -446,25 +424,26 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
446
424
  private createQueryContexts;
447
425
  private prepareOperation;
448
426
  /** Query rows against a caller-supplied queryable through the shared preparation pipeline. */
449
- protected queryAgainstQueryable<Row>(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, queryable: SqlQueryable, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
427
+ protected queryAgainstQueryable<Row>(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, queryable: SqlQueryable, options?: ActivityExecuteOptions): AsyncIterableResult<Row>;
450
428
  /** Execute statistics against a caller-supplied queryable through the shared preparation pipeline. */
451
- protected executeStatisticsAgainstQueryable(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, queryable: SqlQueryable, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
429
+ protected executeStatisticsAgainstQueryable(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, queryable: SqlQueryable, options?: ActivityExecuteOptions): Promise<SqlStatementStats>;
452
430
  private executeStatisticsInFlight;
453
431
  private executeOn;
454
432
  private executeEncodedPlan;
455
433
  prepare<D extends Declaration<CT>, Row, CT extends CodecTypesBase = CodecTypesBase>(declaration: D, callback: PrepareCallback<D, Row>): Promise<PreparedFor<ParamsFromDeclaration<D, CT>, Row>>;
456
434
  /** Query prepared rows against a caller-supplied queryable through the full pipeline. */
457
- protected runPreparedQueryAgainstQueryable<P, Row>(ps: PreparedStatementImpl<P, Row>, userParams: unknown, queryable: SqlQueryable, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
435
+ protected runPreparedQueryAgainstQueryable<P, Row>(ps: PreparedStatementImpl<P, Row>, userParams: unknown, queryable: SqlQueryable, options?: ActivityExecuteOptions): AsyncIterableResult<Row>;
458
436
  private streamPreparedRows;
459
437
  /** Execute a prepared statement's statistics against a caller-supplied queryable through the full pipeline. */
460
- protected runPreparedExecuteAgainstQueryable<P>(ps: PreparedExecutionImpl<P>, userParams: unknown, queryable: SqlQueryable, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
438
+ protected runPreparedExecuteAgainstQueryable<P>(ps: PreparedExecutionImpl<P>, userParams: unknown, queryable: SqlQueryable, options?: ActivityExecuteOptions): Promise<SqlStatementStats>;
461
439
  private runPreparedExecuteInFlight;
462
440
  private executePrepared;
463
441
  connection(): Promise<RuntimeConnection>;
442
+ private openConnection;
464
443
  /**
465
444
  * Begins a transaction on `connection`, which `owner` wraps, as a transaction activity. When the transaction's `activityStarted` hooks refuse the start, no `BEGIN` is sent, `owner` is recorded as clean, and `withTransaction` releases it; after any other start failure it destroys it. The transaction's `activityStarted` hooks run before `BEGIN`. Every statement sent on the transaction, or on `connection`, from the end of `BEGIN` until `commit()` or `rollback()` is called is the transaction's child, and is finalized when the transaction ends, with its outcome. `commit()` and `rollback()` resolve after every finalization hook has run. A subclass that holds its own connection begins its transactions here.
466
445
  */
467
- protected beginTransactionOn(connection: SqlConnection, owner: TransactionStartTarget): Promise<RuntimeTransaction>;
446
+ protected beginTransactionOn(connection: SqlConnection, owner: TransactionStartTarget, parent: ActivityParent | undefined): Promise<RuntimeTransaction>;
468
447
  private wrapTransaction;
469
448
  telemetry(): RuntimeTelemetryEvent | null;
470
449
  close(): Promise<void>;
@@ -482,43 +461,114 @@ interface ConnectionProvider {
482
461
  }
483
462
  declare function withTransaction<R>(runtime: ConnectionProvider, fn: (tx: TransactionContext) => PromiseLike<R>): Promise<R>;
484
463
  //#endregion
485
- //#region src/prepared/prepared-statement.d.ts
486
- interface PreparedStatementInternals {
487
- readonly sql: string;
488
- readonly ast: AnyQueryAst;
489
- readonly meta: PlanMeta;
490
- readonly slots: readonly LoweredParam[];
491
- readonly decodeContext: DecodeContext;
492
- readonly paramMetadata: readonly ParamMetadata[];
464
+ //#region src/activity-handle.d.ts
465
+ /** What starts client activities and hashes plans. The runtime's queryables and activity handles carry one through `activitySource`. */
466
+ interface ActivitySource {
467
+ /**
468
+ * Starts an activity for an act the runtime would not otherwise see, such as an ORM call. Statements and activities started through the handle are its children. An open handle on the runtime keeps the runtime busy, so `close()` waits for its `end()`; a handle never ended keeps it busy, as a connection never released does.
469
+ */
470
+ startActivity<K extends ClientActivityKind>(activity: StartActivity<K>): Promise<ActivityHandle<K>>;
471
+ /** The content hash of the statement `plan` sends: after `beforeCompile`, lowering and encoding, without `beforeEncode`. It equals the digest `ctx.contentHash(exec)` returns for the statement's execution plan only when `beforeCompile` gives the same result here as for the statement (it runs here with the scope and parent of the queryable it is called on, and with fresh state; on the runtime itself there is no parent), no `beforeEncode` hook changes the parameters, and the codecs encode deterministically. It starts nothing, so it also works on a handle that has ended. */
472
+ planContentHash(plan: SqlQueryPlan | SqlExecutionPlan): Promise<string>;
493
473
  }
494
- declare class PreparedStatementImpl<Params, Row> implements PreparedStatement<Params, Row>, PreparedStatementInternals {
495
- readonly sql: string;
496
- readonly ast: AnyQueryAst;
497
- readonly meta: PlanMeta;
498
- readonly slots: readonly LoweredParam[];
499
- readonly decodeContext: DecodeContext;
500
- readonly paramMetadata: readonly ParamMetadata[];
501
- constructor(internals: PreparedStatementInternals);
502
- query(target: RuntimeQueryable, params: Params, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
474
+ /** An open client activity, to send its statements through and to end. Its `startActivity` and `planContentHash` members are those of its `activitySource` member. */
475
+ interface ActivityHandle<K extends ClientActivityKind> extends RuntimeQueryable, ActivitySource, ActivitySourceTarget {
476
+ readonly activity: ClientActivity<K>;
477
+ /** Set when an `intercept.onActivity` handler supplied the result; the client then returns it without running anything. */
478
+ readonly intercepted: {
479
+ readonly result: ClientActivityResult<K>;
480
+ } | undefined;
481
+ /** Starts a transaction beneath the activity. Absent on a handle opened under a transaction, or on a connection whose transaction is open. */
482
+ readonly transaction?: () => Promise<RuntimeTransaction>;
483
+ /** Ends the activity. Rejects with `RUNTIME.ACTIVITY_CHILDREN_OPEN` when a statement or activity beneath it has not ended, after ending it `failed`. */
484
+ end(end: ClientActivityEnd<K>): Promise<void>;
503
485
  }
486
+ /** Options a queryable's statements carry: the activity they start beneath. */
487
+ interface ActivityExecuteOptions extends RuntimeExecuteOptions {
488
+ readonly activityParent?: ActivityParent | undefined;
489
+ }
490
+ /** The symbol-keyed member through which a runtime, connection, transaction, `withTransaction` context or activity handle starts activities; user-facing types do not show it. */
491
+ declare const activitySource: unique symbol;
492
+ interface ActivitySourceTarget {
493
+ readonly [activitySource]: ActivitySource;
494
+ }
495
+ /** The `activitySource` member of a queryable; `undefined` for a queryable that cannot start activities, such as a test stub. */
496
+ declare function findActivitySource(target: RuntimeScope): ActivitySource | undefined;
497
+ /** An activity source that starts activities on whatever queryable `target()` returns when called, for an object that sends its statements to a queryable it looks up each time. */
498
+ declare function delegatingActivitySource(target: () => RuntimeScope): ActivitySource;
499
+ /** Starts an activity on a queryable through its `activitySource` member. */
500
+ declare function startActivityOn<K extends ClientActivityKind>(target: RuntimeScope, activity: StartActivity<K>): Promise<ActivityHandle<K>>;
501
+ declare function planContentHashOn(target: RuntimeScope, plan: SqlQueryPlan | SqlExecutionPlan): Promise<string>;
502
+ //#endregion
503
+ //#region ../../../2-sql/5-runtime/dist/index.d.mts
504
+ //#region src/codecs/ast-codec-registry.d.ts
504
505
  /**
505
- * The statistics-reporting sibling of {@link PreparedStatementImpl}. A plan
506
- * declaring an affected-row count prepares into one of these, which carries
507
- * the same lowered statement and bind slots and is consumed by executing it.
506
+ * Build a contract-free {@link ContractCodecRegistry} that resolves codecs
507
+ * purely from AST-supplied {@link import('@prisma/orm-framework/components/codec').CodecRef}s
508
+ * against a target's descriptor registry.
508
509
  *
509
- * The two classes are separate so the consumption a plan did not declare is
510
- * absent from the value, not merely from its type.
510
+ * Dispatch is driven entirely by `CodecRef`s embedded in AST nodes; no
511
+ * contract walk is needed. `forColumn` always returns `undefined` — this
512
+ * registry carries no column-to-codec mappings.
511
513
  */
512
- declare class PreparedExecutionImpl<Params> implements PreparedExecution<Params>, PreparedStatementInternals {
513
- readonly sql: string;
514
- readonly ast: AnyQueryAst;
515
- readonly meta: PlanMeta;
516
- readonly slots: readonly LoweredParam[];
517
- readonly decodeContext: DecodeContext;
518
- readonly paramMetadata: readonly ParamMetadata[];
519
- constructor(internals: PreparedStatementInternals);
520
- execute(target: RuntimeQueryable, params: Params, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
514
+ declare function createAstCodecRegistry(descriptors: CodecDescriptorRegistry): ContractCodecRegistry;
515
+ //#endregion
516
+ //#region src/codecs/validation.d.ts
517
+ declare function extractCodecIds(contract: Contract<SqlStorage>): Set<string>;
518
+ declare function validateContractCodecMappings(registry: CodecDescriptorRegistry, contract: Contract<SqlStorage>): void;
519
+ declare function validateCodecRegistryCompleteness(registry: CodecDescriptorRegistry, contract: Contract<SqlStorage>): void;
520
+ //#endregion
521
+ //#region src/lower-sql-plan.d.ts
522
+ /**
523
+ * Lowers a SQL query plan to an executable Plan by calling the adapter's lower method.
524
+ *
525
+ * Ad-hoc lowerings produce only `{kind: 'literal'}` slots; this helper
526
+ * unwraps them into the bare-value array `SqlExecutionPlan` exposes.
527
+ * Encountering a `{kind: 'bind'}` slot here means the caller passed an
528
+ * AST containing `PreparedParamRef` to the ad-hoc execute path — that's a
529
+ * caller error, surfaced as `RUNTIME.PREPARE_BIND_ON_ADHOC`.
530
+ */
531
+ declare function lowerSqlPlan<Row>(adapter: Adapter<AnyQueryAst, Contract<SqlStorage>, LoweredStatement>, contract: Contract<SqlStorage>, queryPlan: SqlQueryPlan<Row>): SqlExecutionPlan<Row>;
532
+ //#endregion
533
+ //#region src/middleware/budgets.d.ts
534
+ interface BudgetsOptions {
535
+ readonly maxRows?: number;
536
+ readonly defaultTableRows?: number;
537
+ readonly tableRows?: Record<string, number>;
538
+ readonly maxLatencyMs?: number;
539
+ readonly severities?: {
540
+ readonly rowCount?: 'warn' | 'error';
541
+ readonly latency?: 'warn' | 'error';
542
+ };
543
+ }
544
+ declare function budgets(options?: BudgetsOptions): SqlMiddleware;
545
+ //#endregion
546
+ //#region src/middleware/lints.d.ts
547
+ interface LintsOptions {
548
+ readonly severities?: {
549
+ readonly selectStar?: 'warn' | 'error';
550
+ readonly noLimit?: 'warn' | 'error';
551
+ readonly deleteWithoutWhere?: 'warn' | 'error';
552
+ readonly updateWithoutWhere?: 'warn' | 'error';
553
+ readonly readOnlyMutation?: 'warn' | 'error';
554
+ };
555
+ readonly fallbackWhenAstMissing?: 'raw' | 'skip';
521
556
  }
557
+ /**
558
+ * AST-first lint middleware for SQL plans. When `plan.ast` is a SQL QueryAst, inspects
559
+ * the AST structurally. When `plan.ast` is missing, falls back to raw heuristic
560
+ * guardrails or skips linting depending on `fallbackWhenAstMissing`.
561
+ *
562
+ * Rules (AST-based):
563
+ * - DELETE without WHERE: blocks execution (configurable severity, default error)
564
+ * - UPDATE without WHERE: blocks execution (configurable severity, default error)
565
+ * - Unbounded SELECT: warn/error (severity from noLimit)
566
+ * - SELECT * intent: warn/error (severity from selectStar)
567
+ *
568
+ * Fallback: When ast is missing, `fallbackWhenAstMissing: 'raw'` uses heuristic
569
+ * SQL parsing; `'skip'` skips all lints. Default is `'raw'`.
570
+ */
571
+ declare function lints(options?: LintsOptions): SqlMiddleware;
522
572
  //#endregion
523
- export { settlementOf as $, SqlMiddleware as A, TelemetryOutcome as B, RuntimeParameterizedCodecDescriptor as C, SettledTransactionTarget as D, RuntimeTransaction as E, SqlRuntimeDriverInstance as F, VerifyMarkerOption as G, TransactionSettlementState as H, SqlRuntimeExtensionDescriptor as I, createTransactionStart as J, createExecutionContext as K, SqlRuntimeExtensionInstance as L, SqlRuntimeAdapterDescriptor as M, SqlRuntimeAdapterInstance as N, SqlExecutionStack as O, SqlRuntimeBase as P, preparedStatementQuery as Q, SqlRuntimeTargetDescriptor as R, RuntimeOptions as S, RuntimeTelemetryEvent as T, TransactionStart as U, TransactionContext as V, TransactionStartTarget as W, encodeParamsWithMetadata as X, deriveParamMetadata as Y, preparedStatementExecute as Z, PreparedStatementInternals as _, DeclaredCodecId as a, RuntimeConnection as b, ParamSpec as c, PreparedExecution as d, transactionSettlement as et, PreparedExecutionImpl as f, PreparedStatementImpl as g, PreparedStatementExecuteTarget as h, Declaration as i, SqlMiddlewareContext as j, SqlExecutionStackWithDriver as k, ParamsFromDeclaration as l, PreparedStatement as m, CloseRefusal as n, withTransaction as nt, DeclaredNullable as o, PreparedFor as p, createSqlExecutionStack as q, ConnectionProvider as r, MarkerReader as s, BindSiteParams as t, transactionStart as tt, PrepareCallback as u, PreparedStatementQueryTarget as v, RuntimeQueryable as w, RuntimeFamilyAdapter as x, Runtime as y, SqlStaticContributions as z };
524
- //# sourceMappingURL=prepared-statement-Bs9TKj5u-CInk8vXF.d.mts.map
573
+ export { SqlRuntimeBase as $, ActivityRoute as A, RuntimeConnection as B, extractCodecIds as C, validateContractCodecMappings as D, validateCodecRegistryCompleteness as E, MarkerReader as F, RuntimeTelemetryEvent as G, RuntimeOptions as H, PreparedExecutionImpl as I, SqlExecutionStackWithDriver as J, RuntimeTransaction as K, PreparedStatementImpl as L, ActivitySourceTarget as M, CloseRefusal as N, ActivityExecuteOptions as O, ConnectionProvider as P, SqlRuntimeAdapterInstance as Q, PreparedStatementInternals as R, createAstCodecRegistry as S, lowerSqlPlan as T, RuntimeParameterizedCodecDescriptor as U, RuntimeFamilyAdapter as V, RuntimeQueryable as W, SqlMiddlewareContext as X, SqlMiddleware as Y, SqlRuntimeAdapterDescriptor as Z, StatementActivity as _, withTransaction as _t, ActivityParent$1 as a, TelemetryOutcome as at, TransactionEnded as b, ClientActivityEnd$1 as c, activitySource as ct, ClientActivityResult$1 as d, delegatingActivitySource as dt, SqlRuntimeDriverInstance as et, ExecuteInterceptResult$1 as f, deriveParamMetadata as ft, StartActivity$1 as g, startActivityOn as gt, QueryInterceptResult$1 as h, planContentHashOn as ht, ActivityInterceptResult$1 as i, SqlStaticContributions as it, ActivitySource as j, ActivityHandle as k, ClientActivityEnded as l, createExecutionContext as lt, Log as m, findActivitySource as mt, ActivityEndedResult$1 as n, SqlRuntimeExtensionInstance as nt, BudgetsOptions as o, TransactionContext as ot, LintsOptions as p, encodeParamsWithMetadata as pt, SqlExecutionStack as q, ActivityFinalizedResult$1 as r, SqlRuntimeTargetDescriptor as rt, ClientActivity$1 as s, VerifyMarkerOption as st, Activity$1 as t, SqlRuntimeExtensionDescriptor as tt, ClientActivityKind$1 as u, createSqlExecutionStack as ut, StatementEnded as v, lints as w, budgets as x, TransactionActivity as y, Runtime as z };
574
+ //# sourceMappingURL=index-UHjF-U84.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-UHjF-U84.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/activity-handle-ZJxB73iI.d.mts","../../../../2-sql/5-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KAeK;EACH;EACA;;KAEG,eAAe,oBAAoB,gBAAgB,mBAAmB,qBAAqB;UAEtF;WACC,SAAS;WACT,QAAQ,oBAAoB;WAC5B,YAAY,oBAAoB;WAChC,gBAAgB;WAChB,aAAa;;;;;;;WAOb;;;;UAeD,6BAA6B;WAC5B,UAAU,SAAS;;;;;;UAMpB;WACC,KAAK;WACL,MAAM;;UAEP,cAAc,kBAAkB,0BAA0B,iCAAiC,kBAAkB,kBAAkB,mBAAmB;WACjJ;EACT,iBAAiB,UAAU,UAAU,KAAK,uBAAuB;EACjE,eAAe,UAAU,UAAU,QAAQ,qBAAqB,KAAK,uBAAuB;EAC5F,mBAAmB,UAAU,UAAU,QAAQ,yBAAyB,KAAK,uBAAuB;;;;;;;;;;;;;;;;;;;EAmBpG,eAAe,OAAO,WAAW,KAAK,uBAAuB,QAAQ;;;;;;EAMrE,cAAc,MAAM,kBAAk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oBAAoB,QAAQ;;iBAEnC,gBAAgB,GAAG,SAAS,oBAAoB,KAAK,IAAI,uBAAuB,YAAY,KAAK,QAAQ;;;;UAIhH;;;;EAIR,cAAc,UAAU,oBAAoB,UAAU,cAAc,KAAK,QAAQ,eAAe;;EAEhG,gBAAgB,MAAM,eAAe,mBAAmB;;;UAGhD,eAAe,UAAU,4BAA4B,kBAAkB,gBAAgB;WACtF,UAAU,eAAe;;WAEzB;aACE,QAAQ,qBAAqB;;;WAG/B,oBAAoB,QAAQ;;EAErC,IAAI,KAAK,kBAAkB,KAAK;;;UAGxB,+BAA+B;WAC9B,iBAAiB;;;cAGd;UACJ;YACE,iBAAiB;;;iBAGZ,mBAAmB,QAAQ,eAAe;;iBAE1C,yBAAyB,cAAc,eAAe;;iBAEtD,gBAAgB,UAAU,oBAAoB,QAAQ,cAAc,UAAU,cAAc,KAAK,QAAQ,eAAe;iBACxH,kBAAkB,QAAQ,cAAc,MAAM,eAAe,mBAAmB;;;;;;;;;;;;;iBCnehF,uBAAuB,aAAa,0BAA0B;;;iBAG9D,gBAAgB,UAAU,SAAS,cAAc;iBACjD,8BAA8B,UAAU,yBAAyB,UAAU,SAAS;iBACpF,kCAAkC,UAAU,yBAAyB,UAAU,SAAS;;;;;;;;;;;;iBAYxF,aAAa,KAAK,SAAS,QAAQ,aAAa,SAAS,aAAa,mBAAmB,UAAU,SAAS,aAAa,WAAW,aAAa,OAAO,iBAAiB;;;UAGhL;WACC;WACA;WACA,YAAY;WACZ;WACA;aACE;aACA;;;iBAGI,QAAQ,UAAU,iBAAiB;;;UAG1C;WACC;aACE;aACA;aACA;aACA;aACA;;WAEF;;;;;;;;;;;;;;;;iBAgBM,MAAM,UAAU,eAAe"}
@@ -1,7 +1,7 @@
1
1
  import { t as Index } from "./sql-index-ByAAE7K8-BpbPBWPD.mjs";
2
2
  import "./types-Uv3oTMAb.mjs";
3
3
  import { S as StorageColumnScopeField, o as Expression, x as ScopeField } from "./expression-Ck1wys3N-RNyviMcU.mjs";
4
- //#region ../../../2-sql/4-lanes/relational-core/dist/exports/index-reference.d.mts
4
+ //#region ../../../2-sql/4-lanes/relational-core/dist/index-reference-DJX-CNsb.d.mts
5
5
  //#region src/index-reference.d.ts
6
6
  /**
7
7
  * An index of a table as a query reads it: its columns, bound to the table's alias, its type and its options. A query operation that searches what an index covers, such as Postgres's `fullTextMatches`, takes it in place of the columns and settings the index was built with.
@@ -33,6 +33,12 @@ type IndexOptionsOf<I> = I extends {
33
33
  /** The indexes of `I` whose authored name is `Key`. */
34
34
  type IndexesNamed<I, Key> = I extends unknown ? AuthoredIndexName<I> extends Key ? I : never : never;
35
35
  type IsUnion<T, Whole = T> = T extends unknown ? ([Whole] extends [T] ? false : true) : never;
36
+ /** The authored names of the indexes in `I` of type `Type`, leaving out a name another index in `I` shares. */
37
+ type UniqueIndexNamesOfType<I, Type extends string> = { [Key in AuthoredIndexName<Extract<I, {
38
+ readonly type: Type;
39
+ }>>]: true extends IsUnion<IndexesNamed<I, Key>> ? never : Key; }[AuthoredIndexName<Extract<I, {
40
+ readonly type: Type;
41
+ }>>];
36
42
  /**
37
43
  * A storage table's indexes, keyed by the name the contract source gave each: the `name:` prefix, or the `map:` name. An unnamed index, such as a derived foreign-key backing index, appears under its default prefix. A name that more than one index shares is left out, as reading it is refused at runtime.
38
44
  */
@@ -49,10 +55,13 @@ interface IndexReferencesInput {
49
55
  /** The column of the table as this query reads it: under the table's alias, with its codec. */
50
56
  readonly column: (columnName: string) => Expression<ScopeField>;
51
57
  }
58
+ type NamedIndex = Pick<Index, 'name' | 'prefix' | 'type'>;
59
+ /** The authored names of the indexes of type `type`, leaving out a name another index shares. The run-time counterpart of `UniqueIndexNamesOfType`. */
60
+ declare function uniqueIndexNamesOfType(indexes: ReadonlyArray<NamedIndex>, type: string): readonly string[];
52
61
  /**
53
62
  * The index references of a table, keyed by authored name. A name more than one index shares throws `ORM.ARGUMENT_INVALID` when it is read.
54
63
  */
55
64
  declare function createIndexReferences(input: IndexReferencesInput): Readonly<Record<string, IndexReference>>;
56
65
  //#endregion
57
- export { createIndexReferences as i, IndexReferencesInput as n, TableIndexReferences as r, IndexReference as t };
58
- //# sourceMappingURL=index-reference-CflkzYSd.d.mts.map
66
+ export { createIndexReferences as a, UniqueIndexNamesOfType as i, IndexReferencesInput as n, uniqueIndexNamesOfType as o, TableIndexReferences as r, IndexReference as t };
67
+ //# sourceMappingURL=index-reference-DJX-CNsb-D2qUlYq2.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-reference-DJX-CNsb-D2qUlYq2.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/index-reference-DJX-CNsb.d.mts"],"mappings":";;;;;;;;UAMU,eAAe,gBAAgB,SAAS,eAAe,WAAW,gBAAgB,SAAS,eAAe,WAAW,eAAe,sDAAsD,gBAAgB,SAAS,uCAAuC,SAAS;;WAElQ,SAAS;WACT,MAAM;WACN,SAAS;;;KAGf,kBAAkB,KAAK;WACjB,cAAc;IACrB,SAAS;WACF,YAAY;IACnB;KACC,uBAAuB,SAAS,KAAK;WAC/B,eAAe;gBACV,UAAU,uBAAuB,qBAAqB,UAAU,QAAQ;WAC7E;WACA;IACP,WAAW,wBAAwB,QAAQ,+BAA+B;KACzE,YAAY,KAAK;WACX,YAAY;IACnB;KACC,eAAe,KAAK;WACd,eAAe,gBAAgB;IACtC;;KAEC,aAAa,GAAG,OAAO,oBAAoB,kBAAkB,WAAW,MAAM;KAC9E,QAAQ,GAAG,QAAQ,KAAK,sBAAsB,gBAAgB;;KAE9D,uBAAuB,GAAG,0BAA0B,OAAO,kBAAkB,QAAQ;WAC/E,MAAM;mBACE,QAAQ,aAAa,GAAG,gBAAgB,OAAO,kBAAkB,QAAQ;WACjF,MAAM;;;;;KAKZ,qBAAqB,SAAS;WACxB,yBAAyB;WACzB,eAAe;gBACV,OAAO,kBAAkB,mBAAmB,QAAQ,aAAa,GAAG,gBAAgB,MAAM,eAAe,uBAAuB,SAAS,aAAa,GAAG,OAAO,YAAY,aAAa,GAAG,OAAO,eAAe,aAAa,GAAG;UACxO;WACC;WACA;WACA;aACE,SAAS,cAAc,KAAK;;;WAG9B,SAAS,uBAAuB,WAAW;;KAEjD,aAAa,KAAK;;iBAEN,uBAAuB,SAAS,cAAc,aAAa;;;;iBAI3D,sBAAsB,OAAO,uBAAuB,SAAS,eAAe"}
@@ -1,12 +1,25 @@
1
1
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
2
2
  //#region ../../../2-sql/4-lanes/relational-core/dist/exports/index-reference.mjs
3
+ /** The name the contract source gave an index: the prefix of a wire name, or an exact (`map:`) name. */
4
+ function authoredIndexName(index) {
5
+ return index.prefix ?? index.name;
6
+ }
7
+ /** The authored names of the indexes of type `type`, leaving out a name another index shares. The run-time counterpart of `UniqueIndexNamesOfType`. */
8
+ function uniqueIndexNamesOfType(indexes, type) {
9
+ const counts = /* @__PURE__ */ new Map();
10
+ for (const index of indexes) {
11
+ const name = authoredIndexName(index);
12
+ counts.set(name, (counts.get(name) ?? 0) + 1);
13
+ }
14
+ return indexes.filter((index) => index.type === type && counts.get(authoredIndexName(index)) === 1).map(authoredIndexName);
15
+ }
3
16
  /**
4
17
  * The index references of a table, keyed by authored name. A name more than one index shares throws `ORM.ARGUMENT_INVALID` when it is read.
5
18
  */
6
19
  function createIndexReferences(input) {
7
20
  const byName = /* @__PURE__ */ new Map();
8
21
  for (const index of input.table.indexes) {
9
- const authoredName = index.prefix ?? index.name;
22
+ const authoredName = authoredIndexName(index);
10
23
  const columns = Object.fromEntries((index.columns ?? []).map((column) => [column, input.column(column)]));
11
24
  const reference = Object.freeze({
12
25
  columns: Object.freeze(columns),
@@ -37,6 +50,6 @@ function ambiguousIndexName(input, authoredName) {
37
50
  });
38
51
  }
39
52
  //#endregion
40
- export { createIndexReferences as t };
53
+ export { uniqueIndexNamesOfType as n, createIndexReferences as t };
41
54
 
42
- //# sourceMappingURL=index-reference-D693Lu-E.mjs.map
55
+ //# sourceMappingURL=index-reference-DR62gjQS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-reference-DR62gjQS.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/index-reference.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\n//#region src/index-reference.ts\n/** The name the contract source gave an index: the prefix of a wire name, or an exact (`map:`) name. */\nfunction authoredIndexName(index) {\n\treturn index.prefix ?? index.name;\n}\n/** The authored names of the indexes of type `type`, leaving out a name another index shares. The run-time counterpart of `UniqueIndexNamesOfType`. */\nfunction uniqueIndexNamesOfType(indexes, type) {\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const index of indexes) {\n\t\tconst name = authoredIndexName(index);\n\t\tcounts.set(name, (counts.get(name) ?? 0) + 1);\n\t}\n\treturn indexes.filter((index) => index.type === type && counts.get(authoredIndexName(index)) === 1).map(authoredIndexName);\n}\n/**\n* The index references of a table, keyed by authored name. A name more than one index shares throws `ORM.ARGUMENT_INVALID` when it is read.\n*/\nfunction createIndexReferences(input) {\n\tconst byName = /* @__PURE__ */ new Map();\n\tfor (const index of input.table.indexes) {\n\t\tconst authoredName = authoredIndexName(index);\n\t\tconst columns = Object.fromEntries((index.columns ?? []).map((column) => [column, input.column(column)]));\n\t\tconst reference = Object.freeze({\n\t\t\tcolumns: Object.freeze(columns),\n\t\t\ttype: index.type,\n\t\t\toptions: index.options\n\t\t});\n\t\tbyName.set(authoredName, [...byName.get(authoredName) ?? [], reference]);\n\t}\n\tconst references = {};\n\tfor (const [authoredName, [reference, ...others]] of byName) Object.defineProperty(references, authoredName, {\n\t\tenumerable: true,\n\t\tget: () => {\n\t\t\tif (others.length > 0) throw ambiguousIndexName(input, authoredName);\n\t\t\treturn reference;\n\t\t}\n\t});\n\treturn Object.freeze(references);\n}\nfunction ambiguousIndexName(input, authoredName) {\n\treturn structuredError(\"ORM.ARGUMENT_INVALID\", `Table \"${input.tableName}\" has more than one index named \"${authoredName}\".`, {\n\t\twhy: \"An index is read by the name its contract source gave it, and these indexes share that name.\",\n\t\tfix: `Give each of these indexes of table \"${input.tableName}\" its own name in the contract source.`,\n\t\tmeta: {\n\t\t\tnamespaceId: input.namespaceId,\n\t\t\ttableName: input.tableName,\n\t\t\tindex: authoredName\n\t\t}\n\t});\n}\n//#endregion\nexport { createIndexReferences, uniqueIndexNamesOfType };\n\n//# sourceMappingURL=index-reference.mjs.map"],"mappings":";;;AAGA,SAAS,kBAAkB,OAAO;CACjC,OAAO,MAAM,UAAU,MAAM;AAC9B;;AAEA,SAAS,uBAAuB,SAAS,MAAM;CAC9C,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,SAAS,SAAS;EAC5B,MAAM,OAAO,kBAAkB,KAAK;EACpC,OAAO,IAAI,OAAO,OAAO,IAAI,IAAI,KAAK,KAAK,CAAC;CAC7C;CACA,OAAO,QAAQ,QAAQ,UAAU,MAAM,SAAS,QAAQ,OAAO,IAAI,kBAAkB,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,iBAAiB;AAC1H;;;;AAIA,SAAS,sBAAsB,OAAO;CACrC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,SAAS,MAAM,MAAM,SAAS;EACxC,MAAM,eAAe,kBAAkB,KAAK;EAC5C,MAAM,UAAU,OAAO,aAAa,MAAM,WAAW,CAAC,EAAA,CAAG,KAAK,WAAW,CAAC,QAAQ,MAAM,OAAO,MAAM,CAAC,CAAC,CAAC;EACxG,MAAM,YAAY,OAAO,OAAO;GAC/B,SAAS,OAAO,OAAO,OAAO;GAC9B,MAAM,MAAM;GACZ,SAAS,MAAM;EAChB,CAAC;EACD,OAAO,IAAI,cAAc,CAAC,GAAG,OAAO,IAAI,YAAY,KAAK,CAAC,GAAG,SAAS,CAAC;CACxE;CACA,MAAM,aAAa,CAAC;CACpB,KAAK,MAAM,CAAC,cAAc,CAAC,WAAW,GAAG,YAAY,QAAQ,OAAO,eAAe,YAAY,cAAc;EAC5G,YA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