@prisma/orm-family-sql 8.0.0-rc.14-dev.10 → 8.0.0-rc.14-dev.11
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/{ast-BQOF33Tw.d.mts → ast-qnGR-fmK.d.mts} +2 -2
- package/dist/{ast-BQOF33Tw.d.mts.map → ast-qnGR-fmK.d.mts.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +3 -3
- package/dist/builder__types.d.mts +2 -2
- package/dist/{control-adapter-C4_cgvzB-BwZx3_VD.d.mts → control-adapter-C4_cgvzB-BhRxZg-n.d.mts} +3 -3
- package/dist/{control-adapter-C4_cgvzB-BwZx3_VD.d.mts.map → control-adapter-C4_cgvzB-BhRxZg-n.d.mts.map} +1 -1
- package/dist/control-adapter-Cj6XQ7Yo.d.mts +1 -0
- package/dist/{control-k5_z0qcA.d.mts → control-xT2HdvBb.d.mts} +5 -5
- package/dist/{control-k5_z0qcA.d.mts.map → control-xT2HdvBb.d.mts.map} +1 -1
- package/dist/{db-DLjWu9-f-BWg-lrGV.d.mts → db-DLjWu9-f-B79_8TyU.d.mts} +3 -3
- package/dist/{db-DLjWu9-f-BWg-lrGV.d.mts.map → db-DLjWu9-f-B79_8TyU.d.mts.map} +1 -1
- package/dist/{diff-C_zQQTgw.d.mts → diff-DrA2bRUQ.d.mts} +3 -3
- package/dist/{diff-C_zQQTgw.d.mts.map → diff-DrA2bRUQ.d.mts.map} +1 -1
- package/dist/{driver-types-BQtRkOJ0-Bv2RPSfr.d.mts → driver-types-DYGFEcyv-DPaNalPf.d.mts} +5 -2
- package/dist/driver-types-DYGFEcyv-DPaNalPf.d.mts.map +1 -0
- package/dist/{expression-B95FOcDX.d.mts → expression-C6yUAU4j.d.mts} +2 -2
- package/dist/{expression-B95FOcDX.d.mts.map → expression-C6yUAU4j.d.mts.map} +1 -1
- package/dist/family.d.mts +6 -6
- 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/{index-DrWMh8L0.d.mts → index-CQ74jdOW.d.mts} +3 -3
- package/dist/{index-DrWMh8L0.d.mts.map → index-CQ74jdOW.d.mts.map} +1 -1
- package/dist/{migration-CRsGI-9f.d.mts → migration-CYi19ePw.d.mts} +2 -2
- package/dist/{migration-CRsGI-9f.d.mts.map → migration-CYi19ePw.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +6 -6
- package/dist/{prepared-statement-BdsTSY7Y-ICyuLB7c.d.mts → prepared-statement-Cv54gpY_-CbIaPDc1.d.mts} +24 -8
- package/dist/{prepared-statement-BdsTSY7Y-ICyuLB7c.d.mts.map → prepared-statement-Cv54gpY_-CbIaPDc1.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +4 -4
- package/dist/relational-core__ast.d.mts +2 -2
- package/dist/relational-core__expression.d.mts +1 -1
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +169 -54
- package/dist/runtime.mjs.map +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{types-C0VMsES6-BLOPdA8Y.d.mts → types-BGHABElw-C5MKkR3c.d.mts} +3 -3
- package/dist/{types-C0VMsES6-BLOPdA8Y.d.mts.map → types-BGHABElw-C5MKkR3c.d.mts.map} +1 -1
- package/dist/{types-BKJWoQ40-BzViF_9K.d.mts → types-BKJWoQ40-Dg7V0ErT.d.mts} +2 -2
- package/dist/{types-BKJWoQ40-BzViF_9K.d.mts.map → types-BKJWoQ40-Dg7V0ErT.d.mts.map} +1 -1
- package/dist/types-CXe4fCcu.d.mts +1 -0
- package/package.json +18 -18
- package/dist/control-adapter-CDDbpxyt.d.mts +0 -1
- package/dist/driver-types-BQtRkOJ0-Bv2RPSfr.d.mts.map +0 -1
- package/dist/types-BsUJ1jWE.d.mts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepared-statement-
|
|
1
|
+
{"version":3,"file":"prepared-statement-Cv54gpY_-CbIaPDc1.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/prepared-statement-Cv54gpY_.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;UAaU;WACC,OAAO;WACP;;iBAEM,oBAAoB,KAAK,uBAAuB;iBAChD,yBAAyB,4BAA4B,mBAAmB,iBAAiB,KAAK,qBAAqB,iBAAiB,wBAAwB;;;UAGnK,6BAA6B;WAC5B,UAAU,SAAS;;;;;;UAMpB;WACC,KAAK;WACL,MAAM;;UAEP,cAAc,kBAAkB,0BAA0B,iCAAiC,kBAAkB,kBAAkB,mBAAmB;WACjJ;;;;;;;;;;;;;;;;;;;EAmBT,eAAe,OAAO,WAAW,KAAK,uBAAuB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BrE,aAAa,MAAM,kBAAkB,KAAK,sBAAsB,SAAS,mBAAmB,oBAAoB;EAChH,gBAAgB,MAAM,kBAAkB,KAAK,uBAAuB,QAAQ;EAC5E,OAAO,KAAK,yBAAyB,MAAM,kBAAkB,KAAK,uBAAuB;EACzF,YAAY,MAAM,kBAAkB,QAAQ,kBAAkB,KAAK,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B1F,eAAe,MAAM,kBAAkB,KAAK,sBAAsB,SAAS,mBAAmB,oBAAoB;EAClH,kBAAkB,MAAM,kBAAkB,KAAK,uBAAuB,QAAQ;EAC9E,cAAc,MAAM,kBAAkB,QAAQ,oBAAoB,KAAK,uBAAuB;;;;KAI3F;EACH;EACA;;KAEG,eAAe,oBAAoB,gBAAgB,mBAAmB,qBAAqB;UAEtF;WACC,SAAS;WACT,QAAQ,oBAAoB;WAC5B,YAAY,oBAAoB;WAChC,gBAAgB;WAChB,aAAa;;;;;;;WAOb;;;;KAeN,UAAU,WAAW,iBAAiB,yBAAyB;WACzD,eAAe;WACf,aAAa;WACb;;KAEN,YAAY,W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, Dt as RawSqlLiteral, E as CodecRef$1, Et as RawQueryResult, F as DescriptorCodecJson, Ft as TableSource, G as ExpressionSource, Gt as isOrderByNulls, H as ExprVisitor, Ht as frozenCodecRef, I as DescriptorCodecTraits, It as ToWhereExpr, J as FunctionSource, Jt as queryAstKinds, K as ExtractCodecTypes, Kt as isQueryAst, L as Direction, Lt as UpdateAst, M as DerivedTableSource, Mt as SqlColumnRef, N as DescriptorCodecId, Nt as SubqueryExpr, O as ColumnRef, Ot as SelectAst, P as DescriptorCodecInput, Pt as TableRef, Q as InsertOnConflict, R as DoNothingConflictAction, Rt as WhereArg, S as Codec$1, St as ProjectionItem, T as CodecJsonValueProjection, Tt as RawQueryColumn, U as ExpressionFolder, Ut as isAggregateFn, V as ExistsExpr, Vt as aggregateFnNames, W as ExpressionRewriter, Wt as isOrderByDirection, X as IdentifierRef, Y as FunctionSourceAlias, Yt as whereExprKinds, Z as InsertAst, _ as BinaryExpr, _t as OrderByItem, a as AndExpr, at as JsonObjectExpr, b as CaseExpr, bt as PreparedParamRef, c as AnyExpression, ct as ListExpression, d as AnyInsertValue, dt as LoweredStatement, et as JoinAst, f as AnyJsonValueProjection, ft as NativeJsonValueProjection, g as AstRewriter, gt as OrExpr, h as AnyQueryAst, ht as OperationExpr, i as AggregateOpFn, it as JsonObjectEntry, j as DeleteAst, jt as SqlCodecInstanceContext, k as ContractCodecRegistry, kt as SelectAstOptions, l as AnyFromSource, lt as LiteralExpr, m as AnyParamRef, mt as NullCheckExpr, n as AggregateExpr, nt as JsonArrayAggExpr, o as AnyCodecDescriptor, ot as JsonValueProjectionVisitor, p as AnyOperationArg, pt as NotExpr, q as FunctionCallExpr, qt as isWhereExpr, r as AggregateFn, rt as JsonDocumentProjection, s as AnyCodecDescriptorTemplate, st as LimitOffsetValue, t as AggregateCountFn, tt as JoinOnExpr, u as AnyInsertOnConflictAction, ut as LoweredParam, v as BinaryOp, vt as OrderByNulls, w as CodecDescriptor$1, wt as RawQueryAst, x as CastExpr, xt as ProjectionExpr, y as CaseBranch, yt as ParamRef, z as DoUpdateSetConflictAction, zt as WindowFn } from "./types-Yui2yFf6-DQkiEr9B.mjs";
|
|
2
|
-
import { a as SqlDriverState, c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, n as PreparedStatementHandle, o as SqlExecuteRequest, r as SqlConnection, s as SqlExplainResult, t as PreparedExecuteRequest, u as SqlTransaction } from "./driver-types-
|
|
2
|
+
import { a as SqlDriverState, c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, n as PreparedStatementHandle, o as SqlExecuteRequest, r as SqlConnection, s as SqlExplainResult, t as PreparedExecuteRequest, u as SqlTransaction } from "./driver-types-DYGFEcyv-DPaNalPf.mjs";
|
|
3
3
|
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-B23QEzDx-ridB7leA.mjs";
|
|
4
|
-
import { $ as sqlIntDecode, A as canonicalNumeralText, B as parseJsonBody, C as SqlIntCodec, D as SqlVarcharCodec, E as SqlTextDescriptor, F as encodeLiteralDefault, G as sqlCharDescriptor, H as signedRange, I as escapePslString, J as sqlFloatColumn, K as sqlCharEncode, L as integerTextCanonicalForm, M as compact, N as createNumberClassifier, O as SqlVarcharDescriptor, P as encodeListLiteralDefault, Q as sqlIntColumn, R as isNumeralText, S as SqlFloatDescriptor, T as SqlTextCodec, U as sqlCharColumn, V as printJsonBody, W as sqlCharDecode, X as sqlFloatDescriptor, Y as sqlFloatDecode, Z as sqlFloatEncode, _ as SQL_TEXT_CODEC_ID, a as DateTimeShape, at as sqlTextEncode, b as SqlCharDescriptor, c as LiteralDefaultColumn, ct as sqlVarcharDescriptor, d as MarkerReadResult, et as sqlIntDescriptor, f as NumberClassification, g as SQL_INT_CODEC_ID, h as SQL_FLOAT_CODEC_ID, i as CanonicalDateTimeOptions, it as sqlTextDescriptor, j as collectOrderedParamRefs, k as canonicalDateTime, l as Lowerer, lt as sqlVarcharEncode, m as SQL_CHAR_CODEC_ID, n as AdapterProfile, nt as sqlTextColumn, o as EncodedLiteralDefault, ot as sqlVarcharColumn, p as NumberClassifierSpec, q as sqlCharRenderOutputType, r as AdapterTarget, rt as sqlTextDecode, s as IntegerStep, st as sqlVarcharDecode, t as Adapter, tt as sqlIntEncode, u as LowererContext, ut as sqlVarcharRenderOutputType, v as SQL_VARCHAR_CODEC_ID, w as SqlIntDescriptor, x as SqlFloatCodec, y as SqlCharCodec, z as numeralText } from "./ast-
|
|
4
|
+
import { $ as sqlIntDecode, A as canonicalNumeralText, B as parseJsonBody, C as SqlIntCodec, D as SqlVarcharCodec, E as SqlTextDescriptor, F as encodeLiteralDefault, G as sqlCharDescriptor, H as signedRange, I as escapePslString, J as sqlFloatColumn, K as sqlCharEncode, L as integerTextCanonicalForm, M as compact, N as createNumberClassifier, O as SqlVarcharDescriptor, P as encodeListLiteralDefault, Q as sqlIntColumn, R as isNumeralText, S as SqlFloatDescriptor, T as SqlTextCodec, U as sqlCharColumn, V as printJsonBody, W as sqlCharDecode, X as sqlFloatDescriptor, Y as sqlFloatDecode, Z as sqlFloatEncode, _ as SQL_TEXT_CODEC_ID, a as DateTimeShape, at as sqlTextEncode, b as SqlCharDescriptor, c as LiteralDefaultColumn, ct as sqlVarcharDescriptor, d as MarkerReadResult, et as sqlIntDescriptor, f as NumberClassification, g as SQL_INT_CODEC_ID, h as SQL_FLOAT_CODEC_ID, i as CanonicalDateTimeOptions, it as sqlTextDescriptor, j as collectOrderedParamRefs, k as canonicalDateTime, l as Lowerer, lt as sqlVarcharEncode, m as SQL_CHAR_CODEC_ID, n as AdapterProfile, nt as sqlTextColumn, o as EncodedLiteralDefault, ot as sqlVarcharColumn, p as NumberClassifierSpec, q as sqlCharRenderOutputType, r as AdapterTarget, rt as sqlTextDecode, s as IntegerStep, st as sqlVarcharDecode, t as Adapter, tt as sqlIntEncode, u as LowererContext, ut as sqlVarcharRenderOutputType, v as SQL_VARCHAR_CODEC_ID, w as SqlIntDescriptor, x as SqlFloatCodec, y as SqlCharCodec, z as numeralText } from "./ast-qnGR-fmK.mjs";
|
|
5
5
|
import { n as SqlQueryPlan, r as planFromAst, t as Preparable } from "./plan-B7g2kDfQ-Do1iWC4q.mjs";
|
|
6
|
-
import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-
|
|
6
|
+
import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-C6yUAU4j.mjs";
|
|
7
7
|
import { t as SqlExecutionPlan } from "./sql-execution-plan-Db0j752I-uGUWy8sD.mjs";
|
|
8
8
|
import "./plan-BBBYfvlz.mjs";
|
|
9
9
|
import { a as SqlAggregateDescriptorRegistry, c as TypeHelperRegistry, n as ExecutionContext, r as ResolvedSqlAggregate, t as CodecDescriptorRegistry } from "./query-lane-context-BSmWfohZ-QAWw_dXQ.mjs";
|
|
10
10
|
import "./query-lane-context-B0R8L6W-.mjs";
|
|
11
|
-
import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, 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 SqlPlan, x as TableMetadata, y as TableDef } from "./types-
|
|
11
|
+
import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, 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 SqlPlan, x as TableMetadata, y as TableDef } from "./types-BGHABElw-C5MKkR3c.mjs";
|
|
12
12
|
import { a as SqlParamRefMutatorInternal, i as SqlParamRefMutator, n as ParamRefEntryUnion, o as createSqlParamRefMutator, r as ParamRefHandle, t as ParamRefEntry } from "./middleware-CuGBptK0-CGDI6sQU.mjs";
|
|
13
13
|
export { Adapter, AdapterProfile, AdapterTarget, AffectedCount, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyCodecDescriptorTemplate, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, BuildOperationSpec, BuildOptions, BuildParamsMap, CanonicalDateTimeOptions, 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, DateTimeShape, DdlColumn, DdlColumnDefault, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EncodedLiteralDefault, EqColJoinOn, ExecutionContext, ExistsExpr, Expr, ExprVisitor, Expression, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, FunctionSourceAlias, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, IntegerStep, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectEntry, JsonObjectExpr, JsonValueProjectionVisitor, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralDefaultColumn, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, META, MarkerReadResult, Meta, ModelDef, ModelMetadata, NativeJsonValueProjection, NoReservedRowColumn, NotExpr, NullCheckExpr, NumberClassification, NumberClassifierSpec, OperationExpr, OperationTypeSignature, OperationTypes, OperationsForTypeId, OrExpr, OrderByItem, OrderByNulls, ParamRef, type ParamRefEntry, type ParamRefEntryUnion, type ParamRefHandle, Preparable, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawAffectedCountQuery, RawCodecInferer, RawExpr, RawPlanContext, RawQueryAst, RawQueryColumn, RawQueryResult, RawRow, RawRowQuery, RawRowSpec, RawRowSpecEntry, RawSqlBuilder, RawSqlInterpolation, RawSqlLiteral, RawSqlStatementBuilder, RawSqlStatementTag, RawSqlTag, ResolvedSqlAggregate, type RuntimeScope, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_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, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableDef, TableKey, TableMetadata, TableRef, TableSource, TablesOf, ToWhereExpr, TraitExpression, TypeHelperRegistry, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, aggregateFnNames, buildOperation, canonicalDateTime, canonicalNumeralText, codecOf, collectOrderedParamRefs, compact, createNumberClassifier, createRawSql, createSqlParamRefMutator, encodeListLiteralDefault, encodeLiteralDefault, escapePslString, frozenCodecRef, integerTextCanonicalForm, isAggregateFn, isDdlNode, isExpression, isNumeralText, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, numeralText, param, parseJsonBody, planFromAst, printJsonBody, queryAstKinds, signedRange, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, toExpr, whereExprKinds };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as InsertValue, A as DefaultValueExpr, At as SqlCodecCallContext, B as EqColJoinOn, Bt as WindowFuncExpr, C as CodecCallContext$1, Ct as RawExpr, D as CodecTrait$1, Dt as RawSqlLiteral, E as CodecRef$1, Et as RawQueryResult, F as DescriptorCodecJson, Ft as TableSource, G as ExpressionSource, Gt as isOrderByNulls, H as ExprVisitor, Ht as frozenCodecRef, I as DescriptorCodecTraits, It as ToWhereExpr, J as FunctionSource, Jt as queryAstKinds, K as ExtractCodecTypes, Kt as isQueryAst, L as Direction, Lt as UpdateAst, M as DerivedTableSource, Mt as SqlColumnRef, N as DescriptorCodecId, Nt as SubqueryExpr, O as ColumnRef, Ot as SelectAst, P as DescriptorCodecInput, Pt as TableRef, Q as InsertOnConflict, R as DoNothingConflictAction, Rt as WhereArg, S as Codec$1, St as ProjectionItem, T as CodecJsonValueProjection, Tt as RawQueryColumn, U as ExpressionFolder, Ut as isAggregateFn, V as ExistsExpr, Vt as aggregateFnNames, W as ExpressionRewriter, Wt as isOrderByDirection, X as IdentifierRef, Y as FunctionSourceAlias, Yt as whereExprKinds, Z as InsertAst, _ as BinaryExpr, _t as OrderByItem, a as AndExpr, at as JsonObjectExpr, b as CaseExpr, bt as PreparedParamRef, c as AnyExpression, ct as ListExpression, d as AnyInsertValue, dt as LoweredStatement, et as JoinAst, f as AnyJsonValueProjection, ft as NativeJsonValueProjection, g as AstRewriter, gt as OrExpr, h as AnyQueryAst, ht as OperationExpr, i as AggregateOpFn, it as JsonObjectEntry, j as DeleteAst, jt as SqlCodecInstanceContext, k as ContractCodecRegistry, kt as SelectAstOptions, l as AnyFromSource, lt as LiteralExpr, m as AnyParamRef, mt as NullCheckExpr, n as AggregateExpr, nt as JsonArrayAggExpr, o as AnyCodecDescriptor, ot as JsonValueProjectionVisitor, p as AnyOperationArg, pt as NotExpr, q as FunctionCallExpr, qt as isWhereExpr, r as AggregateFn, rt as JsonDocumentProjection, s as AnyCodecDescriptorTemplate, st as LimitOffsetValue, t as AggregateCountFn, tt as JoinOnExpr, u as AnyInsertOnConflictAction, ut as LoweredParam, v as BinaryOp, vt as OrderByNulls, w as CodecDescriptor$1, wt as RawQueryAst, x as CastExpr, xt as ProjectionExpr, y as CaseBranch, yt as ParamRef, z as DoUpdateSetConflictAction, zt as WindowFn } from "./types-Yui2yFf6-DQkiEr9B.mjs";
|
|
2
|
-
import { a as SqlDriverState, c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, n as PreparedStatementHandle, o as SqlExecuteRequest, r as SqlConnection, s as SqlExplainResult, t as PreparedExecuteRequest, u as SqlTransaction } from "./driver-types-
|
|
2
|
+
import { a as SqlDriverState, c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, n as PreparedStatementHandle, o as SqlExecuteRequest, r as SqlConnection, s as SqlExplainResult, t as PreparedExecuteRequest, u as SqlTransaction } from "./driver-types-DYGFEcyv-DPaNalPf.mjs";
|
|
3
3
|
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-B23QEzDx-ridB7leA.mjs";
|
|
4
|
-
import { $ as sqlIntDecode, A as canonicalNumeralText, B as parseJsonBody, C as SqlIntCodec, D as SqlVarcharCodec, E as SqlTextDescriptor, F as encodeLiteralDefault, G as sqlCharDescriptor, H as signedRange, I as escapePslString, J as sqlFloatColumn, K as sqlCharEncode, L as integerTextCanonicalForm, M as compact, N as createNumberClassifier, O as SqlVarcharDescriptor, P as encodeListLiteralDefault, Q as sqlIntColumn, R as isNumeralText, S as SqlFloatDescriptor, T as SqlTextCodec, U as sqlCharColumn, V as printJsonBody, W as sqlCharDecode, X as sqlFloatDescriptor, Y as sqlFloatDecode, Z as sqlFloatEncode, _ as SQL_TEXT_CODEC_ID, a as DateTimeShape, at as sqlTextEncode, b as SqlCharDescriptor, c as LiteralDefaultColumn, ct as sqlVarcharDescriptor, d as MarkerReadResult, et as sqlIntDescriptor, f as NumberClassification, g as SQL_INT_CODEC_ID, h as SQL_FLOAT_CODEC_ID, i as CanonicalDateTimeOptions, it as sqlTextDescriptor, j as collectOrderedParamRefs, k as canonicalDateTime, l as Lowerer, lt as sqlVarcharEncode, m as SQL_CHAR_CODEC_ID, n as AdapterProfile, nt as sqlTextColumn, o as EncodedLiteralDefault, ot as sqlVarcharColumn, p as NumberClassifierSpec, q as sqlCharRenderOutputType, r as AdapterTarget, rt as sqlTextDecode, s as IntegerStep, st as sqlVarcharDecode, t as Adapter, tt as sqlIntEncode, u as LowererContext, ut as sqlVarcharRenderOutputType, v as SQL_VARCHAR_CODEC_ID, w as SqlIntDescriptor, x as SqlFloatCodec, y as SqlCharCodec, z as numeralText } from "./ast-
|
|
4
|
+
import { $ as sqlIntDecode, A as canonicalNumeralText, B as parseJsonBody, C as SqlIntCodec, D as SqlVarcharCodec, E as SqlTextDescriptor, F as encodeLiteralDefault, G as sqlCharDescriptor, H as signedRange, I as escapePslString, J as sqlFloatColumn, K as sqlCharEncode, L as integerTextCanonicalForm, M as compact, N as createNumberClassifier, O as SqlVarcharDescriptor, P as encodeListLiteralDefault, Q as sqlIntColumn, R as isNumeralText, S as SqlFloatDescriptor, T as SqlTextCodec, U as sqlCharColumn, V as printJsonBody, W as sqlCharDecode, X as sqlFloatDescriptor, Y as sqlFloatDecode, Z as sqlFloatEncode, _ as SQL_TEXT_CODEC_ID, a as DateTimeShape, at as sqlTextEncode, b as SqlCharDescriptor, c as LiteralDefaultColumn, ct as sqlVarcharDescriptor, d as MarkerReadResult, et as sqlIntDescriptor, f as NumberClassification, g as SQL_INT_CODEC_ID, h as SQL_FLOAT_CODEC_ID, i as CanonicalDateTimeOptions, it as sqlTextDescriptor, j as collectOrderedParamRefs, k as canonicalDateTime, l as Lowerer, lt as sqlVarcharEncode, m as SQL_CHAR_CODEC_ID, n as AdapterProfile, nt as sqlTextColumn, o as EncodedLiteralDefault, ot as sqlVarcharColumn, p as NumberClassifierSpec, q as sqlCharRenderOutputType, r as AdapterTarget, rt as sqlTextDecode, s as IntegerStep, st as sqlVarcharDecode, t as Adapter, tt as sqlIntEncode, u as LowererContext, ut as sqlVarcharRenderOutputType, v as SQL_VARCHAR_CODEC_ID, w as SqlIntDescriptor, x as SqlFloatCodec, y as SqlCharCodec, z as numeralText } from "./ast-qnGR-fmK.mjs";
|
|
5
5
|
export { Adapter, AdapterProfile, AdapterTarget, AggregateCountFn, AggregateExpr, AggregateFn, AggregateOpFn, AndExpr, AnyCodecDescriptor, AnyCodecDescriptorTemplate, AnyDdlColumnDefault, AnyExpression, AnyFromSource, AnyInsertOnConflictAction, AnyInsertValue, AnyJsonValueProjection, AnyOperationArg, AnyParamRef, AnyQueryAst, AstRewriter, BinaryExpr, BinaryOp, CanonicalDateTimeOptions, 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, DateTimeShape, DdlColumn, DdlColumnDefault, DdlColumnDefaultVisitor, DdlColumnRenderContext, DdlNode, DdlTableConstraint, DefaultValueExpr, DeleteAst, DerivedTableSource, DescriptorCodecId, DescriptorCodecInput, DescriptorCodecJson, DescriptorCodecTraits, Direction, DoNothingConflictAction, DoUpdateSetConflictAction, EncodedLiteralDefault, EqColJoinOn, ExistsExpr, ExprVisitor, ExpressionFolder, ExpressionRewriter, ExpressionSource, ExtractCodecTypes, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, FunctionSourceAlias, IdentifierRef, InsertAst, InsertOnConflict, InsertValue, IntegerStep, JoinAst, JoinOnExpr, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectEntry, JsonObjectExpr, JsonValueProjectionVisitor, LimitOffsetValue, ListExpression, LiteralColumnDefault, LiteralDefaultColumn, LiteralExpr, LoweredParam, LoweredStatement, Lowerer, LowererContext, MarkerReadResult, NativeJsonValueProjection, NotExpr, NullCheckExpr, NumberClassification, NumberClassifierSpec, OperationExpr, OrExpr, OrderByItem, OrderByNulls, ParamRef, PreparedExecuteRequest, PreparedParamRef, PreparedStatementHandle, PrimaryKeyConstraint, ProjectionExpr, ProjectionItem, RawExpr, RawQueryAst, RawQueryColumn, RawQueryResult, RawSqlLiteral, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_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, SqlTransaction, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableRef, TableSource, ToWhereExpr, UniqueConstraint, UpdateAst, WhereArg, WindowFn, WindowFuncExpr, aggregateFnNames, canonicalDateTime, canonicalNumeralText, collectOrderedParamRefs, compact, createNumberClassifier, encodeListLiteralDefault, encodeLiteralDefault, escapePslString, frozenCodecRef, integerTextCanonicalForm, isAggregateFn, isDdlNode, isNumeralText, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, numeralText, parseJsonBody, printJsonBody, queryAstKinds, signedRange, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, whereExprKinds };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-
|
|
1
|
+
import { C as buildOperation, D as param, E as isExpression, O as toExpr, S as TraitExpression, T as createRawSql, _ as RawSqlStatementBuilder, a as CodecValue, b as ScalarListExpression, c as RawAffectedCountQuery, d as RawRow, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, l as RawCodecInferer, m as RawRowSpecEntry, n as BuildOperationSpec, o as Expression, p as RawRowSpec, r as CodecExpression, s as NoReservedRowColumn, t as AffectedCount, u as RawPlanContext, v as RawSqlStatementTag, w as codecOf, x as ScopeField, y as RawSqlTag } from "./expression-C6yUAU4j.mjs";
|
|
2
2
|
export { AffectedCount, BuildOperationSpec, CodecExpression, CodecTypesBase, CodecValue, Expression, NoReservedRowColumn, RawAffectedCountQuery, RawCodecInferer, RawPlanContext, RawRow, RawRowQuery, RawRowSpec, RawRowSpecEntry, RawSqlBuilder, RawSqlInterpolation, RawSqlStatementBuilder, RawSqlStatementTag, RawSqlTag, ScalarListExpression, ScopeField, TraitExpression, buildOperation, codecOf, createRawSql, isExpression, param, toExpr };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, 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 SqlPlan, x as TableMetadata, y as TableDef } from "./types-
|
|
2
|
-
import "./types-
|
|
1
|
+
import { S as TablesOf, _ as SqlOrmPlan, a as ColumnsOf, b as TableKey, c as META, d as ModelMetadata, f as OperationTypeSignature, g as SqlBuilderOptions, h as RuntimeScope, 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 SqlPlan, x as TableMetadata, y as TableDef } from "./types-BGHABElw-C5MKkR3c.mjs";
|
|
2
|
+
import "./types-CXe4fCcu.mjs";
|
|
3
3
|
export { BuildOptions, BuildParamsMap, CodecTypes, ColumnResolutionContract, ColumnsOf, ComputeColumnJsType, Expr, META, Meta, ModelDef, ModelMetadata, OperationTypeSignature, OperationTypes, OperationsForTypeId, type RuntimeScope, SqlBuilderOptions, type SqlOrmPlan, SqlPlan, TableDef, TableKey, TableMetadata, TablesOf };
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as MarkerReadResult } from "./ast-
|
|
1
|
+
import { d as MarkerReadResult } from "./ast-qnGR-fmK.mjs";
|
|
2
2
|
import { c as TypeHelperRegistry, n as ExecutionContext } from "./query-lane-context-BSmWfohZ-QAWw_dXQ.mjs";
|
|
3
|
-
import { A as
|
|
4
|
-
import { a as LintsOptions, c as budgets, d as lints, f as lowerSqlPlan, i as ExecuteInterceptResult, l as createAstCodecRegistry, m as validateContractCodecMappings, n as AfterQueryResult, o as Log, p as validateCodecRegistryCompleteness, r as BudgetsOptions, s as QueryInterceptResult, t as AfterExecuteResult, u as extractCodecIds } from "./index-
|
|
5
|
-
export { type AfterExecuteResult, type AfterQueryResult, type BindSiteParams, type BudgetsOptions, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecuteInterceptResult, type ExecutionContext, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedExecution, PreparedExecutionImpl, type PreparedFor, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type QueryInterceptResult, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeOptions, 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 };
|
|
3
|
+
import { A as SqlMiddlewareContext, B as TransactionContext, C as RuntimeParameterizedCodecDescriptor, D as SqlExecutionStack, E as RuntimeTransaction, F as SqlRuntimeExtensionDescriptor, G as encodeParamsWithMetadata, H as createExecutionContext, I as SqlRuntimeExtensionInstance, J as withTransaction, L as SqlRuntimeTargetDescriptor, M as SqlRuntimeAdapterInstance, N as SqlRuntimeBase, O as SqlExecutionStackWithDriver, P as SqlRuntimeDriverInstance, R as SqlStaticContributions, S as RuntimeOptions, T as RuntimeTelemetryEvent, U as createSqlExecutionStack, V as VerifyMarkerOption, W as deriveParamMetadata, _ as PreparedStatementInternals, a as DeclaredCodecId, b as RuntimeConnection, c as ParamSpec, d as PreparedExecution, f as PreparedExecutionImpl, g as PreparedStatementImpl, i as Declaration, j as SqlRuntimeAdapterDescriptor, k as SqlMiddleware, l as ParamsFromDeclaration, m as PreparedStatement, n as CloseRefusal, o as DeclaredNullable, p as PreparedFor, r as ConnectionProvider, s as MarkerReader, t as BindSiteParams, u as PrepareCallback, w as RuntimeQueryable, x as RuntimeFamilyAdapter, y as Runtime, z as TelemetryOutcome } from "./prepared-statement-Cv54gpY_-CbIaPDc1.mjs";
|
|
4
|
+
import { a as LintsOptions, c as budgets, d as lints, f as lowerSqlPlan, i as ExecuteInterceptResult, l as createAstCodecRegistry, m as validateContractCodecMappings, n as AfterQueryResult, o as Log, p as validateCodecRegistryCompleteness, r as BudgetsOptions, s as QueryInterceptResult, t as AfterExecuteResult, u as extractCodecIds } from "./index-CQ74jdOW.mjs";
|
|
5
|
+
export { type AfterExecuteResult, type AfterQueryResult, type BindSiteParams, type BudgetsOptions, type CloseRefusal, type ConnectionProvider, type Declaration, type DeclaredCodecId, type DeclaredNullable, type ExecuteInterceptResult, type ExecutionContext, type LintsOptions, type Log, type MarkerReadResult, type MarkerReader, type ParamSpec, type ParamsFromDeclaration, type PrepareCallback, type PreparedExecution, PreparedExecutionImpl, type PreparedFor, type PreparedStatement, PreparedStatementImpl, type PreparedStatementInternals, type QueryInterceptResult, type Runtime, type RuntimeConnection, type RuntimeFamilyAdapter, type RuntimeOptions, 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
|
@@ -5,7 +5,7 @@ import { t as createSqlParamRefMutator } from "./middleware-CMr4CHNz-DHIUdxlm.mj
|
|
|
5
5
|
import { t as buildSqlAggregateDescriptorRegistry } from "./aggregate-descriptor-registry-CJF2KxUb.mjs";
|
|
6
6
|
import { t as buildCodecDescriptorRegistry } from "./codec-descriptor-registry-B1v3GEdK.mjs";
|
|
7
7
|
import { i as runPreparedQuery, n as preparedStatementQuery, r as runPreparedExecute, t as preparedStatementExecute } from "./prepared-query-BJr50wPm-ChoqfJbX.mjs";
|
|
8
|
-
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
8
|
+
import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import { assertNever, isInternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
11
11
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -17,7 +17,7 @@ import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-string
|
|
|
17
17
|
import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
|
|
18
18
|
import { createExecutionStack } from "@prisma/orm-framework/components/execution";
|
|
19
19
|
import { hashContent } from "@prisma/orm-framework/utils/hash-content";
|
|
20
|
-
//#region ../../../2-sql/5-runtime/dist/exports-
|
|
20
|
+
//#region ../../../2-sql/5-runtime/dist/exports-CpMH6Ux-.mjs
|
|
21
21
|
/**
|
|
22
22
|
* Build an {@link AstCodecResolver} bound to a descriptor registry and a per-call instance-context factory.
|
|
23
23
|
*
|
|
@@ -1064,6 +1064,43 @@ function computeSqlFingerprint(sql) {
|
|
|
1064
1064
|
const normalized = sql.replace(STRING_LITERAL_REGEX, "?").replace(NUMERIC_LITERAL_REGEX, "?").replace(WHITESPACE_REGEX, " ").trim().toLowerCase();
|
|
1065
1065
|
return createHash("sha256").update(normalized).digest("hex");
|
|
1066
1066
|
}
|
|
1067
|
+
var InFlightOperations = class {
|
|
1068
|
+
#count = 0;
|
|
1069
|
+
#started = 0;
|
|
1070
|
+
#drainWaiters = [];
|
|
1071
|
+
/** Records one operation as in flight; the returned callback ends it and ignores later calls. */
|
|
1072
|
+
begin() {
|
|
1073
|
+
this.#count += 1;
|
|
1074
|
+
this.#started += 1;
|
|
1075
|
+
let ended = false;
|
|
1076
|
+
return () => {
|
|
1077
|
+
if (ended) return;
|
|
1078
|
+
ended = true;
|
|
1079
|
+
this.#count -= 1;
|
|
1080
|
+
if (this.#count === 0) for (const wake of this.#drainWaiters.splice(0)) wake();
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
/** How many operations have begun so far; a change between two reads means work started in between. */
|
|
1084
|
+
get started() {
|
|
1085
|
+
return this.#started;
|
|
1086
|
+
}
|
|
1087
|
+
get active() {
|
|
1088
|
+
return this.#count > 0;
|
|
1089
|
+
}
|
|
1090
|
+
drained() {
|
|
1091
|
+
if (this.#count === 0) return Promise.resolve();
|
|
1092
|
+
return new Promise((resolve) => this.#drainWaiters.push(resolve));
|
|
1093
|
+
}
|
|
1094
|
+
/** Records `work` as in flight until it settles. */
|
|
1095
|
+
async track(work) {
|
|
1096
|
+
const end = this.begin();
|
|
1097
|
+
try {
|
|
1098
|
+
return await work();
|
|
1099
|
+
} finally {
|
|
1100
|
+
end();
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1067
1104
|
async function runBeforeCompileChain(middleware, initial, ctx) {
|
|
1068
1105
|
let current = initial;
|
|
1069
1106
|
for (const mw of middleware) {
|
|
@@ -1161,6 +1198,13 @@ const noopLog = {
|
|
|
1161
1198
|
warn: noopLogSink,
|
|
1162
1199
|
error: noopLogSink
|
|
1163
1200
|
};
|
|
1201
|
+
const scheduleTimer = globalThis.setTimeout;
|
|
1202
|
+
function runtimeClosedError() {
|
|
1203
|
+
return structuredError("DRIVER.NOT_CONNECTED", "Runtime is closed", {
|
|
1204
|
+
why: "close() was called on this runtime, or on the client or connection that owns it. An await using scope calls close() when it ends.",
|
|
1205
|
+
fix: "Await every query, transaction and prepared statement before close(). The usual cause is a query returned without await from an await using scope."
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1164
1208
|
/**
|
|
1165
1209
|
* Abstract family-layer base for SQL runtimes. Subclass to build a target runtime
|
|
1166
1210
|
* (e.g. `PostgresRuntimeImpl`); app code should consume the `Runtime` interface returned
|
|
@@ -1176,11 +1220,16 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1176
1220
|
sqlCtx;
|
|
1177
1221
|
verifyMarkerOption;
|
|
1178
1222
|
verifyMarkerPromise;
|
|
1223
|
+
closePromise;
|
|
1224
|
+
closeRefusal;
|
|
1225
|
+
#inFlight = new InFlightOperations();
|
|
1226
|
+
#refusing = false;
|
|
1227
|
+
#heldQueryables = /* @__PURE__ */ new WeakSet();
|
|
1179
1228
|
#preparedStatementHandles = /* @__PURE__ */ new WeakMap();
|
|
1180
1229
|
codecRegistryValidated;
|
|
1181
1230
|
_telemetry;
|
|
1182
1231
|
constructor(options) {
|
|
1183
|
-
const { context, adapter, driver, verifyMarker, middleware, mode, log } = options;
|
|
1232
|
+
const { context, adapter, driver, verifyMarker, middleware, mode, log, closeRefusal } = options;
|
|
1184
1233
|
if (middleware) for (const mw of middleware) checkMiddlewareCompatibility(mw, "sql", context.contract.target);
|
|
1185
1234
|
const sqlCtx = {
|
|
1186
1235
|
contract: context.contract,
|
|
@@ -1203,8 +1252,10 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1203
1252
|
this.codecDescriptors = context.codecDescriptors;
|
|
1204
1253
|
this.sqlCtx = sqlCtx;
|
|
1205
1254
|
this.verifyMarkerOption = verifyMarker ?? "onFirstUse";
|
|
1255
|
+
this.closeRefusal = closeRefusal ?? "when-idle";
|
|
1206
1256
|
this.codecRegistryValidated = false;
|
|
1207
1257
|
this.verifyMarkerPromise = this.verifyMarkerOption === false ? Promise.resolve() : null;
|
|
1258
|
+
this.closePromise = null;
|
|
1208
1259
|
this._telemetry = null;
|
|
1209
1260
|
}
|
|
1210
1261
|
/**
|
|
@@ -1305,25 +1356,37 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1305
1356
|
acquireRawConnection() {
|
|
1306
1357
|
return this.driver.acquireConnection();
|
|
1307
1358
|
}
|
|
1308
|
-
async setupDriverExecution(exec) {
|
|
1359
|
+
async setupDriverExecution(exec, queryable) {
|
|
1309
1360
|
this.familyAdapter.validatePlan(exec, this.contract);
|
|
1310
1361
|
this._telemetry = null;
|
|
1311
|
-
if (this.verifyMarkerPromise === null)
|
|
1362
|
+
if (this.verifyMarkerPromise === null) {
|
|
1363
|
+
const markerQueryable = this.#heldQueryables.has(queryable) ? queryable : this.driver;
|
|
1364
|
+
this.verifyMarkerPromise = this.verifyMarker(markerQueryable).catch((error) => {
|
|
1365
|
+
this.verifyMarkerPromise = null;
|
|
1366
|
+
throw error;
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1312
1369
|
await this.verifyMarkerPromise;
|
|
1313
1370
|
}
|
|
1371
|
+
beginOperation(queryable) {
|
|
1372
|
+
if (queryable === this.driver && this.#refusing) throw runtimeClosedError();
|
|
1373
|
+
return this.#inFlight.begin();
|
|
1374
|
+
}
|
|
1314
1375
|
getListDecoder() {
|
|
1315
1376
|
return sqlNativeArrayListDecoder;
|
|
1316
1377
|
}
|
|
1317
|
-
async *streamRows(exec, decodeContext, driverCall, codecCtx, execMiddlewareCtx) {
|
|
1318
|
-
await this.setupDriverExecution(exec);
|
|
1378
|
+
async *streamRows(exec, decodeContext, driverCall, codecCtx, execMiddlewareCtx, queryable, onDriverAnswered) {
|
|
1379
|
+
await this.setupDriverExecution(exec, queryable);
|
|
1319
1380
|
const startedAt = Date.now();
|
|
1320
1381
|
let outcome = null;
|
|
1321
1382
|
try {
|
|
1322
1383
|
const iterator = runQueryWithMiddleware(exec, this.middleware, execMiddlewareCtx, driverCall)[Symbol.asyncIterator]();
|
|
1384
|
+
let answered = false;
|
|
1323
1385
|
try {
|
|
1324
1386
|
while (true) {
|
|
1325
1387
|
checkAborted(codecCtx, "stream");
|
|
1326
|
-
const next = await iterator.next();
|
|
1388
|
+
const next = answered ? await iterator.next() : await iterator.next().finally(onDriverAnswered);
|
|
1389
|
+
answered = true;
|
|
1327
1390
|
if (next.done) break;
|
|
1328
1391
|
yield blindCast(await decodeRow(next.value, decodeContext, codecCtx, this.getListDecoder()));
|
|
1329
1392
|
}
|
|
@@ -1386,21 +1449,34 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1386
1449
|
const self = this;
|
|
1387
1450
|
const { codecCtx, middlewareCtx } = this.createQueryContexts(options);
|
|
1388
1451
|
const generator = async function* () {
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1452
|
+
const endOperation = self.beginOperation(queryable);
|
|
1453
|
+
try {
|
|
1454
|
+
const exec = await self.prepareQueryExecution(plan, codecCtx, middlewareCtx);
|
|
1455
|
+
const decodeContext = buildDecodeContext(exec.ast, self.contractCodecs);
|
|
1456
|
+
yield* self.streamRows(exec, decodeContext, () => queryable.query({
|
|
1457
|
+
sql: exec.sql,
|
|
1458
|
+
params: exec.params
|
|
1459
|
+
}), codecCtx, middlewareCtx, queryable, endOperation);
|
|
1460
|
+
} finally {
|
|
1461
|
+
endOperation();
|
|
1462
|
+
}
|
|
1395
1463
|
};
|
|
1396
1464
|
return new AsyncIterableResult(generator());
|
|
1397
1465
|
}
|
|
1398
1466
|
/** Execute statistics against a caller-supplied queryable through the shared preparation pipeline. */
|
|
1399
1467
|
async executeStatisticsAgainstQueryable(plan, queryable, options) {
|
|
1468
|
+
const endOperation = this.beginOperation(queryable);
|
|
1469
|
+
try {
|
|
1470
|
+
return await this.executeStatisticsInFlight(plan, queryable, options);
|
|
1471
|
+
} finally {
|
|
1472
|
+
endOperation();
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
async executeStatisticsInFlight(plan, queryable, options) {
|
|
1400
1476
|
this.ensureCodecRegistryValidated();
|
|
1401
1477
|
const { codecCtx, middlewareCtx } = this.createQueryContexts(options);
|
|
1402
1478
|
const exec = await this.prepareExecuteExecution(plan, codecCtx, middlewareCtx);
|
|
1403
|
-
await this.setupDriverExecution(exec);
|
|
1479
|
+
await this.setupDriverExecution(exec, queryable);
|
|
1404
1480
|
checkAborted(codecCtx, "stream");
|
|
1405
1481
|
const startedAt = Date.now();
|
|
1406
1482
|
let outcome = "success";
|
|
@@ -1447,40 +1523,56 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1447
1523
|
const self = this;
|
|
1448
1524
|
const { codecCtx, middlewareCtx: execMiddlewareCtx } = this.createQueryContexts(options);
|
|
1449
1525
|
const generator = async function* () {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
meta: ps.meta
|
|
1457
|
-
};
|
|
1458
|
-
const mutator = createSqlParamRefMutator(preEncodeExec);
|
|
1459
|
-
await runBeforeQueryChain(preEncodeExec, self.middleware, execMiddlewareCtx, mutator);
|
|
1460
|
-
const encodedParams = await encodeParamsWithMetadata(mutator.currentParams(), ps.paramMetadata, codecCtx, self.contractCodecs);
|
|
1461
|
-
const exec = {
|
|
1462
|
-
sql: ps.sql,
|
|
1463
|
-
params: encodedParams,
|
|
1464
|
-
ast: ps.ast,
|
|
1465
|
-
meta: ps.meta
|
|
1466
|
-
};
|
|
1467
|
-
const handles = self.#preparedStatementHandles;
|
|
1468
|
-
const request = {
|
|
1469
|
-
sql: exec.sql,
|
|
1470
|
-
params: exec.params,
|
|
1471
|
-
preparedStatementHandle: {
|
|
1472
|
-
get: () => handles.get(ps),
|
|
1473
|
-
set: (value) => {
|
|
1474
|
-
handles.set(ps, value);
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
};
|
|
1478
|
-
yield* self.streamRows(exec, ps.decodeContext, () => queryable.query(request), codecCtx, execMiddlewareCtx);
|
|
1526
|
+
const endOperation = self.beginOperation(queryable);
|
|
1527
|
+
try {
|
|
1528
|
+
yield* self.streamPreparedRows(ps, userParams, queryable, codecCtx, execMiddlewareCtx, endOperation);
|
|
1529
|
+
} finally {
|
|
1530
|
+
endOperation();
|
|
1531
|
+
}
|
|
1479
1532
|
};
|
|
1480
1533
|
return new AsyncIterableResult(generator());
|
|
1481
1534
|
}
|
|
1535
|
+
async *streamPreparedRows(ps, userParams, queryable, codecCtx, execMiddlewareCtx, onDriverAnswered) {
|
|
1536
|
+
checkAborted(codecCtx, "stream");
|
|
1537
|
+
const preEncodeValues = resolvePreparedSlotValues(ps, userParams);
|
|
1538
|
+
const preEncodeExec = {
|
|
1539
|
+
sql: ps.sql,
|
|
1540
|
+
params: preEncodeValues,
|
|
1541
|
+
ast: ps.ast,
|
|
1542
|
+
meta: ps.meta
|
|
1543
|
+
};
|
|
1544
|
+
const mutator = createSqlParamRefMutator(preEncodeExec);
|
|
1545
|
+
await runBeforeQueryChain(preEncodeExec, this.middleware, execMiddlewareCtx, mutator);
|
|
1546
|
+
const encodedParams = await encodeParamsWithMetadata(mutator.currentParams(), ps.paramMetadata, codecCtx, this.contractCodecs);
|
|
1547
|
+
const exec = {
|
|
1548
|
+
sql: ps.sql,
|
|
1549
|
+
params: encodedParams,
|
|
1550
|
+
ast: ps.ast,
|
|
1551
|
+
meta: ps.meta
|
|
1552
|
+
};
|
|
1553
|
+
const handles = this.#preparedStatementHandles;
|
|
1554
|
+
const request = {
|
|
1555
|
+
sql: exec.sql,
|
|
1556
|
+
params: exec.params,
|
|
1557
|
+
preparedStatementHandle: {
|
|
1558
|
+
get: () => handles.get(ps),
|
|
1559
|
+
set: (value) => {
|
|
1560
|
+
handles.set(ps, value);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
};
|
|
1564
|
+
yield* this.streamRows(exec, ps.decodeContext, () => queryable.query(request), codecCtx, execMiddlewareCtx, queryable, onDriverAnswered);
|
|
1565
|
+
}
|
|
1482
1566
|
/** Execute a prepared statement's statistics against a caller-supplied queryable through the full pipeline. */
|
|
1483
1567
|
async runPreparedExecuteAgainstQueryable(ps, userParams, queryable, options) {
|
|
1568
|
+
const endOperation = this.beginOperation(queryable);
|
|
1569
|
+
try {
|
|
1570
|
+
return await this.runPreparedExecuteInFlight(ps, userParams, queryable, options);
|
|
1571
|
+
} finally {
|
|
1572
|
+
endOperation();
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
async runPreparedExecuteInFlight(ps, userParams, queryable, options) {
|
|
1484
1576
|
this.ensureCodecRegistryValidated();
|
|
1485
1577
|
const { codecCtx, middlewareCtx } = this.createQueryContexts(options);
|
|
1486
1578
|
checkAborted(codecCtx, "stream");
|
|
@@ -1499,7 +1591,7 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1499
1591
|
ast: ps.ast,
|
|
1500
1592
|
meta: ps.meta
|
|
1501
1593
|
};
|
|
1502
|
-
await this.setupDriverExecution(exec);
|
|
1594
|
+
await this.setupDriverExecution(exec, queryable);
|
|
1503
1595
|
checkAborted(codecCtx, "stream");
|
|
1504
1596
|
const handles = this.#preparedStatementHandles;
|
|
1505
1597
|
const request = {
|
|
@@ -1524,18 +1616,25 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1524
1616
|
}
|
|
1525
1617
|
}
|
|
1526
1618
|
async connection() {
|
|
1527
|
-
const
|
|
1619
|
+
const endOperation = this.beginOperation(this.driver);
|
|
1620
|
+
let driverConn;
|
|
1621
|
+
try {
|
|
1622
|
+
driverConn = await this.driver.acquireConnection();
|
|
1623
|
+
} finally {
|
|
1624
|
+
endOperation();
|
|
1625
|
+
}
|
|
1626
|
+
this.#heldQueryables.add(driverConn);
|
|
1528
1627
|
const self = this;
|
|
1529
1628
|
return {
|
|
1530
1629
|
async transaction() {
|
|
1531
|
-
const driverTx = await driverConn.beginTransaction();
|
|
1630
|
+
const driverTx = await self.#inFlight.track(() => driverConn.beginTransaction());
|
|
1532
1631
|
return self.wrapTransaction(driverTx);
|
|
1533
1632
|
},
|
|
1534
1633
|
async release() {
|
|
1535
|
-
await driverConn.release();
|
|
1634
|
+
await self.#inFlight.track(() => driverConn.release());
|
|
1536
1635
|
},
|
|
1537
1636
|
async destroy(reason) {
|
|
1538
|
-
await driverConn.destroy(reason);
|
|
1637
|
+
await self.#inFlight.track(() => driverConn.destroy(reason));
|
|
1539
1638
|
},
|
|
1540
1639
|
query(plan, options) {
|
|
1541
1640
|
return self.queryAgainstQueryable(plan, driverConn, {
|
|
@@ -1564,13 +1663,14 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1564
1663
|
};
|
|
1565
1664
|
}
|
|
1566
1665
|
wrapTransaction(driverTx) {
|
|
1666
|
+
this.#heldQueryables.add(driverTx);
|
|
1567
1667
|
const self = this;
|
|
1568
1668
|
return {
|
|
1569
1669
|
async commit() {
|
|
1570
|
-
await driverTx.commit();
|
|
1670
|
+
await self.#inFlight.track(() => driverTx.commit());
|
|
1571
1671
|
},
|
|
1572
1672
|
async rollback() {
|
|
1573
|
-
await driverTx.rollback();
|
|
1673
|
+
await self.#inFlight.track(() => driverTx.rollback());
|
|
1574
1674
|
},
|
|
1575
1675
|
query(plan, options) {
|
|
1576
1676
|
return self.queryAgainstQueryable(plan, driverTx, {
|
|
@@ -1601,17 +1701,32 @@ var SqlRuntimeBase = class extends RuntimeCore {
|
|
|
1601
1701
|
telemetry() {
|
|
1602
1702
|
return this._telemetry;
|
|
1603
1703
|
}
|
|
1604
|
-
|
|
1704
|
+
close() {
|
|
1705
|
+
this.closePromise ??= this.closeDriverAfterWork();
|
|
1706
|
+
return this.closePromise;
|
|
1707
|
+
}
|
|
1708
|
+
async closeDriverAfterWork() {
|
|
1709
|
+
if (this.closeRefusal === "when-idle") await this.waitForIdleTurn();
|
|
1710
|
+
this.#refusing = true;
|
|
1711
|
+
await this.#inFlight.drained();
|
|
1605
1712
|
await this.driver.close();
|
|
1606
1713
|
}
|
|
1714
|
+
async waitForIdleTurn() {
|
|
1715
|
+
for (;;) {
|
|
1716
|
+
const startedBefore = this.#inFlight.started;
|
|
1717
|
+
await new Promise((resolve) => scheduleTimer(resolve, 0));
|
|
1718
|
+
if (!this.#inFlight.active && this.#inFlight.started === startedBefore) return;
|
|
1719
|
+
await this.#inFlight.drained();
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1607
1722
|
ensureCodecRegistryValidated() {
|
|
1608
1723
|
if (!this.codecRegistryValidated) {
|
|
1609
1724
|
validateCodecRegistryCompleteness(this.codecDescriptors, this.contract);
|
|
1610
1725
|
this.codecRegistryValidated = true;
|
|
1611
1726
|
}
|
|
1612
1727
|
}
|
|
1613
|
-
async verifyMarker() {
|
|
1614
|
-
const readResult = await this.familyAdapter.markerReader.readMarker(
|
|
1728
|
+
async verifyMarker(queryable) {
|
|
1729
|
+
const readResult = await this.familyAdapter.markerReader.readMarker(queryable);
|
|
1615
1730
|
const expectedStorageHash = this.contract.storage.storageHash;
|
|
1616
1731
|
const expectedProfileHash = this.contract.profileHash ?? null;
|
|
1617
1732
|
const expected = {
|