@prisma-next/sql-relational-core 0.5.0-dev.6 → 0.5.0-dev.61

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 (70) hide show
  1. package/README.md +65 -1
  2. package/dist/{errors-ChY_dHam.d.mts → errors-Chs-ph28.d.mts} +2 -2
  3. package/dist/errors-Chs-ph28.d.mts.map +1 -0
  4. package/dist/{errors-D3xmG4h-.mjs → errors-kgKOaDM1.mjs} +1 -1
  5. package/dist/{errors-D3xmG4h-.mjs.map → errors-kgKOaDM1.mjs.map} +1 -1
  6. package/dist/exports/ast.d.mts +154 -85
  7. package/dist/exports/ast.d.mts.map +1 -1
  8. package/dist/exports/ast.mjs +229 -1285
  9. package/dist/exports/ast.mjs.map +1 -1
  10. package/dist/exports/codec-descriptor-registry.d.mts +18 -0
  11. package/dist/exports/codec-descriptor-registry.d.mts.map +1 -0
  12. package/dist/exports/codec-descriptor-registry.mjs +40 -0
  13. package/dist/exports/codec-descriptor-registry.mjs.map +1 -0
  14. package/dist/exports/errors.d.mts +4 -4
  15. package/dist/exports/errors.mjs +1 -1
  16. package/dist/exports/expression.d.mts +84 -0
  17. package/dist/exports/expression.d.mts.map +1 -0
  18. package/dist/exports/expression.mjs +63 -0
  19. package/dist/exports/expression.mjs.map +1 -0
  20. package/dist/exports/plan.d.mts +3 -2
  21. package/dist/exports/plan.mjs +1 -17
  22. package/dist/exports/query-lane-context.d.mts +2 -3
  23. package/dist/exports/types.d.mts +6 -4
  24. package/dist/index.d.mts +10 -9
  25. package/dist/index.mjs +6 -4
  26. package/dist/plan-nwFE15re.d.mts +25 -0
  27. package/dist/plan-nwFE15re.d.mts.map +1 -0
  28. package/dist/query-lane-context-DlWgKvvt.d.mts +175 -0
  29. package/dist/query-lane-context-DlWgKvvt.d.mts.map +1 -0
  30. package/dist/sql-execution-plan-DTfj23Tj.d.mts +33 -0
  31. package/dist/sql-execution-plan-DTfj23Tj.d.mts.map +1 -0
  32. package/dist/types-CO7zrXfK.mjs +1072 -0
  33. package/dist/types-CO7zrXfK.mjs.map +1 -0
  34. package/dist/{types-k9pir8XY.d.mts → types-G3hdNPZZ.d.mts} +12 -19
  35. package/dist/types-G3hdNPZZ.d.mts.map +1 -0
  36. package/dist/{types-C3Hg-CVz.d.mts → types-U74HFwNI.d.mts} +36 -23
  37. package/dist/types-U74HFwNI.d.mts.map +1 -0
  38. package/dist/types-dPxXIUPS.d.mts +24 -0
  39. package/dist/types-dPxXIUPS.d.mts.map +1 -0
  40. package/package.json +12 -8
  41. package/src/ast/adapter-types.ts +6 -14
  42. package/src/ast/codec-types.ts +90 -372
  43. package/src/ast/sql-codec-helpers.ts +79 -0
  44. package/src/ast/sql-codecs.ts +285 -125
  45. package/src/ast/types.ts +170 -175
  46. package/src/ast/util.ts +23 -0
  47. package/src/ast/validate-param-refs.ts +39 -0
  48. package/src/codec-descriptor-registry.ts +52 -0
  49. package/src/exports/ast.ts +2 -0
  50. package/src/exports/codec-descriptor-registry.ts +1 -0
  51. package/src/exports/expression.ts +1 -0
  52. package/src/exports/plan.ts +1 -0
  53. package/src/exports/types.ts +1 -0
  54. package/src/expression.ts +134 -0
  55. package/src/index.ts +1 -0
  56. package/src/plan.ts +11 -30
  57. package/src/query-lane-context.ts +35 -55
  58. package/src/runtime-scope.ts +20 -0
  59. package/src/sql-execution-plan.ts +28 -0
  60. package/src/types.ts +9 -22
  61. package/dist/codec-types-DcEITed4.d.mts +0 -144
  62. package/dist/codec-types-DcEITed4.d.mts.map +0 -1
  63. package/dist/errors-ChY_dHam.d.mts.map +0 -1
  64. package/dist/exports/plan.mjs.map +0 -1
  65. package/dist/plan-Cs65hb-E.d.mts +0 -28
  66. package/dist/plan-Cs65hb-E.d.mts.map +0 -1
  67. package/dist/query-lane-context-UlR8vOkd.d.mts +0 -89
  68. package/dist/query-lane-context-UlR8vOkd.d.mts.map +0 -1
  69. package/dist/types-C3Hg-CVz.d.mts.map +0 -1
  70. package/dist/types-k9pir8XY.d.mts.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,11 +1,12 @@
