@prisma-next/sql-relational-core 0.15.0 → 0.16.0-dev.10

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 (63) hide show
  1. package/README.md +0 -1
  2. package/dist/{codec-types-DFLA6Hmj.d.mts → codec-types-Bayoa4PI.d.mts} +5 -5
  3. package/dist/codec-types-Bayoa4PI.d.mts.map +1 -0
  4. package/dist/{ddl-types-Cd4p4EbE.d.mts → ddl-types-B3SfjPGI.d.mts} +3 -4
  5. package/dist/ddl-types-B3SfjPGI.d.mts.map +1 -0
  6. package/dist/exports/ast.d.mts +4 -5
  7. package/dist/exports/ast.d.mts.map +1 -1
  8. package/dist/exports/ast.mjs +63 -2
  9. package/dist/exports/ast.mjs.map +1 -1
  10. package/dist/exports/codec-descriptor-registry.d.mts +2 -3
  11. package/dist/exports/codec-descriptor-registry.d.mts.map +1 -1
  12. package/dist/exports/contract-free.d.mts +7 -8
  13. package/dist/exports/contract-free.d.mts.map +1 -1
  14. package/dist/exports/contract-free.mjs +1 -1
  15. package/dist/exports/expression.d.mts +3 -4
  16. package/dist/exports/expression.d.mts.map +1 -1
  17. package/dist/exports/expression.mjs +1 -1
  18. package/dist/exports/middleware.d.mts +1 -1
  19. package/dist/exports/plan.d.mts +2 -2
  20. package/dist/exports/query-lane-context.d.mts +1 -1
  21. package/dist/exports/types.d.mts +2 -3
  22. package/dist/index.d.mts +11 -11
  23. package/dist/index.mjs +3 -4
  24. package/dist/{middleware-Dyyo4IP1.d.mts → middleware-_9-4TYKC.d.mts} +3 -4
  25. package/dist/middleware-_9-4TYKC.d.mts.map +1 -0
  26. package/dist/{plan-DUjdGLY3.d.mts → plan-Dq94efZJ.d.mts} +2 -3
  27. package/dist/plan-Dq94efZJ.d.mts.map +1 -0
  28. package/dist/{query-lane-context-DFnJVqUH.d.mts → query-lane-context-DTCOHMXn.d.mts} +2 -3
  29. package/dist/query-lane-context-DTCOHMXn.d.mts.map +1 -0
  30. package/dist/{sql-execution-plan-DjMEAjKK.d.mts → sql-execution-plan-B-C-6cZN.d.mts} +2 -3
  31. package/dist/sql-execution-plan-B-C-6cZN.d.mts.map +1 -0
  32. package/dist/{types-lWs6p0ny.d.mts → types-CRV7uuOC.d.mts} +31 -21
  33. package/dist/types-CRV7uuOC.d.mts.map +1 -0
  34. package/dist/{types-DQrmgP8Y.d.mts → types-CWlaErjN.d.mts} +97 -14
  35. package/dist/types-CWlaErjN.d.mts.map +1 -0
  36. package/dist/{types-DtzFztRV.mjs → types-DpAvAX8u.mjs} +160 -24
  37. package/dist/types-DpAvAX8u.mjs.map +1 -0
  38. package/package.json +12 -13
  39. package/src/ast/codec-types.ts +37 -0
  40. package/src/ast/json-value-projection.ts +100 -0
  41. package/src/ast/types.ts +227 -49
  42. package/src/exports/ast.ts +1 -0
  43. package/src/index.ts +0 -1
  44. package/src/types.ts +0 -9
  45. package/dist/codec-types-DFLA6Hmj.d.mts.map +0 -1
  46. package/dist/ddl-types-Cd4p4EbE.d.mts.map +0 -1
  47. package/dist/errors-BwyJxXME.mjs +0 -35
  48. package/dist/errors-BwyJxXME.mjs.map +0 -1
  49. package/dist/errors-COyZClzw.d.mts +0 -8
  50. package/dist/errors-COyZClzw.d.mts.map +0 -1
  51. package/dist/exports/errors.d.mts +0 -2
  52. package/dist/exports/errors.mjs +0 -2
  53. package/dist/middleware-Dyyo4IP1.d.mts.map +0 -1
  54. package/dist/plan-DUjdGLY3.d.mts.map +0 -1
  55. package/dist/query-lane-context-DFnJVqUH.d.mts.map +0 -1
  56. package/dist/sql-execution-plan-DjMEAjKK.d.mts.map +0 -1
  57. package/dist/types-CUHnDsdV.d.mts +0 -23
  58. package/dist/types-CUHnDsdV.d.mts.map +0 -1
  59. package/dist/types-DQrmgP8Y.d.mts.map +0 -1
  60. package/dist/types-DtzFztRV.mjs.map +0 -1
  61. package/dist/types-lWs6p0ny.d.mts.map +0 -1
  62. package/src/errors.ts +0 -47
  63. package/src/exports/errors.ts +0 -1
package/dist/index.mjs CHANGED
@@ -1,11 +1,10 @@
1
+ import { A as PreparedParamRef, B as isWhereExpr, C as LiteralExpr, D as OrExpr, E as OperationExpr, F as SubqueryExpr, H as whereExprKinds, I as TableSource, L as UpdateAst, M as RawExpr, N as RawSqlExpr, O as OrderByItem, P as SelectAst, R as WindowFuncExpr, S as ListExpression, T as NullCheckExpr, U as frozenCodecRef, V as queryAstKinds, _ as InsertAst, a as CastExpr, b as JsonArrayAggExpr, c as DeleteAst, d as DoUpdateSetConflictAction, f as EqColJoinOn, g as IdentifierRef, h as FunctionSource, i as CaseExpr, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as NotExpr, x as JsonObjectExpr, y as JoinAst, z as isQueryAst } from "./types-DpAvAX8u.mjs";
1
2
  import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, i as DdlNode, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, r as DdlColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint, u as isDdlNode } from "./ddl-types-DFKQr_qQ.mjs";
