@prisma/orm-family-sql 8.0.0-rc.17-dev.21 → 8.0.0-rc.17-dev.22

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 (61) hide show
  1. package/dist/builder.d.mts +3 -2
  2. package/dist/builder__runtime.d.mts +7 -24
  3. package/dist/builder__runtime.d.mts.map +1 -1
  4. package/dist/builder__runtime.mjs +61 -185
  5. package/dist/builder__runtime.mjs.map +1 -1
  6. package/dist/builder__types.d.mts +4 -2
  7. package/dist/{db-DB1FVK1P-DbwoL7vg.d.mts → db-BmrN9nRS-DEogPltL.d.mts} +11 -97
  8. package/dist/db-BmrN9nRS-DEogPltL.d.mts.map +1 -0
  9. package/dist/expression-CNBCbbzU-BG3rv8Wb.d.mts +22 -0
  10. package/dist/expression-CNBCbbzU-BG3rv8Wb.d.mts.map +1 -0
  11. package/dist/{expression-CvXfXCGs.d.mts → expression-Ck1wys3N-RNyviMcU.d.mts} +15 -3
  12. package/dist/expression-Ck1wys3N-RNyviMcU.d.mts.map +1 -0
  13. package/dist/expression-DWcDQHh9.d.mts +2 -0
  14. package/dist/{expression-JOe6lo4g.mjs → expression-impl-B-XNINxr-vYwKVFeP.mjs} +26 -3
  15. package/dist/expression-impl-B-XNINxr-vYwKVFeP.mjs.map +1 -0
  16. package/dist/functions-0YWByawj.mjs +88 -0
  17. package/dist/functions-0YWByawj.mjs.map +1 -0
  18. package/dist/functions-CJ8Yf8uL.d.mts +73 -0
  19. package/dist/functions-CJ8Yf8uL.d.mts.map +1 -0
  20. package/dist/{index-BzAG1PFV.d.mts → index-ZHk0SsBA.d.mts} +5 -5
  21. package/dist/{index-BzAG1PFV.d.mts.map → index-ZHk0SsBA.d.mts.map} +1 -1
  22. package/dist/index-reference-CflkzYSd.d.mts +58 -0
  23. package/dist/index-reference-CflkzYSd.d.mts.map +1 -0
  24. package/dist/index-reference-D693Lu-E.mjs +42 -0
  25. package/dist/index-reference-D693Lu-E.mjs.map +1 -0
  26. package/dist/orm-client.d.mts +96 -26
  27. package/dist/orm-client.d.mts.map +1 -1
  28. package/dist/orm-client.mjs +172 -8
  29. package/dist/orm-client.mjs.map +1 -1
  30. package/dist/{prepared-statement-YtgdlN7e-D4MSU3i0.d.mts → prepared-statement-YtgdlN7e-DqHHwo30.d.mts} +8 -7
  31. package/dist/prepared-statement-YtgdlN7e-DqHHwo30.d.mts.map +1 -0
  32. package/dist/query-lane-context-BsZs5lvB.d.mts +1 -0
  33. package/dist/{query-lane-context-CJoNBspB--ieuKEei.d.mts → query-lane-context-C2AXsoFa-COSQOvZz.d.mts} +7 -2
  34. package/dist/query-lane-context-C2AXsoFa-COSQOvZz.d.mts.map +1 -0
  35. package/dist/relational-core.d.mts +7 -6
  36. package/dist/relational-core.mjs +2 -2
  37. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  38. package/dist/relational-core__codec-descriptor-registry.d.mts +1 -1
  39. package/dist/relational-core__expression.d.mts +4 -2
  40. package/dist/relational-core__expression.mjs +2 -2
  41. package/dist/relational-core__functions.d.mts +2 -0
  42. package/dist/relational-core__functions.mjs +2 -0
  43. package/dist/relational-core__index-reference.d.mts +2 -0
  44. package/dist/relational-core__index-reference.mjs +2 -0
  45. package/dist/relational-core__query-lane-context.d.mts +2 -2
  46. package/dist/relational-core__types.d.mts +2 -2
  47. package/dist/runtime.d.mts +3 -3
  48. package/dist/runtime.mjs +2 -1
  49. package/dist/runtime.mjs.map +1 -1
  50. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  51. package/dist/{types-BJQcLx-8-BHNxJ_df.d.mts → types-D09NAayg-CNrpjo7Z.d.mts} +3 -3
  52. package/dist/{types-BJQcLx-8-BHNxJ_df.d.mts.map → types-D09NAayg-CNrpjo7Z.d.mts.map} +1 -1
  53. package/dist/types-DAkmn9FV.d.mts +1 -0
  54. package/package.json +20 -18
  55. package/dist/db-DB1FVK1P-DbwoL7vg.d.mts.map +0 -1
  56. package/dist/expression-CvXfXCGs.d.mts.map +0 -1
  57. package/dist/expression-JOe6lo4g.mjs.map +0 -1
  58. package/dist/prepared-statement-YtgdlN7e-D4MSU3i0.d.mts.map +0 -1
  59. package/dist/query-lane-context-CJoNBspB--ieuKEei.d.mts.map +0 -1
  60. package/dist/query-lane-context-DNt2DeQu.d.mts +0 -1
  61. package/dist/types-BCPHaykc.d.mts +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-BmrN9nRS-DEogPltL.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/sql-builder/dist/db-BmrN9nRS.d.mts"],"mappings":";;;;;;;;;;;;;;KAQK,YAAY,cAAc,UAAU,UAAU,qBAAqB,WAAW;cACrE;KACT,OAAO,QAAQ,WAAW,IAAI,EAAE;KAChC,WAAW,cAAc;KACzB,aAAa,eAAe;KAC5B;EACH,UAAU;EACV,YAAY,eAAe;;KAExB,WAAW,YAAY,YAAY;YAC5B;IACR,UAAU;IACV,YAAY,OAAO,OAAO;;EAE5B,qBAAqB;EACrB,YAAY;;KAET,aAAa,qBAAqB,cAAc;EACnD,UAAU,yBAAyB;EACnC,eAAe,KAAK,OAAO,yBAAyB;;KAEjD,yBAAyB,UAAU,mBAAqB,WAAW,eAAe,wBAAwB,aAAa;KACvH,YAAY,UAAU,OAAO,UAAU;EAC1C,UAAU,OAAO,KAAK,qBAAqB,iBAAiB,KAAK,qBAAqB;EACtF,YAAY,OAAO,kBAAkB;;KAElC,YAAY,UAAU,OAAO,uBAAuB;EACvD,UAAU;EACV,YAAY,OAAO,KAAK,iBAAiB,UAAU,OAAO,QAAQ,gBAAgB;;KAE/E,mBAAmB,UAAU,iBAAiB,WAAW;EAC5D,SAAS,EAAE;EACX;;KAEG,cAAc,UAAU;EAC3B,UAAU,mBAAmB;EAC7B,eAAe,mBAAmB,kBAAkB,mBAAmB,gBAAgB;;KAEpF;WACM,YAAY;WACZ,cAAc,eAAe;WAC7B,qBAAqB;WACrB,2BAA2B;;WAE3B,gBAAgB;;;;KAItB,UA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ys3N-RNyviMcU.mjs";
