@prisma/orm-family-sql 8.0.0-rc.1-dev.11 → 8.0.0-rc.1-dev.13
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/{aggregate-descriptor-registry-DvPrQwzY.mjs → aggregate-descriptor-registry-DSap8YyW.mjs} +12 -5
- package/dist/aggregate-descriptor-registry-DSap8YyW.mjs.map +1 -0
- package/dist/ast-B-eeN74F.mjs.map +1 -1
- package/dist/{ast-BwBkpAM7.d.mts → ast-Du28qINj.d.mts} +2 -2
- package/dist/{ast-BwBkpAM7.d.mts.map → ast-Du28qINj.d.mts.map} +1 -1
- package/dist/builder.d.mts +1 -1
- package/dist/builder__runtime.d.mts +4 -4
- package/dist/builder__types.d.mts +1 -1
- package/dist/{control-ewQAyuM8.d.mts → control-CQGQNGSM.d.mts} +5 -5
- package/dist/{control-ewQAyuM8.d.mts.map → control-CQGQNGSM.d.mts.map} +1 -1
- package/dist/{control-adapter-C99J7aEF-D9Lhjafk.d.mts → control-adapter-C99J7aEF-DqhVuC1_.d.mts} +3 -3
- package/dist/{control-adapter-C99J7aEF-D9Lhjafk.d.mts.map → control-adapter-C99J7aEF-DqhVuC1_.d.mts.map} +1 -1
- package/dist/control-adapter-DiJGgwVx.d.mts +1 -0
- package/dist/{db-C5jmOFPM-DeJH09un.d.mts → db-C5jmOFPM-C8E4QLgQ.d.mts} +2 -2
- package/dist/{db-C5jmOFPM-DeJH09un.d.mts.map → db-C5jmOFPM-C8E4QLgQ.d.mts.map} +1 -1
- package/dist/{ddl-types-BMp2bWVS-D1waZJ4n.mjs → ddl-types-BGdnAbXo-DKPHPUGx.mjs} +3 -3
- package/dist/ddl-types-BGdnAbXo-DKPHPUGx.mjs.map +1 -0
- package/dist/{ddl-types-CBTOCoND-Ct-Dz4gJ.d.mts → ddl-types-CnLSuwXa-BfAdBtW-.d.mts} +3 -3
- package/dist/{ddl-types-CBTOCoND-Ct-Dz4gJ.d.mts.map → ddl-types-CnLSuwXa-BfAdBtW-.d.mts.map} +1 -1
- package/dist/{diff-B_ttICMr.d.mts → diff-lZRkiTxp.d.mts} +3 -3
- package/dist/{diff-B_ttICMr.d.mts.map → diff-lZRkiTxp.d.mts.map} +1 -1
- package/dist/family.d.mts +7 -7
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +2 -2
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__runtime.d.mts +1 -1
- package/dist/{index-DKWhjgoj.d.mts → index-CYUp-sEz.d.mts} +6 -6
- package/dist/{index-DKWhjgoj.d.mts.map → index-CYUp-sEz.d.mts.map} +1 -1
- package/dist/{migration-D8_nHECs.d.mts → migration-DoDR93C_.d.mts} +2 -2
- package/dist/{migration-D8_nHECs.d.mts.map → migration-DoDR93C_.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +16 -13
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +18 -14
- package/dist/orm-client.mjs.map +1 -1
- package/dist/query-lane-context-Dc9gwgtK.d.mts +1 -0
- package/dist/{query-lane-context-CONNlrCx-D2biFONs.d.mts → query-lane-context-DyDSQVS--UJOY8AwQ.d.mts} +6 -7
- package/dist/query-lane-context-DyDSQVS--UJOY8AwQ.d.mts.map +1 -0
- package/dist/relational-core.d.mts +5 -5
- package/dist/relational-core.mjs +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
- package/dist/relational-core__ast.d.mts +2 -2
- package/dist/relational-core__ast.mjs +1 -1
- package/dist/relational-core__codec-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__contract-free.d.mts +1 -1
- package/dist/relational-core__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{runtime-BNtp1bfZ.d.mts → runtime-CbcODreO.d.mts} +2 -2
- package/dist/{runtime-BNtp1bfZ.d.mts.map → runtime-CbcODreO.d.mts.map} +1 -1
- package/dist/runtime.d.mts +3 -3
- package/dist/runtime.mjs +1 -1
- package/dist/{types-Dkm5SRCi-DOcQZ0KX.d.mts → types-CLN9Y3BH-DiekC2oe.d.mts} +3 -3
- package/dist/{types-Dkm5SRCi-DOcQZ0KX.d.mts.map → types-CLN9Y3BH-DiekC2oe.d.mts.map} +1 -1
- package/dist/types-DrgaZ2lG.d.mts +1 -0
- package/dist/{types-IqZMLrFC-oV8-d-Fc.d.mts → types-IqZMLrFC-B8FPWCcB.d.mts} +2 -2
- package/dist/{types-IqZMLrFC-oV8-d-Fc.d.mts.map → types-IqZMLrFC-B8FPWCcB.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/aggregate-descriptor-registry-DvPrQwzY.mjs.map +0 -1
- package/dist/control-adapter-B71_6j-D.d.mts +0 -1
- package/dist/ddl-types-BMp2bWVS-D1waZJ4n.mjs.map +0 -1
- package/dist/query-lane-context-7V5_yUIr.d.mts +0 -1
- package/dist/query-lane-context-CONNlrCx-D2biFONs.d.mts.map +0 -1
- package/dist/types-BgOhriVC.d.mts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
@@ -3,9 +3,9 @@ import "./types-DuriYH5B.mjs";
|
|
|
3
3
|
import { a as SqlOperationRegistry } from "./index-CwtBEMZr.mjs";
|
|
4
4
|
import { O as ContractCodecRegistry, s as AnyExpression } from "./types-ZzeQKmYD-PJlaIsww.mjs";
|
|
5
5
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
6
|
-
import { AggregateDescriptor } from "@prisma/orm-framework/components/components";
|
|
6
|
+
import { AggregateDescriptor, AggregateResultNullability } from "@prisma/orm-framework/components/components";
|
|
7
7
|
import { CodecDescriptor, CodecRef } from "@prisma/orm-framework/components/codec";
|
|
8
|
-
//#region ../../../2-sql/4-lanes/relational-core/dist/query-lane-context-
|
|
8
|
+
//#region ../../../2-sql/4-lanes/relational-core/dist/query-lane-context-DyDSQVS-.d.mts
|
|
9
9
|
//#region src/aggregate-descriptor.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* What a lowering hook is handed: the expression being aggregated (absent for operations that consume no value) and the codec of that expression.
|
|
@@ -66,16 +66,15 @@ interface CodecDescriptorRegistry {
|
|
|
66
66
|
byTargetType(targetType: string): readonly CodecDescriptor<unknown>[];
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* What one aggregate resolves to: the codec its result carries,
|
|
69
|
+
* What one aggregate resolves to: the codec its result carries, how that result reads where no row carries it, and the optional hook that builds the expression.
|
|
70
70
|
*
|
|
71
71
|
* The resolved value carries no descriptor, so a lowering hook has no channel through which to report a different result codec than the one resolved here.
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
type ResolvedSqlAggregate = AggregateResultNullability & {
|
|
74
74
|
readonly operation: string;
|
|
75
75
|
readonly output: CodecRef;
|
|
76
|
-
readonly nullable: boolean;
|
|
77
76
|
readonly lower: SqlAggregateLowering | undefined;
|
|
78
|
-
}
|
|
77
|
+
};
|
|
79
78
|
/**
|
|
80
79
|
* Resolution surface for aggregate result identity, assembled once per execution context.
|
|
81
80
|
*
|
|
@@ -149,4 +148,4 @@ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<Sql
|
|
|
149
148
|
}
|
|
150
149
|
//#endregion
|
|
151
150
|
export { MutationDefaultsOptions as a, SqlAggregateDescriptorRegistry as c, TypeHelperRegistry as d, isSqlAggregateDescriptor as f, MutationDefaultsOp as i, SqlAggregateLowering as l, CodecDescriptorRegistry as n, ResolvedSqlAggregate as o, ExecutionContext as r, SqlAggregateDescriptor as s, AppliedMutationDefault as t, SqlAggregateLoweringContext as u };
|
|
152
|
-
//# sourceMappingURL=query-lane-context-
|
|
151
|
+
//# sourceMappingURL=query-lane-context-DyDSQVS--UJOY8AwQ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-lane-context-DyDSQVS--UJOY8AwQ.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-DyDSQVS-.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;;;KAQjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;;;KAOxC,uBAAuB;WACjB;WACA,QAAQ;WACR,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;KACrB;KACA;WACM;WACA;;KAEN;WACM,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAOrB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WAClE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $ as JoinAst, A as DeleteAst, At as TableRef, B as ExistsExpr, Bt as isQueryAst, C as CodecDescriptor$1, Ct as RawSqlLiteral, D as ColumnRef, Dt as SqlCodecInstanceContext, E as CodecTrait$1, Et as SqlCodecCallContext, F as DescriptorCodecTraits, Ft as WindowFn, G as ExtractCodecTypes, H as ExpressionFolder, Ht as queryAstKinds, I as Direction, It as WindowFuncExpr, J as FunctionSourceAlias, K as FunctionCallExpr, L as DoNothingConflictAction, Lt as aggregateFnNames, M as DescriptorCodecId, Mt as ToWhereExpr, N as DescriptorCodecInput, Nt as UpdateAst, O as ContractCodecRegistry, Ot as SqlColumnRef, P as DescriptorCodecJson, Pt as WhereArg, Q as InsertValue, R as DoUpdateSetConflictAction, Rt as frozenCodecRef, S as CodecCallContext$1, St as RawSqlExpr, T as CodecRef$1, Tt as SelectAstOptions, U as ExpressionRewriter, Ut as whereExprKinds, V as ExprVisitor, Vt as isWhereExpr, W as ExpressionSource, X as InsertAst, Y as IdentifierRef, Z as InsertOnConflict, _ as BinaryOp, _t as ParamRef, a as AndExpr, at as JsonValueProjectionVisitor, b as CastExpr, bt as ProjectionItem, c as AnyFromSource, ct as LiteralExpr, d as AnyJsonValueProjection, dt as NativeJsonValueProjection, et as JoinOnExpr, f as AnyOperationArg, ft as NotExpr, g as BinaryExpr, gt as OrderByItem, h as AstRewriter, ht as OrExpr, i as AggregateOpFn, it as JsonObjectExpr, j as DerivedTableSource, jt as TableSource, k as DefaultValueExpr, kt as SubqueryExpr, l as AnyInsertOnConflictAction, lt as LoweredParam, m as AnyQueryAst, mt as OperationExpr, n as AggregateExpr, nt as JsonDocumentProjection, o as AnyCodecDescriptor, ot as LimitOffsetValue, p as AnyParamRef, pt as NullCheckExpr, q as FunctionSource, r as AggregateFn, rt as JsonObjectEntry, s as AnyExpression, st as ListExpression, t as AggregateCountFn, tt as JsonArrayAggExpr, u as AnyInsertValue, ut as LoweredStatement, v as CaseBranch, vt as PreparedParamRef, w as CodecJsonValueProjection, wt as SelectAst, x as Codec$1, xt as RawExpr, y as CaseExpr, yt as ProjectionExpr, z as EqColJoinOn, zt as isAggregateFn } from "./types-ZzeQKmYD-PJlaIsww.mjs";
|
|
2
|
-
import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-
|
|
3
|
-
import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-
|
|
2
|
+
import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-CnLSuwXa-BfAdBtW-.mjs";
|
|
3
|
+
import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-Du28qINj.mjs";
|
|
4
4
|
import { a as Expression, c as RawSqlTag, d as TraitExpression, f as buildOperation, g as toExpr, h as param, i as CodecValue, l as ScalarListExpression, m as createRawSql, n as CodecExpression, o as RawCodecInferer, p as codecOf, r as CodecTypesBase, s as RawSqlBuilder, t as BuildOperationSpec, u as ScopeField } from "./expression-X88ppPyv.mjs";
|
|
5
5
|
import { t as SqlExecutionPlan } from "./sql-execution-plan-qxvHnFcA-eC6n5Ek9.mjs";
|
|
6
6
|
import { n as planFromAst, t as SqlQueryPlan } from "./plan-DfLDIdep-qOGizVoO.mjs";
|
|
7
7
|
import "./plan-D3FQ6FXy.mjs";
|
|
8
|
-
import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-
|
|
9
|
-
import "./query-lane-context-
|
|
8
|
+
import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
9
|
+
import "./query-lane-context-Dc9gwgtK.mjs";
|
|
10
10
|
import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-Bp5oIYM0-B-m0jAm8.mjs";
|
|
11
|
-
import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-
|
|
11
|
+
import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-CLN9Y3BH-DiekC2oe.mjs";
|
|
12
12
|
export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AppliedMutationDefault, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, CaseBranch, CaseExpr, CastExpr, CheckExpressionConstraint, Codec$1 as Codec, type CodecCallContext$1 as CodecCallContext, type CodecDescriptor$1 as CodecDescriptor, CodecDescriptorRegistry, CodecExpression, CodecJsonValueProjection, type CodecRef$1 as CodecRef, type CodecTrait$1 as CodecTrait, CodecTypes, CodecTypesBase, CodecValue, ColumnRef, ColumnResolutionContract, ColumnsOf, ComputeColumnJsType, ContractCodecRegistry, DdlColumn, DdlColumnDefault, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, Expression, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, FunctionSourceAlias, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectEntry, JsonObjectExpr, JsonValueProjectionVisitor, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, META, MarkerReadResult, Meta, ModelDef, ModelMetadata, MutationDefaultsOp, MutationDefaultsOptions, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, ParamRef, type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawCodecInferer, RawExpr, RawFactory, RawFunctionOptions, RawSqlBuilder, RawSqlExpr, RawSqlLiteral, RawSqlTag, RawTemplateFactory, RawTemplateOptions, ResolvedSqlAggregate, 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, ScalarListExpression, ScopeField, SelectAst, SelectAstOptions, SqlAggregateDescriptorRegistry, 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, SqlQueryable, SqlStatementStats, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TraitExpression, TypeHelperRegistry, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, aggregateFnNames, buildOperation, codecOf, collectOrderedParamRefs, compact, createRawSql, createSqlParamRefMutator, frozenCodecRef, isAggregateFn, isDdlNode, isQueryAst, isWhereExpr, param, planFromAst, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDecodeJson, sqlFloatDescriptor, sqlFloatEncode, sqlFloatEncodeJson, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, toExpr, whereExprKinds };
|
package/dist/relational-core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as PreparedParamRef, B as frozenCodecRef, C as LiteralExpr, D as OrExpr, E as OperationExpr, F as SubqueryExpr, G as whereExprKinds, H as isQueryAst, I as TableSource, L as UpdateAst, M as RawExpr, N as RawSqlExpr, O as OrderByItem, P as SelectAst, R as WindowFuncExpr, S as ListExpression, T as NullCheckExpr, U as isWhereExpr, V as isAggregateFn, W as queryAstKinds, _ as InsertAst, a as CastExpr, b as JsonArrayAggExpr, c as DeleteAst, d as DoUpdateSetConflictAction, f as EqColJoinOn, g as IdentifierRef, h as FunctionSource, i as CaseExpr, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as NotExpr, x as JsonObjectExpr, y as JoinAst, z as aggregateFnNames } from "./types-CSP6WmWn-DVuxsZJW.mjs";
|
|
2
|
-
import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, i as DdlNode, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, r as DdlColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint, u as isDdlNode } from "./ddl-types-
|
|
2
|
+
import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, i as DdlNode, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, r as DdlColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint, u as isDdlNode } from "./ddl-types-BGdnAbXo-DKPHPUGx.mjs";
|
|
3
3
|
import { n as compact, t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
|
|
4
4
|
import { A as sqlFloatDescriptor, B as sqlTextEncode, C as sqlCharDecode, D as sqlFloatColumn, E as sqlCharRenderOutputType, F as sqlIntDescriptor, G as sqlTimestampEncode, H as sqlTimestampDecode, I as sqlIntEncode, J as sqlVarcharColumn, K as sqlTimestampEncodeJson, L as sqlTextColumn, M as sqlFloatEncodeJson, N as sqlIntColumn, O as sqlFloatDecode, P as sqlIntDecode, Q as sqlVarcharRenderOutputType, R as sqlTextDecode, S as sqlCharColumn, T as sqlCharEncode, U as sqlTimestampDecodeJson, V as sqlTimestampColumn, W as sqlTimestampDescriptor, X as sqlVarcharDescriptor, Y as sqlVarcharDecode, Z as sqlVarcharEncode, _ as SqlTextDescriptor, a as SQL_FLOAT_CODEC_ID, b as SqlVarcharCodec, c as SQL_TIMESTAMP_CODEC_ID, d as SqlCharDescriptor, f as SqlFloatCodec, g as SqlTextCodec, h as SqlIntDescriptor, i as SQL_CHAR_CODEC_ID, j as sqlFloatEncode, k as sqlFloatDecodeJson, l as SQL_VARCHAR_CODEC_ID, m as SqlIntCodec, n as JsonDocumentProjection, o as SQL_INT_CODEC_ID, p as SqlFloatDescriptor, q as sqlTimestampRenderOutputType, r as NativeJsonValueProjection, s as SQL_TEXT_CODEC_ID, t as CodecJsonValueProjection, u as SqlCharCodec, v as SqlTimestampCodec, w as sqlCharDescriptor, x as SqlVarcharDescriptor, y as SqlTimestampDescriptor, z as sqlTextDescriptor } from "./ast-B-eeN74F.mjs";
|
|
5
5
|
import { a as toExpr, i as param, n as codecOf, r as createRawSql, t as buildOperation } from "./expression-CYVKobXp.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SqlAggregateDescriptorRegistry, f as isSqlAggregateDescriptor, l as SqlAggregateLowering, n as CodecDescriptorRegistry, s as SqlAggregateDescriptor, u as SqlAggregateLoweringContext } from "./query-lane-context-
|
|
1
|
+
import { c as SqlAggregateDescriptorRegistry, f as isSqlAggregateDescriptor, l as SqlAggregateLowering, n as CodecDescriptorRegistry, s as SqlAggregateDescriptor, u as SqlAggregateLoweringContext } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
2
2
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.d.mts
|
|
3
3
|
//#region src/aggregate-descriptor-registry.d.ts
|
|
4
4
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as isSqlAggregateDescriptor, t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-
|
|
1
|
+
import { n as isSqlAggregateDescriptor, t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-DSap8YyW.mjs";
|
|
2
2
|
export { buildSqlAggregateDescriptorRegistry, isSqlAggregateDescriptor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { $ as JoinAst, A as DeleteAst, At as TableRef, B as ExistsExpr, Bt as isQueryAst, C as CodecDescriptor$1, Ct as RawSqlLiteral, D as ColumnRef, Dt as SqlCodecInstanceContext, E as CodecTrait$1, Et as SqlCodecCallContext, F as DescriptorCodecTraits, Ft as WindowFn, G as ExtractCodecTypes, H as ExpressionFolder, Ht as queryAstKinds, I as Direction, It as WindowFuncExpr, J as FunctionSourceAlias, K as FunctionCallExpr, L as DoNothingConflictAction, Lt as aggregateFnNames, M as DescriptorCodecId, Mt as ToWhereExpr, N as DescriptorCodecInput, Nt as UpdateAst, O as ContractCodecRegistry, Ot as SqlColumnRef, P as DescriptorCodecJson, Pt as WhereArg, Q as InsertValue, R as DoUpdateSetConflictAction, Rt as frozenCodecRef, S as CodecCallContext$1, St as RawSqlExpr, T as CodecRef$1, Tt as SelectAstOptions, U as ExpressionRewriter, Ut as whereExprKinds, V as ExprVisitor, Vt as isWhereExpr, W as ExpressionSource, X as InsertAst, Y as IdentifierRef, Z as InsertOnConflict, _ as BinaryOp, _t as ParamRef, a as AndExpr, at as JsonValueProjectionVisitor, b as CastExpr, bt as ProjectionItem, c as AnyFromSource, ct as LiteralExpr, d as AnyJsonValueProjection, dt as NativeJsonValueProjection, et as JoinOnExpr, f as AnyOperationArg, ft as NotExpr, g as BinaryExpr, gt as OrderByItem, h as AstRewriter, ht as OrExpr, i as AggregateOpFn, it as JsonObjectExpr, j as DerivedTableSource, jt as TableSource, k as DefaultValueExpr, kt as SubqueryExpr, l as AnyInsertOnConflictAction, lt as LoweredParam, m as AnyQueryAst, mt as OperationExpr, n as AggregateExpr, nt as JsonDocumentProjection, o as AnyCodecDescriptor, ot as LimitOffsetValue, p as AnyParamRef, pt as NullCheckExpr, q as FunctionSource, r as AggregateFn, rt as JsonObjectEntry, s as AnyExpression, st as ListExpression, t as AggregateCountFn, tt as JsonArrayAggExpr, u as AnyInsertValue, ut as LoweredStatement, v as CaseBranch, vt as PreparedParamRef, w as CodecJsonValueProjection, wt as SelectAst, x as Codec$1, xt as RawExpr, y as CaseExpr, yt as ProjectionExpr, z as EqColJoinOn, zt as isAggregateFn } from "./types-ZzeQKmYD-PJlaIsww.mjs";
|
|
2
|
-
import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-
|
|
3
|
-
import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-
|
|
2
|
+
import { a as DdlColumnDefaultVisitor, c as DdlTableConstraint, d as LiteralColumnDefault, f as PrimaryKeyConstraint, i as DdlColumnDefault, l as ForeignKeyConstraint, m as isDdlNode, n as CheckExpressionConstraint, o as DdlColumnRenderContext, p as UniqueConstraint, r as DdlColumn, s as DdlNode, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-CnLSuwXa-BfAdBtW-.mjs";
|
|
3
|
+
import { $ as sqlTextDecode, A as SqlTimestampCodec, B as sqlCharEncode, C as SqlFloatDescriptor, D as SqlStatementStats, E as SqlQueryable, F as collectOrderedParamRefs, G as sqlFloatDescriptor, H as sqlFloatColumn, I as compact, J as sqlIntColumn, K as sqlFloatEncode, L as sqlCharColumn, M as SqlTransaction, N as SqlVarcharCodec, O as SqlTextCodec, P as SqlVarcharDescriptor, Q as sqlTextColumn, R as sqlCharDecode, S as SqlFloatCodec, T as SqlIntDescriptor, U as sqlFloatDecode, V as sqlCharRenderOutputType, W as sqlFloatDecodeJson, X as sqlIntDescriptor, Y as sqlIntDecode, Z as sqlIntEncode, _ as SqlConnection, a as LowererContext, at as sqlTimestampDescriptor, b as SqlExecuteRequest, c as PreparedStatementHandle, ct as sqlTimestampRenderOutputType, d as SQL_INT_CODEC_ID, dt as sqlVarcharDescriptor, et as sqlTextDescriptor, f as SQL_TEXT_CODEC_ID, ft as sqlVarcharEncode, g as SqlCharDescriptor, h as SqlCharCodec, i as Lowerer, it as sqlTimestampDecodeJson, j as SqlTimestampDescriptor, k as SqlTextDescriptor, l as SQL_CHAR_CODEC_ID, lt as sqlVarcharColumn, m as SQL_VARCHAR_CODEC_ID, n as AdapterProfile, nt as sqlTimestampColumn, o as MarkerReadResult, ot as sqlTimestampEncode, p as SQL_TIMESTAMP_CODEC_ID, pt as sqlVarcharRenderOutputType, q as sqlFloatEncodeJson, r as AdapterTarget, rt as sqlTimestampDecode, s as PreparedExecuteRequest, st as sqlTimestampEncodeJson, t as Adapter, tt as sqlTextEncode, u as SQL_FLOAT_CODEC_ID, ut as sqlVarcharDecode, v as SqlDriver, w as SqlIntCodec, x as SqlExplainResult, y as SqlDriverState, z as sqlCharDescriptor } from "./ast-Du28qINj.mjs";
|
|
4
4
|
export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, CaseBranch, CaseExpr, CastExpr, CheckExpressionConstraint, Codec$1 as Codec, type CodecCallContext$1 as CodecCallContext, type CodecDescriptor$1 as CodecDescriptor, CodecJsonValueProjection, type CodecRef$1 as CodecRef, type CodecTrait$1 as CodecTrait, ColumnRef, ContractCodecRegistry, DdlColumn, DdlColumnDefault, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ExprVisitor, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, FunctionSourceAlias, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectEntry, JsonObjectExpr, JsonValueProjectionVisitor, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, MarkerReadResult, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawExpr, RawSqlExpr, RawSqlLiteral, 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, SqlCharCodec, SqlCharDescriptor, SqlCodecCallContext, SqlCodecInstanceContext, SqlColumnRef, SqlConnection, SqlDriver, SqlDriverState, SqlExecuteRequest, SqlExplainResult, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlQueryable, SqlStatementStats, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableRef, TableSource, ToWhereExpr, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, aggregateFnNames, collectOrderedParamRefs, compact, frozenCodecRef, isAggregateFn, isDdlNode, isQueryAst, isWhereExpr, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDecodeJson, sqlFloatDescriptor, sqlFloatEncode, sqlFloatEncodeJson, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, whereExprKinds };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as PreparedParamRef, B as frozenCodecRef, C as LiteralExpr, D as OrExpr, E as OperationExpr, F as SubqueryExpr, G as whereExprKinds, H as isQueryAst, I as TableSource, L as UpdateAst, M as RawExpr, N as RawSqlExpr, O as OrderByItem, P as SelectAst, R as WindowFuncExpr, S as ListExpression, T as NullCheckExpr, U as isWhereExpr, V as isAggregateFn, W as queryAstKinds, _ as InsertAst, a as CastExpr, b as JsonArrayAggExpr, c as DeleteAst, d as DoUpdateSetConflictAction, f as EqColJoinOn, g as IdentifierRef, h as FunctionSource, i as CaseExpr, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as NotExpr, x as JsonObjectExpr, y as JoinAst, z as aggregateFnNames } from "./types-CSP6WmWn-DVuxsZJW.mjs";
|
|
2
|
-
import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, i as DdlNode, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, r as DdlColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint, u as isDdlNode } from "./ddl-types-
|
|
2
|
+
import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, i as DdlNode, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, r as DdlColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint, u as isDdlNode } from "./ddl-types-BGdnAbXo-DKPHPUGx.mjs";
|
|
3
3
|
import { n as compact, t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
|
|
4
4
|
import { A as sqlFloatDescriptor, B as sqlTextEncode, C as sqlCharDecode, D as sqlFloatColumn, E as sqlCharRenderOutputType, F as sqlIntDescriptor, G as sqlTimestampEncode, H as sqlTimestampDecode, I as sqlIntEncode, J as sqlVarcharColumn, K as sqlTimestampEncodeJson, L as sqlTextColumn, M as sqlFloatEncodeJson, N as sqlIntColumn, O as sqlFloatDecode, P as sqlIntDecode, Q as sqlVarcharRenderOutputType, R as sqlTextDecode, S as sqlCharColumn, T as sqlCharEncode, U as sqlTimestampDecodeJson, V as sqlTimestampColumn, W as sqlTimestampDescriptor, X as sqlVarcharDescriptor, Y as sqlVarcharDecode, Z as sqlVarcharEncode, _ as SqlTextDescriptor, a as SQL_FLOAT_CODEC_ID, b as SqlVarcharCodec, c as SQL_TIMESTAMP_CODEC_ID, d as SqlCharDescriptor, f as SqlFloatCodec, g as SqlTextCodec, h as SqlIntDescriptor, i as SQL_CHAR_CODEC_ID, j as sqlFloatEncode, k as sqlFloatDecodeJson, l as SQL_VARCHAR_CODEC_ID, m as SqlIntCodec, n as JsonDocumentProjection, o as SQL_INT_CODEC_ID, p as SqlFloatDescriptor, q as sqlTimestampRenderOutputType, r as NativeJsonValueProjection, s as SQL_TEXT_CODEC_ID, t as CodecJsonValueProjection, u as SqlCharCodec, v as SqlTimestampCodec, w as sqlCharDescriptor, x as SqlVarcharDescriptor, y as SqlTimestampDescriptor, z as sqlTextDescriptor } from "./ast-B-eeN74F.mjs";
|
|
5
5
|
export { AggregateExpr, AndExpr, BinaryExpr, CaseExpr, CastExpr, CheckExpressionConstraint, CodecJsonValueProjection, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralColumnDefault, LiteralExpr, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawSqlExpr, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, aggregateFnNames, collectOrderedParamRefs, compact, frozenCodecRef, isAggregateFn, isDdlNode, isQueryAst, isWhereExpr, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDecodeJson, sqlFloatDescriptor, sqlFloatEncode, sqlFloatEncodeJson, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, whereExprKinds };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as SqlStorage } from "./sql-storage-DCUlYs47-Cosit03s.mjs";
|
|
2
2
|
import "./types-DuriYH5B.mjs";
|
|
3
3
|
import { o as AnyCodecDescriptor$1 } from "./types-ZzeQKmYD-PJlaIsww.mjs";
|
|
4
|
-
import { n as CodecDescriptorRegistry } from "./query-lane-context-
|
|
4
|
+
import { n as CodecDescriptorRegistry } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
5
5
|
import { CodecRef } from "@prisma/orm-framework/components/codec";
|
|
6
6
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/codec-descriptor-registry.d.mts
|
|
7
7
|
//#region src/codec-descriptor-registry.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ReferentialAction } from "./foreign-key-BSy9u4O4-BnsOe5Nf.mjs";
|
|
2
2
|
import "./types-DuriYH5B.mjs";
|
|
3
3
|
import { $ as JoinAst, D as ColumnRef, Nt as UpdateAst, T as CodecRef$1, X as InsertAst, bt as ProjectionItem, c as AnyFromSource, gt as OrderByItem, jt as TableSource, s as AnyExpression, wt as SelectAst } from "./types-ZzeQKmYD-PJlaIsww.mjs";
|
|
4
|
-
import { d as LiteralColumnDefault, f as PrimaryKeyConstraint, l as ForeignKeyConstraint, n as CheckExpressionConstraint, p as UniqueConstraint, r as DdlColumn, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-
|
|
4
|
+
import { d as LiteralColumnDefault, f as PrimaryKeyConstraint, l as ForeignKeyConstraint, n as CheckExpressionConstraint, p as UniqueConstraint, r as DdlColumn, t as AnyDdlColumnDefault, u as FunctionColumnDefault } from "./ddl-types-CnLSuwXa-BfAdBtW-.mjs";
|
|
5
5
|
import { ColumnDefaultLiteralInputValue } from "@prisma/orm-framework/contract/types";
|
|
6
6
|
import { ParamSpec } from "@prisma/orm-framework/operations";
|
|
7
7
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/contract-free.d.mts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as LiteralExpr, D as OrExpr, E as OperationExpr, I as TableSource, L as UpdateAst, M as RawExpr, O as OrderByItem, P as SelectAst, T as NullCheckExpr, _ as InsertAst, g as IdentifierRef, j as ProjectionItem, k as ParamRef, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, t as AggregateExpr, v as InsertOnConflict, y as JoinAst } from "./types-CSP6WmWn-DVuxsZJW.mjs";
|
|
2
|
-
import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint } from "./ddl-types-
|
|
2
|
+
import { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint } from "./ddl-types-BGdnAbXo-DKPHPUGx.mjs";
|
|
3
3
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
4
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
5
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/contract-free.mjs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relational-core__contract-free.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/contract-free.mjs"],"sourcesContent":["import { C as LiteralExpr, D as OrExpr, E as OperationExpr, I as TableSource, L as UpdateAst, M as RawExpr, O as OrderByItem, P as SelectAst, T as NullCheckExpr, _ as InsertAst, g as IdentifierRef, j as ProjectionItem, k as ParamRef, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, t as AggregateExpr, v as InsertOnConflict, y as JoinAst } from \"../types-CSP6WmWn.mjs\";\nimport { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint } from \"../ddl-types-BMp2bWVS.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/contract-free/column.ts\nfunction lit(value) {\n\treturn new LiteralColumnDefault(value);\n}\nfunction fn(expression) {\n\treturn new FunctionColumnDefault(expression);\n}\nfunction col(name, type, options) {\n\treturn new DdlColumn({\n\t\tname,\n\t\ttype,\n\t\t...options\n\t});\n}\nfunction primaryKey(columns, options) {\n\treturn new PrimaryKeyConstraint({\n\t\tcolumns,\n\t\t...options\n\t});\n}\nfunction foreignKey(columns, refTable, refColumns, options) {\n\treturn new ForeignKeyConstraint({\n\t\tcolumns,\n\t\trefTable,\n\t\trefColumns,\n\t\t...options\n\t});\n}\nfunction unique(columns, options) {\n\treturn new UniqueConstraint({\n\t\tcolumns,\n\t\t...options\n\t});\n}\nfunction checkExpression(name, expression) {\n\treturn new CheckExpressionConstraint({\n\t\tname,\n\t\texpression\n\t});\n}\n//#endregion\n//#region src/contract-free/table.ts\n/**\n* A composable WHERE / ON expression. Wraps an `AnyExpression` and exposes\n* fluent boolean combinators, mirroring the spirit of `sql-builder`'s\n* `Expression` interface without the contract-bound type machinery.\n*/\nvar CfExpr = class CfExpr {\n\tast;\n\tconstructor(ast) {\n\t\tthis.ast = ast;\n\t}\n\tand(other) {\n\t\treturn new CfExpr(AndExpr.of([this.ast, other.ast]));\n\t}\n\tor(other) {\n\t\treturn new CfExpr(OrExpr.of([this.ast, other.ast]));\n\t}\n\tnot() {\n\t\treturn new CfExpr(this.ast.not());\n\t}\n\tisNull() {\n\t\treturn new CfExpr(NullCheckExpr.isNull(this.ast));\n\t}\n\tisNotNull() {\n\t\treturn new CfExpr(NullCheckExpr.isNotNull(this.ast));\n\t}\n\teqLit(value) {\n\t\treturn new CfExpr(BinaryExpr.eq(this.ast, LiteralExpr.of(value)));\n\t}\n\tgtLit(value) {\n\t\treturn new CfExpr(BinaryExpr.gt(this.ast, LiteralExpr.of(value)));\n\t}\n\teqParam(value, codecId) {\n\t\treturn new CfExpr(BinaryExpr.eq(this.ast, ParamRef.of(value, { codec: { codecId } })));\n\t}\n\teqExpr(other) {\n\t\treturn new CfExpr(BinaryExpr.eq(this.ast, other.ast));\n\t}\n};\nconst cfExpr = {\n\tcountStar() {\n\t\treturn new CfExpr(AggregateExpr.count());\n\t},\n\tlit(value) {\n\t\treturn new CfExpr(LiteralExpr.of(value));\n\t},\n\tidentifierRef(name) {\n\t\treturn new CfExpr(IdentifierRef.of(name));\n\t},\n\tparam(value, codecId) {\n\t\treturn new CfExpr(ParamRef.of(value, { codec: { codecId } }));\n\t},\n\t/**\n\t* Catalog function call lowered via a `'function'`-strategy template\n\t* (e.g. `to_regclass({{self}})`). Owns the `OperationExpr` assembly so\n\t* target packages only supply vocabulary: template, codec'd operands,\n\t* and return spec.\n\t*/\n\tfn(options) {\n\t\treturn new CfExpr(new OperationExpr({\n\t\t\tmethod: options.method,\n\t\t\tself: options.self.ast,\n\t\t\targs: options.args?.map((arg) => arg.ast),\n\t\t\treturns: options.returns,\n\t\t\tlowering: {\n\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\tstrategy: \"function\",\n\t\t\t\ttemplate: options.template\n\t\t\t}\n\t\t}));\n\t},\n\tcolumnRef(qualifier, name) {\n\t\treturn new CfExpr(ColumnRef.of(qualifier, name));\n\t},\n\tallOf(exprs) {\n\t\treturn new CfExpr(AndExpr.of(exprs.map((expr) => expr.ast)));\n\t},\n\t/**\n\t* Opaque DB-side SQL expression (e.g. `current_schema()`) carried as a\n\t* `RawExpr`. For zero-operand catalog functions where a `'function'`\n\t* lowering template has nothing to substitute.\n\t*/\n\traw(sql, returns) {\n\t\treturn new CfExpr(new RawExpr({\n\t\t\tparts: [sql],\n\t\t\treturns\n\t\t}));\n\t},\n\texists(query) {\n\t\treturn new CfExpr(ExistsExpr.exists(query.build()));\n\t},\n\tnotExists(query) {\n\t\treturn new CfExpr(ExistsExpr.notExists(query.build()));\n\t}\n};\n/** Aliased table source for catalog queries (no namespace coordinate). */\nfunction cfTable(name, alias) {\n\treturn TableSource.named(name, alias);\n}\nvar CfExprSelectQuery = class CfExprSelectQuery {\n\tsrc;\n\tprojectionItems;\n\twhereExpr;\n\tjoinItems;\n\tlimitValue;\n\tconstructor(src, projectionItems, whereExpr, joinItems = [], limitValue = void 0) {\n\t\tthis.src = src;\n\t\tthis.projectionItems = projectionItems;\n\t\tthis.whereExpr = whereExpr;\n\t\tthis.joinItems = joinItems;\n\t\tthis.limitValue = limitValue;\n\t}\n\tfrom(source) {\n\t\treturn new CfExprSelectQuery(source, this.projectionItems, this.whereExpr, this.joinItems, this.limitValue);\n\t}\n\tjoin(source, on) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, this.whereExpr, [...this.joinItems, JoinAst.inner(source, on.ast)], this.limitValue);\n\t}\n\tleftJoin(source, on) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, this.whereExpr, [...this.joinItems, JoinAst.left(source, on.ast)], this.limitValue);\n\t}\n\tproject(alias, expr) {\n\t\treturn new CfExprSelectQuery(this.src, [...this.projectionItems, ProjectionItem.of(alias, expr.ast)], this.whereExpr, this.joinItems, this.limitValue);\n\t}\n\twhere(expr) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, expr, this.joinItems, this.limitValue);\n\t}\n\tlimit(value) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, this.whereExpr, this.joinItems, value);\n\t}\n\tbuild() {\n\t\tif (this.joinItems.length > 0 && this.src === void 0) throw structuredError(\"ORM.ARGUMENT_INVALID\", \"CfExprSelectQuery: cannot add a JOIN without a FROM clause\");\n\t\tconst base = this.src !== void 0 ? SelectAst.from(this.src).withProjection(this.projectionItems) : SelectAst.noFrom().withProjection(this.projectionItems);\n\t\tconst withJoins = this.joinItems.length > 0 ? base.withJoins(this.joinItems) : base;\n\t\tconst withWhere = this.whereExpr !== void 0 ? withJoins.withWhere(this.whereExpr.ast) : withJoins;\n\t\treturn this.limitValue !== void 0 ? withWhere.withLimit(this.limitValue) : withWhere;\n\t}\n};\nfunction exprSelect() {\n\treturn new CfExprSelectQuery(void 0, [], void 0);\n}\nvar CfInsertQuery = class CfInsertQuery {\n\tsrc;\n\tschema;\n\trowValues;\n\treturningItems;\n\tconstructor(src, schema, rowValues, returningItems = void 0) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t\tthis.returningItems = returningItems;\n\t}\n\treturning(...columns) {\n\t\treturn new CfInsertQuery(this.src, this.schema, this.rowValues, columns.map((col) => col.toProjectionItem()));\n\t}\n\tbuild() {\n\t\tconst row = buildInsertRow(this.schema, this.rowValues);\n\t\tconst ast = InsertAst.into(this.src).withRows([row]);\n\t\treturn this.returningItems ? ast.withReturning(this.returningItems) : ast;\n\t}\n};\nvar CfUpsertBuilder = class {\n\tsrc;\n\tschema;\n\trowValues;\n\tconstructor(src, schema, rowValues) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t}\n\tonConflict(...columns) {\n\t\treturn new CfConflictClause(this.src, this.schema, this.rowValues, [...columns]);\n\t}\n};\nvar CfConflictClause = class {\n\tsrc;\n\tschema;\n\trowValues;\n\tconflictCols;\n\tconstructor(src, schema, rowValues, conflictCols) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t\tthis.conflictCols = conflictCols;\n\t}\n\tdoUpdate(setOrCallback) {\n\t\tconst set = typeof setOrCallback === \"function\" ? setOrCallback(buildExcludedProxy(this.schema)) : setOrCallback;\n\t\treturn new CfUpsertQuery(this.src, this.schema, this.rowValues, this.conflictCols, set);\n\t}\n\tdoNothing() {\n\t\treturn new CfUpsertQuery(this.src, this.schema, this.rowValues, this.conflictCols, void 0);\n\t}\n};\nvar CfUpsertQuery = class {\n\tsrc;\n\tschema;\n\trowValues;\n\tconflictCols;\n\tupdateSet;\n\tconstructor(src, schema, rowValues, conflictCols, updateSet) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t\tthis.conflictCols = conflictCols;\n\t\tthis.updateSet = updateSet;\n\t}\n\tbuild() {\n\t\tconst row = buildInsertRow(this.schema, this.rowValues);\n\t\tconst conflictRefs = this.conflictCols.map((col) => col.toRef());\n\t\tconst onConflict = this.updateSet === void 0 ? InsertOnConflict.on(conflictRefs).doNothing() : InsertOnConflict.on(conflictRefs).doUpdateSet(buildSetMap(this.schema, this.updateSet));\n\t\treturn InsertAst.into(this.src).withRows([row]).withOnConflict(onConflict);\n\t}\n};\nvar CfUpdateQuery = class CfUpdateQuery {\n\tsrc;\n\tschema;\n\tsetValues;\n\twhereExpr;\n\treturningItems;\n\tconstructor(src, schema, setValues = void 0, whereExpr = void 0, returningItems = void 0) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.setValues = setValues;\n\t\tthis.whereExpr = whereExpr;\n\t\tthis.returningItems = returningItems;\n\t}\n\tset(values) {\n\t\treturn new CfUpdateQuery(this.src, this.schema, values, this.whereExpr, this.returningItems);\n\t}\n\twhere(expr) {\n\t\treturn new CfUpdateQuery(this.src, this.schema, this.setValues, expr, this.returningItems);\n\t}\n\treturning(...columns) {\n\t\treturn new CfUpdateQuery(this.src, this.schema, this.setValues, this.whereExpr, columns.map((col) => col.toProjectionItem()));\n\t}\n\tbuild() {\n\t\tconst set = buildSetMap(this.schema, this.setValues);\n\t\tconst base = UpdateAst.table(this.src).withSet(set);\n\t\tconst withWhere = this.whereExpr ? base.withWhere(this.whereExpr.ast) : base;\n\t\treturn this.returningItems ? withWhere.withReturning(this.returningItems) : withWhere;\n\t}\n};\nvar CfSelectQuery = class CfSelectQuery {\n\tsrc;\n\tprojectionItems;\n\twhereExpr;\n\torderByItems;\n\tconstructor(src, projectionItems, whereExpr = void 0, orderByItems = []) {\n\t\tthis.src = src;\n\t\tthis.projectionItems = projectionItems;\n\t\tthis.whereExpr = whereExpr;\n\t\tthis.orderByItems = orderByItems;\n\t}\n\twhere(expr) {\n\t\treturn new CfSelectQuery(this.src, this.projectionItems, expr, this.orderByItems);\n\t}\n\torderBy(column, dir = \"asc\") {\n\t\tconst item = dir === \"asc\" ? OrderByItem.asc(column.toRef()) : OrderByItem.desc(column.toRef());\n\t\treturn new CfSelectQuery(this.src, this.projectionItems, this.whereExpr, [...this.orderByItems, item]);\n\t}\n\tbuild() {\n\t\tconst base = SelectAst.from(this.src).withProjection(this.projectionItems);\n\t\tconst withWhere = this.whereExpr ? base.withWhere(this.whereExpr.ast) : base;\n\t\treturn this.orderByItems.length > 0 ? withWhere.withOrderBy(this.orderByItems) : withWhere;\n\t}\n};\n/**\n* Declare a control-plane table once, binding column codecs at declaration time.\n* Returns a `TableHandle` whose column properties compose expressions directly\n* without per-call-site codec or column-name threading.\n*\n* ```ts\n* const marker = pgTable({ name: 'marker', schema: 'prisma_contract' }, {\n* space: text(),\n* core_hash: text(),\n* updated_at: timestamptz(),\n* });\n*\n* const query = marker.update()\n* .set({ core_hash: newHash, updated_at: NOW })\n* .where(marker.space.eq(space).and(marker.core_hash.eq(expectedFrom)))\n* .returning(marker.space)\n* .build();\n* ```\n*/\nfunction table(source, schema) {\n\tconst proxies = {};\n\tfor (const [col, desc] of Object.entries(schema)) proxies[col] = makeColumnProxy(source.alias ?? source.name, col, desc);\n\treturn blindCast({\n\t\t...proxies,\n\t\tsource,\n\t\tinsert: (row) => new CfInsertQuery(source, schema, row),\n\t\tupsert: (row) => new CfUpsertBuilder(source, schema, row),\n\t\tupdate: () => new CfUpdateQuery(source, schema),\n\t\tselect: (...cols) => new CfSelectQuery(source, cols.map((col) => col.toProjectionItem()))\n\t});\n}\nfunction makeColumnProxy(tableName, columnName, desc) {\n\tconst ref = ColumnRef.of(tableName, columnName);\n\treturn {\n\t\tcodecId: desc.codecId,\n\t\tnullable: desc.nullable,\n\t\tcolumnName,\n\t\ttableName,\n\t\teq: (value) => value === null ? new CfExpr(NullCheckExpr.isNull(ref)) : new CfExpr(BinaryExpr.eq(ref, toSetExpression(value, desc))),\n\t\tneq: (value) => value === null ? new CfExpr(NullCheckExpr.isNotNull(ref)) : new CfExpr(BinaryExpr.neq(ref, toSetExpression(value, desc))),\n\t\tisNull: () => new CfExpr(NullCheckExpr.isNull(ref)),\n\t\tisNotNull: () => new CfExpr(NullCheckExpr.isNotNull(ref)),\n\t\ttoRef: () => ref,\n\t\ttoProjectionItem: (alias = columnName) => ProjectionItem.of(alias, ref, { codecId: desc.codecId })\n\t};\n}\nfunction buildExcludedProxy(schema) {\n\treturn blindCast(Object.fromEntries(Object.keys(schema).map((col) => [col, ColumnRef.of(\"excluded\", col)])));\n}\nfunction isExpressionSource(value) {\n\treturn typeof value === \"object\" && value !== null && \"toExpr\" in value && typeof value.toExpr === \"function\";\n}\nfunction toInsertValue(value, desc) {\n\tif (isExpressionSource(value)) {\n\t\tconst expr = value.toExpr();\n\t\tif (expr.kind === \"column-ref\" || expr.kind === \"param-ref\" || expr.kind === \"prepared-param-ref\" || expr.kind === \"raw-expr\") return expr;\n\t}\n\treturn ParamRef.of(value, { codec: { codecId: desc.codecId } });\n}\nfunction toSetExpression(value, desc) {\n\tif (isExpressionSource(value)) return value.toExpr();\n\treturn ParamRef.of(value, { codec: { codecId: desc.codecId } });\n}\nfunction buildInsertRow(schema, values) {\n\tconst row = {};\n\tconst rawValues = blindCast(values);\n\tfor (const [col, desc] of Object.entries(schema)) row[col] = toInsertValue(rawValues[col], desc);\n\treturn row;\n}\nfunction buildSetMap(schema, values) {\n\tif (values === void 0) return {};\n\tconst set = {};\n\tconst rawSchema = blindCast(schema);\n\tconst rawValues = blindCast(values);\n\tfor (const [col, value] of Object.entries(rawValues)) {\n\t\tconst desc = rawSchema[col];\n\t\tif (desc !== void 0) set[col] = toSetExpression(value, desc);\n\t}\n\treturn set;\n}\n//#endregion\nexport { CfConflictClause, CfExpr, CfExprSelectQuery, CfInsertQuery, CfSelectQuery, CfUpdateQuery, CfUpsertBuilder, CfUpsertQuery, cfExpr, cfTable, checkExpression, col, exprSelect, fn, foreignKey, lit, primaryKey, table, unique };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;AAKA,SAAS,IAAI,OAAO;CACnB,OAAO,IAAI,qBAAqB,KAAK;AACtC;AACA,SAAS,GAAG,YAAY;CACvB,OAAO,IAAI,sBAAsB,UAAU;AAC5C;AACA,SAAS,IAAI,MAAM,MAAM,SAAS;CACjC,OAAO,IAAI,UAAU;EACpB;EACA;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,WAAW,SAAS,SAAS;CACrC,OAAO,IAAI,qBAAqB;EAC/B;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,WAAW,SAAS,UAAU,YAAY,SAAS;CAC3D,OAAO,IAAI,qBAAqB;EAC/B;EACA;EACA;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,OAAO,SAAS,SAAS;CACjC,OAAO,IAAI,iBAAiB;EAC3B;EACA,GAAG;CACJ,CAAC;AACF;AACA,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M,OAAO,MAAM,OAAO;EAC1B,IAAI,KAAK,SAAS,gBAAgB,KAAK,SAAS,eAAe,KAAK,SAAS,wBAAwB,KAAK,SAAS,YAAY,OAAO;CACvI;CACA,OAAO,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AAC/D;AACA,SAAS,gBAAgB,OAAO,MAAM;CACrC,IAAI,mBAAmB,KAAK,GAAG,OAAO,MAAM,OAAO;CACnD,OAAO,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AAC/D;AACA,SAAS,eAAe,QAAQ,QAAQ;CACvC,MAAM,MAAM,CAAC;CACb,MAAM,YAAY,UAAU,MAAM;CAClC,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,MAAM,GAAG,IAAI,OAAO,cAAc,UAAU,MAAM,IAAI;CAC/F,OAAO;AACR;AACA,SAAS,YAAY,QAAQ,QAAQ;CACpC,IAAI,WAAW,KAAK,GAAG,OAAO,CAAC;CAC/B,MAAM,MAAM,CAAC;CACb,MAAM,YAAY,UAAU,MAAM;CAClC,MAAM,YAAY,UAAU,MAAM;CAClC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,SAAS,GAAG;EACrD,MAAM,OAAO,UAAU;EACvB,IAAI,SAAS,KAAK,GAAG,IAAI,OAAO,gBAAgB,OAAO,IAAI;CAC5D;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"relational-core__contract-free.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/contract-free.mjs"],"sourcesContent":["import { C as LiteralExpr, D as OrExpr, E as OperationExpr, I as TableSource, L as UpdateAst, M as RawExpr, O as OrderByItem, P as SelectAst, T as NullCheckExpr, _ as InsertAst, g as IdentifierRef, j as ProjectionItem, k as ParamRef, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, t as AggregateExpr, v as InsertOnConflict, y as JoinAst } from \"../types-CSP6WmWn.mjs\";\nimport { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint } from \"../ddl-types-BGdnAbXo.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/contract-free/column.ts\nfunction lit(value) {\n\treturn new LiteralColumnDefault(value);\n}\nfunction fn(expression) {\n\treturn new FunctionColumnDefault(expression);\n}\nfunction col(name, type, options) {\n\treturn new DdlColumn({\n\t\tname,\n\t\ttype,\n\t\t...options\n\t});\n}\nfunction primaryKey(columns, options) {\n\treturn new PrimaryKeyConstraint({\n\t\tcolumns,\n\t\t...options\n\t});\n}\nfunction foreignKey(columns, refTable, refColumns, options) {\n\treturn new ForeignKeyConstraint({\n\t\tcolumns,\n\t\trefTable,\n\t\trefColumns,\n\t\t...options\n\t});\n}\nfunction unique(columns, options) {\n\treturn new UniqueConstraint({\n\t\tcolumns,\n\t\t...options\n\t});\n}\nfunction checkExpression(name, expression) {\n\treturn new CheckExpressionConstraint({\n\t\tname,\n\t\texpression\n\t});\n}\n//#endregion\n//#region src/contract-free/table.ts\n/**\n* A composable WHERE / ON expression. Wraps an `AnyExpression` and exposes\n* fluent boolean combinators, mirroring the spirit of `sql-builder`'s\n* `Expression` interface without the contract-bound type machinery.\n*/\nvar CfExpr = class CfExpr {\n\tast;\n\tconstructor(ast) {\n\t\tthis.ast = ast;\n\t}\n\tand(other) {\n\t\treturn new CfExpr(AndExpr.of([this.ast, other.ast]));\n\t}\n\tor(other) {\n\t\treturn new CfExpr(OrExpr.of([this.ast, other.ast]));\n\t}\n\tnot() {\n\t\treturn new CfExpr(this.ast.not());\n\t}\n\tisNull() {\n\t\treturn new CfExpr(NullCheckExpr.isNull(this.ast));\n\t}\n\tisNotNull() {\n\t\treturn new CfExpr(NullCheckExpr.isNotNull(this.ast));\n\t}\n\teqLit(value) {\n\t\treturn new CfExpr(BinaryExpr.eq(this.ast, LiteralExpr.of(value)));\n\t}\n\tgtLit(value) {\n\t\treturn new CfExpr(BinaryExpr.gt(this.ast, LiteralExpr.of(value)));\n\t}\n\teqParam(value, codecId) {\n\t\treturn new CfExpr(BinaryExpr.eq(this.ast, ParamRef.of(value, { codec: { codecId } })));\n\t}\n\teqExpr(other) {\n\t\treturn new CfExpr(BinaryExpr.eq(this.ast, other.ast));\n\t}\n};\nconst cfExpr = {\n\tcountStar() {\n\t\treturn new CfExpr(AggregateExpr.count());\n\t},\n\tlit(value) {\n\t\treturn new CfExpr(LiteralExpr.of(value));\n\t},\n\tidentifierRef(name) {\n\t\treturn new CfExpr(IdentifierRef.of(name));\n\t},\n\tparam(value, codecId) {\n\t\treturn new CfExpr(ParamRef.of(value, { codec: { codecId } }));\n\t},\n\t/**\n\t* Catalog function call lowered via a `'function'`-strategy template\n\t* (e.g. `to_regclass({{self}})`). Owns the `OperationExpr` assembly so\n\t* target packages only supply vocabulary: template, codec'd operands,\n\t* and return spec.\n\t*/\n\tfn(options) {\n\t\treturn new CfExpr(new OperationExpr({\n\t\t\tmethod: options.method,\n\t\t\tself: options.self.ast,\n\t\t\targs: options.args?.map((arg) => arg.ast),\n\t\t\treturns: options.returns,\n\t\t\tlowering: {\n\t\t\t\ttargetFamily: \"sql\",\n\t\t\t\tstrategy: \"function\",\n\t\t\t\ttemplate: options.template\n\t\t\t}\n\t\t}));\n\t},\n\tcolumnRef(qualifier, name) {\n\t\treturn new CfExpr(ColumnRef.of(qualifier, name));\n\t},\n\tallOf(exprs) {\n\t\treturn new CfExpr(AndExpr.of(exprs.map((expr) => expr.ast)));\n\t},\n\t/**\n\t* Opaque DB-side SQL expression (e.g. `current_schema()`) carried as a\n\t* `RawExpr`. For zero-operand catalog functions where a `'function'`\n\t* lowering template has nothing to substitute.\n\t*/\n\traw(sql, returns) {\n\t\treturn new CfExpr(new RawExpr({\n\t\t\tparts: [sql],\n\t\t\treturns\n\t\t}));\n\t},\n\texists(query) {\n\t\treturn new CfExpr(ExistsExpr.exists(query.build()));\n\t},\n\tnotExists(query) {\n\t\treturn new CfExpr(ExistsExpr.notExists(query.build()));\n\t}\n};\n/** Aliased table source for catalog queries (no namespace coordinate). */\nfunction cfTable(name, alias) {\n\treturn TableSource.named(name, alias);\n}\nvar CfExprSelectQuery = class CfExprSelectQuery {\n\tsrc;\n\tprojectionItems;\n\twhereExpr;\n\tjoinItems;\n\tlimitValue;\n\tconstructor(src, projectionItems, whereExpr, joinItems = [], limitValue = void 0) {\n\t\tthis.src = src;\n\t\tthis.projectionItems = projectionItems;\n\t\tthis.whereExpr = whereExpr;\n\t\tthis.joinItems = joinItems;\n\t\tthis.limitValue = limitValue;\n\t}\n\tfrom(source) {\n\t\treturn new CfExprSelectQuery(source, this.projectionItems, this.whereExpr, this.joinItems, this.limitValue);\n\t}\n\tjoin(source, on) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, this.whereExpr, [...this.joinItems, JoinAst.inner(source, on.ast)], this.limitValue);\n\t}\n\tleftJoin(source, on) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, this.whereExpr, [...this.joinItems, JoinAst.left(source, on.ast)], this.limitValue);\n\t}\n\tproject(alias, expr) {\n\t\treturn new CfExprSelectQuery(this.src, [...this.projectionItems, ProjectionItem.of(alias, expr.ast)], this.whereExpr, this.joinItems, this.limitValue);\n\t}\n\twhere(expr) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, expr, this.joinItems, this.limitValue);\n\t}\n\tlimit(value) {\n\t\treturn new CfExprSelectQuery(this.src, this.projectionItems, this.whereExpr, this.joinItems, value);\n\t}\n\tbuild() {\n\t\tif (this.joinItems.length > 0 && this.src === void 0) throw structuredError(\"ORM.ARGUMENT_INVALID\", \"CfExprSelectQuery: cannot add a JOIN without a FROM clause\");\n\t\tconst base = this.src !== void 0 ? SelectAst.from(this.src).withProjection(this.projectionItems) : SelectAst.noFrom().withProjection(this.projectionItems);\n\t\tconst withJoins = this.joinItems.length > 0 ? base.withJoins(this.joinItems) : base;\n\t\tconst withWhere = this.whereExpr !== void 0 ? withJoins.withWhere(this.whereExpr.ast) : withJoins;\n\t\treturn this.limitValue !== void 0 ? withWhere.withLimit(this.limitValue) : withWhere;\n\t}\n};\nfunction exprSelect() {\n\treturn new CfExprSelectQuery(void 0, [], void 0);\n}\nvar CfInsertQuery = class CfInsertQuery {\n\tsrc;\n\tschema;\n\trowValues;\n\treturningItems;\n\tconstructor(src, schema, rowValues, returningItems = void 0) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t\tthis.returningItems = returningItems;\n\t}\n\treturning(...columns) {\n\t\treturn new CfInsertQuery(this.src, this.schema, this.rowValues, columns.map((col) => col.toProjectionItem()));\n\t}\n\tbuild() {\n\t\tconst row = buildInsertRow(this.schema, this.rowValues);\n\t\tconst ast = InsertAst.into(this.src).withRows([row]);\n\t\treturn this.returningItems ? ast.withReturning(this.returningItems) : ast;\n\t}\n};\nvar CfUpsertBuilder = class {\n\tsrc;\n\tschema;\n\trowValues;\n\tconstructor(src, schema, rowValues) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t}\n\tonConflict(...columns) {\n\t\treturn new CfConflictClause(this.src, this.schema, this.rowValues, [...columns]);\n\t}\n};\nvar CfConflictClause = class {\n\tsrc;\n\tschema;\n\trowValues;\n\tconflictCols;\n\tconstructor(src, schema, rowValues, conflictCols) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t\tthis.conflictCols = conflictCols;\n\t}\n\tdoUpdate(setOrCallback) {\n\t\tconst set = typeof setOrCallback === \"function\" ? setOrCallback(buildExcludedProxy(this.schema)) : setOrCallback;\n\t\treturn new CfUpsertQuery(this.src, this.schema, this.rowValues, this.conflictCols, set);\n\t}\n\tdoNothing() {\n\t\treturn new CfUpsertQuery(this.src, this.schema, this.rowValues, this.conflictCols, void 0);\n\t}\n};\nvar CfUpsertQuery = class {\n\tsrc;\n\tschema;\n\trowValues;\n\tconflictCols;\n\tupdateSet;\n\tconstructor(src, schema, rowValues, conflictCols, updateSet) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.rowValues = rowValues;\n\t\tthis.conflictCols = conflictCols;\n\t\tthis.updateSet = updateSet;\n\t}\n\tbuild() {\n\t\tconst row = buildInsertRow(this.schema, this.rowValues);\n\t\tconst conflictRefs = this.conflictCols.map((col) => col.toRef());\n\t\tconst onConflict = this.updateSet === void 0 ? InsertOnConflict.on(conflictRefs).doNothing() : InsertOnConflict.on(conflictRefs).doUpdateSet(buildSetMap(this.schema, this.updateSet));\n\t\treturn InsertAst.into(this.src).withRows([row]).withOnConflict(onConflict);\n\t}\n};\nvar CfUpdateQuery = class CfUpdateQuery {\n\tsrc;\n\tschema;\n\tsetValues;\n\twhereExpr;\n\treturningItems;\n\tconstructor(src, schema, setValues = void 0, whereExpr = void 0, returningItems = void 0) {\n\t\tthis.src = src;\n\t\tthis.schema = schema;\n\t\tthis.setValues = setValues;\n\t\tthis.whereExpr = whereExpr;\n\t\tthis.returningItems = returningItems;\n\t}\n\tset(values) {\n\t\treturn new CfUpdateQuery(this.src, this.schema, values, this.whereExpr, this.returningItems);\n\t}\n\twhere(expr) {\n\t\treturn new CfUpdateQuery(this.src, this.schema, this.setValues, expr, this.returningItems);\n\t}\n\treturning(...columns) {\n\t\treturn new CfUpdateQuery(this.src, this.schema, this.setValues, this.whereExpr, columns.map((col) => col.toProjectionItem()));\n\t}\n\tbuild() {\n\t\tconst set = buildSetMap(this.schema, this.setValues);\n\t\tconst base = UpdateAst.table(this.src).withSet(set);\n\t\tconst withWhere = this.whereExpr ? base.withWhere(this.whereExpr.ast) : base;\n\t\treturn this.returningItems ? withWhere.withReturning(this.returningItems) : withWhere;\n\t}\n};\nvar CfSelectQuery = class CfSelectQuery {\n\tsrc;\n\tprojectionItems;\n\twhereExpr;\n\torderByItems;\n\tconstructor(src, projectionItems, whereExpr = void 0, orderByItems = []) {\n\t\tthis.src = src;\n\t\tthis.projectionItems = projectionItems;\n\t\tthis.whereExpr = whereExpr;\n\t\tthis.orderByItems = orderByItems;\n\t}\n\twhere(expr) {\n\t\treturn new CfSelectQuery(this.src, this.projectionItems, expr, this.orderByItems);\n\t}\n\torderBy(column, dir = \"asc\") {\n\t\tconst item = dir === \"asc\" ? OrderByItem.asc(column.toRef()) : OrderByItem.desc(column.toRef());\n\t\treturn new CfSelectQuery(this.src, this.projectionItems, this.whereExpr, [...this.orderByItems, item]);\n\t}\n\tbuild() {\n\t\tconst base = SelectAst.from(this.src).withProjection(this.projectionItems);\n\t\tconst withWhere = this.whereExpr ? base.withWhere(this.whereExpr.ast) : base;\n\t\treturn this.orderByItems.length > 0 ? withWhere.withOrderBy(this.orderByItems) : withWhere;\n\t}\n};\n/**\n* Declare a control-plane table once, binding column codecs at declaration time.\n* Returns a `TableHandle` whose column properties compose expressions directly\n* without per-call-site codec or column-name threading.\n*\n* ```ts\n* const marker = pgTable({ name: 'marker', schema: 'prisma_contract' }, {\n* space: text(),\n* core_hash: text(),\n* updated_at: timestamptz(),\n* });\n*\n* const query = marker.update()\n* .set({ core_hash: newHash, updated_at: NOW })\n* .where(marker.space.eq(space).and(marker.core_hash.eq(expectedFrom)))\n* .returning(marker.space)\n* .build();\n* ```\n*/\nfunction table(source, schema) {\n\tconst proxies = {};\n\tfor (const [col, desc] of Object.entries(schema)) proxies[col] = makeColumnProxy(source.alias ?? source.name, col, desc);\n\treturn blindCast({\n\t\t...proxies,\n\t\tsource,\n\t\tinsert: (row) => new CfInsertQuery(source, schema, row),\n\t\tupsert: (row) => new CfUpsertBuilder(source, schema, row),\n\t\tupdate: () => new CfUpdateQuery(source, schema),\n\t\tselect: (...cols) => new CfSelectQuery(source, cols.map((col) => col.toProjectionItem()))\n\t});\n}\nfunction makeColumnProxy(tableName, columnName, desc) {\n\tconst ref = ColumnRef.of(tableName, columnName);\n\treturn {\n\t\tcodecId: desc.codecId,\n\t\tnullable: desc.nullable,\n\t\tcolumnName,\n\t\ttableName,\n\t\teq: (value) => value === null ? new CfExpr(NullCheckExpr.isNull(ref)) : new CfExpr(BinaryExpr.eq(ref, toSetExpression(value, desc))),\n\t\tneq: (value) => value === null ? new CfExpr(NullCheckExpr.isNotNull(ref)) : new CfExpr(BinaryExpr.neq(ref, toSetExpression(value, desc))),\n\t\tisNull: () => new CfExpr(NullCheckExpr.isNull(ref)),\n\t\tisNotNull: () => new CfExpr(NullCheckExpr.isNotNull(ref)),\n\t\ttoRef: () => ref,\n\t\ttoProjectionItem: (alias = columnName) => ProjectionItem.of(alias, ref, { codecId: desc.codecId })\n\t};\n}\nfunction buildExcludedProxy(schema) {\n\treturn blindCast(Object.fromEntries(Object.keys(schema).map((col) => [col, ColumnRef.of(\"excluded\", col)])));\n}\nfunction isExpressionSource(value) {\n\treturn typeof value === \"object\" && value !== null && \"toExpr\" in value && typeof value.toExpr === \"function\";\n}\nfunction toInsertValue(value, desc) {\n\tif (isExpressionSource(value)) {\n\t\tconst expr = value.toExpr();\n\t\tif (expr.kind === \"column-ref\" || expr.kind === \"param-ref\" || expr.kind === \"prepared-param-ref\" || expr.kind === \"raw-expr\") return expr;\n\t}\n\treturn ParamRef.of(value, { codec: { codecId: desc.codecId } });\n}\nfunction toSetExpression(value, desc) {\n\tif (isExpressionSource(value)) return value.toExpr();\n\treturn ParamRef.of(value, { codec: { codecId: desc.codecId } });\n}\nfunction buildInsertRow(schema, values) {\n\tconst row = {};\n\tconst rawValues = blindCast(values);\n\tfor (const [col, desc] of Object.entries(schema)) row[col] = toInsertValue(rawValues[col], desc);\n\treturn row;\n}\nfunction buildSetMap(schema, values) {\n\tif (values === void 0) return {};\n\tconst set = {};\n\tconst rawSchema = blindCast(schema);\n\tconst rawValues = blindCast(values);\n\tfor (const [col, value] of Object.entries(rawValues)) {\n\t\tconst desc = rawSchema[col];\n\t\tif (desc !== void 0) set[col] = toSetExpression(value, desc);\n\t}\n\treturn set;\n}\n//#endregion\nexport { CfConflictClause, CfExpr, CfExprSelectQuery, CfInsertQuery, CfSelectQuery, CfUpdateQuery, CfUpsertBuilder, CfUpsertQuery, cfExpr, cfTable, checkExpression, col, exprSelect, fn, foreignKey, lit, primaryKey, table, unique };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;AAKA,SAAS,IAAI,OAAO;CACnB,OAAO,IAAI,qBAAqB,KAAK;AACtC;AACA,SAAS,GAAG,YAAY;CACvB,OAAO,IAAI,sBAAsB,UAAU;AAC5C;AACA,SAAS,IAAI,MAAM,MAAM,SAAS;CACjC,OAAO,IAAI,UAAU;EACpB;EACA;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,WAAW,SAAS,SAAS;CACrC,OAAO,IAAI,qBAAqB;EAC/B;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,WAAW,SAAS,UAAU,YAAY,SAAS;CAC3D,OAAO,IAAI,qBAAqB;EAC/B;EACA;EACA;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,OAAO,SAAS,SAAS;CACjC,OAAO,IAAI,iBAAiB;EAC3B;EACA,GAAG;CACJ,CAAC;AACF;AACA,SAAS,gBAAgB,MAAM,YAAY;CAC1C,OAAO,IAAI,0BAA0B;EACpC;EACA;CACD,CAAC;AACF;;;;;;AAQA,IAAI,SAAS,MAAM,OAAO;CACzB;CACA,YAAY,KAAK;EAChB,KAAK,MAAM;CACZ;CACA,IAAI,OAAO;EACV,OAAO,IAAI,OAAO,QAAQ,GAAG,CAAC,KAAK,KAAK,MAAM,GAAG,CAAC,CAAC;CACpD;CACA,GAAG,OAAO;EACT,OAAO,IAAI,OAAO,OAAO,GAAG,CAAC,KAAK,KAAK,MAAM,GAAG,CAAC,CAAC;CACnD;CACA,MAAM;EACL,OAAO,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC;CACjC;CACA,SAAS;EACR,OAAO,IAAI,OAAO,cAAc,OA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K,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,MAAM,GAAG,IAAI,OAAO,cAAc,UAAU,MAAM,IAAI;CAC/F,OAAO;AACR;AACA,SAAS,YAAY,QAAQ,QAAQ;CACpC,IAAI,WAAW,KAAK,GAAG,OAAO,CAAC;CAC/B,MAAM,MAAM,CAAC;CACb,MAAM,YAAY,UAAU,MAAM;CAClC,MAAM,YAAY,UAAU,MAAM;CAClC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,SAAS,GAAG;EACrD,MAAM,OAAO,UAAU;EACvB,IAAI,SAAS,KAAK,GAAG,IAAI,OAAO,gBAAgB,OAAO,IAAI;CAC5D;CACA,OAAO;AACR"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-
|
|
2
|
-
import "./query-lane-context-
|
|
1
|
+
import { a as MutationDefaultsOptions, c as SqlAggregateDescriptorRegistry, d as TypeHelperRegistry, i as MutationDefaultsOp, n as CodecDescriptorRegistry, o as ResolvedSqlAggregate, r as ExecutionContext, t as AppliedMutationDefault } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
2
|
+
import "./query-lane-context-Dc9gwgtK.mjs";
|
|
3
3
|
export { AppliedMutationDefault, CodecDescriptorRegistry, ExecutionContext, MutationDefaultsOp, MutationDefaultsOptions, ResolvedSqlAggregate, SqlAggregateDescriptorRegistry, TypeHelperRegistry };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { C as TableDef, E as TablesOf, S as SqlPlan, T as TableMetadata, _ as RawTemplateFactory, a as ColumnsOf, b as SqlBuilderOptions, c as META, d as ModelMetadata, f as OperationTypeSignature, g as RawFunctionOptions, h as RawFactory, i as ColumnResolutionContract, l as Meta, m as OperationsForTypeId, n as BuildParamsMap, o as ComputeColumnJsType, p as OperationTypes, r as CodecTypes, s as Expr, t as BuildOptions, u as ModelDef, v as RawTemplateOptions, w as TableKey, x as SqlOrmPlan, y as RuntimeScope } from "./types-CLN9Y3BH-DiekC2oe.mjs";
|
|
2
|
+
import "./types-DrgaZ2lG.mjs";
|
|
3
3
|
export { BuildOptions, BuildParamsMap, CodecTypes, ColumnResolutionContract, ColumnsOf, ComputeColumnJsType, Expr, META, Meta, ModelDef, ModelMetadata, OperationTypeSignature, OperationTypes, OperationsForTypeId, RawFactory, RawFunctionOptions, RawTemplateFactory, RawTemplateOptions, type RuntimeScope, SqlBuilderOptions, type SqlOrmPlan, SqlPlan, TableDef, TableKey, TableMetadata, TablesOf };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./resolve-storage-table-CQsGt37y.mjs";
|
|
2
|
-
import { O as RuntimeMutationDefaultGenerator } from "./index-
|
|
2
|
+
import { O as RuntimeMutationDefaultGenerator } from "./index-CYUp-sEz.mjs";
|
|
3
3
|
import { ResolvedDomainModel, UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma/orm-framework/contract/types";
|
|
4
4
|
import { RuntimeFamilyDescriptor, RuntimeFamilyInstance } from "@prisma/orm-framework/components/execution";
|
|
5
5
|
//#region ../../../2-sql/9-family/dist/runtime.d.mts
|
|
@@ -43,4 +43,4 @@ declare const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRunt
|
|
|
43
43
|
declare function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { timestampNowRuntimeGenerator as a, sqlRuntimeFamilyDescriptor as i, UNBOUND_DOMAIN_NAMESPACE_ID as n, resolveDomainModel as r, ResolvedDomainModel as t };
|
|
46
|
-
//# sourceMappingURL=runtime-
|
|
46
|
+
//# sourceMappingURL=runtime-CbcODreO.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-
|
|
1
|
+
{"version":3,"file":"runtime-CbcODreO.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;UAaU,iCAAiC;;;;;;;;;;;cAW7B,4BAA4B,+BAA+B;;;;;;;;;;;;;;;;;iBAiBxD,gCAAgC"}
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as MarkerReadResult } from "./ast-
|
|
2
|
-
import { d as TypeHelperRegistry, r as ExecutionContext } from "./query-lane-context-
|
|
3
|
-
import { A as RuntimeQueryable, B as SqlRuntimeDriverInstance, C as PreparedStatementImpl, D as RuntimeFamilyAdapter, E as RuntimeConnection, F as SqlMiddleware, G as TelemetryOutcome, H as SqlRuntimeExtensionInstance, I as SqlMiddlewareContext, J as createExecutionContext, K as TransactionContext, L as SqlRuntimeAdapterDescriptor, M as RuntimeTransaction, N as SqlExecutionStack, O as RuntimeMutationDefaultGenerator, P as SqlExecutionStackWithDriver, Q as withTransaction, R as SqlRuntimeAdapterInstance, S as PreparedStatement, T as Runtime, U as SqlRuntimeTargetDescriptor, V as SqlRuntimeExtensionDescriptor, W as SqlStaticContributions, X as deriveParamMetadata, Y as createSqlExecutionStack, Z as encodeParamsWithMetadata, _ as GeneratorStability, a as budgets, b as ParamsFromDeclaration, c as lints, d as validateContractCodecMappings, f as BindSiteParams, g as DeclaredNullable, h as DeclaredCodecId, i as Log, j as RuntimeTelemetryEvent, k as RuntimeParameterizedCodecDescriptor, l as lowerSqlPlan, m as Declaration, n as BudgetsOptions, o as createAstCodecRegistry, p as ConnectionProvider, q as VerifyMarkerOption, r as LintsOptions, s as extractCodecIds, t as AfterExecuteResult, u as validateCodecRegistryCompleteness, v as MarkerReader, w as PreparedStatementInternals, x as PrepareCallback, y as ParamSpec, z as SqlRuntimeBase } from "./index-
|
|
1
|
+
import { o as MarkerReadResult } from "./ast-Du28qINj.mjs";
|
|
2
|
+
import { d as TypeHelperRegistry, r as ExecutionContext } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
3
|
+
import { A as RuntimeQueryable, B as SqlRuntimeDriverInstance, C as PreparedStatementImpl, D as RuntimeFamilyAdapter, E as RuntimeConnection, F as SqlMiddleware, G as TelemetryOutcome, H as SqlRuntimeExtensionInstance, I as SqlMiddlewareContext, J as createExecutionContext, K as TransactionContext, L as SqlRuntimeAdapterDescriptor, M as RuntimeTransaction, N as SqlExecutionStack, O as RuntimeMutationDefaultGenerator, P as SqlExecutionStackWithDriver, Q as withTransaction, R as SqlRuntimeAdapterInstance, S as PreparedStatement, T as Runtime, U as SqlRuntimeTargetDescriptor, V as SqlRuntimeExtensionDescriptor, W as SqlStaticContributions, X as deriveParamMetadata, Y as createSqlExecutionStack, Z as encodeParamsWithMetadata, _ as GeneratorStability, a as budgets, b as ParamsFromDeclaration, c as lints, d as validateContractCodecMappings, f as BindSiteParams, g as DeclaredNullable, h as DeclaredCodecId, i as Log, j as RuntimeTelemetryEvent, k as RuntimeParameterizedCodecDescriptor, l as lowerSqlPlan, m as Declaration, n as BudgetsOptions, o as createAstCodecRegistry, p as ConnectionProvider, q as VerifyMarkerOption, r as LintsOptions, s as extractCodecIds, t as AfterExecuteResult, u as validateCodecRegistryCompleteness, v as MarkerReader, w as PreparedStatementInternals, x as PrepareCallback, y as ParamSpec, z as SqlRuntimeBase } from "./index-CYUp-sEz.mjs";
|
|
4
4
|
export { type AfterExecuteResult, type BindSiteParams, type BudgetsOptions, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecutionContext, type GeneratorStability, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeMutationDefaultGenerator, type RuntimeParameterizedCodecDescriptor, type RuntimeQueryable, type RuntimeTelemetryEvent, type RuntimeTransaction, type SqlExecutionStack, type SqlExecutionStackWithDriver, type SqlMiddleware, type SqlMiddlewareContext, type SqlRuntimeAdapterDescriptor, type SqlRuntimeAdapterInstance, SqlRuntimeBase, type SqlRuntimeDriverInstance, type SqlRuntimeExtensionDescriptor, type SqlRuntimeExtensionInstance, type SqlRuntimeTargetDescriptor, type SqlStaticContributions, type TelemetryOutcome, type TransactionContext, type TypeHelperRegistry, type VerifyMarkerOption, budgets, createAstCodecRegistry, createExecutionContext, createSqlExecutionStack, deriveParamMetadata, encodeParamsWithMetadata, extractCodecIds, lints, lowerSqlPlan, validateCodecRegistryCompleteness, validateContractCodecMappings, withTransaction };
|
package/dist/runtime.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { t as createSqlOperationRegistry } from "./dist-C_q1_QR9.mjs";
|
|
|
2
2
|
import { A as PreparedParamRef, H as isQueryAst } from "./types-CSP6WmWn-DVuxsZJW.mjs";
|
|
3
3
|
import { t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
|
|
4
4
|
import { t as createSqlParamRefMutator } from "./middleware-CMr4CHNz-DHIUdxlm.mjs";
|
|
5
|
-
import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-
|
|
5
|
+
import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-DSap8YyW.mjs";
|
|
6
6
|
import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-BQPj9q8O.mjs";
|
|
7
7
|
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
@@ -6,11 +6,11 @@ import { t as SqlLoweringSpec } from "./index-CwtBEMZr.mjs";
|
|
|
6
6
|
import { D as ColumnRef, _t as ParamRef } from "./types-ZzeQKmYD-PJlaIsww.mjs";
|
|
7
7
|
import { t as SqlExecutionPlan } from "./sql-execution-plan-qxvHnFcA-eC6n5Ek9.mjs";
|
|
8
8
|
import { t as SqlQueryPlan } from "./plan-DfLDIdep-qOGizVoO.mjs";
|
|
9
|
-
import { r as ExecutionContext } from "./query-lane-context-
|
|
9
|
+
import { r as ExecutionContext } from "./query-lane-context-DyDSQVS--UJOY8AwQ.mjs";
|
|
10
10
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
11
11
|
import { ParamSpec } from "@prisma/orm-framework/operations";
|
|
12
12
|
import { RuntimeExecutor } from "@prisma/orm-framework/components/runtime";
|
|
13
|
-
//#region ../../../2-sql/4-lanes/relational-core/dist/types-
|
|
13
|
+
//#region ../../../2-sql/4-lanes/relational-core/dist/types-CLN9Y3BH.d.mts
|
|
14
14
|
//#region src/runtime-scope.d.ts
|
|
15
15
|
/**
|
|
16
16
|
* The plan shape accepted by the SQL ORM client and SQL runtime: either a
|
|
@@ -244,4 +244,4 @@ interface SqlBuilderOptions<TContract extends Contract<SqlStorage> = Contract<Sq
|
|
|
244
244
|
}
|
|
245
245
|
//#endregion
|
|
246
246
|
export { TableDef as C, TablesOf as E, SqlPlan as S, TableMetadata as T, RawTemplateFactory as _, ColumnsOf as a, SqlBuilderOptions as b, META as c, ModelMetadata as d, OperationTypeSignature as f, RawFunctionOptions as g, RawFactory as h, ColumnResolutionContract as i, Meta as l, OperationsForTypeId as m, BuildParamsMap as n, ComputeColumnJsType as o, OperationTypes as p, CodecTypes as r, Expr as s, BuildOptions as t, ModelDef as u, RawTemplateOptions as v, TableKey as w, SqlOrmPlan as x, RuntimeScope as y };
|
|
247
|
-
//# sourceMappingURL=types-
|
|
247
|
+
//# sourceMappingURL=types-CLN9Y3BH-DiekC2oe.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-CLN9Y3BH-DiekC2oe.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/types-CLN9Y3BH.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;KAeK,aAAa,mBAAmB;;;;;;;;;KAShC,eAAe,KAAK,gBAAgB;;;KAGpC,OAAO,YAAY;;;;;;;;;;KAUnB;WACM;aACE,YAAY,SAAS;eACnB,QAAQ,SAAS;;;WAGrB;aACE,YAAY,SAAS;eACnB,SAAS,SAAS,eAAe,SAAS;;;;KAIpD,gBAAgB,kBAAkB,0BAA0B,uBAAuB,kCAAkC;WAC/G,cAAc,eAAe;IACpC;KACC,oBAAoB,kBAAkB,0BAA0B,qBAAqB,4BAA4B,gBAAgB,WAAW,qBAAqB,eAAe,8BAA8B,WAAW,kBAAkB,OAAO;WAC5O;aACE,OAAO;;IAEhB,mBAAmB;KAClB,qBAAqB,kBAAkB,0BAA0B,qBAAqB,0BAA0B,6BAA6B,oBAAoB,WAAW,MAAM,0BAA0B,4BAA4B,gBAAgB,WAAW,qBAAqB,eAAe,2BAA2B,kBAAkB,sBAAsB,uBAAuB,OAAO;WAClY;aACE,cAAc,eAAe;;OAEnC,WAAW,kBAAkB,OAAO;WAChC,QAAQ;IACf,mBAAmB;;KAElB,uBAAuB,kBAAkB,0BAA0B,qBAAqB,0BAA0B,6BAA6B,mCAAmC;WAC5K;aACE,aAAa,eAAe;;IAErC,wBAAwB,SAAS,OAAO;WACjC,eAAe,gBAAgB;IACtC,yBAAyB,UAAU,QAAQ,oBAAoB,gBAAgB,QAAQ;KACtF,oBAAoB,mBAAmB,eAAe,mBAAmB;WACnE;MACL;EACJ,eAAe;IACb,sBAAsB,aAAa,WAAW;WACvC,cAAc;IACrB;E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c;;;;;;UAMvB,SAAS;YACP,OAAO,cAAc;;KAE5B,UAAU,WAAW,UAAU,SAAS,cAAc,gBAAgB,SAAS,aAAa,SAAS,WAAW;EACnH,eAAe;IACb;UACM;WACC,cAAc;;UAEf,2BAA2B;WAC1B,QAAQ;;KAEd,sBAAsB,SAAS,yBAAyB,+BAA+B;UAClF,mBAAmB;GAC1B,cAAc,SAAS,qBAAqB;EAC7C,KAAK,SAAS,qBAAqB;;UAE3B;YACE;;UAEF;WACC,SAAS;;UAEV,kBAAkB,kBAAkB,SAAS,cAAc,SAAS;WACnE,SAAS,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types-CLN9Y3BH-DiekC2oe.mjs";
|
|
@@ -5,7 +5,7 @@ import "./types-DuriYH5B.mjs";
|
|
|
5
5
|
import { r as SqlOperationDescriptors } from "./index-CwtBEMZr.mjs";
|
|
6
6
|
import { v as SqlSchemaIRNode } from "./types-DtDXwS0i-BjB1HLTY.mjs";
|
|
7
7
|
import "./types-DEBm1lFa.mjs";
|
|
8
|
-
import { i as SqlControlAdapter } from "./control-adapter-C99J7aEF-
|
|
8
|
+
import { i as SqlControlAdapter } from "./control-adapter-C99J7aEF-DqhVuC1_.mjs";
|
|
9
9
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
10
10
|
import { Result } from "@prisma/orm-framework/utils/result";
|
|
11
11
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
@@ -423,4 +423,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
|
|
|
423
423
|
}
|
|
424
424
|
//#endregion
|
|
425
425
|
export { SqlPlannerSuccessResult as A, SqlMigrationRunnerSuccessValue as C, SqlPlannerConflictLocation as D, SqlPlannerConflictKind as E, SqlPlannerFailureResult as O, SqlMigrationRunnerResult as S, SqlPlannerConflict as T, SqlMigrationRunner as _, FieldEvent as a, SqlMigrationRunnerExecuteOptions as b, SqlControlAdapterDescriptor as c, SqlMigrationPlanContractInfo as d, SqlMigrationPlanOperation as f, SqlMigrationPlannerPlanOptions as g, SqlMigrationPlanner as h, ExpandNativeTypeInput as i, StorageTypePlanResult as j, SqlPlannerResult as k, SqlControlExtensionDescriptor as l, SqlMigrationPlanOperationTarget as m, CodecControlHooks as n, FieldEventContext as o, SqlMigrationPlanOperationStep as p, CreateSqlMigrationPlanOptions as r, ResolveIdentityValueInput as s, AnyRecord as t, SqlMigrationPlan as u, SqlMigrationRunnerErrorCode as v, SqlPlanTargetDetails as w, SqlMigrationRunnerFailure as x, SqlMigrationRunnerExecuteCallbacks as y };
|
|
426
|
-
//# sourceMappingURL=types-IqZMLrFC-
|
|
426
|
+
//# sourceMappingURL=types-IqZMLrFC-B8FPWCcB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-IqZMLrFC-
|
|
1
|
+
{"version":3,"file":"types-IqZMLrFC-B8FPWCcB.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-IqZMLrFC.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;UAKhD;WACC;WACA;WACA,aAAa;;;;;;;;;UASd;WACC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;;EAW7B,oBAAoB,OAAO;;;;;;;;;;EAU3B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BA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,qBAAqB,cAAc;;;;;WAKnC,yBAAyB;;KAE/B;UACK,kCAAkC;WACjC,MAAM;WACN,OAAO;;UAER,uCAAuC;KAC5C,2BAA2B,OAAO,gCAAgC;UAC7D,mBAAmB;;;;;;;;;;;;;;EAc3B,QAAQ;aACG,QAAQ;aACR,iBAAiB,cAAc,iCAAiC;MACvE,QAAQ;;;;;;;;;;;EAWZ,oBAAoB,SAAS,iCAAiC,kBAAkB,QAAQ;;UAEhF,8BAA8B;WAC7B;;;;WAIA;WACA,SAAS;WACT,aAAa;WACb,qBAAqB,0BAA0B;;;;;;WAM/C;WACA,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-family-sql",
|
|
3
|
-
"version": "8.0.0-rc.1-dev.
|
|
3
|
+
"version": "8.0.0-rc.1-dev.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-framework": "8.0.0-rc.1-dev.
|
|
13
|
-
"@prisma/orm-toolchain": "8.0.0-rc.1-dev.
|
|
12
|
+
"@prisma/orm-framework": "8.0.0-rc.1-dev.13",
|
|
13
|
+
"@prisma/orm-toolchain": "8.0.0-rc.1-dev.13",
|
|
14
14
|
"@standard-schema/spec": "^1.1.0",
|
|
15
15
|
"arktype": "^2.2.2",
|
|
16
16
|
"pathe": "^2.0.3",
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
"ts-toolbelt": "^9.6.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@internal/family-sql": "8.0.0-rc.1-dev.
|
|
22
|
-
"@internal/sql-builder": "8.0.0-rc.1-dev.
|
|
23
|
-
"@internal/sql-contract": "8.0.0-rc.1-dev.
|
|
24
|
-
"@internal/sql-contract-emitter": "8.0.0-rc.1-dev.
|
|
25
|
-
"@internal/sql-contract-psl": "8.0.0-rc.1-dev.
|
|
26
|
-
"@internal/sql-contract-ts": "8.0.0-rc.1-dev.
|
|
27
|
-
"@internal/sql-errors": "8.0.0-rc.1-dev.
|
|
28
|
-
"@internal/sql-lane-query-builder": "8.0.0-rc.1-dev.
|
|
29
|
-
"@internal/sql-operations": "8.0.0-rc.1-dev.
|
|
30
|
-
"@internal/sql-orm-client": "8.0.0-rc.1-dev.
|
|
31
|
-
"@internal/sql-relational-core": "8.0.0-rc.1-dev.
|
|
32
|
-
"@internal/sql-runtime": "8.0.0-rc.1-dev.
|
|
33
|
-
"@internal/sql-schema-ir": "8.0.0-rc.1-dev.
|
|
34
|
-
"@repo/tsconfig": "8.0.0-rc.1-dev.
|
|
35
|
-
"@repo/tsdown": "8.0.0-rc.1-dev.
|
|
21
|
+
"@internal/family-sql": "8.0.0-rc.1-dev.13",
|
|
22
|
+
"@internal/sql-builder": "8.0.0-rc.1-dev.13",
|
|
23
|
+
"@internal/sql-contract": "8.0.0-rc.1-dev.13",
|
|
24
|
+
"@internal/sql-contract-emitter": "8.0.0-rc.1-dev.13",
|
|
25
|
+
"@internal/sql-contract-psl": "8.0.0-rc.1-dev.13",
|
|
26
|
+
"@internal/sql-contract-ts": "8.0.0-rc.1-dev.13",
|
|
27
|
+
"@internal/sql-errors": "8.0.0-rc.1-dev.13",
|
|
28
|
+
"@internal/sql-lane-query-builder": "8.0.0-rc.1-dev.13",
|
|
29
|
+
"@internal/sql-operations": "8.0.0-rc.1-dev.13",
|
|
30
|
+
"@internal/sql-orm-client": "8.0.0-rc.1-dev.13",
|
|
31
|
+
"@internal/sql-relational-core": "8.0.0-rc.1-dev.13",
|
|
32
|
+
"@internal/sql-runtime": "8.0.0-rc.1-dev.13",
|
|
33
|
+
"@internal/sql-schema-ir": "8.0.0-rc.1-dev.13",
|
|
34
|
+
"@repo/tsconfig": "8.0.0-rc.1-dev.13",
|
|
35
|
+
"@repo/tsdown": "8.0.0-rc.1-dev.13",
|
|
36
36
|
"tsdown": "0.22.14",
|
|
37
37
|
"typescript": "5.9.3"
|
|
38
38
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate-descriptor-registry-DvPrQwzY.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs"],"sourcesContent":["import { B as isAggregateFn, G as frozenCodecRef, z as aggregateFnNames } from \"../types-CSP6WmWn.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { aggregateDescriptorKey, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, settleAggregateOverloads } from \"@internal/framework-components/components\";\n//#region src/aggregate-descriptor.ts\n/** Structural validation of a contributed SQL aggregate descriptor: the declarative shape plus a callable lowering hook where one is declared. */\nfunction isSqlAggregateDescriptor(value) {\n\tif (!isAggregateDescriptor(value)) return false;\n\treturn !(\"lower\" in value) || value.lower === void 0 || typeof value.lower === \"function\";\n}\n//#endregion\n//#region src/aggregate-descriptor-registry.ts\nfunction namedOutputRef(output, input) {\n\treturn frozenCodecRef({\n\t\tcodecId: output.codecId,\n\t\t...ifDefined(\"typeParams\", output.typeParams?.(input))\n\t});\n}\n/**\n* Validate every contributed aggregate descriptor and settle its matches against the composed codec set.\n*\n* Validation covers the descriptor's own shape, the lowering rule — an operation outside the closed SQL aggregate alphabet must carry a `lower` hook, there being no plain `AggregateExpr` form for it — a second claim on one `(operation, input)` pair, and two trait descriptors that both claim a registered codec for one operation — the last of which only a composed stack can detect, which is why it is settled here rather than at contribution.\n*/\nfunction buildSqlAggregateDescriptorRegistry(descriptors, codecDescriptors) {\n\tconst validated = [];\n\tconst claimedKeys = /* @__PURE__ */ new Set();\n\tfor (const candidate of descriptors) {\n\t\tif (!isSqlAggregateDescriptor(candidate)) throw structuredError(\"RUNTIME.AGGREGATE_DESCRIPTOR_INVALID\", `Contributed value ${describeCandidate(candidate)} is not a valid SQL aggregate descriptor.`, {\n\t\t\twhy: \"Aggregate resolution reads a declared operation, input match, result codec, and nullability; a lowering hook, where present, must be callable.\",\n\t\t\tfix: \"Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor.\",\n\t\t\tmeta: { descriptor: describeCandidate(candidate) }\n\t\t});\n\t\tconst key = aggregateDescriptorKey(candidate);\n\t\tif (!isAggregateFn(candidate.operation) && candidate.lower === void 0) throw structuredError(\"RUNTIME.AGGREGATE_LOWERING_MISSING\", `Aggregate descriptor '${key}' declares operation '${candidate.operation}', which is outside the SQL aggregate alphabet (${[...aggregateFnNames].join(\", \")}) and carries no lowering hook.`, {\n\t\t\twhy: \"An operation in the alphabet lowers to a plain aggregate call; renderers know no other operation, so any other name must build its expression through a `lower` hook from existing nodes.\",\n\t\t\tfix: \"Declare a `lower` hook on the descriptor, or use an operation name from the SQL aggregate alphabet.\",\n\t\t\tmeta: {\n\t\t\t\toperation: candidate.operation,\n\t\t\t\tkey\n\t\t\t}\n\t\t});\n\t\tif (claimedKeys.has(key)) throw structuredError(\"RUNTIME.DUPLICATE_AGGREGATE_DESCRIPTOR\", `Duplicate aggregate descriptor for '${key}'.`, {\n\t\t\twhy: \"Each operation/input pair resolves to exactly one result codec, so exactly one component may claim it.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: { key }\n\t\t});\n\t\tclaimedKeys.add(key);\n\t\tvalidated.push(candidate);\n\t}\n\tconst settled = settleAggregateOverloads(validated, codecDescriptors.values());\n\tconst ambiguity = settled.ambiguities[0];\n\tif (ambiguity !== void 0) throw structuredError(\"RUNTIME.AMBIGUOUS_AGGREGATE_DESCRIPTOR\", `Ambiguous aggregate descriptors for '${ambiguity.operation}' over codec '${ambiguity.codecId}': traits ${ambiguity.traits.join(\", \")} all claim it.`, {\n\t\twhy: \"A codec advertising several claimed traits leaves the result codec undetermined.\",\n\t\tfix: `Contribute an exact descriptor for '${ambiguity.operation}' over '${ambiguity.codecId}', or narrow the overlapping trait contributions.`,\n\t\tmeta: {\n\t\t\toperation: ambiguity.operation,\n\t\t\tcodecId: ambiguity.codecId,\n\t\t\ttraits: ambiguity.traits\n\t\t}\n\t});\n\tfor (const descriptor of validated) {\n\t\tconst outputCodecId = descriptor.output.kind === \"codec\" ? descriptor.output.codecId : descriptor.input.kind === \"codec\" ? descriptor.input.codecId : void 0;\n\t\tif (outputCodecId !== void 0 && codecDescriptors.descriptorFor(outputCodecId) === void 0) {\n\t\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.AGGREGATE_OUTPUT_CODEC_MISSING\", `Aggregate descriptor '${key}' names result codec '${outputCodecId}', which the composed stack does not register.`, {\n\t\t\t\twhy: \"A resolved aggregate decodes its result through the declared codec; a codec the stack does not compose cannot decode anything.\",\n\t\t\t\tfix: \"Register the codec on the composed stack, or declare a result codec the stack composes.\",\n\t\t\t\tmeta: {\n\t\t\t\t\toperation: descriptor.operation,\n\t\t\t\t\tkey,\n\t\t\t\t\toutputCodecId\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tconst tables = /* @__PURE__ */ new Map();\n\tfor (const [operation, entry] of settled.operations) tables.set(operation, {\n\t\twithoutInput: resolveWithoutInput(operation, entry.noInput) ?? resolveWithoutInput(operation, entry.anyInput),\n\t\tbyCodecId: entry.byCodecId,\n\t\tanyInput: entry.anyInput\n\t});\n\treturn {\n\t\tresolve(operation, input) {\n\t\t\tconst table = tables.get(operation);\n\t\t\tif (table === void 0) return void 0;\n\t\t\tif (input === void 0) return table.withoutInput;\n\t\t\tconst descriptor = table.byCodecId.get(input.codecId) ?? table.anyInput;\n\t\t\tif (descriptor === void 0) return void 0;\n\t\t\treturn {\n\t\t\t\toperation,\n\t\t\t\toutput: descriptor.output.kind === \"self\" ? frozenCodecRef(input) : namedOutputRef(descriptor.output, input),\n\t\t\t\tnullable: descriptor.nullable,\n\t\t\t\tlower: descriptor.lower\n\t\t\t};\n\t\t},\n\t\t*values() {\n\t\t\tyield* validated;\n\t\t}\n\t};\n}\n/**\n* Resolve the overload that answers a call carrying no input. Both kinds that qualify name their result codec outright, there being no input codec to reuse.\n*/\nfunction resolveWithoutInput(operation, descriptor) {\n\tif (descriptor === void 0) return void 0;\n\tif (!isNoInputAggregateDescriptor(descriptor) && !isAnyInputAggregateDescriptor(descriptor)) return;\n\treturn {\n\t\toperation,\n\t\toutput: namedOutputRef(descriptor.output, void 0),\n\t\tnullable: descriptor.nullable,\n\t\tlower: descriptor.lower\n\t};\n}\nfunction describeCandidate(value) {\n\tif (typeof value === \"object\" && value !== null && \"operation\" in value) return `'${String(value.operation)}'`;\n\treturn `of type ${typeof value}`;\n}\n//#endregion\nexport { buildSqlAggregateDescriptorRegistry, isSqlAggregateDescriptor };\n\n//# sourceMappingURL=aggregate-descriptor-registry.mjs.map"],"mappings":";;;;;;AAMA,SAAS,yBAAyB,OAAO;CACxC,IAAI,CAAC,sBAAsB,KAAK,GAAG,OAAO;CAC1C,OAAO,EAAE,WAAW,UAAU,MAAM,UAAU,KAAK,KAAK,OAAO,MAAM,UAAU;AAChF;AAGA,SAAS,eAAe,QAAQ,OAAO;CACtC,OAAO,eAAe;EACrB,SAAS,OAAO;EAChB,GAAG,UAAU,cAAc,OAAO,aAAa,KAAK,CAAC;CACtD,CAAC;AACF;;;;;;AAMA,SAAS,oCAAoC,aAAa,kBAAkB;CAC3E,MAAM,YAAY,CAAC;CACnB,MAAM,8BAA8B,IAAI,IAAI;CAC5C,KAAK,MAAM,aAAa,aAAa;EACpC,IAAI,CAAC,yBAAyB,SAAS,GAAG,MAAM,gBAAgB,wCAAwC,qBAAqB,kBAAkB,SAAS,EAAE,4CAA4C;GACrM,KAAK;GACL,KAAK;GACL,MAAM,EAAE,YAAY,kBAAkB,SAAS,EAAE;EAClD,CAAC;EACD,MAAM,MAAM,uBAAuB,SAA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../2-sql/4-lanes/relational-core/dist/ddl-types-BMp2bWVS.mjs"],"sourcesContent":["import { isColumnDefaultLiteralInputValue } from \"@internal/contract/types\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/ast/ddl-types.ts\nvar DdlColumnDefault = class {\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nvar LiteralColumnDefault = class extends DdlColumnDefault {\n\tkind = \"literal\";\n\tvalue;\n\tconstructor(value) {\n\t\tsuper();\n\t\tif (!isColumnDefaultLiteralInputValue(value)) throw structuredError(\"CONTRACT.DEFAULT_INVALID\", \"Invalid column default literal value\");\n\t\tthis.value = value;\n\t\tthis.freeze();\n\t}\n\taccept(visitor, ctx) {\n\t\treturn visitor.literal(this, ctx);\n\t}\n};\nvar FunctionColumnDefault = class extends DdlColumnDefault {\n\tkind = \"function\";\n\texpression;\n\tconstructor(expression) {\n\t\tsuper();\n\t\tthis.expression = expression;\n\t\tthis.freeze();\n\t}\n\taccept(visitor, ctx) {\n\t\treturn visitor.function(this, ctx);\n\t}\n};\nvar DdlColumn = class {\n\tname;\n\ttype;\n\tnotNull;\n\tprimaryKey;\n\tdefault;\n\t/** Codec identity for this column. When present, the DDL walker resolves the codec via `codecLookup.get(codecRef.codecId)` and calls `codec.encode(default.value, {})` to obtain the wire value before inlining the literal default into the DDL string. When absent, literal defaults follow RawSqlLiteral wire-scalar semantics (string / number / boolean / bigint / null / Uint8Array / Date inlined directly). */\n\tcodecRef;\n\tconstructor(options) {\n\t\tthis.name = options.name;\n\t\tthis.type = options.type;\n\t\tthis.notNull = options.notNull;\n\t\tthis.primaryKey = options.primaryKey;\n\t\tthis.default = options.default;\n\t\tthis.codecRef = options.codecRef;\n\t\tObject.freeze(this);\n\t}\n};\nvar DdlNode = class {\n\t/**\n\t* Structural brand: every DDL node answers `true`. Lets {@link isDdlNode}\n\t* recognise any `DdlNode` subclass — including target-contributed kinds —\n\t* without a central kind registry that subclasses would have to register\n\t* into.\n\t*/\n\tisDdlNode() {\n\t\treturn true;\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n\tcollectParamRefs() {\n\t\treturn [];\n\t}\n};\nfunction isDdlNode(value) {\n\treturn typeof value === \"object\" && value !== null && \"isDdlNode\" in value && typeof value.isDdlNode === \"function\";\n}\n/**\n* A composite (or single-column) PRIMARY KEY constraint on a `CreateTable`\n* node. When `name` is set, the adapter renders `CONSTRAINT <name> PRIMARY KEY\n* (…)`; otherwise it renders an anonymous `PRIMARY KEY (…)`.\n*\n* Frozen on construction — immutable after creation.\n*/\nvar PrimaryKeyConstraint = class {\n\tkind = \"primary-key\";\n\tcolumns;\n\tname;\n\tconstructor(options) {\n\t\tthis.columns = Object.freeze([...options.columns]);\n\t\tthis.name = options.name;\n\t\tObject.freeze(this);\n\t}\n};\n/**\n* A FOREIGN KEY constraint on a `CreateTable` node. `onDelete` and `onUpdate`\n* use the same `ReferentialAction` vocabulary already used by the migration\n* planner and the contract IR — no parallel string enum.\n*\n* Frozen on construction — immutable after creation.\n*/\nvar ForeignKeyConstraint = class {\n\tkind = \"foreign-key\";\n\tcolumns;\n\trefTable;\n\trefColumns;\n\tonDelete;\n\tonUpdate;\n\tname;\n\tconstructor(options) {\n\t\tthis.columns = Object.freeze([...options.columns]);\n\t\tthis.refTable = options.refTable;\n\t\tthis.refColumns = Object.freeze([...options.refColumns]);\n\t\tthis.onDelete = options.onDelete;\n\t\tthis.onUpdate = options.onUpdate;\n\t\tthis.name = options.name;\n\t\tObject.freeze(this);\n\t}\n};\n/**\n* A table-level UNIQUE constraint on a `CreateTable` node. When `name` is\n* set, the adapter renders `CONSTRAINT <name> UNIQUE (…)`; otherwise it\n* renders an anonymous `UNIQUE (…)`.\n*\n* Frozen on construction — immutable after creation.\n*/\nvar UniqueConstraint = class {\n\tkind = \"unique\";\n\tcolumns;\n\tname;\n\tconstructor(options) {\n\t\tthis.columns = Object.freeze([...options.columns]);\n\t\tthis.name = options.name;\n\t\tObject.freeze(this);\n\t}\n};\n/**\n* A table-level CHECK constraint carrying a raw SQL predicate expression. Used\n* for checks that are not enum value-set restrictions — e.g. the element-non-null\n* constraint on a scalar-array column (`array_position(col, NULL) IS NULL`).\n* The `expression` is emitted verbatim, so callers must supply safe,\n* pre-validated SQL.\n*\n* Frozen on construction — immutable after creation.\n*/\nvar CheckExpressionConstraint = class {\n\tkind = \"check-expression\";\n\tname;\n\texpression;\n\tconstructor(options) {\n\t\tthis.name = options.name;\n\t\tthis.expression = options.expression;\n\t\tObject.freeze(this);\n\t}\n};\n//#endregion\nexport { ForeignKeyConstraint as a, PrimaryKeyConstraint as c, DdlNode as i, UniqueConstraint as l, DdlColumn as n, FunctionColumnDefault as o, DdlColumnDefault as r, LiteralColumnDefault as s, CheckExpressionConstraint as t, isDdlNode as u };\n\n//# sourceMappingURL=ddl-types-BMp2bWVS.mjs.map"],"mappings":";;;AAGA,IAAI,mBAAmB,MAAM;CAC5B,SAAS;EACR,OAAO,OAAO,IAAI;CACnB;AACD;AACA,IAAI,uBAAuB,cAAc,iBAAiB;CACzD,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,IAAI,CAAC,iCAAiC,KAAK,GAAG,MAAM,gBAAgB,4BAA4B,sCAAsC;EACtI,KAAK,QAAQ;EACb,KAAK,OAAO;CACb;CACA,OAAO,SAAS,KAAK;EACpB,OAAO,QAAQ,QAAQ,MAAM,GAAG;CACjC;AACD;AACA,IAAI,wBAAwB,cAAc,iBAAiB;CAC1D,OAAO;CACP;CACA,YAAY,YAAY;EACvB,MAAM;EACN,KAAK,aAAa;EAClB,KAAK,OAAO;CACb;CACA,OAAO,SAAS,KAAK;EACpB,OAAO,QAAQ,SAAS,MAAM,GAAG;CAClC;AACD;AACA,IAAI,YAAY,MAAM;CACrB;CACA;CACA;CACA;CACA;;CAEA;CACA,YAAY,SAAS;EACpB,KAAK,OAAO,QAAQ;EACpB,KAAK,OAAO,QAAQ;EACpB,KAAK,UAAU,QAAQ;EACvB,KAAK,aAAa,QAAQ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ACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./query-lane-context-CONNlrCx-D2biFONs.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-lane-context-CONNlrCx-D2biFONs.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-CONNlrCx.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;;;KAQjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;;;UAOnC;WACC;WACA,QAAQ;WACR;WACA,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;KACrB;KACA;WACM;WACA;;KAEN;WACM,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAOrB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WAClE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types-Dkm5SRCi-DOcQZ0KX.mjs";
|