2
- import { A as RawSqlExpr, C as OperationExpr, D as PreparedParamRef, E as ParamRef, F as WindowFuncExpr, I as isQueryAst, L as isWhereExpr, M as SubqueryExpr, N as TableSource, O as ProjectionItem, P as UpdateAst, R as queryAstKinds, S as NullCheckExpr, T as OrderByItem, _ as JsonArrayAggExpr, a as DefaultValueExpr, b as LiteralExpr, c as DoNothingConflictAction, d as ExistsExpr, f as FunctionSource, g as JoinAst, h as InsertOnConflict, i as ColumnRef, j as SelectAst, k as RawExpr, l as DoUpdateSetConflictAction, m as InsertAst, n as AndExpr, o as DeleteAst, p as IdentifierRef, r as BinaryExpr, s as DerivedTableSource, t as AggregateExpr, u as EqColJoinOn, v as JsonObjectExpr, w as OrExpr, x as NotExpr, y as ListExpression, z as whereExprKinds } from "./types-DtzFztRV.mjs";
3
3
  import { n as compact, t as collectOrderedParamRefs } from "./util-DQQgv2j1.mjs";
4
- import { SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType } from "./exports/ast.mjs";
5
- import { n as planUnsupported, t as planInvalid } from "./errors-BwyJxXME.mjs";
4
+ import { CodecJsonValueProjection, JsonDocumentProjection, NativeJsonValueProjection, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType } from "./exports/ast.mjs";
6
5
  import { buildOperation, codecOf, createRawSql, param, toExpr } from "./exports/expression.mjs";
7
6
  import { t as createSqlParamRefMutator } from "./middleware-CMr4CHNz.mjs";
8
7
  import { planFromAst } from "./exports/plan.mjs";
9
8
  import "./exports/query-lane-context.mjs";
10
9
  import "./exports/types.mjs";
11
- export { AggregateExpr, AndExpr, BinaryExpr, CheckExpressionConstraint, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionColumnDefault, FunctionSource, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonObjectExpr, ListExpression, LiteralColumnDefault, LiteralExpr, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawSqlExpr, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, buildOperation, codecOf, collectOrderedParamRefs, compact, createRawSql, createSqlParamRefMutator, isDdlNode, isQueryAst, isWhereExpr, param, planFromAst, planInvalid, planUnsupported, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, toExpr, whereExprKinds };
10
+ export { AggregateExpr, AndExpr, BinaryExpr, CaseExpr, CastExpr, CheckExpressionConstraint, CodecJsonValueProjection, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralColumnDefault, LiteralExpr, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawSqlExpr, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, buildOperation, codecOf, collectOrderedParamRefs, compact, createRawSql, createSqlParamRefMutator, frozenCodecRef, isDdlNode, isQueryAst, isWhereExpr, param, planFromAst, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, toExpr, whereExprKinds };
@@ -1,6 +1,5 @@
1
- import { t as SqlExecutionPlan } from "./sql-execution-plan-DjMEAjKK.mjs";
1
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-B-C-6cZN.mjs";
2
2
  import { ParamRefMutator } from "@prisma-next/framework-components/runtime";
3
-
4
3
  //#region src/middleware/param-ref-mutator.d.ts
5
4
  /**
6
5
  * Brand applied to {@link ParamRefHandle} so user-constructed handles
@@ -43,7 +42,7 @@ interface ParamRefEntry<TCodecId extends string | undefined = string | undefined
43
42
  * narrows `entry.ref` to a `ParamRefHandle<K>`, which routes through
44
43
  * the typed `replaceValue` overload.
45
44
  */