3
+ //#region ../../../2-sql/4-lanes/relational-core/dist/expression-CNBCbbzU.d.mts
4
+ //#region src/expression-impl.d.ts
5
+ /**
6
+ * Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.
7
+ *
8
+ * `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.
9
+ *
10
+ * `projectionAst` carries the descriptor-lowered rendering of the expression, where a target declares one (e.g. SQLite's `CAST(count(*) AS TEXT)`). Lowering exists to carry the value across the driver boundary, so only the projection site consumes it — predicate and ordering positions (`buildAst()`) keep the plain form, where the rendering would change SQL semantics.
11
+ */
12
+ declare class ExpressionImpl<T extends ScopeField = ScopeField> implements Expression<T> {
13
+ private readonly ast;
14
+ private readonly projectionAst;
15
+ readonly returnType: T;
16
+ constructor(ast: AnyExpression, returnType: T, projectionAst?: AnyExpression);
17
+ buildAst(): AnyExpression;
18
+ buildProjectionAst(): AnyExpression;
19
+ }
20
+ //#endregion
21
+ export { ExpressionImpl as t };
22
+ //# sourceMappingURL=expression-CNBCbbzU-BG3rv8Wb.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-CNBCbbzU-BG3rv8Wb.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/expression-CNBCbbzU.d.mts"],"mappings":";;;;;;;;;;;cAUc,eAAe,UAAU,aAAa,uBAAuB,WAAW;mBACnE;mBACA;WACR,YAAY;EACrB,YAAY,KAAK,eAAe,YAAY,GAAG,gBAAgB;EAC/D,YAAY;EACZ,sBAAsB"}
@@ -7,7 +7,7 @@ import { l as SqlStatementStats } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
7
7
  import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
8
8
  import { Contract } from "@prisma/orm-framework/contract/types";
9
9
  import { ParamSpec } from "@prisma/orm-framework/operations";
10
- //#region ../../../2-sql/4-lanes/relational-core/dist/exports/expression.d.mts
10
+ //#region ../../../2-sql/4-lanes/relational-core/dist/expression-Ck1wys3N.d.mts
11
11
  //#region src/expression.d.ts