1
- import { a as CodecMeta, c as CodecRegistry, d as ExtractCodecTypes, f as ExtractDataTypes, h as defineCodecs, i as CodecInput, l as CodecTrait, m as createCodecRegistry, n as CodecDefBuilder, o as CodecOutput, p as codec, r as CodecId, s as CodecParamsDescriptor, t as Codec, u as CodecTraits } from "./codec-types-DcEITed4.mjs";
2
- import { $ as ToWhereExpr, A as InsertOnConflict, B as NotExpr, C as ExistsExpr, D as ExpressionSource, E as ExpressionRewriter, F as JsonObjectEntry, G as ParamRef, H as OperationExpr, I as JsonObjectExpr, J as SelectAst, K as ProjectionExpr, L as ListExpression, M as JoinAst, N as JoinOnExpr, O as IdentifierRef, P as JsonArrayAggExpr, Q as TableSource, R as LiteralExpr, S as EqColJoinOn, T as ExpressionFolder, U as OrExpr, V as NullCheckExpr, W as OrderByItem, X as SubqueryExpr, Y as SelectAstOptions, Z as TableRef, _ as DeleteAst, a as AndExpr, at as whereExprKinds, b as DoNothingConflictAction, c as AnyInsertOnConflictAction, d as AnyQueryAst, et as UpdateAst, f as AstRewriter, g as DefaultValueExpr, h as ColumnRef, i as AggregateOpFn, it as queryAstKinds, j as InsertValue, k as InsertAst, l as AnyInsertValue, m as BinaryOp, n as AggregateExpr, nt as isQueryAst, o as AnyExpression, p as BinaryExpr, q as ProjectionItem, r as AggregateFn, rt as isWhereExpr, s as AnyFromSource, t as AggregateCountFn, tt as WhereArg, u as AnyOperationArg, v as DerivedTableSource, w as ExprVisitor, x as DoUpdateSetConflictAction, y as Direction, z as LoweredStatement } from "./types-C3Hg-CVz.mjs";
3
- import { Adapter, AdapterProfile, AdapterTarget, Lowerer, LowererContext, MarkerStatement, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqlCodecTypes, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlQueryResult, SqlQueryable, SqlTransaction, compact, sqlCodecDefinitions, sqlDataTypes } from "./exports/ast.mjs";
4
- import { n as augmentDescriptorWithColumnMeta, t as SqlQueryPlan } from "./plan-Cs65hb-E.mjs";
5
- import { a as JsonSchemaValidationResult, c as MutationDefaultsOptions, i as JsonSchemaValidationError, l as TypeHelperRegistry, n as ExecutionContext, o as JsonSchemaValidatorRegistry, r as JsonSchemaValidateFn, s as MutationDefaultsOp, t as AppliedMutationDefault } from "./query-lane-context-UlR8vOkd.mjs";
6
- import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ComputeColumnJsType, b as RuntimeError, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, i as ColumnsOf, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as Expr, p as OperationTypes, r as CodecTypes, s as HasIncludeManyCapabilities, t as BuildOptions, u as ModelDef, v as RawTemplateOptions, w as TableKey, x as SqlBuilderOptions, y as ResultType } from "./types-k9pir8XY.mjs";
7
- import { n as planUnsupported, t as planInvalid } from "./errors-ChY_dHam.mjs";
1
+ import { $ as TableSource, A as InsertOnConflict, B as NotExpr, C as ExistsExpr, D as ExpressionSource, E as ExpressionRewriter, F as JsonObjectEntry, G as ParamRef, H as OperationExpr, I as JsonObjectExpr, J as ProjectionItem, K as ParamRefBindingRefs, L as ListExpression, M as JoinAst, N as JoinOnExpr, O as IdentifierRef, P as JsonArrayAggExpr, Q as TableRef, R as LiteralExpr, S as EqColJoinOn, T as ExpressionFolder, U as OrExpr, V as NullCheckExpr, W as OrderByItem, X as SelectAstOptions, Y as SelectAst, Z as SubqueryExpr, _ as DeleteAst, a as AndExpr, at as queryAstKinds, b as DoNothingConflictAction, c as AnyInsertOnConflictAction, d as AnyQueryAst, et as ToWhereExpr, f as AstRewriter, g as DefaultValueExpr, h as ColumnRef, i as AggregateOpFn, it as isWhereExpr, j as InsertValue, k as InsertAst, l as AnyInsertValue, m as BinaryOp, n as AggregateExpr, nt as WhereArg, o as AnyExpression, ot as whereExprKinds, p as BinaryExpr, q as ProjectionExpr, r as AggregateFn, rt as isQueryAst, s as AnyFromSource, t as AggregateCountFn, tt as UpdateAst, u as AnyOperationArg, v as DerivedTableSource, w as ExprVisitor, x as DoUpdateSetConflictAction, y as Direction, z as LoweredStatement } from "./types-U74HFwNI.mjs";
2
+ import { _ as ExtractCodecTypes, a as MutationDefaultsOptions, b as SqlColumnRef, c as Codec, d as CodecMeta, f as CodecTrait, g as DescriptorCodecTraits, h as DescriptorCodecInput, i as MutationDefaultsOp, l as CodecCallContext, m as DescriptorCodecId, n as CodecDescriptorRegistry, o as TypeHelperRegistry, p as ContractCodecRegistry, r as ExecutionContext, s as AnyCodecDescriptor, t as AppliedMutationDefault, u as CodecDescriptor, v as SqlCodecCallContext, y as SqlCodecInstanceContext } from "./query-lane-context-DlWgKvvt.mjs";
3
+ import { Adapter, AdapterProfile, AdapterTarget, Lowerer, LowererContext, MarkerStatement, 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, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlQueryResult, SqlQueryable, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, collectOrderedParamRefs, compact, 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, validateParamRefRefs } from "./exports/ast.mjs";
4
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-DTfj23Tj.mjs";
5
+ import { C as TableKey, S as TableDef, T as TablesOf, _ as RawTemplateFactory, a as ComputeColumnJsType, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, i as ColumnsOf, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as Expr, p as OperationTypes, r as CodecTypes, s as HasIncludeManyCapabilities, t as BuildOptions, u as ModelDef, v as RawTemplateOptions, w as TableMetadata, x as SqlPlan, y as RuntimeError } from "./types-G3hdNPZZ.mjs";
6
+ import { n as planUnsupported, t as planInvalid } from "./errors-Chs-ph28.mjs";
7
+ import { BuildOperationSpec, CodecExpression, Expression, ScopeField, TraitExpression, buildOperation, refsOf, toExpr } from "./exports/expression.mjs";
8
+ import { t as SqlQueryPlan } from "./plan-nwFE15re.mjs";
8
9
  import "./exports/plan.mjs";