46
- type ParamRefEntryUnion<TCodecMap extends Record<string, unknown>> = { [K in keyof TCodecMap & string]: ParamRefEntry<K> }[keyof TCodecMap & string] | ParamRefEntry<undefined>;
45
+ type ParamRefEntryUnion<TCodecMap extends Record<string, unknown>> = { [K in keyof TCodecMap & string]: ParamRefEntry<K>; }[keyof TCodecMap & string] | ParamRefEntry<undefined>;
47
46
  /**
48
47
  * SQL-family mutator threaded into `SqlMiddleware.beforeExecute` as
49
48
  * `params`. Scope is `ParamRef.value` slots only — middleware cannot
@@ -116,4 +115,4 @@ interface SqlParamRefMutatorInternal<TCodecMap extends Record<string, unknown> =
116
115
  declare function createSqlParamRefMutator<TCodecMap extends Record<string, unknown> = Record<string, unknown>>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap>;
117
116
  //#endregion
118
117
  export { SqlParamRefMutatorInternal as a, SqlParamRefMutator as i, ParamRefEntryUnion as n, createSqlParamRefMutator as o, ParamRefHandle as r, ParamRefEntry as t };
119
- //# sourceMappingURL=middleware-Dyyo4IP1.d.mts.map
118
+ //# sourceMappingURL=middleware-_9-4TYKC.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-_9-4TYKC.d.mts","names":[],"sources":["../src/middleware/param-ref-mutator.ts"],"mappings":";;;;;;;;;;;;;cAec;;;;;;;;;;UAWG,eAAe;YACpB,sBAAsB;;;;;;;UAQjB,cAAc;WACpB,KAAK,eAAe;WACpB;WACA,SAAS;;;;;;;;;;KAWR,mBAAmB,kBAAkB,8BAC1C,WAAW,qBAAqB,cAAc,YAAW,sBAC5D;;;;;;;;;;;;;;;;;;;;;;;;;UA0Ba,mBACf,kBAAkB,0BAA0B,iCACpC;;EAER,WAAW,iBAAiB,mBAAmB;;;;;;;EAQ/C,aAAa,uBAAuB,oBAClC,KAAK,eAAe,WACpB,UAAU,UAAU;EAEtB,aAAa,KAAK,2BAA2B;;EAG7C,cACE,SAAS;aACE,KAAK,sBAAsB;aAC3B;;;;;;;;;;;;;UAeE,2BACf,kBAAkB,0BAA0B,iCACpC,mBAAmB;EAC3B;;;;;;;;;;;;;;;;;iBAoBc,yBACd,kBAAkB,0BAA0B,yBAC5C,MAAM,mBAAmB,2BAA2B"}
@@ -1,8 +1,7 @@
1
- import { f as AnyQueryAst } from "./types-DQrmgP8Y.mjs";
1
+ import { f as AnyQueryAst } from "./types-CWlaErjN.mjs";
2
2
  import { Contract } from "@prisma-next/contract/types";
3
3
  import { QueryPlan } from "@prisma-next/framework-components/runtime";
4
4
  import { SqlStorage } from "@prisma-next/sql-contract/types";
5
-
6
5
  //#region src/plan.d.ts
7
6
  /**
8
7
  * SQL query plan produced by lanes before lowering.
@@ -41,4 +40,4 @@ interface SqlQueryPlan<Row = unknown> extends QueryPlan<Row> {
41
40
  declare function planFromAst<Row = unknown>(ast: AnyQueryAst, contract: Contract<SqlStorage>, laneId?: string): SqlQueryPlan<Row>;
42
41
  //#endregion
43
42
  export { planFromAst as n, SqlQueryPlan as t };
44
- //# sourceMappingURL=plan-DUjdGLY3.d.mts.map
43
+ //# sourceMappingURL=plan-Dq94efZJ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-Dq94efZJ.d.mts","names":[],"sources":["../src/plan.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAkBiB,aAAa,uBAAuB,UAAU;WACpD,KAAK;WACL;;;;;;;;;;;;;;;;;;;iBAoBK,YAAY,eAC1B,KAAK,aACL,UAAU,SAAS,aACnB,kBACC,aAAa"}
@@ -1,9 +1,8 @@
1
- import { c as ContractCodecRegistry } from "./codec-types-DFLA6Hmj.mjs";
1
+ import { c as ContractCodecRegistry } from "./codec-types-Bayoa4PI.mjs";
2
2
  import { Contract } from "@prisma-next/contract/types";
3
3
  import { CodecDescriptor, CodecRef } from "@prisma-next/framework-components/codec";
4
4
  import { SqlStorage } from "@prisma-next/sql-contract/types";
5
5
  import { SqlOperationRegistry } from "@prisma-next/sql-operations";
6
-
7
6
  //#region src/query-lane-context.d.ts
8
7
  /**
9
8
  * Codec-id-keyed accessor for descriptor metadata. The unified read API for codec-id-keyed metadata (`traits`, `targetTypes`, `meta`) — non-branching for parameterized vs. non-parameterized codecs. Every codec ships natively as a `CodecDescriptor` through the unified `codecs:` contributor slot (see ADR 208).
@@ -90,4 +89,4 @@ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<Sql
90
89
  }
91
90
  //#endregion
92
91
  export { MutationDefaultsOptions as a, MutationDefaultsOp as i, CodecDescriptorRegistry as n, TypeHelperRegistry as o, ExecutionContext as r, AppliedMutationDefault as t };
93
- //# sourceMappingURL=query-lane-context-DFnJVqUH.d.mts.map
92
+ //# sourceMappingURL=query-lane-context-DTCOHMXn.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-lane-context-DTCOHMXn.d.mts","names":[],"sources":["../src/query-lane-context.ts"],"mappings":";;;;;;;;;UASiB;;;;EAIf,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;KAMjC,qBAAqB;KAErB;KAEA;WACD;WACA;;KAGC;WACD,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAQd,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WACzE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;WAClB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
@@ -1,6 +1,5 @@
1
- import { f as AnyQueryAst } from "./types-DQrmgP8Y.mjs";
1
+ import { f as AnyQueryAst } from "./types-CWlaErjN.mjs";
2
2
  import { ExecutionPlan } from "@prisma-next/framework-components/runtime";
3
-
4
3
  //#region src/sql-execution-plan.d.ts
5
4
  /**
6
5
  * SQL-domain execution plan: a query lowered to the wire-level shape that a
@@ -29,4 +28,4 @@ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
29
28
  }
30
29
  //#endregion
31
30
  export { SqlExecutionPlan as t };
32
- //# sourceMappingURL=sql-execution-plan-DjMEAjKK.d.mts.map
31
+ //# sourceMappingURL=sql-execution-plan-B-C-6cZN.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-execution-plan-B-C-6cZN.d.mts","names":[],"sources":["../src/sql-execution-plan.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAuBiB,iBAAiB,uBAAuB,cAAc;WAC5D;WACA;WACA,KAAK"}
@@ -1,11 +1,29 @@
1
- import { Y as ParamRef, g as ColumnRef } from "./types-DQrmgP8Y.mjs";
2
- import { r as ExecutionContext } from "./query-lane-context-DFnJVqUH.mjs";
3
- import { t as SqlExecutionPlan } from "./sql-execution-plan-DjMEAjKK.mjs";
1
+ import { et as ParamRef, y as ColumnRef } from "./types-CWlaErjN.mjs";
2
+ import { r as ExecutionContext } from "./query-lane-context-DTCOHMXn.mjs";
3
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-B-C-6cZN.mjs";
4
+ import { t as SqlQueryPlan } from "./plan-Dq94efZJ.mjs";
4
5
  import { Contract } from "@prisma-next/contract/types";
6
+ import { RuntimeExecutor } from "@prisma-next/framework-components/runtime";
5
7
  import { ExtractFieldOutputTypes, SqlStorage, StorageColumn } from "@prisma-next/sql-contract/types";
6
8
  import { ParamSpec } from "@prisma-next/operations";
7
9
  import { SqlLoweringSpec } from "@prisma-next/sql-operations";
8
-
10
+ //#region src/runtime-scope.d.ts
11
+ /**
12
+ * The plan shape accepted by the SQL ORM client and SQL runtime: either a
13
+ * pre-lowering `SqlQueryPlan` (AST + meta) or a post-lowering
14
+ * `SqlExecutionPlan` (sql + params + meta).
15
+ */
16
+ type SqlOrmPlan = SqlExecutionPlan | SqlQueryPlan;
17
+ /**
18
+ * The minimal SQL-runtime surface that the ORM client and SQL runtime both
19
+ * depend on: the `execute` method of `RuntimeExecutor<SqlOrmPlan>`.
20
+ *
21
+ * Owned by `sql-relational-core` (lanes layer) so both
22
+ * `@prisma-next/sql-runtime` and `@prisma-next/sql-orm-client` consume the
23
+ * same source of truth without a layering inversion.
24
+ */
25
+ type RuntimeScope = Pick<RuntimeExecutor<SqlOrmPlan>, 'execute'>;
26
+ //#endregion
9
27
  //#region src/types.d.ts