12
12
  type ScopeField = {
13
13
  codecId: string;
@@ -25,6 +25,18 @@ type ScopeField = {
25
25
  */
26
26
  codec?: CodecRef$1;
27
27
  };
28
+ /** A storage column as a scope field: its codec id, its nullability, and `many` for a list column. */
29
+ type StorageColumnScopeField<Column extends {
30
+ readonly codecId: string;
31
+ readonly nullable: boolean;
32
+ }> = {
33
+ codecId: Column['codecId'];
34
+ nullable: Column['nullable'];
35
+ } & (Column extends {
36
+ many: true;
37
+ } ? {
38
+ many: true;
39
+ } : Record<never, never>);
28
40
  type CodecTypesBase = Record<string, {
29
41
  readonly input: unknown;
30
42
  readonly output: unknown;
@@ -262,5 +274,5 @@ type RawSqlInterpolation = RawExprInterpolation | RawRowQuery;
262
274
  declare function createRawSql(adapter: RawCodecInferer, planContext: RawPlanContext): RawSqlStatementTag;
263
275
  declare function createRawSql(adapter: RawCodecInferer): RawSqlTag;
264
276
  //#endregion
265
- export { buildOperation as C, param as D, isExpression as E, toExpr as O, TraitExpression as S, createRawSql as T, RawSqlStatementBuilder as _, CodecValue as a, ScalarListExpression as b, RawAffectedCountQuery as c, RawRow as d, RawRowQuery as f, RawSqlInterpolation as g, RawSqlBuilder as h, CodecTypesBase as i, RawCodecInferer as l, RawRowSpecEntry as m, BuildOperationSpec as n, Expression as o, RawRowSpec as p, CodecExpression as r, NoReservedRowColumn as s, AffectedCount as t, RawPlanContext as u, RawSqlStatementTag as v, codecOf as w, ScopeField as x, RawSqlTag as y };
266
- //# sourceMappingURL=expression-CvXfXCGs.d.mts.map
277
+ export { TraitExpression as C, isExpression as D, createRawSql as E, param as O, StorageColumnScopeField as S, codecOf as T, RawSqlStatementBuilder as _, CodecValue as a, ScalarListExpression as b, RawAffectedCountQuery as c, RawRow as d, RawRowQuery as f, RawSqlInterpolation as g, RawSqlBuilder as h, CodecTypesBase as i, toExpr as k, RawCodecInferer as l, RawRowSpecEntry as m, BuildOperationSpec as n, Expression as o, RawRowSpec as p, CodecExpression as r, NoReservedRowColumn as s, AffectedCount as t, RawPlanContext as u, RawSqlStatementTag as v, buildOperation as w, ScopeField as x, RawSqlTag as y };
278
+ //# sourceMappingURL=expression-Ck1wys3N-RNyviMcU.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-Ck1wys3N-RNyviMcU.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/expression-Ck1wys3N.d.mts"],"mappings":";;;;;;;;;;;KAQK;EACH;EACA;;;;;;;;EAQA;;;;EAIA,QAAQ;;;KAGL,wBAAwB;WAClB;WACA;;EAET,SAAS;EACT,UAAU;KACP;EACH;;EAEA;IACE;KACC,iBAAiB;WACX;WACA;;;;;KAKN,WAAW,UAAU,cAAc;WAC7B,YAAY;EACrB,YAAY;;KAET,kBAAkB,WAAW;WACvB;IACP,+CAA+C,WAAW,cAAc,GAAG;WACpE,cAAc;KACpB,iCAAiC,KAAK,2BAA2B;KACjE,WAAW,KAAK;;;;;KAKhB,WAAW,wBAAwB,0BAA0B,WAAW;WAClE;OACJ,sBAAsB,KAAK,GAAG,6BAA6B,WAAW;;;;;;;;;;;;;;;KAexE,gBAAgB,wBAAwB,0BAA0B,WAAW;WACvE;MACL;EACJ,SAAS;EACT,UAAU;EACV;KACG,WAAW,SAAS,UAAU;;;;;;;KAO9B,qBAAqB,wBAAwB,4BAA4B;EAC5E,SAAS;EACT,UAAU;EACV;;;;;;;KAOG,gBAAgB,kCAAkC,0BAA0B,WAAW;WACjF;MACL,gBAAgB,kBAAkB,IAAI,SAAS,UAAU;;;;;;;;iBAQ9C,OAAO,gBAAgB,QAAQ,aAAW;;;;iBAI1C,MAAM,GAAG,OAAO,GAAG;EAClC;IACE;;;;;;;;;;iBAUa,QAAQ,iBAAiB;iBACzB,aAAa,iBAAiB,SAAS,WAAW;UACzD,mBAAmB,UAAU;WAC5B;;;;WAIA,gBAAgB,kBAAkB;WAClC,SAAS,IAAI;WACb,UAAU;;;;;iBAKJ,eAAe,UAAU,YAAY,MAAM,mBAAmB,KAAK,WAAW;;;;;;;;;;;;;UAarF;EACR,WAAW,OAAO;;;UAGV;EACR,QAAQ,kBAAkB,MAAM,IAAI;IAClC,SAAS;IACT;;EAEF,QAAQ,kBAAkB,2BAA2B;aAC1C,SAAS;aACT,WAAW;MAClB;IACF,SAAS;IACT,UAAU;;;;;;;;;KAST;WACM;WACA;;;;;;;;;KASN;WACM;;;KAGN,aAAa,SAAS,eAAe,oBAAoB;;;;;;KAMzD,OAAO,aAAa,0BAA0B,WAAW;;;;;UAKpD;WACC,UAAU,SAAS;WACnB;;;;;;;;;;UAUD,YAAY,eAAe,aAAa,SAAS,eAAe,mBAAmB,SAAS,eAAe;;;;;;;;;WAS1G,SAAS;EAClB,YAAY;EACZ,SAAS,aAAa;;cAEV;;;;;;;;;;UAUJ,sBAAsB;YACpB;;;;;;;;UAQF;EACR,SAAS,aAAa;;;;;;;UAOd,+BAA+B;EACvC,WAAW,aAAa,YAAY,MAAM,OAAO,YAAY,OAAO;EACpE,iBAAiB;;;KAGd,aAAa,SAAS,yBAAyB,QAAQ,0BAA0B;;KAEjF,sBAAsB,SAAS,yBAAyB,QAAQ,0BAA0B;;KAE1F,uBAAuB,WAAW,cAAc,WAAW;;KAE3D,sBAAsB,uBAAuB;;;;;;;;iBAQjC,aAAa,SAAS,iBAAiB,aAAa,iBAAiB;iBACrE,aAAa,SAAS,kBAAkB"}
@@ -0,0 +1,2 @@
1
+ import "./expression-Ck1wys3N-RNyviMcU.mjs";
2
+ import "./expression-CNBCbbzU-BG3rv8Wb.mjs";
@@ -2,7 +2,7 @@ import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } fro
2
2
  import { t as planFromAst } from "./plan-Dh0LbYIv-Crx5-ThG.mjs";
3
3
  import { runtimeError } from "@prisma/orm-framework/components/runtime";
4
4
  import { invariant } from "@prisma/orm-framework/utils/assertions";
5
- //#region ../../../2-sql/4-lanes/relational-core/dist/exports/expression.mjs
5
+ //#region ../../../2-sql/4-lanes/relational-core/dist/expression-impl-B-XNINxr.mjs
6
6
  /**
7
7
  * Resolve a raw value or an Expression into an AST expression node.
8
8
  *
@@ -142,7 +142,30 @@ var RawSqlStatementBuilderImpl = class extends RawSqlBuilderImpl {
142
142
  return planFromAst(node, this.planContext.contract, this.planContext.laneId);
143
143
  }
144
144
  };
145
+ /**
146
+ * Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.
147
+ *
148
+ * `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.
149
+ *
150
+ * `projectionAst` carries the descriptor-lowered rendering of the expression, where a target declares one (e.g. SQLite's `CAST(count(*) AS TEXT)`). Lowering exists to carry the value across the driver boundary, so only the projection site consumes it — predicate and ordering positions (`buildAst()`) keep the plain form, where the rendering would change SQL semantics.
151
+ */
152
+ var ExpressionImpl = class {
153
+ ast;
154
+ projectionAst;
155
+ returnType;
156
+ constructor(ast, returnType, projectionAst) {
157
+ this.ast = ast;
158
+ this.returnType = returnType;
159
+ this.projectionAst = projectionAst;
160
+ }
161
+ buildAst() {
162
+ return this.ast;
163
+ }
164
+ buildProjectionAst() {
165
+ return this.projectionAst ?? this.ast;
166
+ }
167
+ };
145
168
  //#endregion
146
- export { param as a, isExpression as i, codecOf as n, toExpr as o, createRawSql as r, buildOperation as t };
169
+ export { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };
147
170
 
148
- //# sourceMappingURL=expression-JOe6lo4g.mjs.map
171
+ //# sourceMappingURL=expression-impl-B-XNINxr-vYwKVFeP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expression-impl-B-XNINxr-vYwKVFeP.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/expression-impl-B-XNINxr.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-NTQsD2MS.mjs\";\nimport { t as planFromAst } from \"./plan-Dh0LbYIv.mjs\";\nimport { runtimeError } from \"@internal/framework-components/runtime\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/expression.ts\n/**\n* Resolve a raw value or an Expression into an AST expression node.\n*\n* When `value` is an object with a callable `buildAst`, the AST it wraps is returned. Otherwise the value is embedded as a ParamRef tagged with the caller-supplied {@link CodecRef} (when known). The runtime resolves the ref via `contractCodecs.forCodecRef(codec)`; content-keyed memoisation collapses repeated lookups for the same logical column onto one shared codec.\n*\n* Operation implementations that compare a column-bound expression to a user value derive the column's {@link CodecRef} from the column-bound side (via {@link codecOf}) and forward it here so encode-side dispatch resolves to the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction toExpr(value, codec) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (codec === void 0) throw runtimeError(\"RUNTIME.PARAM_REF_CODEC_REQUIRED\", `Cannot construct a ParamRef for a ${value === null ? \"null\" : typeof value} value without an explicit codec. Provide a CodecRef at the call site or use a column-bound builder path.`);\n\treturn ParamRef.of(value, { codec });\n}\n/**\n* Construct a `ParamRef` for a value whose codec identity is known at call time. Use this when interpolating a value into a raw SQL expression and the codec cannot be inferred from context — e.g. `param(myDate, { codecId: 'pg/timestamptz-temporal@1' })`.\n*/\nfunction param(value, opts) {\n\treturn ParamRef.of(value, { codec: { codecId: opts.codecId } });\n}\n/**\n* Derive the {@link CodecRef} carried by an expression-like value.\n*\n* Resolution order:\n* 1. `wrapper.returnType.codec` — scope-level codec when the scope was built from contract storage.\n* 2. `{ codecId: wrapper.returnType.codecId }` — minimal ref derived from the expression's declared codec id (covers synthetic expressions like `count()` whose returnType has a known codec id but no explicit column binding).\n*\n* Returns `undefined` for raw scalar values (non-expression-like).\n*/\nfunction codecOf(value) {\n\tif (!isExpression(value)) return void 0;\n\treturn value.returnType?.codec ?? (value.returnType?.codecId ? { codecId: value.returnType.codecId } : void 0);\n}\nfunction isExpression(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\";\n}\n/**\n* Construct an OperationExpr AST node and wrap it as a typed Expression. Operation implementations use this to turn their user-facing arguments into the AST node the compilation pipeline eventually lowers to SQL.\n*/\nfunction buildOperation(spec) {\n\tconst [self, ...rest] = spec.args;\n\tconst op = new OperationExpr({\n\t\tmethod: spec.method,\n\t\tself,\n\t\targs: rest.length > 0 ? rest : void 0,\n\t\treturns: spec.returns,\n\t\tlowering: spec.lowering\n\t});\n\treturn {\n\t\treturnType: spec.returns,\n\t\tbuildAst: () => op\n\t};\n}\nfunction resolveInterpolation(adapter, value) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (value instanceof ParamRef) return value;\n\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"string\" || typeof value === \"boolean\" || value instanceof Uint8Array) return ParamRef.of(value, { codec: { codecId: adapter.inferCodec(value) } });\n\tthrow runtimeError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\");\n}\nfunction isRawRowQuery(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\" && \"build\" in value && typeof value.build === \"function\";\n}\nfunction templateParts(adapter, strings, values) {\n\tconst parts = [strings[0] ?? \"\"];\n\tvalues.forEach((value, i) => {\n\t\tif (isRawRowQuery(value)) parts.push(...value.buildAst().parts);\n\t\telse parts.push(resolveInterpolation(adapter, value));\n\t\tparts.push(strings[i + 1] ?? \"\");\n\t});\n\treturn parts;\n}\n/**\n* Normalizes each authored entry to a {@link RawQueryColumn}. The record is\n* assembled with `Object.fromEntries`, which defines each key as an own\n* property: a spec built at runtime with a `__proto__` key reaches the AST,\n* which refuses it by name, rather than silently setting the record's\n* prototype and leaving the column to vanish.\n*/\nfunction resolveRowSpec(spec) {\n\treturn Object.fromEntries(Object.entries(spec).map(([name, entry]) => [name, typeof entry === \"string\" ? {\n\t\tcodecId: entry,\n\t\tnullable: false\n\t} : {\n\t\tcodecId: entry.codecId,\n\t\tnullable: entry.nullable ?? false\n\t}]));\n}\nfunction createRawSql(adapter, planContext) {\n\tif (planContext === void 0) return (strings, ...values) => new RawSqlBuilderImpl(templateParts(adapter, strings, values));\n\tconst context = planContext;\n\treturn (strings, ...values) => new RawSqlStatementBuilderImpl(templateParts(adapter, strings, values), context);\n}\nvar RawSqlBuilderImpl = class {\n\tparts;\n\tconstructor(parts) {\n\t\tthis.parts = parts;\n\t}\n\treturns(spec) {\n\t\tconst codecId = typeof spec === \"string\" ? spec : spec.codecId;\n\t\tconst nullable = typeof spec === \"string\" ? false : spec.nullable ?? false;\n\t\tconst paramSpec = {\n\t\t\tcodecId,\n\t\t\tnullable\n\t\t};\n\t\tconst node = new RawExpr({\n\t\t\tparts: this.parts,\n\t\t\treturns: paramSpec\n\t\t});\n\t\treturn {\n\t\t\treturnType: {\n\t\t\t\tcodecId,\n\t\t\t\tnullable\n\t\t\t},\n\t\t\tbuildAst: () => node\n\t\t};\n\t}\n};\nvar RawSqlStatementBuilderImpl = class extends RawSqlBuilderImpl {\n\tplanContext;\n\tconstructor(parts, planContext) {\n\t\tsuper(parts);\n\t\tthis.planContext = planContext;\n\t}\n\treturnsRow(spec) {\n\t\tconst node = RawQueryAst.rows(this.parts, resolveRowSpec(spec));\n\t\tconst result = node.result;\n\t\tinvariant(result.kind === \"rows\", \"RawQueryAst.rows built a non-rows result\");\n\t\treturn {\n\t\t\treturns: result.columns,\n\t\t\tbuildAst: () => node,\n\t\t\tbuild: () => this.planFor(node)\n\t\t};\n\t}\n\taffectedCount() {\n\t\tconst node = RawQueryAst.affectedCount(this.parts);\n\t\treturn { build: () => this.planFor(node) };\n\t}\n\tplanFor(node) {\n\t\treturn planFromAst(node, this.planContext.contract, this.planContext.laneId);\n\t}\n};\n//#endregion\n//#region src/expression-impl.ts\n/**\n* Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.\n*\n* `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.\n*\n* `projectionAst` carries the descriptor-lowered rendering of the expression, where a target declares one (e.g. SQLite's `CAST(count(*) AS TEXT)`). Lowering exists to carry the value across the driver boundary, so only the projection site consumes it — predicate and ordering positions (`buildAst()`) keep the plain form, where the rendering would change SQL semantics.\n*/\nvar ExpressionImpl = class {\n\tast;\n\tprojectionAst;\n\treturnType;\n\tconstructor(ast, returnType, projectionAst) {\n\t\tthis.ast = ast;\n\t\tthis.returnType = returnType;\n\t\tthis.projectionAst = projectionAst;\n\t}\n\tbuildAst() {\n\t\treturn this.ast;\n\t}\n\tbuildProjectionAst() {\n\t\treturn this.projectionAst ?? this.ast;\n\t}\n};\n//#endregion\nexport { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };\n\n//# sourceMappingURL=expression-impl-B-XNINxr.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,OAAO,OAAO,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,IAAI,UAAU,KAAK,GAAG,MAAM,aAAa,oCAAoC,qCAAqC,UAAU,OAAO,SAAS,OAAO,MAAM,0GAA0G;CACnQ,OAAO,SAAS,GAAG,OAAO,EAAE,MAAM,C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,YAAY,KAAK,KAAK,OAAO,eAAe,IAAI,CAAC;EAC9D,MAAM,SAAS,KAAK;EACpB,UAAU,OAAO,SAAS,QAAQ,0CAA0C;EAC5E,OAAO;GACN,SAAS,OAAO;GAChB,gBAAgB;GAChB,aAAa,KAAK,QAAQ,IAAI;EAC/B;CACD;CACA,gBAAgB;EACf,MAAM,OAAO,YAAY,cAAc,KAAK,KAAK;EACjD,OAAO,EAAE,aAAa,KAAK,QAAQ,IAAI,EAAE;CAC1C;CACA,QAAQ,MAAM;EACb,OAAO,YAAY,MAAM,KAAK,YAAY,UAAU,KAAK,YAAY,MAAM;CAC5E;AACD;;;;;;;;AAUA,IAAI,iBAAiB,MAAM;CAC1B;CACA;CACA;CACA,YAAY,KAAK,YAAY,eAAe;EAC3C,KAAK,MAAM;EACX,KAAK,aAAa;EAClB,KAAK,gBAAgB;CACtB;CACA,WAAW;EACV,OAAO,KAAK;CACb;CACA,qBAAqB;EACpB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD"}
@@ -0,0 +1,88 @@
1
+ import { C as LiteralExpr, E as NullCheckExpr, I as SubqueryExpr, O as OrExpr, S as ListExpression, n as AndExpr, p as ExistsExpr, r as BinaryExpr } from "./types-NTQsD2MS-DAP2yVDn.mjs";
2
+ import { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from "./expression-impl-B-XNINxr-vYwKVFeP.mjs";
3
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
4
+ //#region ../../../2-sql/4-lanes/relational-core/dist/exports/functions.mjs
5
+ const BOOL_FIELD = {
6
+ codecId: "pg/bool@1",
7
+ nullable: false
8
+ };
9
+ /**
10
+ * Resolve a binary-comparison operand into an AST expression, threading the column-bound side's {@link CodecRef} to the raw-value side.
11
+ *
12
+ * For `fns.eq(f.email, 'alice@example.com')`, `f.email` is the column-bound expression carrying a `ColumnRef` AST and a `CodecRef` derived from contract storage; the raw string operand has no codec context. By deriving the codec context from the column-bound side and forwarding it via `toExpr(value, codec)`, the resulting `ParamRef` carries the `CodecRef` that encode-side dispatch needs to materialise the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).
13
+ */
14
+ function resolveOperand(operand, otherCodec) {
15
+ if (isExpression(operand)) return operand.buildAst();
16
+ return toExpr(operand, otherCodec);
17
+ }
18
+ /**
19
+ * Resolves an Expression via `buildAst()`, or wraps a raw value as a `LiteralExpr` — an SQL literal inlined into the query text, not a bound parameter.
20
+ *
21
+ * Used for `and` / `or` operands. The usual operand is an `Expression<bool>` (e.g. the result of `fns.eq`), which this function passes through by calling `buildAst()`. The only time the raw-value branch fires is when the caller writes `fns.and(true, x)` or similar — inlining `TRUE`/`FALSE` literals lets the SQL planner statically simplify `TRUE AND x` to `x`, which it cannot do for an opaque `ParamRef`.
22
+ */
23
+ function toLiteralExpr(value) {
24
+ if (isExpression(value)) return value.buildAst();
25
+ return new LiteralExpr(value);
26
+ }
27
+ function boolExpr(astNode) {
28
+ return new ExpressionImpl(astNode, BOOL_FIELD);
29
+ }
30
+ function binaryWithSharedCodec(a, b, build) {
31
+ const aCodec = codecOf(a);
32
+ return build(resolveOperand(a, codecOf(b)), resolveOperand(b, aCodec));
33
+ }
34
+ function eq(a, b) {
35
+ if (b === null) return boolExpr(NullCheckExpr.isNull(toExpr(a)));
36
+ if (a === null) return boolExpr(NullCheckExpr.isNull(toExpr(b)));
37
+ return boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr("eq", l, r)));
38
+ }
39
+ function ne(a, b) {
40
+ if (b === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(a)));
41
+ if (a === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(b)));
42
+ return boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr("neq", l, r)));
43
+ }
44
+ function comparison(a, b, op) {
45
+ return boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(op, l, r)));
46
+ }
47
+ function inOrNotIn(expr, valuesOrSubquery, op) {
48
+ const left = expr.buildAst();
49
+ const leftCodec = codecOf(expr);
50
+ const binaryFn = op === "in" ? BinaryExpr.in : BinaryExpr.notIn;
51
+ if (Array.isArray(valuesOrSubquery)) {
52
+ const refs = valuesOrSubquery.map((v) => resolveOperand(v, leftCodec));
53
+ return boolExpr(binaryFn(left, ListExpression.of(refs)));
54
+ }
55
+ return boolExpr(binaryFn(left, SubqueryExpr.of(valuesOrSubquery.buildAst())));
56
+ }
57
+ function createBuiltinFunctions(rawCodecInferer) {
58
+ return {
59
+ eq: (a, b) => eq(a, b),
60
+ ne: (a, b) => ne(a, b),
61
+ gt: (a, b) => comparison(a, b, "gt"),
62
+ gte: (a, b) => comparison(a, b, "gte"),
63
+ lt: (a, b) => comparison(a, b, "lt"),
64
+ lte: (a, b) => comparison(a, b, "lte"),
65
+ and: (...exprs) => boolExpr(AndExpr.of(exprs.map(toLiteralExpr))),
66
+ or: (...exprs) => boolExpr(OrExpr.of(exprs.map(toLiteralExpr))),
67
+ exists: (subquery) => boolExpr(ExistsExpr.exists(subquery.buildAst())),
68
+ notExists: (subquery) => boolExpr(ExistsExpr.notExists(subquery.buildAst())),
69
+ in: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, "in"),
70
+ notIn: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, "notIn"),
71
+ raw: createRawSql(rawCodecInferer)
72
+ };
73
+ }
74
+ /**
75
+ * The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.
76
+ */
77
+ function createFunctions(operations, rawCodecInferer) {
78
+ const builtins = createBuiltinFunctions(rawCodecInferer);
79
+ return new Proxy(blindCast({}), { get(_target, prop) {
80
+ if (Object.hasOwn(builtins, prop)) return blindCast(builtins)[prop];
81
+ const op = operations[prop];
82
+ if (op) return op.impl;
83
+ } });
84
+ }
85
+ //#endregion
86
+ export { createFunctions as t };
87
+
88
+ //# sourceMappingURL=functions-0YWByawj.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions-0YWByawj.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/functions.mjs"],"sourcesContent":["import { C as LiteralExpr, E as NullCheckExpr, I as SubqueryExpr, O as OrExpr, S as ListExpression, n as AndExpr, p as ExistsExpr, r as BinaryExpr } from \"../types-NTQsD2MS.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-B-XNINxr.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/functions.ts\nconst BOOL_FIELD = {\n\tcodecId: \"pg/bool@1\",\n\tnullable: false\n};\n/**\n* Resolve a binary-comparison operand into an AST expression, threading the column-bound side's {@link CodecRef} to the raw-value side.\n*\n* For `fns.eq(f.email, 'alice@example.com')`, `f.email` is the column-bound expression carrying a `ColumnRef` AST and a `CodecRef` derived from contract storage; the raw string operand has no codec context. By deriving the codec context from the column-bound side and forwarding it via `toExpr(value, codec)`, the resulting `ParamRef` carries the `CodecRef` that encode-side dispatch needs to materialise the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction resolveOperand(operand, otherCodec) {\n\tif (isExpression(operand)) return operand.buildAst();\n\treturn toExpr(operand, otherCodec);\n}\n/**\n* Resolves an Expression via `buildAst()`, or wraps a raw value as a `LiteralExpr` — an SQL literal inlined into the query text, not a bound parameter.\n*\n* Used for `and` / `or` operands. The usual operand is an `Expression<bool>` (e.g. the result of `fns.eq`), which this function passes through by calling `buildAst()`. The only time the raw-value branch fires is when the caller writes `fns.and(true, x)` or similar — inlining `TRUE`/`FALSE` literals lets the SQL planner statically simplify `TRUE AND x` to `x`, which it cannot do for an opaque `ParamRef`.\n*/\nfunction toLiteralExpr(value) {\n\tif (isExpression(value)) return value.buildAst();\n\treturn new LiteralExpr(value);\n}\nfunction boolExpr(astNode) {\n\treturn new ExpressionImpl(astNode, BOOL_FIELD);\n}\nfunction binaryWithSharedCodec(a, b, build) {\n\tconst aCodec = codecOf(a);\n\treturn build(resolveOperand(a, codecOf(b)), resolveOperand(b, aCodec));\n}\nfunction eq(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"eq\", l, r)));\n}\nfunction ne(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"neq\", l, r)));\n}\nfunction comparison(a, b, op) {\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(op, l, r)));\n}\nfunction inOrNotIn(expr, valuesOrSubquery, op) {\n\tconst left = expr.buildAst();\n\tconst leftCodec = codecOf(expr);\n\tconst binaryFn = op === \"in\" ? BinaryExpr.in : BinaryExpr.notIn;\n\tif (Array.isArray(valuesOrSubquery)) {\n\t\tconst refs = valuesOrSubquery.map((v) => resolveOperand(v, leftCodec));\n\t\treturn boolExpr(binaryFn(left, ListExpression.of(refs)));\n\t}\n\treturn boolExpr(binaryFn(left, SubqueryExpr.of(valuesOrSubquery.buildAst())));\n}\nfunction createBuiltinFunctions(rawCodecInferer) {\n\treturn {\n\t\teq: (a, b) => eq(a, b),\n\t\tne: (a, b) => ne(a, b),\n\t\tgt: (a, b) => comparison(a, b, \"gt\"),\n\t\tgte: (a, b) => comparison(a, b, \"gte\"),\n\t\tlt: (a, b) => comparison(a, b, \"lt\"),\n\t\tlte: (a, b) => comparison(a, b, \"lte\"),\n\t\tand: (...exprs) => boolExpr(AndExpr.of(exprs.map(toLiteralExpr))),\n\t\tor: (...exprs) => boolExpr(OrExpr.of(exprs.map(toLiteralExpr))),\n\t\texists: (subquery) => boolExpr(ExistsExpr.exists(subquery.buildAst())),\n\t\tnotExists: (subquery) => boolExpr(ExistsExpr.notExists(subquery.buildAst())),\n\t\tin: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"in\"),\n\t\tnotIn: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"notIn\"),\n\t\traw: createRawSql(rawCodecInferer)\n\t};\n}\n/**\n* The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.\n*/\nfunction createFunctions(operations, rawCodecInferer) {\n\tconst builtins = createBuiltinFunctions(rawCodecInferer);\n\treturn new Proxy(blindCast({}), { get(_target, prop) {\n\t\tif (Object.hasOwn(builtins, prop)) return blindCast(builtins)[prop];\n\t\tconst op = operations[prop];\n\t\tif (op) return op.impl;\n\t} });\n}\n//#endregion\nexport { createFunctions };\n\n//# sourceMappingURL=functions.mjs.map"],"mappings":";;;;AAIA,MAAM,aAAa;CAClB,SAAS;CACT,UAAU;AACX;;;;;;AAMA,SAAS,eAAe,SAAS,YAAY;CAC5C,IAAI,aAAa,OAAO,GAAG,OAAO,QAAQ,SAAS;CACnD,OAAO,OAAO,SAAS,UAAU;AAClC;;;;;;AAMA,SAAS,cAAc,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,OAAO,IAAI,YAAY,KAAK;AAC7B;AACA,SAAS,SAAS,SAAS;CAC1B,OAAO,IAAI,eAAe,SAAS,UAAU;AAC9C;AACA,SAAS,sBAAsB,GAAG,GAAG,OAAO;CAC3C,MAAM,SAAS,QAAQ,CAAC;CACxB,OAAO,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,GAAG,eAAe,GAAG,MAAM,CAAC;AACtE;AACA,SAAS,GAAG,GAAG,GAAG;CACjB,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,CAAC,CAAC,CAAC;CAC/D,IAAI,MAAM,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,CAAC,CAAC,CAAC;CAC/D,OAAO,SAAS,sBAAsB,GAAG,IAAI,GAAG,MAAM,IAAI,WAA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C;EAChE,KAAK,GAAG,UAAU,SAAS,OAAO,GAAG,MAAM,IAAI,aAAa,CAAC,CAAC;EAC9D,SAAS,aAAa,SAAS,WAAW,OAAO,SAAS,SAAS,CAAC,CAAC;EACrE,YAAY,aAAa,SAAS,WAAW,UAAU,SAAS,SAAS,CAAC,CAAC;EAC3E,KAAK,MAAM,qBAAqB,UAAU,MAAM,kBAAkB,IAAI;EACtE,QAAQ,MAAM,qBAAqB,UAAU,MAAM,kBAAkB,OAAO;EAC5E,KAAK,aAAa,eAAe;CAClC;AACD;;;;AAIA,SAAS,gBAAgB,YAAY,iBAAiB;CACrD,MAAM,WAAW,uBAAuB,eAAe;CACvD,OAAO,IAAI,MAAM,UAAU,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,MAAM;EACpD,IAAI,OAAO,OAAO,UAAU,IAAI,GAAG,OAAO,UAAU,QAAQ,CAAC,CAAC;EAC9D,MAAM,KAAK,WAAW;EACtB,IAAI,IAAI,OAAO,GAAG;CACnB,EAAE,CAAC;AACJ"}
@@ -0,0 +1,73 @@
1
+ import { T as QueryOperationTypesBase } from "./types-DFZhLz18-Msi8wwig.mjs";
2
+ import "./types-Uv3oTMAb.mjs";
3
+ import { i as SqlOperationEntry } from "./index-We-mbWnZ.mjs";
4
+ import { Mt as SelectAst } from "./types-Sh5HuaZE-CqThc46M.mjs";
5
+ import { i as CodecTypesBase, l as RawCodecInferer, o as Expression, r as CodecExpression, x as ScopeField, y as RawSqlTag } from "./expression-Ck1wys3N-RNyviMcU.mjs";
6
+ //#region ../../../2-sql/4-lanes/relational-core/dist/exports/functions.d.mts
7
+ //#region src/functions.d.ts
8
+ type BooleanCodecType = {
9
+ codecId: 'pg/bool@1';
10
+ nullable: boolean;
11
+ };
12
+ declare const SubqueryMarker: unique symbol;
13
+ type Subquery<RowType extends Record<string, ScopeField>> = {
14
+ [SubqueryMarker]: RowType;
15
+ buildAst(): SelectAst;
16
+ getRowFields(): Record<string, ScopeField>;
17
+ };
18
+ /** What the function surface reads from a query context: the codec types and the registered query operations. */
19
+ type FunctionsContext = {
20
+ readonly codecTypes: CodecTypesBase;
21
+ readonly queryOperationTypes: QueryOperationTypesBase;
22
+ };
23
+ type DeriveExtFunctions<OT extends QueryOperationTypesBase> = { [K in keyof OT]: OT[K]['impl']; };
24
+ type BuiltinFunctions<CT extends Record<string, {
25
+ readonly input: unknown;
26
+ }>> = {
27
+ eq: <CodecId extends string>(a: CodecExpression<CodecId, boolean, CT> | null, b: CodecExpression<CodecId, boolean, CT> | null) => Expression<BooleanCodecType>;
28
+ ne: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT> | null, b: CodecExpression<CodecId, N, CT> | null) => Expression<BooleanCodecType>;
29
+ gt: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
30
+ gte: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
31
+ lt: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
32
+ lte: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
33
+ and: (...ands: CodecExpression<'pg/bool@1', boolean, CT>[]) => Expression<BooleanCodecType>;
34
+ or: (...ors: CodecExpression<'pg/bool@1', boolean, CT>[]) => Expression<BooleanCodecType>;
35
+ exists: (subquery: Subquery<Record<string, ScopeField>>) => Expression<BooleanCodecType>;
36
+ notExists: (subquery: Subquery<Record<string, ScopeField>>) => Expression<BooleanCodecType>;
37
+ in: {
38
+ <CodecId extends string>(expr: Expression<{
39
+ codecId: CodecId;
40
+ nullable: boolean;
41
+ }>, subquery: Subquery<Record<string, {
42
+ codecId: CodecId;
43
+ nullable: boolean;
44
+ }>>): Expression<BooleanCodecType>;
45
+ <CodecId extends string>(expr: Expression<{
46
+ codecId: CodecId;
47
+ nullable: boolean;
48
+ }>, values: Array<CodecExpression<CodecId, boolean, CT>>): Expression<BooleanCodecType>;
49
+ };
50
+ notIn: {
51
+ <CodecId extends string>(expr: Expression<{
52
+ codecId: CodecId;
53
+ nullable: boolean;
54
+ }>, subquery: Subquery<Record<string, {
55
+ codecId: CodecId;
56
+ nullable: boolean;
57
+ }>>): Expression<BooleanCodecType>;
58
+ <CodecId extends string>(expr: Expression<{
59
+ codecId: CodecId;
60
+ nullable: boolean;
61
+ }>, values: Array<CodecExpression<CodecId, boolean, CT>>): Expression<BooleanCodecType>;
62
+ };
63
+ readonly raw: RawSqlTag;
64
+ };
65
+ /** The functions a query's callbacks receive: the built-in ones and every query operation the contract's target and extensions register. */
66
+ type Functions<QC extends FunctionsContext> = BuiltinFunctions<QC['codecTypes']> & DeriveExtFunctions<QC['queryOperationTypes']>;
67
+ /**
68
+ * The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.
69
+ */
70
+ declare function createFunctions<QC extends FunctionsContext>(operations: Readonly<Record<string, SqlOperationEntry>>, rawCodecInferer: RawCodecInferer): Functions<QC>;
71
+ //#endregion
72
+ export { Subquery as a, FunctionsContext as i, BuiltinFunctions as n, SubqueryMarker as o, Functions as r, createFunctions as s, BooleanCodecType as t };
73
+ //# sourceMappingURL=functions-CJ8Yf8uL.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions-CJ8Yf8uL.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/functions.d.mts"],"mappings":";;;;;;;KAKK;EACH;EACA;;cAEY;KACT,SAAS,gBAAgB,eAAe;GAC1C,iBAAiB;EAClB,YAAY;EACZ,gBAAgB,eAAe;;;KAG5B;WACM,YAAY;WACZ,qBAAqB;;KAE3B,mBAAmB,WAAW,8BAA8B,WAAW,KAAK,GAAG;KAC/E,iBAAiB,WAAW;WACtB;;EAET,KAAK,wBAAwB,GAAG,gBAAgB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 -1,13 +1,13 @@
1
1
  import { l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
2
2
  import "./types-Uv3oTMAb.mjs";
3
3
  import { h as AnyQueryAst, ht as LoweredStatement, k as ContractCodecRegistry } from "./types-Sh5HuaZE-CqThc46M.mjs";
4
- import { t as Adapter } from "./ast-Dp6lQXUX.mjs";
5
4
  import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
5
+ import { t as Adapter } from "./ast-Dp6lQXUX.mjs";
6
6
  import { t as SqlExecutionPlan } from "./sql-execution-plan-C7XauPPu-eskZJbmm.mjs";
7
7
  import "./plan-_8dKi13Q.mjs";
8
- import { t as CodecDescriptorRegistry } from "./query-lane-context-CJoNBspB--ieuKEei.mjs";
9
- import "./query-lane-context-DNt2DeQu.mjs";
10
- import { k as SqlMiddleware } from "./prepared-statement-YtgdlN7e-D4MSU3i0.mjs";
8
+ import { t as CodecDescriptorRegistry } from "./query-lane-context-C2AXsoFa-COSQOvZz.mjs";
9
+ import "./query-lane-context-BsZs5lvB.mjs";
10
+ import { k as SqlMiddleware } from "./prepared-statement-YtgdlN7e-DqHHwo30.mjs";
11
11
  import { Contract } from "@prisma/orm-framework/contract/types";
12
12
  import { AfterExecuteResult as AfterExecuteResult$1, AfterQueryResult as AfterQueryResult$1, ExecuteInterceptResult as ExecuteInterceptResult$1, QueryInterceptResult as QueryInterceptResult$1, RuntimeLog as Log } from "@prisma/orm-framework/components/runtime";
13
13
  //#region ../../../2-sql/5-runtime/dist/index.d.mts
@@ -81,4 +81,4 @@ interface LintsOptions {
81
81
  declare function lints(options?: LintsOptions): SqlMiddleware;
82
82
  //#endregion
83
83
  export { LintsOptions as a, budgets as c, lints as d, lowerSqlPlan as f, ExecuteInterceptResult$1 as i, createAstCodecRegistry as l, validateContractCodecMappings as m, AfterQueryResult$1 as n, Log as o, validateCodecRegistryCompleteness as p, BudgetsOptions as r, QueryInterceptResult$1 as s, AfterExecuteResult$1 as t, extractCodecIds as u };
84
- //# sourceMappingURL=index-BzAG1PFV.d.mts.map
84
+ //# sourceMappingURL=index-ZHk0SsBA.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BzAG1PFV.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAiBiB,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
+ {"version":3,"file":"index-ZHk0SsBA.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAiBiB,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"}
@@ -0,0 +1,58 @@
1
+ import { t as Index } from "./sql-index-ByAAE7K8-BpbPBWPD.mjs";
2
+ import "./types-Uv3oTMAb.mjs";
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
5
+ //#region src/index-reference.d.ts
6
+ /**
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.
8
+ */
9
+ interface IndexReference<Columns extends Readonly<Record<string, Expression<ScopeField>>> = Readonly<Record<string, Expression<ScopeField>>>, Type extends string | undefined = string | undefined, Options extends Readonly<Record<string, unknown>> | undefined = Readonly<Record<string, unknown>> | undefined> {
10
+ /** The index's columns by name, each the column of the aliased table; empty for an expression index. */
11
+ readonly columns: Columns;
12
+ readonly type: Type;
13
+ readonly options: Options;
14
+ }
15
+ /** The name the contract source gave an index: the prefix of a wire name, or an exact (`map:`) name. */
16
+ type AuthoredIndexName<I> = I extends {
17
+ readonly prefix: infer Prefix extends string;
18
+ } ? Prefix : I extends {
19
+ readonly name: infer Name extends string;
20
+ } ? Name : never;
21
+ type IndexColumnExpressions<Columns, I> = I extends {
22
+ readonly columns: infer IndexColumns extends readonly string[];
23
+ } ? { readonly [Column in IndexColumns[number]]: Column extends keyof Columns ? Columns[Column] extends {
24
+ readonly codecId: string;
25
+ readonly nullable: boolean;
26
+ } ? Expression<StorageColumnScopeField<Columns[Column]>> : never : never; } : Record<never, never>;
27
+ type IndexTypeOf<I> = I extends {
28
+ readonly type: infer Type extends string;
29
+ } ? Type : undefined;
30
+ type IndexOptionsOf<I> = I extends {
31
+ readonly options: infer Options extends Record<string, unknown>;
32
+ } ? Options : undefined;
33
+ /** The indexes of `I` whose authored name is `Key`. */
34
+ type IndexesNamed<I, Key> = I extends unknown ? AuthoredIndexName<I> extends Key ? I : never : never;
35
+ type IsUnion<T, Whole = T> = T extends unknown ? ([Whole] extends [T] ? false : true) : never;
36
+ /**
37
+ * 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
+ */
39
+ type TableIndexReferences<Table> = Table extends {
40
+ readonly indexes: readonly (infer I)[];
41
+ readonly columns: infer Columns;
42
+ } ? { readonly [Key in AuthoredIndexName<I> as true extends IsUnion<IndexesNamed<I, Key>> ? never : Key]: IndexReference<IndexColumnExpressions<Columns, IndexesNamed<I, Key>>, IndexTypeOf<IndexesNamed<I, Key>>, IndexOptionsOf<IndexesNamed<I, Key>>>; } : never;
43
+ interface IndexReferencesInput {
44
+ readonly namespaceId: string;
45
+ readonly tableName: string;
46
+ readonly table: {
47
+ readonly indexes: ReadonlyArray<Pick<Index, 'name' | 'prefix' | 'columns' | 'type' | 'options'>>;
48
+ };
49
+ /** The column of the table as this query reads it: under the table's alias, with its codec. */
50
+ readonly column: (columnName: string) => Expression<ScopeField>;
51
+ }
52
+ /**
53
+ * 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
+ */
55
+ declare function createIndexReferences(input: IndexReferencesInput): Readonly<Record<string, IndexReference>>;
56
+ //#endregion
57
+ export { createIndexReferences as i, IndexReferencesInput as n, TableIndexReferences as r, IndexReference as t };
58
+ //# sourceMappingURL=index-reference-CflkzYSd.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-reference-CflkzYSd.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/index-reference.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;;;;KAI9D,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;;;;;iBAKrC,sBAAsB,OAAO,uBAAuB,SAAS,eAAe"}
@@ -0,0 +1,42 @@
1
+ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
2
+ //#region ../../../2-sql/4-lanes/relational-core/dist/exports/index-reference.mjs
3
+ /**
4
+ * 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
+ */
6
+ function createIndexReferences(input) {
7
+ const byName = /* @__PURE__ */ new Map();
8
+ for (const index of input.table.indexes) {
9
+ const authoredName = index.prefix ?? index.name;
10
+ const columns = Object.fromEntries((index.columns ?? []).map((column) => [column, input.column(column)]));
11
+ const reference = Object.freeze({
12
+ columns: Object.freeze(columns),
13
+ type: index.type,
14
+ options: index.options
15
+ });
16
+ byName.set(authoredName, [...byName.get(authoredName) ?? [], reference]);
17
+ }
18
+ const references = {};
19
+ for (const [authoredName, [reference, ...others]] of byName) Object.defineProperty(references, authoredName, {
20
+ enumerable: true,
21
+ get: () => {
22
+ if (others.length > 0) throw ambiguousIndexName(input, authoredName);
23
+ return reference;
24
+ }
25
+ });
26
+ return Object.freeze(references);
27
+ }
28
+ function ambiguousIndexName(input, authoredName) {
29
+ return structuredError("ORM.ARGUMENT_INVALID", `Table "${input.tableName}" has more than one index named "${authoredName}".`, {
30
+ why: "An index is read by the name its contract source gave it, and these indexes share that name.",
31
+ fix: `Give each of these indexes of table "${input.tableName}" its own name in the contract source.`,
32
+ meta: {
33
+ namespaceId: input.namespaceId,
34
+ tableName: input.tableName,
35
+ index: authoredName
36
+ }
37
+ });
38
+ }
39
+ //#endregion
40
+ export { createIndexReferences as t };
41
+
42
+ //# sourceMappingURL=index-reference-D693Lu-E.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-reference-D693Lu-E.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/**\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 = index.prefix ?? index.name;\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 };\n\n//# sourceMappingURL=index-reference.mjs.map"],"mappings":";;;;;AAKA,SAAS,sBAAsB,OAAO;CACrC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,SAAS,MAAM,MAAM,SAAS;EACxC,MAAM,eAAe,MAAM,UAAU,MAAM;EAC3C,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,YAAY;EACZ,WAAW;GACV,IAAI,OAAO,SAAS,GAAG,MAAM,mBAAmB,OAAO,YAAY;GACnE,OAAO;EACR;CACD,CAAC;CACD,OAAO,OAAO,OAAO,UAAU;AAChC;AACA,SAAS,mBAAmB,OAAO,cAAc;CAChD,OAAO,gBAAgB,wBAAwB,UAAU,MAAM,UAAU,mCAAmC,aAAa,KAAK;EAC7H,KAAK;EACL,KAAK,wCAAwC,MAAM,UAAU;EAC7D,MAAM;GACL,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,OAAO;EACR;CACD,CAAC;AACF"}