9
10
  import "./exports/query-lane-context.mjs";
10
- import "./exports/types.mjs";
11
- export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyOperationArg, AnyQueryAst, AppliedMutationDefault, AstRewriter, BinaryExpr, BinaryOp, BuildOptions, BuildParamsMap, Codec, CodecDefBuilder, CodecId, CodecInput, CodecMeta, CodecOutput, CodecParamsDescriptor, CodecRegistry, CodecTrait, CodecTraits, CodecTypes, ColumnRef, ColumnsOf, ComputeColumnJsType, DefaultValueExpr, DeleteAst, DerivedTableSource, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ExtractDataTypes, HasIncludeManyCapabilities, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonObjectEntry, JsonObjectExpr, JsonSchemaValidateFn, JsonSchemaValidationError, JsonSchemaValidationResult, JsonSchemaValidatorRegistry, ListExpression, LiteralExpr, LoweredStatement, Lowerer, LowererContext, META, MarkerStatement, Meta, ModelDef, ModelMetadata, MutationDefaultsOp, MutationDefaultsOptions, NotExpr, NullCheckExpr, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, ParamRef, ProjectionExpr, ProjectionItem, RawFactory, RawFunctionOptions, RawTemplateFactory, RawTemplateOptions, ResultType, RuntimeError, 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, SelectAstOptions, SqlBuilderOptions, SqlCodecTypes, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlPlan, SqlQueryPlan, SqlQueryResult, SqlQueryable, SqlTransaction, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TypeHelperRegistry, UpdateAst, WhereArg, augmentDescriptorWithColumnMeta, codec, compact, createCodecRegistry, defineCodecs, isQueryAst, isWhereExpr, planInvalid, planUnsupported, queryAstKinds, sqlCodecDefinitions, sqlDataTypes, whereExprKinds };
11
+ import { n as SqlOrmPlan, t as RuntimeScope } from "./types-dPxXIUPS.mjs";
12
+ export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyOperationArg, AnyQueryAst, AppliedMutationDefault, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, Codec, CodecCallContext, CodecDescriptor, CodecDescriptorRegistry, CodecExpression, CodecMeta, CodecTrait, CodecTypes, ColumnRef, ColumnsOf, ComputeColumnJsType, ContractCodecRegistry, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, Expression, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, HasIncludeManyCapabilities, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonObjectEntry, JsonObjectExpr, ListExpression, LiteralExpr, LoweredStatement, Lowerer, LowererContext, META, MarkerStatement, Meta, ModelDef, ModelMetadata, MutationDefaultsOp, MutationDefaultsOptions, NotExpr, NullCheckExpr, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, ParamRef, ParamRefBindingRefs, ProjectionExpr, ProjectionItem, RawFactory, RawFunctionOptions, RawTemplateFactory, RawTemplateOptions, RuntimeError, RuntimeScope, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, ScopeField, SelectAst, SelectAstOptions, SqlBuilderOptions, SqlCharCodec, SqlCharDescriptor, SqlCodecCallContext, SqlCodecInstanceContext, SqlColumnRef, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExecutionPlan, SqlExplainResult, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlOrmPlan, SqlPlan, SqlQueryPlan, SqlQueryResult, SqlQueryable, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TraitExpression, TypeHelperRegistry, UpdateAst, WhereArg, buildOperation, collectOrderedParamRefs, compact, isQueryAst, isWhereExpr, planInvalid, planUnsupported, queryAstKinds, refsOf, 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, validateParamRefRefs, whereExprKinds };
package/dist/index.mjs CHANGED
@@ -1,7 +1,9 @@
1
- import { AggregateExpr, AndExpr, BinaryExpr, ColumnRef, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonObjectExpr, ListExpression, LiteralExpr, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, ProjectionItem, 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, SubqueryExpr, TableSource, UpdateAst, codec, compact, createCodecRegistry, defineCodecs, isQueryAst, isWhereExpr, queryAstKinds, sqlCodecDefinitions, sqlDataTypes, whereExprKinds } from "./exports/ast.mjs";
2
- import { n as planUnsupported, t as planInvalid } from "./errors-D3xmG4h-.mjs";
3
- import { augmentDescriptorWithColumnMeta } from "./exports/plan.mjs";
1
+ import { A as UpdateAst, C as OrExpr, D as SelectAst, E as ProjectionItem, M as isWhereExpr, N as queryAstKinds, O as SubqueryExpr, P as whereExprKinds, S as OperationExpr, T as ParamRef, _ as JsonObjectExpr, a as DefaultValueExpr, b as NotExpr, c as DoNothingConflictAction, d as ExistsExpr, f as IdentifierRef, g as JsonArrayAggExpr, h as JoinAst, i as ColumnRef, j as isQueryAst, k as TableSource, l as DoUpdateSetConflictAction, m as InsertOnConflict, n as AndExpr, o as DeleteAst, p as InsertAst, r as BinaryExpr, s as DerivedTableSource, t as AggregateExpr, u as EqColJoinOn, v as ListExpression, w as OrderByItem, x as NullCheckExpr, y as LiteralExpr } from "./types-CO7zrXfK.mjs";
2
+ 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, collectOrderedParamRefs, compact, 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, validateParamRefRefs } from "./exports/ast.mjs";
3
+ import { n as planUnsupported, t as planInvalid } from "./errors-kgKOaDM1.mjs";
4
+ import { buildOperation, refsOf, toExpr } from "./exports/expression.mjs";
5
+ import "./exports/plan.mjs";
4
6
  import "./exports/query-lane-context.mjs";