10
28
  type Expr = ColumnRef | ParamRef;
11
29
  /**
@@ -32,18 +50,18 @@ type ColumnResolutionContract = {
32
50
  type NamespaceModels<TContract extends ColumnResolutionContract, NsId extends string> = TContract['domain']['namespaces'][NsId] extends {
33
51
  readonly models: infer Models extends Record<string, unknown>;
34
52
  } ? Models : never;
35
- type ExtractTableToModel<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string> = NamespaceModels<TContract, NsId> extends infer Models extends Record<string, unknown> ? { [M in keyof Models & string]: Models[M] extends {
53
+ type ExtractTableToModel<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string> = NamespaceModels<TContract, NsId> extends (infer Models extends Record<string, unknown>) ? { [M in keyof Models & string]: Models[M] extends {
36
54
  readonly storage: {
37
55
  readonly table: TableName;
38
56
  };
39
- } ? M : never }[keyof Models & string] : never;
40
- type ExtractColumnToField<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string, ColumnName extends string> = ExtractTableToModel<TContract, NsId, TableName> extends infer ModelName extends string ? NamespaceModels<TContract, NsId> extends infer Models extends Record<string, unknown> ? ModelName & keyof Models extends infer MKey extends string ? Models[MKey] extends {
57
+ } ? M : never; }[keyof Models & string] : never;
58
+ type ExtractColumnToField<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string, ColumnName extends string> = ExtractTableToModel<TContract, NsId, TableName> extends (infer ModelName extends string) ? NamespaceModels<TContract, NsId> extends (infer Models extends Record<string, unknown>) ? ModelName & keyof Models extends (infer MKey extends string) ? Models[MKey] extends {
41
59
  readonly storage: {
42
60
  readonly fields: infer Fields extends Record<string, unknown>;
43
61
  };
44
62
  } ? { [F in keyof Fields & string]: Fields[F] extends {
45
63
  readonly column: ColumnName;
46
- } ? F : never }[keyof Fields & string] : never : never : never : never;
64
+ } ? F : never; }[keyof Fields & string] : never : never : never : never;
47
65
  /** Resolves to `never` when the table or column is absent in the namespace. */
