@prisma-next/sql-relational-core 0.12.0-dev.7 → 0.12.0-dev.71
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.
- package/dist/{codec-types-Cezo7k-i.d.mts → codec-types-Df1I_oSx.d.mts} +1 -1
- package/dist/{codec-types-Cezo7k-i.d.mts.map → codec-types-Df1I_oSx.d.mts.map} +1 -1
- package/dist/ddl-types-CUSEHM1Z.d.mts +126 -0
- package/dist/ddl-types-CUSEHM1Z.d.mts.map +1 -0
- package/dist/ddl-types-X9_XHUl0.mjs +130 -0
- package/dist/ddl-types-X9_XHUl0.mjs.map +1 -0
- package/dist/{errors-DyOlJVVe.d.mts → errors-BQLDsT4Q.d.mts} +2 -2
- package/dist/{errors-DyOlJVVe.d.mts.map → errors-BQLDsT4Q.d.mts.map} +1 -1
- package/dist/{errors-BF7W5uUd.mjs → errors-BwyJxXME.mjs} +1 -1
- package/dist/{errors-BF7W5uUd.mjs.map → errors-BwyJxXME.mjs.map} +1 -1
- package/dist/exports/ast.d.mts +11 -15
- package/dist/exports/ast.d.mts.map +1 -1
- package/dist/exports/ast.mjs +4 -3
- package/dist/exports/ast.mjs.map +1 -1
- package/dist/exports/codec-descriptor-registry.d.mts +3 -3
- package/dist/exports/codec-descriptor-registry.mjs +6 -9
- package/dist/exports/codec-descriptor-registry.mjs.map +1 -1
- package/dist/exports/contract-free.d.mts +161 -0
- package/dist/exports/contract-free.d.mts.map +1 -0
- package/dist/exports/contract-free.mjs +268 -0
- package/dist/exports/contract-free.mjs.map +1 -0
- package/dist/exports/errors.d.mts +1 -1
- package/dist/exports/errors.mjs +1 -1
- package/dist/exports/expression.d.mts +2 -2
- package/dist/exports/expression.d.mts.map +1 -1
- package/dist/exports/expression.mjs +1 -1
- package/dist/exports/middleware.d.mts +2 -2
- package/dist/exports/middleware.mjs +1 -1
- package/dist/exports/plan.d.mts +2 -2
- package/dist/exports/query-lane-context.d.mts +1 -1
- package/dist/exports/types.d.mts +3 -3
- package/dist/index.d.mts +12 -11
- package/dist/index.mjs +6 -5
- package/dist/{middleware-B0yz0pff.mjs → middleware-CMr4CHNz.mjs} +2 -2
- package/dist/{middleware-B0yz0pff.mjs.map → middleware-CMr4CHNz.mjs.map} +1 -1
- package/dist/{middleware-wAl5AE2L.d.mts → middleware-H5EG_C4e.d.mts} +2 -2
- package/dist/{middleware-wAl5AE2L.d.mts.map → middleware-H5EG_C4e.d.mts.map} +1 -1
- package/dist/{plan-DOddRU_l.d.mts → plan-Dd-t9rIQ.d.mts} +3 -3
- package/dist/plan-Dd-t9rIQ.d.mts.map +1 -0
- package/dist/{query-lane-context-Dw1Tz0kv.d.mts → query-lane-context-Dax7DapC.d.mts} +3 -3
- package/dist/{query-lane-context-Dw1Tz0kv.d.mts.map → query-lane-context-Dax7DapC.d.mts.map} +1 -1
- package/dist/{sql-execution-plan-DeBoZUre.d.mts → sql-execution-plan-BngECpWj.d.mts} +2 -2
- package/dist/{sql-execution-plan-DeBoZUre.d.mts.map → sql-execution-plan-BngECpWj.d.mts.map} +1 -1
- package/dist/{types-ptGgzUQd.d.mts → types-CfID8M7D.d.mts} +7 -7
- package/dist/{types-ptGgzUQd.d.mts.map → types-CfID8M7D.d.mts.map} +1 -1
- package/dist/{types-BKeEhnEl.d.mts → types-CnBcZ9NS.d.mts} +13 -6
- package/dist/types-CnBcZ9NS.d.mts.map +1 -0
- package/dist/{types-BS8Mm93x.mjs → types-D72v8s92.mjs} +16 -5
- package/dist/{types-BS8Mm93x.mjs.map → types-D72v8s92.mjs.map} +1 -1
- package/dist/{types-CkfUpAlx.d.mts → types-jaK2vi4A.d.mts} +3 -3
- package/dist/{types-CkfUpAlx.d.mts.map → types-jaK2vi4A.d.mts.map} +1 -1
- package/dist/{util-DWmhUCEO.mjs → util-DQQgv2j1.mjs} +1 -1
- package/dist/{util-DWmhUCEO.mjs.map → util-DQQgv2j1.mjs.map} +1 -1
- package/package.json +14 -13
- package/src/ast/adapter-types.ts +0 -5
- package/src/ast/ddl-types.ts +198 -0
- package/src/ast/types.ts +22 -6
- package/src/codec-ref-for-column.ts +7 -9
- package/src/contract-free/column.ts +56 -0
- package/src/contract-free/dml.ts +17 -0
- package/src/contract-free/table.ts +390 -0
- package/src/exports/ast.ts +1 -0
- package/src/exports/contract-free.ts +26 -0
- package/src/types.ts +3 -3
- package/dist/plan-DOddRU_l.d.mts.map +0 -1
- package/dist/types-BKeEhnEl.d.mts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { a as CodecMeta, c as ContractCodecRegistry, d as DescriptorCodecTraits, f as ExtractCodecTypes, h as SqlColumnRef, i as CodecDescriptor, l as DescriptorCodecId, m as SqlCodecInstanceContext, n as Codec, o as CodecRef, p as SqlCodecCallContext, r as CodecCallContext, s as CodecTrait, t as AnyCodecDescriptor, u as DescriptorCodecInput } from "./codec-types-
|
|
2
|
-
import { $ as RawSqlExpr, A as InsertAst, B as LiteralExpr, C as EqColJoinOn, D as ExpressionRewriter, E as ExpressionFolder, F as JsonArrayAggExpr, G as OperationExpr, H as LoweredStatement, I as JsonObjectEntry, J as ParamRef, K as OrExpr, L as JsonObjectExpr, M as InsertValue, N as JoinAst, O as ExpressionSource, P as JoinOnExpr, Q as RawExpr, R as LimitOffsetValue, S as DoUpdateSetConflictAction, T as ExprVisitor, U as NotExpr, V as LoweredParam, W as NullCheckExpr, X as ProjectionExpr, Y as PreparedParamRef, Z as ProjectionItem, _ as DefaultValueExpr, a as AndExpr, at as TableSource, b as Direction, c as AnyInsertOnConflictAction, ct as WhereArg, d as AnyParamRef, dt as isQueryAst, et as RawSqlLiteral, f as AnyQueryAst, ft as isWhereExpr, g as ColumnRef, h as BinaryOp, i as AggregateOpFn, it as TableRef, j as InsertOnConflict, k as IdentifierRef, l as AnyInsertValue, lt as WindowFn, m as BinaryExpr, mt as whereExprKinds, n as AggregateExpr, nt as SelectAstOptions, o as AnyExpression, ot as ToWhereExpr, p as AstRewriter, pt as queryAstKinds, q as OrderByItem, r as AggregateFn, rt as SubqueryExpr, s as AnyFromSource, st as UpdateAst, t as AggregateCountFn, tt as SelectAst, u as AnyOperationArg, ut as WindowFuncExpr, v as DeleteAst, w as ExistsExpr, x as DoNothingConflictAction, y as DerivedTableSource, z as ListExpression } from "./types-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
1
|
+
import { a as CodecMeta, c as ContractCodecRegistry, d as DescriptorCodecTraits, f as ExtractCodecTypes, h as SqlColumnRef, i as CodecDescriptor, l as DescriptorCodecId, m as SqlCodecInstanceContext, n as Codec, o as CodecRef, p as SqlCodecCallContext, r as CodecCallContext, s as CodecTrait, t as AnyCodecDescriptor, u as DescriptorCodecInput } from "./codec-types-Df1I_oSx.mjs";
|
|
2
|
+
import { $ as RawSqlExpr, A as InsertAst, B as LiteralExpr, C as EqColJoinOn, D as ExpressionRewriter, E as ExpressionFolder, F as JsonArrayAggExpr, G as OperationExpr, H as LoweredStatement, I as JsonObjectEntry, J as ParamRef, K as OrExpr, L as JsonObjectExpr, M as InsertValue, N as JoinAst, O as ExpressionSource, P as JoinOnExpr, Q as RawExpr, R as LimitOffsetValue, S as DoUpdateSetConflictAction, T as ExprVisitor, U as NotExpr, V as LoweredParam, W as NullCheckExpr, X as ProjectionExpr, Y as PreparedParamRef, Z as ProjectionItem, _ as DefaultValueExpr, a as AndExpr, at as TableSource, b as Direction, c as AnyInsertOnConflictAction, ct as WhereArg, d as AnyParamRef, dt as isQueryAst, et as RawSqlLiteral, f as AnyQueryAst, ft as isWhereExpr, g as ColumnRef, h as BinaryOp, i as AggregateOpFn, it as TableRef, j as InsertOnConflict, k as IdentifierRef, l as AnyInsertValue, lt as WindowFn, m as BinaryExpr, mt as whereExprKinds, n as AggregateExpr, nt as SelectAstOptions, o as AnyExpression, ot as ToWhereExpr, p as AstRewriter, pt as queryAstKinds, q as OrderByItem, r as AggregateFn, rt as SubqueryExpr, s as AnyFromSource, st as UpdateAst, t as AggregateCountFn, tt as SelectAst, u as AnyOperationArg, ut as WindowFuncExpr, v as DeleteAst, w as ExistsExpr, x as DoNothingConflictAction, y as DerivedTableSource, z as ListExpression } from "./types-CnBcZ9NS.mjs";
|
|
3
|
+
import { a as DdlColumnRenderContext, c as ForeignKeyConstraint, d as PrimaryKeyConstraint, f as UniqueConstraint, i as DdlColumnDefaultVisitor, l as FunctionColumnDefault, n as DdlColumn, o as DdlNode, p as isDdlNode, r as DdlColumnDefault, s as DdlTableConstraint, t as AnyDdlColumnDefault, u as LiteralColumnDefault } from "./ddl-types-CUSEHM1Z.mjs";
|
|
4
|
+
import { Adapter, AdapterProfile, AdapterTarget, Lowerer, LowererContext, MarkerReadResult, PreparedExecuteRequest, 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 } from "./exports/ast.mjs";
|
|
5
|
+
import { a as MutationDefaultsOptions, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as TypeHelperRegistry, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-Dax7DapC.mjs";
|
|
6
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-BngECpWj.mjs";
|
|
7
|
+
import { C as TableMetadata, S as TableKey, _ as RawTemplateOptions, a as ComputeColumnJsType, b as SqlPlan, c as Meta, d as OperationTypeSignature, f as OperationTypes, g as RawTemplateFactory, h as RawFunctionOptions, i as ColumnsOf, l as ModelDef, m as RawFactory, n as BuildParamsMap, o as Expr, p as OperationsForTypeId, r as CodecTypes, s as META, t as BuildOptions, u as ModelMetadata, v as RuntimeError, w as TablesOf, x as TableDef, y as SqlBuilderOptions } from "./types-CfID8M7D.mjs";
|
|
8
|
+
import { n as planUnsupported, t as planInvalid } from "./errors-BQLDsT4Q.mjs";
|
|
8
9
|
import { BuildOperationSpec, CodecExpression, CodecTypesBase, CodecValue, Expression, RawCodecInferer, RawSqlBuilder, RawSqlTag, ScopeField, TraitExpression, buildOperation, codecOf, createRawSql, param, toExpr } from "./exports/expression.mjs";
|
|
9
|
-
import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-
|
|
10
|
-
import { n as planFromAst, t as SqlQueryPlan } from "./plan-
|
|
11
|
-
import { n as SqlOrmPlan, t as RuntimeScope } from "./types-
|
|
12
|
-
export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyOperationArg, AnyParamRef, AnyQueryAst, AppliedMutationDefault, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, Codec, CodecCallContext, CodecDescriptor, CodecDescriptorRegistry, CodecExpression, CodecMeta, CodecRef, CodecTrait, CodecTypes, CodecTypesBase, CodecValue, ColumnRef, ColumnsOf, ComputeColumnJsType, ContractCodecRegistry, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, Expression, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonObjectEntry, JsonObjectExpr, LimitOffsetValue, ListExpression, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, META, MarkerReadResult,
|
|
10
|
+
import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-H5EG_C4e.mjs";
|
|
11
|
+
import { n as planFromAst, t as SqlQueryPlan } from "./plan-Dd-t9rIQ.mjs";
|
|
12
|
+
import { n as SqlOrmPlan, t as RuntimeScope } from "./types-jaK2vi4A.mjs";
|
|
13
|
+
export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyOperationArg, AnyParamRef, AnyQueryAst, AppliedMutationDefault, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, Codec, type CodecCallContext, type CodecDescriptor, CodecDescriptorRegistry, CodecExpression, CodecMeta, type CodecRef, type CodecTrait, CodecTypes, CodecTypesBase, CodecValue, ColumnRef, ColumnsOf, ComputeColumnJsType, ContractCodecRegistry, DdlColumn, DdlColumnDefault, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, Expression, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionColumnDefault, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonObjectEntry, JsonObjectExpr, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, META, MarkerReadResult, Meta, ModelDef, ModelMetadata, MutationDefaultsOp, MutationDefaultsOptions, NotExpr, NullCheckExpr, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, ParamRef, type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, PreparedExecuteRequest, PreparedParamRef, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawCodecInferer, RawExpr, RawFactory, RawFunctionOptions, RawSqlBuilder, RawSqlExpr, RawSqlLiteral, RawSqlTag, RawTemplateFactory, RawTemplateOptions, RuntimeError, type 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, type SqlExecutionPlan, SqlExplainResult, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, type SqlOrmPlan, type SqlParamRefMutator, type SqlParamRefMutatorInternal, SqlPlan, SqlQueryPlan, SqlQueryResult, SqlQueryable, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TraitExpression, TypeHelperRegistry, UniqueConstraint, UpdateAst, WhereArg, WindowFn, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
1
|
+
import { a as FunctionColumnDefault, c as UniqueConstraint, i as ForeignKeyConstraint, l as isDdlNode, n as DdlColumnDefault, o as LiteralColumnDefault, r as DdlNode, s as PrimaryKeyConstraint, t as DdlColumn } from "./ddl-types-X9_XHUl0.mjs";
|
|
2
|
+
import { A as SelectAst, C as OrExpr, D as ProjectionItem, E as PreparedParamRef, F as isQueryAst, I as isWhereExpr, L as queryAstKinds, M as TableSource, N as UpdateAst, O as RawExpr, P as WindowFuncExpr, R 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 SubqueryExpr, k as RawSqlExpr, 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-D72v8s92.mjs";
|
|
3
|
+
import { n as compact, t as collectOrderedParamRefs } from "./util-DQQgv2j1.mjs";
|
|
3
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";
|
|
4
|
-
import { n as planUnsupported, t as planInvalid } from "./errors-
|
|
5
|
+
import { n as planUnsupported, t as planInvalid } from "./errors-BwyJxXME.mjs";
|
|
5
6
|
import { buildOperation, codecOf, createRawSql, param, toExpr } from "./exports/expression.mjs";
|
|
6
|
-
import { t as createSqlParamRefMutator } from "./middleware-
|
|
7
|
+
import { t as createSqlParamRefMutator } from "./middleware-CMr4CHNz.mjs";
|
|
7
8
|
import { planFromAst } from "./exports/plan.mjs";
|
|
8
9
|
import "./exports/query-lane-context.mjs";
|
|
9
10
|
import "./exports/types.mjs";
|
|
10
|
-
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, PreparedParamRef, 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, UpdateAst, WindowFuncExpr, buildOperation, codecOf, collectOrderedParamRefs, compact, createRawSql, createSqlParamRefMutator, 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 };
|
|
11
|
+
export { AggregateExpr, AndExpr, BinaryExpr, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionColumnDefault, 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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as collectOrderedParamRefs } from "./util-
|
|
1
|
+
import { t as collectOrderedParamRefs } from "./util-DQQgv2j1.mjs";
|
|
2
2
|
//#region src/middleware/param-ref-mutator.ts
|
|
3
3
|
/**
|
|
4
4
|
* Build a {@link SqlParamRefMutatorInternal} for the given lowered plan.
|
|
@@ -77,4 +77,4 @@ function createSqlParamRefMutator(plan) {
|
|
|
77
77
|
//#endregion
|
|
78
78
|
export { createSqlParamRefMutator as t };
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=middleware-
|
|
80
|
+
//# sourceMappingURL=middleware-CMr4CHNz.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-B0yz0pff.mjs","names":[],"sources":["../src/middleware/param-ref-mutator.ts"],"sourcesContent":["import type { ParamRefMutator } from '@prisma-next/framework-components/runtime';\nimport type { AnyParamRef } from '../ast/types';\nimport { collectOrderedParamRefs } from '../ast/util';\nimport type { SqlExecutionPlan } from '../sql-execution-plan';\n\n/**\n * Brand applied to {@link ParamRefHandle} so user-constructed handles\n * are rejected by the type system. The mutator only accepts handles it\n * produced from `entries()`.\n *\n * The brand is a phantom type — there is no runtime token. At runtime\n * the handle is the underlying `ParamRef` instance from the plan's\n * `ast`; the brand only narrows the type-level surface so callers\n * cannot fabricate a handle from a fresh `ParamRef.of(...)`.\n */\ndeclare const paramRefHandleBrand: unique symbol;\n\n/**\n * Opaque token identifying a single `ParamRef` in the plan. Produced by\n * {@link SqlParamRefMutator.entries}; consumed by `replaceValue` /\n * `replaceValues`.\n *\n * The phantom `TCodecId` parameter records the codec id of the\n * referenced `ParamRef` so type-level inference can route replacement\n * values through `TCodecMap` to the codec's declared `TInput`.\n */\nexport interface ParamRefHandle<TCodecId extends string | undefined = string | undefined> {\n readonly [paramRefHandleBrand]: TCodecId;\n}\n\n/**\n * One outbound `ParamRef` slot in the plan exposed to middleware.\n * `value` is the current value (post any prior middleware mutations);\n * `codecId` is the codec id declared on the underlying `ParamRef.codec`.\n */\nexport interface ParamRefEntry<TCodecId extends string | undefined = string | undefined> {\n readonly ref: ParamRefHandle<TCodecId>;\n readonly value: unknown;\n readonly codecId: TCodecId;\n}\n\n/**\n * Discriminated entry union over a codec map. For each `K` in\n * `TCodecMap`, `entries()` may yield a `ParamRefEntry<K>`; ParamRefs\n * with no codec id (or a codec id outside the map) yield a\n * `ParamRefEntry<undefined>`. Pattern-matching on `entry.codecId`\n * narrows `entry.ref` to a `ParamRefHandle<K>`, which routes through\n * the typed `replaceValue` overload.\n */\nexport type ParamRefEntryUnion<TCodecMap extends Record<string, unknown>> =\n | { [K in keyof TCodecMap & string]: ParamRefEntry<K> }[keyof TCodecMap & string]\n | ParamRefEntry<undefined>;\n\n/**\n * SQL-family mutator threaded into `SqlMiddleware.beforeExecute` as\n * `params`. Scope is `ParamRef.value` slots only — middleware cannot\n * insert / remove `ParamRef`s, rewrite SQL, or modify projection. The\n * type-level `ParamRefHandle` brand and the `replaceValue(ref,\n * newValue)` shape enforce this at compile time.\n *\n * `entries()` surfaces both literal call-site `ParamRef` slots and\n * `prepare()`-time `PreparedParamRef` bind slots; the handle and codec\n * id work the same for both.\n *\n * Allocation discipline: the mutator is constructed lazily from the\n * plan. `entries()` walks the plan's existing AST without allocating\n * an intermediate array; the working params buffer is only allocated\n * on the first `replaceValue` / `replaceValues` call. If no middleware\n * mutates, `currentParams()` returns the plan's original `params` by\n * reference identity.\n *\n * The `TCodecMap` parameter is a record keyed by codec id; `replaceValue`\n * infers `newValue` from `TCodecMap[H['codecId']]` for handles whose\n * codec id is statically resolvable. For codec ids the type system\n * cannot resolve, `newValue` falls back to `unknown` and the middleware\n * is on the hook for runtime correctness.\n */\nexport interface SqlParamRefMutator<\n TCodecMap extends Record<string, unknown> = Record<string, unknown>,\n> extends ParamRefMutator {\n /** Iterate every outbound `ParamRef` the plan currently carries, in canonical order. */\n entries(): IterableIterator<ParamRefEntryUnion<TCodecMap>>;\n\n /**\n * Replace one `ParamRef`'s value with the result of bulk processing.\n * `newValue` is constrained to the codec's declared `TInput` for codec\n * ids the type system can resolve via `TCodecMap`; for unresolvable\n * codec ids `newValue` is `unknown` (the second overload).\n */\n replaceValue<TCodecId extends keyof TCodecMap & string>(\n ref: ParamRefHandle<TCodecId>,\n newValue: TCodecMap[TCodecId],\n ): void;\n replaceValue(ref: ParamRefHandle<undefined>, newValue: unknown): void;\n\n /** Replace many at once (typical for bulk-pattern middleware). */\n replaceValues(\n updates: Iterable<{\n readonly ref: ParamRefHandle<(keyof TCodecMap & string) | undefined>;\n readonly newValue: unknown;\n }>,\n ): void;\n}\n\n/**\n * Internal-only view of the mutator that exposes the post-mutation params\n * array to the SQL runtime. The runtime calls `currentParams()` after the\n * `beforeExecute` chain has run; the result is the plan's original\n * `params` by reference identity if no middleware mutated, otherwise a\n * frozen new array carrying the mutations applied in chain order.\n *\n * Family-internal contract — `SqlMiddleware` consumers never see this\n * shape; they receive the public `SqlParamRefMutator` view above.\n */\nexport interface SqlParamRefMutatorInternal<\n TCodecMap extends Record<string, unknown> = Record<string, unknown>,\n> extends SqlParamRefMutator<TCodecMap> {\n currentParams(): readonly unknown[];\n}\n\ntype AnyHandle = ParamRefHandle<string | undefined>;\n\n/**\n * Build a {@link SqlParamRefMutatorInternal} for the given lowered plan.\n *\n * The mutator captures `plan.params` by reference and walks\n * `plan.ast` (via `collectOrderedParamRefs`) on demand to build\n * entries. Mutations write to a lazily-allocated working copy so the\n * fast path (no mutation) preserves bit-for-bit reference identity to\n * the original `plan.params`.\n *\n * Threading: `plan.ast` carries the canonical `ParamRef` ordering used\n * by every consumer (renderer's `$N` index map, encode-side metadata\n * walk, etc.). The mutator's `entries()` yields the same order so\n * middleware that filters by codec id sees ParamRefs in the order the\n * runtime will encode them.\n */\nexport function createSqlParamRefMutator<\n TCodecMap extends Record<string, unknown> = Record<string, unknown>,\n>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap> {\n const originalParams = plan.params;\n const refs: ReadonlyArray<AnyParamRef> = plan.ast ? collectOrderedParamRefs(plan.ast) : [];\n let workingParams: unknown[] | undefined;\n\n const indexOfRef = (handle: AnyHandle): number => {\n // The handle is the underlying ParamRef instance the mutator yielded\n // from entries(); equality is identity equality on the ParamRef. The\n // brand on ParamRefHandle is unforgeable from outside, so the only\n // legal handles came from this mutator's entries().\n return refs.indexOf(handle as unknown as AnyParamRef);\n };\n\n const ensureWorkingParams = (): unknown[] => {\n if (!workingParams) {\n workingParams = [...originalParams];\n }\n return workingParams;\n };\n\n const writeAt = (index: number, value: unknown): void => {\n const buffer = ensureWorkingParams();\n buffer[index] = value;\n };\n\n function* entries(): IterableIterator<ParamRefEntryUnion<TCodecMap>> {\n const view = workingParams ?? originalParams;\n for (let i = 0; i < refs.length; i++) {\n const ref = refs[i];\n if (!ref) continue;\n const handle = ref as unknown as ParamRefHandle<string | undefined>;\n let value: unknown;\n let codecId: string | undefined;\n if (ref.kind === 'param-ref') {\n value = i < view.length ? view[i] : ref.value;\n codecId = ref.codec?.codecId;\n } else {\n // PreparedParamRef positions carry no AST-side fallback value —\n // the slot value at index `i` is the only source.\n value = i < view.length ? view[i] : undefined;\n codecId = ref.codec.codecId;\n }\n // The runtime erases the discriminated union to a single shape; the\n // public type pins each entry's `ref` to the matching `codecId`\n // arm at compile time.\n const entry: ParamRefEntry<string | undefined> = { ref: handle, value, codecId };\n yield entry as ParamRefEntryUnion<TCodecMap>;\n }\n }\n\n function replaceValue(handle: AnyHandle, newValue: unknown): void {\n const index = indexOfRef(handle);\n if (index < 0) {\n // Handle does not belong to this plan. The type system pins this\n // at the brand level; this runtime check guards against handles\n // smuggled across plans.\n return;\n }\n writeAt(index, newValue);\n }\n\n function replaceValues(\n updates: Iterable<{ readonly ref: AnyHandle; readonly newValue: unknown }>,\n ): void {\n for (const { ref, newValue } of updates) {\n const index = indexOfRef(ref);\n if (index < 0) continue;\n writeAt(index, newValue);\n }\n }\n\n // The public `SqlParamRefMutator` declares overloaded `replaceValue`\n // signatures (typed-by-codec / unresolvable-codec). The implementation\n // is one function with a permissive runtime signature; the cast is the\n // single point at which the runtime function meets the typed overload\n // surface, matching the overload-implementation pattern.\n return {\n entries,\n replaceValue: replaceValue as SqlParamRefMutator<TCodecMap>['replaceValue'],\n replaceValues,\n currentParams(): readonly unknown[] {\n if (!workingParams) {\n return originalParams;\n }\n return Object.freeze([...workingParams]);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyIA,SAAgB,yBAEd,MAA+D;CAC/D,MAAM,iBAAiB,KAAK;CAC5B,MAAM,OAAmC,KAAK,MAAM,wBAAwB,KAAK,GAAG,IAAI,CAAC;CACzF,IAAI;CAEJ,MAAM,cAAc,WAA8B;EAKhD,OAAO,KAAK,QAAQ,MAAgC;CACtD;CAEA,MAAM,4BAAuC;EAC3C,IAAI,CAAC,eACH,gBAAgB,CAAC,GAAG,cAAc;EAEpC,OAAO;CACT;CAEA,MAAM,WAAW,OAAe,UAAyB;EACvD,MAAM,SAAS,oBAAoB;EACnC,OAAO,SAAS;CAClB;CAEA,UAAU,UAA2D;EACnE,MAAM,OAAO,iBAAiB;EAC9B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;GACpC,MAAM,MAAM,KAAK;GACjB,IAAI,CAAC,KAAK;GACV,MAAM,SAAS;GACf,IAAI;GACJ,IAAI;GACJ,IAAI,IAAI,SAAS,aAAa;IAC5B,QAAQ,IAAI,KAAK,SAAS,KAAK,KAAK,IAAI;IACxC,UAAU,IAAI,OAAO;GACvB,OAAO;IAGL,QAAQ,IAAI,KAAK,SAAS,KAAK,KAAK,KAAA;IACpC,UAAU,IAAI,MAAM;GACtB;GAKA,MAAM;IAD6C,KAAK;IAAQ;IAAO;GAC7D;EACZ;CACF;CAEA,SAAS,aAAa,QAAmB,UAAyB;EAChE,MAAM,QAAQ,WAAW,MAAM;EAC/B,IAAI,QAAQ,GAIV;EAEF,QAAQ,OAAO,QAAQ;CACzB;CAEA,SAAS,cACP,SACM;EACN,KAAK,MAAM,EAAE,KAAK,cAAc,SAAS;GACvC,MAAM,QAAQ,WAAW,GAAG;GAC5B,IAAI,QAAQ,GAAG;GACf,QAAQ,OAAO,QAAQ;EACzB;CACF;CAOA,OAAO;EACL;EACc;EACd;EACA,gBAAoC;GAClC,IAAI,CAAC,eACH,OAAO;GAET,OAAO,OAAO,OAAO,CAAC,GAAG,aAAa,CAAC;EACzC;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"middleware-CMr4CHNz.mjs","names":[],"sources":["../src/middleware/param-ref-mutator.ts"],"sourcesContent":["import type { ParamRefMutator } from '@prisma-next/framework-components/runtime';\nimport type { AnyParamRef } from '../ast/types';\nimport { collectOrderedParamRefs } from '../ast/util';\nimport type { SqlExecutionPlan } from '../sql-execution-plan';\n\n/**\n * Brand applied to {@link ParamRefHandle} so user-constructed handles\n * are rejected by the type system. The mutator only accepts handles it\n * produced from `entries()`.\n *\n * The brand is a phantom type — there is no runtime token. At runtime\n * the handle is the underlying `ParamRef` instance from the plan's\n * `ast`; the brand only narrows the type-level surface so callers\n * cannot fabricate a handle from a fresh `ParamRef.of(...)`.\n */\ndeclare const paramRefHandleBrand: unique symbol;\n\n/**\n * Opaque token identifying a single `ParamRef` in the plan. Produced by\n * {@link SqlParamRefMutator.entries}; consumed by `replaceValue` /\n * `replaceValues`.\n *\n * The phantom `TCodecId` parameter records the codec id of the\n * referenced `ParamRef` so type-level inference can route replacement\n * values through `TCodecMap` to the codec's declared `TInput`.\n */\nexport interface ParamRefHandle<TCodecId extends string | undefined = string | undefined> {\n readonly [paramRefHandleBrand]: TCodecId;\n}\n\n/**\n * One outbound `ParamRef` slot in the plan exposed to middleware.\n * `value` is the current value (post any prior middleware mutations);\n * `codecId` is the codec id declared on the underlying `ParamRef.codec`.\n */\nexport interface ParamRefEntry<TCodecId extends string | undefined = string | undefined> {\n readonly ref: ParamRefHandle<TCodecId>;\n readonly value: unknown;\n readonly codecId: TCodecId;\n}\n\n/**\n * Discriminated entry union over a codec map. For each `K` in\n * `TCodecMap`, `entries()` may yield a `ParamRefEntry<K>`; ParamRefs\n * with no codec id (or a codec id outside the map) yield a\n * `ParamRefEntry<undefined>`. Pattern-matching on `entry.codecId`\n * narrows `entry.ref` to a `ParamRefHandle<K>`, which routes through\n * the typed `replaceValue` overload.\n */\nexport type ParamRefEntryUnion<TCodecMap extends Record<string, unknown>> =\n | { [K in keyof TCodecMap & string]: ParamRefEntry<K> }[keyof TCodecMap & string]\n | ParamRefEntry<undefined>;\n\n/**\n * SQL-family mutator threaded into `SqlMiddleware.beforeExecute` as\n * `params`. Scope is `ParamRef.value` slots only — middleware cannot\n * insert / remove `ParamRef`s, rewrite SQL, or modify projection. The\n * type-level `ParamRefHandle` brand and the `replaceValue(ref,\n * newValue)` shape enforce this at compile time.\n *\n * `entries()` surfaces both literal call-site `ParamRef` slots and\n * `prepare()`-time `PreparedParamRef` bind slots; the handle and codec\n * id work the same for both.\n *\n * Allocation discipline: the mutator is constructed lazily from the\n * plan. `entries()` walks the plan's existing AST without allocating\n * an intermediate array; the working params buffer is only allocated\n * on the first `replaceValue` / `replaceValues` call. If no middleware\n * mutates, `currentParams()` returns the plan's original `params` by\n * reference identity.\n *\n * The `TCodecMap` parameter is a record keyed by codec id; `replaceValue`\n * infers `newValue` from `TCodecMap[H['codecId']]` for handles whose\n * codec id is statically resolvable. For codec ids the type system\n * cannot resolve, `newValue` falls back to `unknown` and the middleware\n * is on the hook for runtime correctness.\n */\nexport interface SqlParamRefMutator<\n TCodecMap extends Record<string, unknown> = Record<string, unknown>,\n> extends ParamRefMutator {\n /** Iterate every outbound `ParamRef` the plan currently carries, in canonical order. */\n entries(): IterableIterator<ParamRefEntryUnion<TCodecMap>>;\n\n /**\n * Replace one `ParamRef`'s value with the result of bulk processing.\n * `newValue` is constrained to the codec's declared `TInput` for codec\n * ids the type system can resolve via `TCodecMap`; for unresolvable\n * codec ids `newValue` is `unknown` (the second overload).\n */\n replaceValue<TCodecId extends keyof TCodecMap & string>(\n ref: ParamRefHandle<TCodecId>,\n newValue: TCodecMap[TCodecId],\n ): void;\n replaceValue(ref: ParamRefHandle<undefined>, newValue: unknown): void;\n\n /** Replace many at once (typical for bulk-pattern middleware). */\n replaceValues(\n updates: Iterable<{\n readonly ref: ParamRefHandle<(keyof TCodecMap & string) | undefined>;\n readonly newValue: unknown;\n }>,\n ): void;\n}\n\n/**\n * Internal-only view of the mutator that exposes the post-mutation params\n * array to the SQL runtime. The runtime calls `currentParams()` after the\n * `beforeExecute` chain has run; the result is the plan's original\n * `params` by reference identity if no middleware mutated, otherwise a\n * frozen new array carrying the mutations applied in chain order.\n *\n * Family-internal contract — `SqlMiddleware` consumers never see this\n * shape; they receive the public `SqlParamRefMutator` view above.\n */\nexport interface SqlParamRefMutatorInternal<\n TCodecMap extends Record<string, unknown> = Record<string, unknown>,\n> extends SqlParamRefMutator<TCodecMap> {\n currentParams(): readonly unknown[];\n}\n\ntype AnyHandle = ParamRefHandle<string | undefined>;\n\n/**\n * Build a {@link SqlParamRefMutatorInternal} for the given lowered plan.\n *\n * The mutator captures `plan.params` by reference and walks\n * `plan.ast` (via `collectOrderedParamRefs`) on demand to build\n * entries. Mutations write to a lazily-allocated working copy so the\n * fast path (no mutation) preserves bit-for-bit reference identity to\n * the original `plan.params`.\n *\n * Threading: `plan.ast` carries the canonical `ParamRef` ordering used\n * by every consumer (renderer's `$N` index map, encode-side metadata\n * walk, etc.). The mutator's `entries()` yields the same order so\n * middleware that filters by codec id sees ParamRefs in the order the\n * runtime will encode them.\n */\nexport function createSqlParamRefMutator<\n TCodecMap extends Record<string, unknown> = Record<string, unknown>,\n>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap> {\n const originalParams = plan.params;\n const refs: ReadonlyArray<AnyParamRef> = plan.ast ? collectOrderedParamRefs(plan.ast) : [];\n let workingParams: unknown[] | undefined;\n\n const indexOfRef = (handle: AnyHandle): number => {\n // The handle is the underlying ParamRef instance the mutator yielded\n // from entries(); equality is identity equality on the ParamRef. The\n // brand on ParamRefHandle is unforgeable from outside, so the only\n // legal handles came from this mutator's entries().\n return refs.indexOf(handle as unknown as AnyParamRef);\n };\n\n const ensureWorkingParams = (): unknown[] => {\n if (!workingParams) {\n workingParams = [...originalParams];\n }\n return workingParams;\n };\n\n const writeAt = (index: number, value: unknown): void => {\n const buffer = ensureWorkingParams();\n buffer[index] = value;\n };\n\n function* entries(): IterableIterator<ParamRefEntryUnion<TCodecMap>> {\n const view = workingParams ?? originalParams;\n for (let i = 0; i < refs.length; i++) {\n const ref = refs[i];\n if (!ref) continue;\n const handle = ref as unknown as ParamRefHandle<string | undefined>;\n let value: unknown;\n let codecId: string | undefined;\n if (ref.kind === 'param-ref') {\n value = i < view.length ? view[i] : ref.value;\n codecId = ref.codec?.codecId;\n } else {\n // PreparedParamRef positions carry no AST-side fallback value —\n // the slot value at index `i` is the only source.\n value = i < view.length ? view[i] : undefined;\n codecId = ref.codec.codecId;\n }\n // The runtime erases the discriminated union to a single shape; the\n // public type pins each entry's `ref` to the matching `codecId`\n // arm at compile time.\n const entry: ParamRefEntry<string | undefined> = { ref: handle, value, codecId };\n yield entry as ParamRefEntryUnion<TCodecMap>;\n }\n }\n\n function replaceValue(handle: AnyHandle, newValue: unknown): void {\n const index = indexOfRef(handle);\n if (index < 0) {\n // Handle does not belong to this plan. The type system pins this\n // at the brand level; this runtime check guards against handles\n // smuggled across plans.\n return;\n }\n writeAt(index, newValue);\n }\n\n function replaceValues(\n updates: Iterable<{ readonly ref: AnyHandle; readonly newValue: unknown }>,\n ): void {\n for (const { ref, newValue } of updates) {\n const index = indexOfRef(ref);\n if (index < 0) continue;\n writeAt(index, newValue);\n }\n }\n\n // The public `SqlParamRefMutator` declares overloaded `replaceValue`\n // signatures (typed-by-codec / unresolvable-codec). The implementation\n // is one function with a permissive runtime signature; the cast is the\n // single point at which the runtime function meets the typed overload\n // surface, matching the overload-implementation pattern.\n return {\n entries,\n replaceValue: replaceValue as SqlParamRefMutator<TCodecMap>['replaceValue'],\n replaceValues,\n currentParams(): readonly unknown[] {\n if (!workingParams) {\n return originalParams;\n }\n return Object.freeze([...workingParams]);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyIA,SAAgB,yBAEd,MAA+D;CAC/D,MAAM,iBAAiB,KAAK;CAC5B,MAAM,OAAmC,KAAK,MAAM,wBAAwB,KAAK,GAAG,IAAI,CAAC;CACzF,IAAI;CAEJ,MAAM,cAAc,WAA8B;EAKhD,OAAO,KAAK,QAAQ,MAAgC;CACtD;CAEA,MAAM,4BAAuC;EAC3C,IAAI,CAAC,eACH,gBAAgB,CAAC,GAAG,cAAc;EAEpC,OAAO;CACT;CAEA,MAAM,WAAW,OAAe,UAAyB;EACvD,MAAM,SAAS,oBAAoB;EACnC,OAAO,SAAS;CAClB;CAEA,UAAU,UAA2D;EACnE,MAAM,OAAO,iBAAiB;EAC9B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;GACpC,MAAM,MAAM,KAAK;GACjB,IAAI,CAAC,KAAK;GACV,MAAM,SAAS;GACf,IAAI;GACJ,IAAI;GACJ,IAAI,IAAI,SAAS,aAAa;IAC5B,QAAQ,IAAI,KAAK,SAAS,KAAK,KAAK,IAAI;IACxC,UAAU,IAAI,OAAO;GACvB,OAAO;IAGL,QAAQ,IAAI,KAAK,SAAS,KAAK,KAAK,KAAA;IACpC,UAAU,IAAI,MAAM;GACtB;GAKA,MAAM;IAD6C,KAAK;IAAQ;IAAO;GAC7D;EACZ;CACF;CAEA,SAAS,aAAa,QAAmB,UAAyB;EAChE,MAAM,QAAQ,WAAW,MAAM;EAC/B,IAAI,QAAQ,GAIV;EAEF,QAAQ,OAAO,QAAQ;CACzB;CAEA,SAAS,cACP,SACM;EACN,KAAK,MAAM,EAAE,KAAK,cAAc,SAAS;GACvC,MAAM,QAAQ,WAAW,GAAG;GAC5B,IAAI,QAAQ,GAAG;GACf,QAAQ,OAAO,QAAQ;EACzB;CACF;CAOA,OAAO;EACL;EACc;EACd;EACA,gBAAoC;GAClC,IAAI,CAAC,eACH,OAAO;GAET,OAAO,OAAO,OAAO,CAAC,GAAG,aAAa,CAAC;EACzC;CACF;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SqlExecutionPlan } from "./sql-execution-plan-
|
|
1
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-BngECpWj.mjs";
|
|
2
2
|
import { ParamRefMutator } from "@prisma-next/framework-components/runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/middleware/param-ref-mutator.d.ts
|
|
@@ -116,4 +116,4 @@ interface SqlParamRefMutatorInternal<TCodecMap extends Record<string, unknown> =
|
|
|
116
116
|
declare function createSqlParamRefMutator<TCodecMap extends Record<string, unknown> = Record<string, unknown>>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap>;
|
|
117
117
|
//#endregion
|
|
118
118
|
export { SqlParamRefMutatorInternal as a, SqlParamRefMutator as i, ParamRefEntryUnion as n, createSqlParamRefMutator as o, ParamRefHandle as r, ParamRefEntry as t };
|
|
119
|
-
//# sourceMappingURL=middleware-
|
|
119
|
+
//# sourceMappingURL=middleware-H5EG_C4e.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-
|
|
1
|
+
{"version":3,"file":"middleware-H5EG_C4e.d.mts","names":[],"sources":["../src/middleware/param-ref-mutator.ts"],"mappings":";;;;;;AAG8D;;;;AAYd;AAWhD;;;cAXc,mBAAA;;;;;AAY4B;AAQ1C;;;;UATiB,cAAA;EAAA,UACL,mBAAmB,GAAG,QAAA;AAAA;;;;;;UAQjB,aAAA;EAAA,SACN,GAAA,EAAK,cAAA,CAAe,QAAA;EAAA,SACpB,KAAA;EAAA,SACA,OAAA,EAAS,QAAA;AAAA;AAWpB;;;;;;;;AAAA,KAAY,kBAAA,mBAAqC,MAAA,mCAC/B,SAAA,YAAqB,aAAA,CAAc,CAAA,UAAW,SAAA,aAC5D,aAAA;;;;;;;;;;AAAa;AA0BjB;;;;;;;;;;;;;;UAAiB,kBAAA,mBACG,MAAA,oBAA0B,MAAA,2BACpC,eAAA;EAmBU;EAjBlB,OAAA,IAAW,gBAAA,CAAiB,kBAAA,CAAmB,SAAA;EAFvC;;;;;;EAUR,YAAA,wBAAoC,SAAA,WAClC,GAAA,EAAK,cAAA,CAAe,QAAA,GACpB,QAAA,EAAU,SAAA,CAAU,QAAA;EAEtB,YAAA,CAAa,GAAA,EAAK,cAAA,aAA2B,QAAA;EAZlC;EAeX,aAAA,CACE,OAAA,EAAS,QAAA;IAAA,SACE,GAAA,EAAK,cAAA,QAAsB,SAAA;IAAA,SAC3B,QAAA;EAAA;AAAA;;;;;;;;;;;UAeE,0BAAA,mBACG,MAAA,oBAA0B,MAAA,2BACpC,kBAAA,CAAmB,SAAA;EAC3B,aAAA;AAAA;;;;;;AAjBI;AAcN;;;;;;;;;iBAuBgB,wBAAA,mBACI,MAAA,oBAA0B,MAAA,mBAC5C,IAAA,EAAM,gBAAA,GAAmB,0BAAA,CAA2B,SAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as AnyQueryAst } from "./types-
|
|
1
|
+
import { f as AnyQueryAst } from "./types-CnBcZ9NS.mjs";
|
|
2
|
+
import { Contract } from "@prisma-next/contract/types";
|
|
2
3
|
import { QueryPlan } from "@prisma-next/framework-components/runtime";
|
|
3
4
|
import { SqlStorage } from "@prisma-next/sql-contract/types";
|
|
4
|
-
import { Contract } from "@prisma-next/contract/types";
|
|
5
5
|
|
|
6
6
|
//#region src/plan.d.ts
|
|
7
7
|
/**
|
|
@@ -41,4 +41,4 @@ interface SqlQueryPlan<Row = unknown> extends QueryPlan<Row> {
|
|
|
41
41
|
declare function planFromAst<Row = unknown>(ast: AnyQueryAst, contract: Contract<SqlStorage>, laneId?: string): SqlQueryPlan<Row>;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { planFromAst as n, SqlQueryPlan as t };
|
|
44
|
-
//# sourceMappingURL=plan-
|
|
44
|
+
//# sourceMappingURL=plan-Dd-t9rIQ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-Dd-t9rIQ.d.mts","names":[],"sources":["../src/plan.ts"],"mappings":";;;;;;;;AAkBA;;;;;;;;;;;UAAiB,YAAA,wBAAoC,SAAA,CAAU,GAAA;EAAA,SACpD,GAAA,EAAK,WAAA;EAAA,SACL,MAAA;AAAA;AAAM;AAoBjB;;;;;;;;;;;;;;;;AApBiB,iBAoBD,WAAA,gBACd,GAAA,EAAK,WAAA,EACL,QAAA,EAAU,QAAA,CAAS,UAAA,GACnB,MAAA,YACC,YAAA,CAAa,GAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as ContractCodecRegistry } from "./codec-types-
|
|
1
|
+
import { c as ContractCodecRegistry } from "./codec-types-Df1I_oSx.mjs";
|
|
2
|
+
import { Contract } from "@prisma-next/contract/types";
|
|
2
3
|
import { CodecDescriptor, CodecRef } from "@prisma-next/framework-components/codec";
|
|
3
4
|
import { SqlStorage } from "@prisma-next/sql-contract/types";
|
|
4
|
-
import { Contract } from "@prisma-next/contract/types";
|
|
5
5
|
import { SqlOperationRegistry } from "@prisma-next/sql-operations";
|
|
6
6
|
|
|
7
7
|
//#region src/query-lane-context.d.ts
|
|
@@ -80,4 +80,4 @@ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<Sql
|
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
82
|
export { MutationDefaultsOptions as a, MutationDefaultsOp as i, CodecDescriptorRegistry as n, TypeHelperRegistry as o, ExecutionContext as r, AppliedMutationDefault as t };
|
|
83
|
-
//# sourceMappingURL=query-lane-context-
|
|
83
|
+
//# sourceMappingURL=query-lane-context-Dax7DapC.d.mts.map
|
package/dist/{query-lane-context-Dw1Tz0kv.d.mts.map → query-lane-context-Dax7DapC.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-lane-context-
|
|
1
|
+
{"version":3,"file":"query-lane-context-Dax7DapC.d.mts","names":[],"sources":["../src/query-lane-context.ts"],"mappings":";;;;;;;;;AASA;UAAiB,uBAAA;;;;EAIf,aAAA,CAAc,OAAA,WAAkB,eAAA;EAgBtB;;;;;;;;;;;EAJV,iBAAA,CAAkB,KAAA,UAAe,MAAA,WAAiB,QAAA;EAIxC;;;EAAV,MAAA,IAAU,gBAAA,CAAiB,eAAA;EAIgB;;AAAe;EAA1D,YAAA,CAAa,UAAA,oBAA8B,eAAA;AAAA;;;AAMN;KAA3B,kBAAA,GAAqB,MAAM;AAAA,KAE3B,kBAAA;AAAA,KAEA,sBAAA;EAAA,SACD,MAAA;EAAA,SACA,KAAK;AAAA;AAAA,KAGJ,uBAAA;EAAA,SACD,EAAA,EAAI,kBAAA;EAAA,SACJ,KAAA;EAAA,SACA,MAAA,EAAQ,MAAA;EAHP;;;;EAAA,SAQD,iBAAA,GAAoB,GAAA;AAAA;;;;;;UAQd,gBAAA,mBAAmC,QAAA,CAAS,UAAA,IAAc,QAAA,CAAS,UAAA;EAAA,SACzE,QAAA,EAAU,SAAA;EATV;;;EAAA,SAaA,cAAA,EAAgB,qBAAA;EALV;;;EAAA,SASN,gBAAA,EAAkB,uBAAA;EAAA,SAClB,eAAA,EAAiB,oBAAA;EAVwD;;;EAAA,SAczE,KAAA,EAAO,kBAAA;EALW;;;EAS3B,qBAAA,CAAsB,OAAA,EAAS,uBAAA,GAA0B,aAAA,CAAc,sBAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as AnyQueryAst } from "./types-
|
|
1
|
+
import { f as AnyQueryAst } from "./types-CnBcZ9NS.mjs";
|
|
2
2
|
import { ExecutionPlan } from "@prisma-next/framework-components/runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/sql-execution-plan.d.ts
|
|
@@ -29,4 +29,4 @@ interface SqlExecutionPlan<Row = unknown> extends ExecutionPlan<Row> {
|
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
export { SqlExecutionPlan as t };
|
|
32
|
-
//# sourceMappingURL=sql-execution-plan-
|
|
32
|
+
//# sourceMappingURL=sql-execution-plan-BngECpWj.d.mts.map
|
package/dist/{sql-execution-plan-DeBoZUre.d.mts.map → sql-execution-plan-BngECpWj.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql-execution-plan-
|
|
1
|
+
{"version":3,"file":"sql-execution-plan-BngECpWj.d.mts","names":[],"sources":["../src/sql-execution-plan.ts"],"mappings":";;;;;;AAuBA;;;;;;;;;;;;;;;;AAG2B;;UAHV,gBAAA,wBAAwC,aAAA,CAAc,GAAA;EAAA,SAC5D,GAAA;EAAA,SACA,MAAA;EAAA,SACA,GAAA,EAAK,WAAA;AAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { J as ParamRef, g as ColumnRef } from "./types-
|
|
2
|
-
import { r as ExecutionContext } from "./query-lane-context-
|
|
3
|
-
import { t as SqlExecutionPlan } from "./sql-execution-plan-
|
|
1
|
+
import { J as ParamRef, g as ColumnRef } from "./types-CnBcZ9NS.mjs";
|
|
2
|
+
import { r as ExecutionContext } from "./query-lane-context-Dax7DapC.mjs";
|
|
3
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-BngECpWj.mjs";
|
|
4
|
+
import { Contract, ContractModelDefinitions } from "@prisma-next/contract/types";
|
|
4
5
|
import { ExtractFieldOutputTypes, SqlStorage, StorageColumn } from "@prisma-next/sql-contract/types";
|
|
5
|
-
import { Contract, ContractModelsMap } from "@prisma-next/contract/types";
|
|
6
6
|
import { ParamSpec } from "@prisma-next/operations";
|
|
7
7
|
import { SqlLoweringSpec } from "@prisma-next/sql-operations";
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ type Expr = ColumnRef | ParamRef;
|
|
|
12
12
|
* Extracts the model name for a given table by iterating models to find the one
|
|
13
13
|
* whose `storage.table` matches.
|
|
14
14
|
*/
|
|
15
|
-
type ExtractTableToModel<TContract extends Contract<SqlStorage>, TableName extends string> =
|
|
15
|
+
type ExtractTableToModel<TContract extends Contract<SqlStorage>, TableName extends string> = ContractModelDefinitions<TContract> extends infer Models extends Record<string, unknown> ? { [M in keyof Models & string]: Models[M] extends {
|
|
16
16
|
readonly storage: {
|
|
17
17
|
readonly table: TableName;
|
|
18
18
|
};
|
|
@@ -21,7 +21,7 @@ type ExtractTableToModel<TContract extends Contract<SqlStorage>, TableName exten
|
|
|
21
21
|
* Extracts the field name for a given column by finding the field in
|
|
22
22
|
* `model.storage.fields` whose `column` matches.
|
|
23
23
|
*/
|
|
24
|
-
type ExtractColumnToField<TContract extends Contract<SqlStorage>, TableName extends string, ColumnName extends string> = ExtractTableToModel<TContract, TableName> extends infer ModelName extends string ?
|
|
24
|
+
type ExtractColumnToField<TContract extends Contract<SqlStorage>, TableName extends string, ColumnName extends string> = ExtractTableToModel<TContract, TableName> extends infer ModelName extends string ? ContractModelDefinitions<TContract> extends infer Models extends Record<string, unknown> ? ModelName & keyof Models extends infer MKey extends string ? Models[MKey] extends {
|
|
25
25
|
readonly storage: {
|
|
26
26
|
readonly fields: infer Fields extends Record<string, unknown>;
|
|
27
27
|
};
|
|
@@ -178,4 +178,4 @@ interface SqlBuilderOptions<TContract extends Contract<SqlStorage> = Contract<Sq
|
|
|
178
178
|
}
|
|
179
179
|
//#endregion
|
|
180
180
|
export { TableMetadata as C, TableKey as S, RawTemplateOptions as _, ComputeColumnJsType as a, SqlPlan as b, Meta as c, OperationTypeSignature as d, OperationTypes as f, RawTemplateFactory as g, RawFunctionOptions as h, ColumnsOf as i, ModelDef as l, RawFactory as m, BuildParamsMap as n, Expr as o, OperationsForTypeId as p, CodecTypes as r, META as s, BuildOptions as t, ModelMetadata as u, RuntimeError as v, TablesOf as w, TableDef as x, SqlBuilderOptions as y };
|
|
181
|
-
//# sourceMappingURL=types-
|
|
181
|
+
//# sourceMappingURL=types-CfID8M7D.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-CfID8M7D.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;;KAYY,IAAA,GAAO,SAAA,GAAY,QAAQ;;AAAvC;;;KAMK,mBAAA,mBAAsC,QAAA,CAAS,UAAA,+BAClD,wBAAA,CAAyB,SAAA,+BAAwC,MAAA,kCAE/C,MAAA,YAAkB,MAAA,CAAO,CAAA;EAAA,SAC1B,OAAA;IAAA,SAAoB,KAAA,EAAO,SAAA;EAAA;AAAA,IAElC,CAAA,iBAEE,MAAA;;;;;KAOT,oBAAA,mBACe,QAAA,CAAS,UAAA,0DAI3B,mBAAA,CAAoB,SAAA,EAAW,SAAA,2CAC3B,wBAAA,CAAyB,SAAA,+BAAwC,MAAA,oBAC/D,SAAA,SAAkB,MAAA,qCAChB,MAAA,CAAO,IAAA;EAAA,SACI,OAAA;IAAA,SAAoB,MAAA,uBAA6B,MAAA;EAAA;AAAA,kBAG5C,MAAA,YAAkB,MAAA,CAAO,CAAA;EAAA,SAAsB,MAAA,EAAQ,UAAA;AAAA,IAC/D,CAAA,iBAEE,MAAA;AAAA,KAMf,mBAAA,oBACgB,aAAA,qBACA,MAAA;EAAA,SAA0B,MAAA;AAAA,MAC3C,UAAA;EAAqB,OAAA;AAAA,IACrB,OAAA,eAAsB,UAAA,GACpB,UAAA,CAAW,OAAA;EAAA,SAA4B,MAAA;AAAA,IACrC,UAAA;EAAqB,QAAA;AAAA,IACnB,CAAA,UACA,CAAA;;;;;KASE,sBAAA;EAAA,SACD,IAAA,EAAM,aAAA,CAAc,SAAA;EAAA,SACpB,OAAA,EAAS,SAAA;EAAA,SACT,QAAA,EAAU,eAAA;EAAA,SACV,YAAA,GAAe,aAAA;AAAA;;;;;;;;;;;;;;;;;;KAoBd,cAAA,GAAiB,MAAA,S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,SAAA,KACjB,CAAA,eAAgB,QAAA,CAAS,SAAA,IACzB,QAAA,CAAS,SAAA,EAAW,CAAA;EAAa,OAAA;AAAA,IAC/B,CAAA;AAAA,UAIW,kBAAA;EAAA,SACN,WAAA,GAAc,MAAM;AAAA;AAAA,UAGd,kBAAA,SAA2B,kBAAkB;EAAA,SACnD,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGP,kBAAA,IACV,OAAA,EAAS,oBAAA,KACN,MAAA,yBACA,gBAAgB;AAAA,UAEJ,UAAA,SAAmB,kBAAA;EAAA,CACjC,IAAA,UAAc,OAAA,EAAS,kBAAA,GAAqB,gBAAA;EAC7C,IAAA,CAAK,OAAA,EAAS,kBAAA,GAAqB,kBAAA;AAAA;AAAA,UAGpB,YAAA,SAAqB,KAAK;EAAA,SAChC,IAAA;EAAA,SACA,QAAA;EAAA,SACA,QAAA;EAAA,SACA,OAAA,GAAU,MAAA;EAAA,SACV,KAAA;EAAA,SACA,IAAA;AAAA;AAAA,UAGM,cAAA;EAAA,UACL,IAAY;AAAA;AAAA,UAGP,YAAA;EAAA,SACN,MAAA,GAAS,cAAc;AAAA;AAAA,UAGjB,iBAAA,mBAAoC,QAAA,CAAS,UAAA,IAAc,QAAA,CAAS,UAAA;EAAA,SAC1E,OAAA,EAAS,gBAAA,CAAiB,SAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as CodecRef } from "./codec-types-
|
|
1
|
+
import { o as CodecRef } from "./codec-types-Df1I_oSx.mjs";
|
|
2
2
|
import { ParamSpec } from "@prisma-next/operations";
|
|
3
3
|
import { SqlLoweringSpec } from "@prisma-next/sql-operations";
|
|
4
4
|
|
|
@@ -70,7 +70,7 @@ interface ExpressionFolder<T> {
|
|
|
70
70
|
rawExpr?(expr: RawExpr): T;
|
|
71
71
|
}
|
|
72
72
|
type ProjectionExpr = AnyExpression;
|
|
73
|
-
type InsertValue = ColumnRef | ParamRef | PreparedParamRef | DefaultValueExpr;
|
|
73
|
+
type InsertValue = ColumnRef | ParamRef | PreparedParamRef | DefaultValueExpr | RawExpr;
|
|
74
74
|
type JoinOnExpr = EqColJoinOn | AnyExpression;
|
|
75
75
|
type WhereArg = AnyExpression | ToWhereExpr;
|
|
76
76
|
type JsonObjectEntry = {
|
|
@@ -103,8 +103,15 @@ declare class TableSource extends FromSource {
|
|
|
103
103
|
readonly kind: "table-source";
|
|
104
104
|
readonly name: string;
|
|
105
105
|
readonly alias: string | undefined;
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Resolved storage namespace coordinate for this table, stamped when the
|
|
108
|
+
* table proxy constructs the AST. Renderers qualify via the namespace
|
|
109
|
+
* concretion's `qualifyTable()` using this id — never by re-resolving the
|
|
110
|
+
* bare table name at render time.
|
|
111
|
+
*/
|
|
112
|
+
readonly namespaceId: string | undefined;
|
|
113
|
+
protected constructor(name: string, alias?: string, namespaceId?: string);
|
|
114
|
+
static named(name: string, alias?: string, namespaceId?: string): TableSource;
|
|
108
115
|
rewrite(rewriter: AstRewriter): AnyFromSource;
|
|
109
116
|
toFromSource(): AnyFromSource;
|
|
110
117
|
}
|
|
@@ -580,7 +587,7 @@ type AnyFromSource = TableSource | DerivedTableSource;
|
|
|
580
587
|
type AnyExpression = ColumnRef | IdentifierRef | ParamRef | PreparedParamRef | LiteralExpr | SubqueryExpr | OperationExpr | AggregateExpr | WindowFuncExpr | JsonObjectExpr | JsonArrayAggExpr | ListExpression | BinaryExpr | AndExpr | OrExpr | ExistsExpr | NullCheckExpr | NotExpr | RawExpr;
|
|
581
588
|
type AnyParamRef = ParamRef | PreparedParamRef;
|
|
582
589
|
type AnyInsertOnConflictAction = DoNothingConflictAction | DoUpdateSetConflictAction;
|
|
583
|
-
type AnyInsertValue = ColumnRef | ParamRef | PreparedParamRef | DefaultValueExpr;
|
|
590
|
+
type AnyInsertValue = ColumnRef | ParamRef | PreparedParamRef | DefaultValueExpr | RawExpr;
|
|
584
591
|
type AnyOperationArg = AnyExpression | ParamRef | PreparedParamRef | LiteralExpr;
|
|
585
592
|
declare const queryAstKinds: ReadonlySet<string>;
|
|
586
593
|
declare const whereExprKinds: ReadonlySet<string>;
|
|
@@ -617,4 +624,4 @@ interface LoweredStatement {
|
|
|
617
624
|
}
|
|
618
625
|
//#endregion
|
|
619
626
|
export { RawSqlExpr as $, InsertAst as A, LiteralExpr as B, EqColJoinOn as C, ExpressionRewriter as D, ExpressionFolder as E, JsonArrayAggExpr as F, OperationExpr as G, LoweredStatement as H, JsonObjectEntry as I, ParamRef as J, OrExpr as K, JsonObjectExpr as L, InsertValue as M, JoinAst as N, ExpressionSource as O, JoinOnExpr as P, RawExpr as Q, LimitOffsetValue as R, DoUpdateSetConflictAction as S, ExprVisitor as T, NotExpr as U, LoweredParam as V, NullCheckExpr as W, ProjectionExpr as X, PreparedParamRef as Y, ProjectionItem as Z, DefaultValueExpr as _, AndExpr as a, TableSource as at, Direction as b, AnyInsertOnConflictAction as c, WhereArg as ct, AnyParamRef as d, isQueryAst as dt, RawSqlLiteral as et, AnyQueryAst as f, isWhereExpr as ft, ColumnRef as g, BinaryOp as h, AggregateOpFn as i, TableRef as it, InsertOnConflict as j, IdentifierRef as k, AnyInsertValue as l, WindowFn as lt, BinaryExpr as m, whereExprKinds as mt, AggregateExpr as n, SelectAstOptions as nt, AnyExpression as o, ToWhereExpr as ot, AstRewriter as p, queryAstKinds as pt, OrderByItem as q, AggregateFn as r, SubqueryExpr as rt, AnyFromSource as s, UpdateAst as st, AggregateCountFn as t, SelectAst as tt, AnyOperationArg as u, WindowFuncExpr as ut, DeleteAst as v, ExistsExpr as w, DoNothingConflictAction as x, DerivedTableSource as y, ListExpression as z };
|
|
620
|
-
//# sourceMappingURL=types-
|
|
627
|
+
//# sourceMappingURL=types-CnBcZ9NS.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CnBcZ9NS.d.mts","names":[],"sources":["../src/ast/types.ts"],"mappings":";;;;;KAK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AAAA,KAChD,aAAA,GACR,SAAA,GACA,aAAA,GACA,QAAA,GACA,gBAAA,GACA,WAAA,GACA,YAAA,GACA,aAAA,GACA,aAAA,GACA,cAAA,GACA,cAAA,GACA,gBAAA,GACA,cAAA,GACA,UAAA,GACA,OAAA,GACA,MAAA,GACA,UAAA,GACA,aAAA,GACA,OAAA,GACA,OAAA;AAAA,KACQ,WAAA,GAAc,QAAA,GAAW,gBAAgB;AAAA,KACzC,yBAAA,GAA4B,uBAAA,GAA0B,yBAAyB;AAAA,KAC/E,cAAA,GAAiB,SAAA,GAAY,QAAA,GAAW,gBAAA,GAAmB,gBAAA,GAAmB,OAAA;AAAA,KAC9E,eAAA,GAAkB,aAAA,GAAgB,QAAA,GAAW,gBAAA,GAAmB,WAAA;AAAA,cAE/D,aAAA,EAAe,WAAW;AAAA,cAO1B,cAAA,EAAgB,WAAW;AAAA,iBASxB,UAAA,CAAW,KAAA,YAAiB,KAAA,IAAS,WAAW;AAAA,iBAShD,WAAA,CAAY,KAAA,YAAiB,KAAA,IAAS,aAAa;AAAA,UASlD,WAAA;EACf,WAAA,IAAe,aAAa;AAAA;;;;;;;;;;;;;;AAv/CoB;KAwgDtC,YAAA;EAAA,SACG,IAAA;EAAA,SAA0B,KAAA;AAAA;EAAA,SAC1B,IAAA;EAAA,SAAuB,IAAA;AAAA;AAAA,UAErB,gBAAA;EAAA,SACN,GAAA;EAAA,SACA,MAAA,WAAiB,YAAA;EAAA,SACjB,WAAA,GAAc,MAAM;AAAA"}
|
|
@@ -77,6 +77,7 @@ function rewriteInsertValue(value, rewriter) {
|
|
|
77
77
|
case "prepared-param-ref": return rewriter.preparedParamRef ? rewriter.preparedParamRef(value) : value;
|
|
78
78
|
case "column-ref": return rewriter.columnRef ? rewriteColumnRefForInsert(value, rewriter) : value;
|
|
79
79
|
case "default-value": return value;
|
|
80
|
+
case "raw-expr": return value;
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
function rewriteParamRefForInsert(value, rewriter) {
|
|
@@ -137,14 +138,23 @@ var TableSource = class TableSource extends FromSource {
|
|
|
137
138
|
kind = "table-source";
|
|
138
139
|
name;
|
|
139
140
|
alias;
|
|
140
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Resolved storage namespace coordinate for this table, stamped when the
|
|
143
|
+
* table proxy constructs the AST. Renderers qualify via the namespace
|
|
144
|
+
* concretion's `qualifyTable()` using this id — never by re-resolving the
|
|
145
|
+
* bare table name at render time.
|
|
146
|
+
*/
|
|
147
|
+
namespaceId;
|
|
148
|
+
constructor(name, alias, namespaceId) {
|
|
141
149
|
super();
|
|
142
150
|
this.name = name;
|
|
143
151
|
this.alias = alias;
|
|
144
|
-
this.
|
|
152
|
+
this.namespaceId = namespaceId;
|
|
145
153
|
}
|
|
146
|
-
static named(name, alias) {
|
|
147
|
-
|
|
154
|
+
static named(name, alias, namespaceId) {
|
|
155
|
+
const source = new TableSource(name, alias, namespaceId);
|
|
156
|
+
source.freeze();
|
|
157
|
+
return source;
|
|
148
158
|
}
|
|
149
159
|
rewrite(rewriter) {
|
|
150
160
|
return rewriter.tableSource ? rewriter.tableSource(this) : this;
|
|
@@ -1083,6 +1093,7 @@ var InsertAst = class InsertAst extends QueryAst {
|
|
|
1083
1093
|
collectParamRefs() {
|
|
1084
1094
|
const refs = [];
|
|
1085
1095
|
for (const row of this.rows) for (const value of Object.values(row)) if (value.kind === "param-ref" || value.kind === "prepared-param-ref") refs.push(value);
|
|
1096
|
+
else if (value.kind === "raw-expr") refs.push(...value.collectParamRefs());
|
|
1086
1097
|
if (this.onConflict?.action.kind === "do-update-set") {
|
|
1087
1098
|
for (const value of Object.values(this.onConflict.action.set)) if (value.kind === "param-ref" || value.kind === "prepared-param-ref") refs.push(value);
|
|
1088
1099
|
}
|
|
@@ -1230,4 +1241,4 @@ function isWhereExpr(value) {
|
|
|
1230
1241
|
//#endregion
|
|
1231
1242
|
export { SelectAst as A, OrExpr as C, ProjectionItem as D, PreparedParamRef as E, isQueryAst as F, isWhereExpr as I, queryAstKinds as L, TableSource as M, UpdateAst as N, RawExpr as O, WindowFuncExpr as P, whereExprKinds as R, OperationExpr as S, ParamRef as T, JsonObjectExpr as _, DefaultValueExpr as a, NotExpr as b, DoNothingConflictAction as c, ExistsExpr as d, IdentifierRef as f, JsonArrayAggExpr as g, JoinAst as h, ColumnRef as i, SubqueryExpr as j, RawSqlExpr as k, DoUpdateSetConflictAction as l, InsertOnConflict as m, AndExpr as n, DeleteAst as o, InsertAst as p, BinaryExpr as r, DerivedTableSource as s, AggregateExpr as t, EqColJoinOn as u, ListExpression as v, OrderByItem as w, NullCheckExpr as x, LiteralExpr as y };
|
|
1232
1243
|
|
|
1233
|
-
//# sourceMappingURL=types-
|
|
1244
|
+
//# sourceMappingURL=types-D72v8s92.mjs.map
|