5
7
  import "./exports/types.mjs";
6
8
 
7
- export { AggregateExpr, AndExpr, BinaryExpr, ColumnRef, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonObjectExpr, ListExpression, LiteralExpr, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, ProjectionItem, 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, SubqueryExpr, TableSource, UpdateAst, augmentDescriptorWithColumnMeta, codec, compact, createCodecRegistry, defineCodecs, isQueryAst, isWhereExpr, planInvalid, planUnsupported, queryAstKinds, sqlCodecDefinitions, sqlDataTypes, whereExprKinds };
9
+ export { AggregateExpr, AndExpr, BinaryExpr, ColumnRef, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonObjectExpr, ListExpression, LiteralExpr, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, ProjectionItem, 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, UpdateAst, buildOperation, collectOrderedParamRefs, compact, isQueryAst, isWhereExpr, planInvalid, planUnsupported, queryAstKinds, refsOf, 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, validateParamRefRefs, whereExprKinds };
@@ -0,0 +1,25 @@
1
+ import { d as AnyQueryAst } from "./types-U74HFwNI.mjs";
2
+ import { QueryPlan } from "@prisma-next/framework-components/runtime";
3
+
4
+ //#region src/plan.d.ts
5
+
6
+ /**
7
+ * SQL query plan produced by lanes before lowering.
8
+ *
9
+ * Lanes build ASTs and metadata but do not perform SQL lowering. The `sql`
10
+ * field is absent — `RuntimeCore` (the runtime base class in
11
+ * `@prisma-next/framework-components/runtime`) drives lowering via the
12
+ * SQL adapter and produces a `SqlExecutionPlan`.
13
+ *
14
+ * Extends the framework-level `QueryPlan<Row>` marker (`meta + _row`) and
15
+ * adds SQL-specific fields (`ast`, `params`). The phantom `_row` property
16
+ * (inherited from `QueryPlan`) is what `ResultType<P>` inspects to recover
17
+ * the row type.
18
+ */
19
+ interface SqlQueryPlan<Row = unknown> extends QueryPlan<Row> {
20
+ readonly ast: AnyQueryAst;
21
+ readonly params: readonly unknown[];
22
+ }
23
+ //#endregion
24
+ export { SqlQueryPlan as t };
25
+ //# sourceMappingURL=plan-nwFE15re.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-nwFE15re.d.mts","names":[],"sources":["../src/plan.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgBA;;;;;;;;;;;UAAiB,oCAAoC,UAAU;gBAC/C"}
@@ -0,0 +1,175 @@
1
+ import { Codec, CodecCallContext, CodecCallContext as CodecCallContext$1, CodecDescriptor, CodecDescriptor as CodecDescriptor$1, CodecInstanceContext, CodecTrait, CodecTrait as CodecTrait$1 } from "@prisma-next/framework-components/codec";
2
+ import { Contract } from "@prisma-next/contract/types";
3
+ import { SqlOperationRegistry } from "@prisma-next/sql-operations";
4
+ import { SqlStorage } from "@prisma-next/sql-contract/types";
5
+
6
+ //#region src/ast/codec-types.d.ts
7
+
8
+ /**
9
+ * SQL-family addressing of a single column. The decode site populates a `SqlColumnRef` whenever it can resolve the cell to a single underlying `(table, column)` (the typical case for projected columns from a single-table source); cells the runtime cannot resolve (aggregate aliases, include aggregate fields, computed projections without a simple ref) get `column = undefined`.
10
+ *
11
+ * The shape is a structural projection of the runtime's `ColumnRef` so the SQL decode site can reuse the resolution it already performs for `RUNTIME.DECODE_FAILED` envelope construction without allocating twice per cell.
12
+ */
13
+ interface SqlColumnRef {
14
+ readonly table: string;
15
+ readonly name: string;
16
+ }
17
+ /**
18
+ * SQL-family per-call context. Extends the framework {@link CodecCallContext} (which carries `signal` only) with `column?: SqlColumnRef`, populated on **decode** call sites that can resolve a single underlying column ref. Encode call sites currently leave `column` undefined (encode-time column context is the middleware's domain).
19
+ *
20
+ * SQL codec authors writing codec methods observe this type via {@link SqlCodec}. The framework codec dispatch surface (and Mongo) sees only the base `CodecCallContext`.
21
+ */
22
+ interface SqlCodecCallContext extends CodecCallContext {
23
+ readonly column?: SqlColumnRef;
24
+ }
25
+ /**
26
+ * SQL-family per-instance context. Extends the framework {@link CodecInstanceContext} (`name` only) with `usedAt`, the set of `(table, column)` pairs the resolved codec serves.
27
+ *
28
+ * - For `typeRef` columns sharing one named `storage.types` instance, the array lists every referencing column — a column-scoped stateful codec (e.g. encryption) can derive aggregated per-instance state across all the columns sharing the named instance.
29
+ * - For inline-`typeParams` columns, the array has exactly one entry — the column that owns the inline params.
30
+ * - For shared non-parameterized codecs, the array carries one representative entry (the column that triggered materialization); the codec is shared across every column with that codec id, so the `usedAt` is informational only.
31
+ *
32
+ * SQL extensions consuming `usedAt` (e.g. column-scoped state derivation) type their factory parameter as `SqlCodecInstanceContext`. Extensions that don't read `usedAt` type their factory parameter as the family-agnostic {@link CodecInstanceContext} — a `SqlCodecInstanceContext` is structurally assignable to the base.
33
+ */
34
+ interface SqlCodecInstanceContext extends CodecInstanceContext {
35
+ readonly usedAt: ReadonlyArray<{
36
+ readonly table: string;
37
+ readonly column: string;
38
+ }>;
39
+ }
40
+ /**
41
+ * Codec metadata for database-specific type information. Used for schema introspection and verification.
42
+ */
43
+ interface CodecMeta {
44
+ readonly db?: {
45
+ readonly sql?: {
46
+ readonly postgres?: {
47
+ readonly nativeType: string;
48
+ };
49
+ };
50
+ };
51
+ }
52
+ /**
53
+ * SQL codec — extends the framework codec base by narrowing the per-call context to the SQL-family {@link SqlCodecCallContext} (adds `column?: SqlColumnRef`). TypeScript treats method-syntax declarations bivariantly, so the SQL narrowing is structurally compatible with the framework {@link BaseCodec} super-interface.
54
+ *
55
+ * Codec-id-keyed static metadata (`traits`, `targetTypes`, `meta`, `paramsSchema`, `renderOutputType`) lives on the unified {@link import('@prisma-next/framework-components/codec').CodecDescriptor} — the codec instance itself only carries `id` plus the four conversion methods.
56
+ *
57
+ * See `Codec` in `@prisma-next/framework-components/codec` for the codec contract that this interface extends.
58
+ */
59
+ interface Codec$1<Id extends string = string, TTraits$1 extends readonly CodecTrait[] = readonly CodecTrait[], TWire = unknown, TInput = unknown> extends Codec<Id, TTraits$1, TWire, TInput> {
60
+ encode(value: TInput, ctx: SqlCodecCallContext): Promise<TWire>;
61
+ decode(wire: TWire, ctx: SqlCodecCallContext): Promise<TInput>;
62
+ }
63
+ /**
64
+ * Contract-bound codec registry.
65
+ *
66
+ * The dispatch interface for encode/decode at runtime: built once at `ExecutionContext` construction time by walking the contract's `storage.tables[].columns[]` and resolving each column through its descriptor's factory (per-instance for parameterized columns; the cached shared codec for non-parameterized columns). The dispatch path calls `forColumn(table, column).encode/decode(...)` and doesn't know whether the codec
67
+ * is parameterized.
68
+ *
69
+ * `forCodecId(codecId)` is the refs-less fallback. Every column-bound `ParamRef` carries `refs: { table; column }` and the builder-pipeline `validateParamRefRefs` pass enforces refs on every parameterized `ParamRef` before encode runs, so this fallback is only reached for non-parameterized codec ids.
70
+ */
71
+ interface ContractCodecRegistry {
72
+ /**
73
+ * Resolve the codec for `(table, column)`. Returns the per-instance parameterized codec for parameterized columns, the shared codec for non-parameterized columns, or `undefined` if the column is unknown or the codec isn't registered.
74
+ */
75
+ forColumn(table: string, column: string): Codec$1 | undefined;
76
+ /**
77
+ * Resolve a codec by id. For non-parameterized codecs this returns the canonical shared instance materialized once at context construction; for parameterized codecs it returns the column-resolved instance when a single column declares the codec id, or the `factory(undefined)` representative when the descriptor's factory is parameter-tolerant. Used by refs-less call sites; the validator pass guarantees the call site's
78
+ * `codecId` is non-parameterized (or parameter-tolerant) at this boundary.
79
+ */
80
+ forCodecId(codecId: string): Codec$1 | undefined;
81
+ }
82
+ /**
83
+ * Variance-erased descriptor type used for heterogeneous storage in collection containers and on the unified contributor `codecs:` slot. The descriptor's `factory` and `renderOutputType` are contravariant in `P`, so descriptors with different params shapes are not in a subtype relationship; collecting them into one container needs an explicit variance erasure rather than `CodecDescriptor<unknown>` (which is the
84
+ * narrowest, not the widest, of the family).
85
+ */
86
+ type AnyCodecDescriptor = CodecDescriptor<any>;
87
+ type DescriptorResolvedCodec<D> = D extends CodecDescriptor<infer _P> ? ReturnType<ReturnType<D['factory']>> : never;
88
+ type DescriptorCodecId<D> = D extends AnyCodecDescriptor ? D['codecId'] : never;
89
+ type DescriptorCodecInput<D> = DescriptorResolvedCodec<D> extends Codec<string, readonly CodecTrait[], unknown, infer In> ? In : never;
90
+ /**
91
+ * Resolve the trait union for a descriptor `D`.
92
+ *
93
+ * Reads `traits` directly off the descriptor — concrete descriptor classes declare `override readonly traits = [...] as const`, which preserves the literal trait tuple at the descriptor type. Reading from the resolved codec instance (`CodecImpl<…, TTraits, …>`) would lose the literal because `Codec` carries `TTraits` only on its optional phantom slot (`readonly __codecTraits?: TTraits`); codecs extending `CodecImpl`
94
+ * have no required structural site that pins `TTraits`, so a descriptor-keyed extractor reading from the codec instance would widen to the broad `CodecTrait` union.
95
+ */
96
+ type DescriptorCodecTraits<D> = D extends {
97
+ readonly traits: infer TTraits extends readonly CodecTrait[];
98
+ } ? TTraits[number] & CodecTrait : never;
99
+ /**
100
+ * Project a record of {@link AnyCodecDescriptor}s keyed by scalar name onto the codec-id-keyed `CodecTypes` shape consumed by emit and no-emit type pipelines (`{ readonly [codecId]: { input; output; traits } }`).
101
+ *
102
+ * Canonical extractor for the descriptor-keyed type pipeline; the legacy instance-keyed extractor and its `mkCodec`-bound builder retired alongside the carrier deletion.
103
+ */
104
+ type ExtractCodecTypes<ScalarNames extends { readonly [K in keyof ScalarNames]: AnyCodecDescriptor } = Record<never, never>> = { readonly [K in keyof ScalarNames as DescriptorCodecId<ScalarNames[K]>]: {
105
+ readonly input: DescriptorCodecInput<ScalarNames[K]>;
106
+ readonly output: DescriptorCodecInput<ScalarNames[K]>;
107
+ readonly traits: DescriptorCodecTraits<ScalarNames[K]>;
108
+ } };
109
+ //#endregion
110
+ //#region src/query-lane-context.d.ts
111
+ /**
112
+ * 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).
113
+ */
114
+ interface CodecDescriptorRegistry {
115
+ /**
116
+ * Descriptors carry distinct param shapes per codec id; the registry is heterogeneous and the consumer narrows per codec.
117
+ */
118
+ descriptorFor(codecId: string): CodecDescriptor<unknown> | undefined;
119
+ /**
120
+ * All registered descriptors. Used by `validateCodecRegistryCompleteness` and other startup-time consumers that enumerate descriptors.
121
+ */
122
+ values(): IterableIterator<CodecDescriptor<unknown>>;
123
+ /**
124
+ * Descriptors indexed by `targetTypes[i]` (each scalar type the codec advertises). Multiple descriptors may map to the same scalar type; ordering reflects registration order.
125
+ */
126
+ byTargetType(targetType: string): readonly CodecDescriptor<unknown>[];
127
+ }
128
+ /**
129
+ * Registry of initialized type helpers from storage.types. Each key is a type name from storage.types, and the value is the resolved codec materialized once for that named instance via `descriptor.factory(typeParams)(ctx)` (or the raw `StorageTypeInstance` metadata for codec ids whose descriptor isn't registered).
130
+ */
131
+ type TypeHelperRegistry = Record<string, unknown>;
132
+ type MutationDefaultsOp = 'create' | 'update';
133
+ type AppliedMutationDefault = {
134
+ readonly column: string;
135
+ readonly value: unknown;
136
+ };
137
+ type MutationDefaultsOptions = {
138
+ readonly op: MutationDefaultsOp;
139
+ readonly table: string;
140
+ readonly values: Record<string, unknown>;
141
+ /**
142
+ * Per-ORM-operation cache for generators that declare `stability: 'query'`. The caller passes the same `Map` across every `applyMutationDefaults` invocation in one bulk operation; the framework keys by `generatorId` so the same value is reused across all rows and columns. Generators with `stability: 'row'` use a fresh per-call cache the framework manages internally; generators with `stability: 'field'` skip caching
143
+ * entirely. Omit to make every call independent (degrades `'query'` to per-call behavior).
144
+ */
145
+ readonly defaultValueCache?: Map<string, unknown>;
146
+ };
147
+ /**
148
+ * Minimal context interface for SQL query lanes.
149
+ *
150
+ * Lanes only need contract, operations, and codecs to build typed ASTs and attach operation builders. This interface explicitly excludes runtime concerns like adapters, connection management, and transaction state.
151
+ */
152
+ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<SqlStorage>> {
153
+ readonly contract: TContract;
154
+ /**
155
+ * Contract-bound codec registry built once at context-construction time by walking the contract's columns and resolving each through its descriptor's factory. The dispatch path (`encodeParam` / `decodeRow`) consults `forColumn(table, column)` for column-bound call sites; `forCodecId(codecId)` is the refs-less fallback, permitted only for non-parameterized codec ids (the builder-pipeline validator pass enforces refs on
156
+ * every parameterized `ParamRef`). Pre-populated with one canonical instance per non-parameterized descriptor so `forCodecId` covers refs-less codec ids that no contract column declares.
157
+ */
158
+ readonly contractCodecs: ContractCodecRegistry;
159
+ /**
160
+ * Codec-id-keyed descriptor map. Single source of truth for codec-id-keyed metadata (`traits`, `targetTypes`, `meta`) — every codec, parameterized or not, resolves through this map without branching.
161
+ */
162
+ readonly codecDescriptors: CodecDescriptorRegistry;
163
+ readonly queryOperations: SqlOperationRegistry;
164
+ /**
165
+ * Type helper registry for parameterized types. Schema builders expose these helpers via schema.types.
166
+ */
167
+ readonly types: TypeHelperRegistry;
168
+ /**
169
+ * Applies execution-time mutation defaults for the given table. Returns the applied defaults (caller-provided values always win).
170
+ */
171
+ applyMutationDefaults(options: MutationDefaultsOptions): ReadonlyArray<AppliedMutationDefault>;
172
+ }
173
+ //#endregion
174
+ export { ExtractCodecTypes as _, MutationDefaultsOptions as a, SqlColumnRef as b, Codec$1 as c, CodecMeta as d, CodecTrait$1 as f, DescriptorCodecTraits as g, DescriptorCodecInput as h, MutationDefaultsOp as i, CodecCallContext$1 as l, DescriptorCodecId as m, CodecDescriptorRegistry as n, TypeHelperRegistry as o, ContractCodecRegistry as p, ExecutionContext as r, AnyCodecDescriptor as s, AppliedMutationDefault as t, CodecDescriptor$1 as u, SqlCodecCallContext as v, SqlCodecInstanceContext as y };
175
+ //# sourceMappingURL=query-lane-context-DlWgKvvt.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-lane-context-DlWgKvvt.d.mts","names":[],"sources":["../src/ast/codec-types.ts","../src/query-lane-context.ts"],"sourcesContent":[],"mappings":"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"}
@@ -0,0 +1,33 @@
1
+ import { d as AnyQueryAst } from "./types-U74HFwNI.mjs";
2
+ import { ExecutionPlan } from "@prisma-next/framework-components/runtime";
3
+
4
+ //#region src/sql-execution-plan.d.ts
5
+
6
+ /**
7
+ * SQL-domain execution plan: a query lowered to the wire-level shape that a
8
+ * SQL driver can run.
9
+ *
10
+ * The plan carries:
11
+ * - `sql` — the rendered SQL text
12
+ * - `params` — the bound parameter list
13
+ * - `ast` — optional pre-lowering AST, retained for telemetry / debugging
14
+ * - `meta` — family-agnostic plan metadata (target, lane, hashes, ...)
15
+ * - `_row` — phantom row type, propagated from the originating `SqlQueryPlan`
16
+ *
17
+ * Extends the framework-level `ExecutionPlan<Row>` marker so generic SPIs
18
+ * (`RuntimeExecutor<SqlExecutionPlan>`, `RuntimeMiddleware<SqlExecutionPlan>`)
19
+ * can be parameterized over it.
20
+ *
21
+ * Co-located with `SqlQueryPlan` (its pre-lowering counterpart) in the lanes
22
+ * layer because lane-level utilities (`RawTemplateFactory`, `RawFactory`,
23
+ * `SqlPlan`) compose against the executable shape and the lanes layer cannot
24
+ * depend on the runtime layer.
25
+ */
26
+ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
27
+ readonly sql: string;
28
+ readonly params: readonly unknown[];
29
+ readonly ast?: AnyQueryAst;
30
+ }
31
+ //#endregion
32
+ export { SqlExecutionPlan as t };
33
+ //# sourceMappingURL=sql-execution-plan-DTfj23Tj.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-execution-plan-DTfj23Tj.d.mts","names":[],"sources":["../src/sql-execution-plan.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuBA;;;;;;;;;;;;;;;;;;UAAiB,wCAAwC,cAAc;;;iBAGtD"}