48
66
  type NamespaceStorageColumn<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string, ColumnName extends string> = TContract['storage']['namespaces'][NsId] extends {
49
67
  readonly entries: {
@@ -68,7 +86,7 @@ type FallbackCodecLookup<ColumnMeta extends StorageColumn, CodecTypes extends Re
68
86
  * refinements (e.g. `Vector<N>`, `Char<N>`) that a bare codec-output lookup
69
87
  * would drop. Resolves to `never` when the coordinate is absent from the map.
70
88
  */
71
- type NamespaceFieldOutput<TContract extends ColumnResolutionContract, NsId extends string, ModelName extends string, FieldName extends string> = ExtractFieldOutputTypes<TContract> extends infer Outputs ? NsId extends keyof Outputs ? Outputs[NsId] extends infer NamespaceOutputs ? ModelName extends keyof NamespaceOutputs ? NamespaceOutputs[ModelName] extends infer ModelOutputs ? FieldName extends keyof ModelOutputs ? ModelOutputs[FieldName] : never : never : never : never : never : never;
89
+ type NamespaceFieldOutput<TContract extends ColumnResolutionContract, NsId extends string, ModelName extends string, FieldName extends string> = ExtractFieldOutputTypes<TContract> extends (infer Outputs) ? NsId extends keyof Outputs ? Outputs[NsId] extends (infer NamespaceOutputs) ? ModelName extends keyof NamespaceOutputs ? NamespaceOutputs[ModelName] extends (infer ModelOutputs) ? FieldName extends keyof ModelOutputs ? ModelOutputs[FieldName] : never : never : never : never : never : never;
72
90
  /**
73
91
  * The secondary resolution path, taken for a storage column not backed by a
74
92
  * domain model field in the namespace (e.g. a column with no corresponding
@@ -76,7 +94,7 @@ type NamespaceFieldOutput<TContract extends ColumnResolutionContract, NsId exten
76
94
  */
77
95
  type ColumnCodecFallback<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string, ColumnName extends string, CodecTypes extends Record<string, {
78
96
  readonly output: unknown;
79
- }>> = NamespaceStorageColumn<TContract, NsId, TableName, ColumnName> extends infer ColumnMeta ? [ColumnMeta] extends [never] ? never : ColumnMeta extends StorageColumn ? FallbackCodecLookup<ColumnMeta, CodecTypes> : never : never;
97
+ }>> = NamespaceStorageColumn<TContract, NsId, TableName, ColumnName> extends (infer ColumnMeta) ? [ColumnMeta] extends [never] ? never : ColumnMeta extends StorageColumn ? FallbackCodecLookup<ColumnMeta, CodecTypes> : never : never;
80
98
  /**
81
99
  * Type-level operation signature.
82
100
  * Represents an operation at the type level for use in contract type maps.
@@ -145,7 +163,7 @@ type OperationsForTypeId<TypeId extends string, Operations extends OperationType
145
163
  */
146
164
  type ComputeColumnJsType<TContract extends ColumnResolutionContract, NsId extends string, TableName extends string, ColumnName extends string, CodecTypes extends Record<string, {
147
165
  readonly output: unknown;
148
- }>> = ExtractTableToModel<TContract, NsId, TableName> extends infer ModelName ? [ModelName] extends [never] ? ColumnCodecFallback<TContract, NsId, TableName, ColumnName, CodecTypes> : ModelName extends string ? ExtractColumnToField<TContract, NsId, TableName, ColumnName> extends infer FieldName ? [FieldName] extends [never] ? ColumnCodecFallback<TContract, NsId, TableName, ColumnName, CodecTypes> : FieldName extends string ? NamespaceFieldOutput<TContract, NsId, ModelName, FieldName> extends infer Out ? [Out] extends [never] ? ColumnCodecFallback<TContract, NsId, TableName, ColumnName, CodecTypes> : Out : never : never : never : never : never;
166
+ }>> = ExtractTableToModel<TContract, NsId, TableName> extends (infer ModelName) ? [ModelName] extends [never] ? ColumnCodecFallback<TContract, NsId, TableName, ColumnName, CodecTypes> : ModelName extends string ? ExtractColumnToField<TContract, NsId, TableName, ColumnName> extends (infer FieldName) ? [FieldName] extends [never] ? ColumnCodecFallback<TContract, NsId, TableName, ColumnName, CodecTypes> : FieldName extends string ? NamespaceFieldOutput<TContract, NsId, ModelName, FieldName> extends (infer Out) ? [Out] extends [never] ? ColumnCodecFallback<TContract, NsId, TableName, ColumnName, CodecTypes> : Out : never : never : never : never : never;
149
167
  /**
150
168
  * Alias for the SQL-domain executable plan, exposed under the legacy
151
169
  * `SqlPlan` name for compatibility with SQL builder/utility call sites.
@@ -211,14 +229,6 @@ interface RawFactory extends RawTemplateFactory {
211
229
  (text: string, options: RawFunctionOptions): SqlExecutionPlan;
212
230
  with(options: RawTemplateOptions): RawTemplateFactory;
213
231
  }
214
- interface RuntimeError extends Error {
215
- readonly code: string;
216
- readonly category: 'PLAN';
217
- readonly severity: 'error';
218
- readonly details?: Record<string, unknown>;
219
- readonly hints?: readonly string[];
220
- readonly docs?: readonly string[];
221
- }
222
232
  interface BuildParamsMap {
223
233
  readonly [name: string]: unknown;
224
234
  }
@@ -229,5 +239,5 @@ interface SqlBuilderOptions<TContract extends Contract<SqlStorage> = Contract<Sq
229
239
  readonly context: ExecutionContext<TContract>;
230
240
  }
231
241
  //#endregion
232
- export { TableKey as C, TableDef as S, TablesOf as T, RawTemplateFactory as _, ColumnsOf as a, SqlBuilderOptions as b, META as c, ModelMetadata as d, OperationTypeSignature as f, RawFunctionOptions as g, RawFactory as h, ColumnResolutionContract as i, Meta as l, OperationsForTypeId as m, BuildParamsMap as n, ComputeColumnJsType as o, OperationTypes as p, CodecTypes as r, Expr as s, BuildOptions as t, ModelDef as u, RawTemplateOptions as v, TableMetadata as w, SqlPlan as x, RuntimeError as y };
233
- //# sourceMappingURL=types-lWs6p0ny.d.mts.map
242
+ export { TableMetadata as C, SqlOrmPlan as E, TableKey as S, RuntimeScope as T, RawTemplateFactory as _, ColumnsOf as a, SqlPlan as b, META as c, ModelMetadata as d, OperationTypeSignature as f, RawFunctionOptions as g, RawFactory as h, ColumnResolutionContract as i, Meta as l, OperationsForTypeId as m, BuildParamsMap as n, ComputeColumnJsType as o, OperationTypes as p, CodecTypes as r, Expr as s, BuildOptions as t, ModelDef as u, RawTemplateOptions as v, TablesOf as w, TableDef as x, SqlBuilderOptions as y };
243
+ //# sourceMappingURL=types-CRV7uuOC.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-CRV7uuOC.d.mts","names":[],"sources":["../src/runtime-scope.ts","../src/types.ts"],"mappings":";;;;;;;;;;;;;;;KASY,aAAa,mBAAmB;;;;;;;;;KAUhC,eAAe,KAAK,gBAAgB;;;KCPpC,OAAO,YAAY;;;;;;;;;;KAWnB;WACD;aACE,YAAY,SACnB;eAA0B,QAAQ,SAAS;;;WAGtC;aACE,YAAY,SACnB;eAEa,SAAS,SAAS,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;WAA0B;;;;;;;;;;;;KAYvC,oBAAoB,uBAAuB,mBAAmB,kBACxE,mBAAmB,wBACf,wBACA,qBAAqB,aACnB,WAAW,UACX;;;;;;;;;;;;;KAcI,oBACV,kBAAkB,0BAClB,qBACA,0BACA,2BACA,mBAAmB;WAA0B;MAE7C,oBAAoB,WAAW,MAAM,0BAAyB,cACzD,6BACC,oBAAoB,WAAW,MAAM,WAAW,YAAY,cAC5D,2BACE,qBAAqB,WAAW,MAAM,WAAW,2BAA0B,cACxE,6BACC,oBAAoB,WAAW,MAAM,WAAW,YAAY,cAC5D,2BACE,qBAAqB,WAAW,MAAM,WAAW,0BAAyB,QACvE,uBACC,oBAAoB,WAAW,MAAM,WAAW,YAAY,cAC5D;;;;;;KAYR,QAAQ,iBAAiB,iBAAiB;;;;KAK1C,SAAS,aAAa;EAChC;IAAW,cAAc;;IAEvB;KAGQ,SAAS,aAAa,cAAc,SAAS;;;;cAQpC;;;;KAKT,KAAK;GAAa;KAAoB,SAAS;;;;UAK1C,cAAc;EAC7B,MAAM;;;;;UAMS,cAAc;EAC7B,MAAM;;;;;;UAOS,SAAS;YACd,OAAO,cAAc;;;;;;UAOhB,SAAS;YACd,OAAO,cAAc;;KAGrB,UACV,WACA,UAAU,SAAS,cACjB,gBAAgB,SAAS,aACzB,SAAS,WAAW;EAAa,eAAe;IAC9C;UAIW;WACN,cAAc;;UAGR,2BAA2B;WACjC,QAAQ;;KAGP,sBACV,SAAS,yBACN,+BACA;UAEY,mBAAmB;GACjC,cAAc,SAAS,qBAAqB;EAC7C,KAAK,SAAS,qBAAqB;;UAGpB;YACL;;UAGK;WACN,SAAS;;UAGH,kBAAkB,kBAAkB,SAAS,cAAc,SAAS;WAC1E,SAAS,iBAAiB"}
@@ -1,7 +1,44 @@
1
- import { o as CodecRef } from "./codec-types-DFLA6Hmj.mjs";
1
+ import { o as CodecRef } from "./codec-types-Bayoa4PI.mjs";
2
2
  import { ParamSpec } from "@prisma-next/operations";
3
3
  import { SqlLoweringSpec } from "@prisma-next/sql-operations";
4
-
4
+ //#region src/ast/json-value-projection.d.ts
5
+ declare abstract class JsonValueProjection {
6
+ abstract readonly kind: string;
7
+ readonly value: ProjectionExpr;
8
+ protected constructor(value: ProjectionExpr);
9
+ abstract accept<R>(visitor: JsonValueProjectionVisitor<R>): R;
10
+ abstract rewrite(rewriter: ExpressionRewriter): AnyJsonValueProjection;
11
+ fold<T>(folder: ExpressionFolder<T>): T;
12
+ collectColumnRefs(): ColumnRef[];
13
+ collectParamRefs(): AnyParamRef[];
14
+ protected freeze(): void;
15
+ }
16
+ interface JsonValueProjectionVisitor<R> {
17
+ codec(projection: CodecJsonValueProjection): R;
18
+ native(projection: NativeJsonValueProjection): R;
19
+ document(projection: JsonDocumentProjection): R;
20
+ }
21
+ declare class CodecJsonValueProjection extends JsonValueProjection {
22
+ readonly kind: "codec";
23
+ readonly codec: CodecRef;
24
+ constructor(value: ProjectionExpr, codec: CodecRef);
25
+ accept<R>(visitor: JsonValueProjectionVisitor<R>): R;
26
+ rewrite(rewriter: ExpressionRewriter): CodecJsonValueProjection;
27
+ }
28
+ declare class NativeJsonValueProjection extends JsonValueProjection {
29
+ readonly kind: "native";
30
+ constructor(value: ProjectionExpr);
31
+ accept<R>(visitor: JsonValueProjectionVisitor<R>): R;
32
+ rewrite(rewriter: ExpressionRewriter): NativeJsonValueProjection;
33
+ }
34
+ declare class JsonDocumentProjection extends JsonValueProjection {
35
+ readonly kind: "document";
36
+ constructor(value: ProjectionExpr);
37
+ accept<R>(visitor: JsonValueProjectionVisitor<R>): R;
38
+ rewrite(rewriter: ExpressionRewriter): JsonDocumentProjection;
39
+ }
40
+ type AnyJsonValueProjection = CodecJsonValueProjection | NativeJsonValueProjection | JsonDocumentProjection;
41
+ //#endregion
5
42
  //#region src/ast/types.d.ts
6
43
  type Direction = 'asc' | 'desc';
7
44
  type BinaryOp = 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'like' | 'in' | 'notIn';
@@ -42,6 +79,9 @@ interface ExprVisitor<R> {
42
79
  operation(expr: OperationExpr): R;
43
80
  aggregate(expr: AggregateExpr): R;
44
81
  windowFunc(expr: WindowFuncExpr): R;
82
+ functionCall(expr: FunctionCallExpr): R;
83
+ cast(expr: CastExpr): R;
84
+ case(expr: CaseExpr): R;
45
85
  jsonObject(expr: JsonObjectExpr): R;
46
86
  jsonArrayAgg(expr: JsonArrayAggExpr): R;
47
87
  binary(expr: BinaryExpr): R;
@@ -75,7 +115,7 @@ type JoinOnExpr = EqColJoinOn | AnyExpression;
75
115
  type WhereArg = AnyExpression | ToWhereExpr;
76
116
  type JsonObjectEntry = {
77
117
  readonly key: string;
78
- readonly value: ProjectionExpr;
118
+ readonly value: AnyJsonValueProjection;
79
119
  };
80
120
  declare abstract class AstNode {
81
121
  abstract readonly kind: string;
@@ -90,6 +130,7 @@ declare abstract class FromSource extends AstNode {
90
130
  abstract toFromSource(): AnyFromSource;
91
131
  }
92
132
  declare abstract class Expression extends AstNode implements ExpressionSource {
133
+ #private;
93
134
  abstract accept<R>(visitor: ExprVisitor<R>): R;
94
135
  abstract rewrite(rewriter: ExpressionRewriter): AnyExpression;
95
136
  abstract fold<T>(folder: ExpressionFolder<T>): T;
@@ -128,13 +169,21 @@ declare class DerivedTableSource extends FromSource {
128
169
  rewrite(rewriter: AstRewriter): AnyFromSource;
129
170
  toFromSource(): AnyFromSource;
130
171
  }
172
+ interface FunctionSourceAlias {
173
+ readonly alias: string;
174
+ readonly columnAliases?: ReadonlyArray<string>;
175
+ }
131
176
  declare class FunctionSource extends FromSource {
177
+ #private;
132
178
  readonly kind: "function-source";
133
179
  readonly fn: string;
134
180
  readonly args: ReadonlyArray<AnyExpression>;
135
181
  readonly alias: string | undefined;
136
- protected constructor(fn: string, args: ReadonlyArray<AnyExpression>, alias?: string);
137
- static of(fn: string, args: ReadonlyArray<AnyExpression>, alias?: string): FunctionSource;
182
+ readonly columnAliases: ReadonlyArray<string> | undefined;
183
+ readonly ordinality: boolean;
184
+ protected constructor(fn: string, args: ReadonlyArray<AnyExpression>, alias?: FunctionSourceAlias, ordinality?: boolean);
185
+ static of(fn: string, args: ReadonlyArray<AnyExpression>, alias?: FunctionSourceAlias): FunctionSource;
186
+ withOrdinality(): FunctionSource;
138
187
  rewrite(rewriter: AstRewriter): AnyFromSource;
139
188
  toFromSource(): AnyFromSource;
140
189
  }
@@ -296,11 +345,45 @@ declare class WindowFuncExpr extends Expression {
296
345
  rewrite(rewriter: ExpressionRewriter): AnyExpression;
297
346
  fold<T>(folder: ExpressionFolder<T>): T;
298
347
  }
348
+ declare class FunctionCallExpr extends Expression {
349
+ readonly kind: "function-call";
350
+ readonly fn: string;
351
+ readonly args: ReadonlyArray<AnyExpression>;
352
+ constructor(fn: string, args: ReadonlyArray<AnyExpression>);
353
+ static of(fn: string, args: ReadonlyArray<AnyExpression>): FunctionCallExpr;
354
+ accept<R>(visitor: ExprVisitor<R>): R;
355
+ rewrite(rewriter: ExpressionRewriter): AnyExpression;
356
+ fold<T>(folder: ExpressionFolder<T>): T;
357
+ }
358
+ declare class CastExpr extends Expression {
359
+ readonly kind: "cast";
360
+ readonly expr: AnyExpression;
361
+ readonly targetType: string;
362
+ constructor(expr: AnyExpression, targetType: string);
363
+ static as(expr: AnyExpression, targetType: string): CastExpr;
364
+ accept<R>(visitor: ExprVisitor<R>): R;
365
+ rewrite(rewriter: ExpressionRewriter): AnyExpression;
366
+ fold<T>(folder: ExpressionFolder<T>): T;
367
+ }
368
+ interface CaseBranch {
369
+ readonly condition: AnyExpression;
370
+ readonly value: AnyExpression;
371
+ }
372
+ declare class CaseExpr extends Expression {
373
+ readonly kind: "case";
374
+ readonly branches: ReadonlyArray<Readonly<CaseBranch>>;
375
+ readonly elseExpr: AnyExpression | undefined;
376
+ constructor(branches: ReadonlyArray<CaseBranch>, elseExpr?: AnyExpression);
377
+ static of(branches: ReadonlyArray<CaseBranch>, elseExpr?: AnyExpression): CaseExpr;
378
+ accept<R>(visitor: ExprVisitor<R>): R;
379
+ rewrite(rewriter: ExpressionRewriter): AnyExpression;
380
+ fold<T>(folder: ExpressionFolder<T>): T;
381
+ }
299
382
  declare class JsonObjectExpr extends Expression {
300
383
  readonly kind: "json-object";
301
384
  readonly entries: ReadonlyArray<JsonObjectEntry>;
302
385
  constructor(entries: ReadonlyArray<JsonObjectEntry>);
303
- static entry(key: string, value: ProjectionExpr): JsonObjectEntry;
386
+ static entry(key: string, value: AnyJsonValueProjection): JsonObjectEntry;
304
387
  static fromEntries(entries: ReadonlyArray<JsonObjectEntry>): JsonObjectExpr;
305
388
  accept<R>(visitor: ExprVisitor<R>): R;
306
389
  rewrite(rewriter: ExpressionRewriter): AnyExpression;
@@ -323,11 +406,11 @@ declare class OrderByItem extends AstNode {
323
406
  }
324
407
  declare class JsonArrayAggExpr extends Expression {
325
408
  readonly kind: "json-array-agg";
326
- readonly expr: AnyExpression;
409
+ readonly expr: AnyJsonValueProjection;
327
410
  readonly onEmpty: 'null' | 'emptyArray';
328
411
  readonly orderBy: ReadonlyArray<OrderByItem> | undefined;
329
- constructor(expr: AnyExpression, onEmpty?: 'null' | 'emptyArray', orderBy?: ReadonlyArray<OrderByItem>);
330
- static of(expr: AnyExpression, onEmpty?: 'null' | 'emptyArray', orderBy?: ReadonlyArray<OrderByItem>): JsonArrayAggExpr;
412
+ constructor(expr: AnyJsonValueProjection, onEmpty?: 'null' | 'emptyArray', orderBy?: ReadonlyArray<OrderByItem>);
413
+ static of(expr: AnyJsonValueProjection, onEmpty?: 'null' | 'emptyArray', orderBy?: ReadonlyArray<OrderByItem>): JsonArrayAggExpr;
331
414
  accept<R>(visitor: ExprVisitor<R>): R;
332
415
  rewrite(rewriter: ExpressionRewriter): AnyExpression;
333
416
  fold<T>(folder: ExpressionFolder<T>): T;
@@ -438,9 +521,9 @@ declare class ProjectionItem extends AstNode {
438
521
  readonly alias: string;
439
522
  readonly expr: ProjectionExpr;
440
523
  /**
441
- * Codec identity for the projected cell. Decode-side dispatch resolves the per-instance codec through `contractCodecs.forCodecRef(codec)` — content-keyed memoisation collapses repeated lookups for the same logical column onto one shared {@link Codec}.
524
+ * Codec identity for any known projected result, whether read directly from a contract column or forwarded through a query wrapper. Decode-side dispatch resolves the per-instance codec through `contractCodecs.forCodecRef(codec)` — content-keyed memoisation collapses repeated lookups for the same logical result onto one shared {@link Codec}.
442
525
  *
443
- * Stays `undefined` for non-column-bound projections (computed expressions, subqueries, raw aliases) whose decoded type the runtime cannot infer from a single contract column.
526
+ * Stays `undefined` only when the projected result's codec is unknown, such as computed expressions, subqueries, or raw aliases whose decoded type the runtime cannot infer.
444
527
  */
445
528
  readonly codec: CodecRef | undefined;
446
529
  constructor(alias: string, expr: ProjectionExpr, codec?: CodecRef);
@@ -596,7 +679,7 @@ declare class RawSqlExpr extends QueryAst {
596
679
  }
597
680
  type AnyQueryAst = SelectAst | InsertAst | UpdateAst | DeleteAst | RawSqlExpr;
598
681
  type AnyFromSource = TableSource | DerivedTableSource | FunctionSource;
599
- type AnyExpression = ColumnRef | IdentifierRef | ParamRef | PreparedParamRef | LiteralExpr | SubqueryExpr | OperationExpr | AggregateExpr | WindowFuncExpr | JsonObjectExpr | JsonArrayAggExpr | ListExpression | BinaryExpr | AndExpr | OrExpr | ExistsExpr | NullCheckExpr | NotExpr | RawExpr;
682
+ type AnyExpression = ColumnRef | IdentifierRef | ParamRef | PreparedParamRef | LiteralExpr | SubqueryExpr | OperationExpr | AggregateExpr | WindowFuncExpr | FunctionCallExpr | CastExpr | CaseExpr | JsonObjectExpr | JsonArrayAggExpr | ListExpression | BinaryExpr | AndExpr | OrExpr | ExistsExpr | NullCheckExpr | NotExpr | RawExpr;
600
683
  type AnyParamRef = ParamRef | PreparedParamRef;
601
684
  type AnyInsertOnConflictAction = DoNothingConflictAction | DoUpdateSetConflictAction;
602
685
  type AnyInsertValue = ColumnRef | ParamRef | PreparedParamRef | DefaultValueExpr | RawExpr;
@@ -635,5 +718,5 @@ interface LoweredStatement {
635
718
  readonly annotations?: Record<string, unknown>;
636
719
  }
637
720
  //#endregion
638
- export { RawExpr as $, IdentifierRef as A, ListExpression as B, EqColJoinOn as C, ExpressionRewriter as D, ExpressionFolder as E, JoinOnExpr as F, NullCheckExpr as G, LoweredParam as H, JsonArrayAggExpr as I, OrderByItem as J, OperationExpr as K, JsonObjectEntry as L, InsertOnConflict as M, InsertValue as N, ExpressionSource as O, JoinAst as P, ProjectionItem as Q, JsonObjectExpr as R, DoUpdateSetConflictAction as S, ExprVisitor as T, LoweredStatement as U, LiteralExpr as V, NotExpr as W, PreparedParamRef as X, ParamRef as Y, ProjectionExpr as Z, DefaultValueExpr as _, AndExpr as a, TableRef as at, Direction as b, AnyInsertOnConflictAction as c, UpdateAst as ct, AnyParamRef as d, WindowFuncExpr as dt, RawSqlExpr as et, AnyQueryAst as f, isQueryAst as ft, ColumnRef as g, BinaryOp as h, whereExprKinds as ht, AggregateOpFn as i, SubqueryExpr as it, InsertAst as j, FunctionSource as k, AnyInsertValue as l, WhereArg as lt, BinaryExpr as m, queryAstKinds as mt, AggregateExpr as n, SelectAst as nt, AnyExpression as o, TableSource as ot, AstRewriter as p, isWhereExpr as pt, OrExpr as q, AggregateFn as r, SelectAstOptions as rt, AnyFromSource as s, ToWhereExpr as st, AggregateCountFn as t, RawSqlLiteral as tt, AnyOperationArg as u, WindowFn as ut, DeleteAst as v, ExistsExpr as w, DoNothingConflictAction as x, DerivedTableSource as y, LimitOffsetValue as z };
639
- //# sourceMappingURL=types-DQrmgP8Y.d.mts.map
721
+ export { OrderByItem as $, ExpressionRewriter as A, JoinOnExpr as B, Direction as C, JsonDocumentProjection as Ct, ExistsExpr as D, EqColJoinOn as E, IdentifierRef as F, ListExpression as G, JsonObjectEntry as H, InsertAst as I, LoweredStatement as J, LiteralExpr as K, InsertOnConflict as L, FunctionCallExpr as M, FunctionSource as N, ExprVisitor as O, FunctionSourceAlias as P, OrExpr as Q, InsertValue as R, DerivedTableSource as S, CodecJsonValueProjection as St, DoUpdateSetConflictAction as T, NativeJsonValueProjection as Tt, JsonObjectExpr as U, JsonArrayAggExpr as V, LimitOffsetValue as W, NullCheckExpr as X, NotExpr as Y, OperationExpr as Z, CaseExpr as _, isQueryAst as _t, AndExpr as a, RawSqlExpr as at, DefaultValueExpr as b, whereExprKinds as bt, AnyInsertOnConflictAction as c, SelectAstOptions as ct, AnyParamRef as d, TableSource as dt, ParamRef as et, AnyQueryAst as f, ToWhereExpr as ft, CaseBranch as g, WindowFuncExpr as gt, BinaryOp as h, WindowFn as ht, AggregateOpFn as i, RawExpr as it, ExpressionSource as j, ExpressionFolder as k, AnyInsertValue as l, SubqueryExpr as lt, BinaryExpr as m, WhereArg as mt, AggregateExpr as n, ProjectionExpr as nt, AnyExpression as o, RawSqlLiteral as ot, AstRewriter as p, UpdateAst as pt, LoweredParam as q, AggregateFn as r, ProjectionItem as rt, AnyFromSource as s, SelectAst as st, AggregateCountFn as t, PreparedParamRef as tt, AnyOperationArg as u, TableRef as ut, CastExpr as v, isWhereExpr as vt, DoNothingConflictAction as w, JsonValueProjectionVisitor as wt, DeleteAst as x, AnyJsonValueProjection as xt, ColumnRef as y, queryAstKinds as yt, JoinAst as z };
722
+ //# sourceMappingURL=types-CWlaErjN.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-CWlaErjN.d.mts","names":[],"sources":["../src/ast/json-value-projection.ts","../src/ast/types.ts"],"mappings":";;;;uBASe;oBACK;WACT,OAAO;YAEP,YAAa,OAAO;WAIpB,OAAO,GAAG,SAAS,2BAA2B,KAAK;WACnD,QAAQ,UAAU,qBAAqB;EAEhD,KAAK,GAAG,QAAQ,iBAAiB,KAAK;EAItC,qBAAqB;EAIrB,oBAAoB;YAIV;;UAKK,2BAA2B;EAC1C,MAAM,YAAY,2BAA2B;EAC7C,OAAO,YAAY,4BAA4B;EAC/C,SAAS,YAAY,yBAAyB;;cAGnC,iCAAiC;WACnC;WACA,OAAO;cAEJ,OAAO,gBAAgB,OAAO;EAMjC,OAAO,GAA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