@prisma/orm-family-sql 8.0.0-rc.20-dev.7 → 8.0.0-rc.20-dev.9
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-ZrKjxwQe.mjs → aggregate-descriptor-registry-CkybswmO.mjs} +2 -2
- package/dist/{aggregate-descriptor-registry-ZrKjxwQe.mjs.map → aggregate-descriptor-registry-CkybswmO.mjs.map} +1 -1
- package/dist/{ast-YEMe_B8z.d.mts → ast-DcphKbq9.d.mts} +6 -8
- package/dist/{ast-YEMe_B8z.d.mts.map → ast-DcphKbq9.d.mts.map} +1 -1
- package/dist/{ast-D0miQ1B6.mjs → ast-e_02t9Nt.mjs} +2 -2
- package/dist/{ast-D0miQ1B6.mjs.map → ast-e_02t9Nt.mjs.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +7 -7
- package/dist/builder__runtime.mjs +5 -5
- package/dist/builder__types.d.mts +5 -5
- package/dist/{collection-methods-D2UnCS0S-DOy2qHYS.d.mts → collection-methods-D9CYfePl-DsDjYS6t.d.mts} +3 -3
- package/dist/{collection-methods-D2UnCS0S-DOy2qHYS.d.mts.map → collection-methods-D9CYfePl-DsDjYS6t.d.mts.map} +1 -1
- package/dist/collection-methods-FWiYjZ5j.d.mts +1 -0
- package/dist/{control-4J_KkH9m.d.mts → control-CffuMKgt.d.mts} +103 -9
- package/dist/control-CffuMKgt.d.mts.map +1 -0
- package/dist/{control-D1Er9MJE.mjs → control-D7N_L18S.mjs} +510 -152
- package/dist/control-D7N_L18S.mjs.map +1 -0
- package/dist/{control-adapter-BfyLe7rh-DKIl5Ft6.d.mts → control-adapter-BfyLe7rh-C_rrUuhb.d.mts} +4 -4
- package/dist/{control-adapter-BfyLe7rh-DKIl5Ft6.d.mts.map → control-adapter-BfyLe7rh-C_rrUuhb.d.mts.map} +1 -1
- package/dist/{control-adapter-cNZNO0Nc.d.mts → control-adapter-CZ84jQ_z.d.mts} +2 -2
- package/dist/{control-adapter-cNZNO0Nc.d.mts.map → control-adapter-CZ84jQ_z.d.mts.map} +1 -1
- package/dist/{db-D1d75IvM-D4mRDC6w.d.mts → db-D1d75IvM-D5CqruQz.d.mts} +10 -10
- package/dist/{db-D1d75IvM-D4mRDC6w.d.mts.map → db-D1d75IvM-D5CqruQz.d.mts.map} +1 -1
- package/dist/{ddl-types-By5mT2_S-CdaaFvsX.d.mts → ddl-types-BeA1kjV1-C4d5owxE.d.mts} +3 -3
- package/dist/{ddl-types-By5mT2_S-CdaaFvsX.d.mts.map → ddl-types-BeA1kjV1-C4d5owxE.d.mts.map} +1 -1
- package/dist/{diff-Bh3cSTWM.d.mts → diff-FNTO8gbI.d.mts} +2 -2
- package/dist/{diff-Bh3cSTWM.d.mts.map → diff-FNTO8gbI.d.mts.map} +1 -1
- package/dist/{exports-CGzFaakG-DWGJbXKM.mjs → exports-CGzFaakG-Dddm8emA.mjs} +5 -5
- package/dist/{exports-CGzFaakG-DWGJbXKM.mjs.map → exports-CGzFaakG-Dddm8emA.mjs.map} +1 -1
- package/dist/{expression-CieaNuRM-B1uVqxwd.d.mts → expression-BWRsWR6O-BrUVz0V2.d.mts} +4 -4
- package/dist/expression-BWRsWR6O-BrUVz0V2.d.mts.map +1 -0
- package/dist/{expression-6ld_ZQL6-fOuazzzm.d.mts → expression-C3F6gxZH-DrYNeDbh.d.mts} +4 -4
- package/dist/{expression-6ld_ZQL6-fOuazzzm.d.mts.map → expression-C3F6gxZH-DrYNeDbh.d.mts.map} +1 -1
- package/dist/expression-CQHy0GY7.d.mts +2 -0
- package/dist/{expression-impl-B-XNINxr-BhN2sysZ.mjs → expression-impl-DtbmFnnz-CUKzBisY.mjs} +3 -3
- package/dist/{expression-impl-B-XNINxr-BhN2sysZ.mjs.map → expression-impl-DtbmFnnz-CUKzBisY.mjs.map} +1 -1
- package/dist/family.d.mts +7 -7
- package/dist/family.mjs +4 -4
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +2 -2
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/{functions-EW-RrRn3.d.mts → functions-CQrsCHCj.d.mts} +3 -3
- package/dist/{functions-EW-RrRn3.d.mts.map → functions-CQrsCHCj.d.mts.map} +1 -1
- package/dist/{functions-CsOoN7I3.mjs → functions-D7lN5-JU.mjs} +3 -3
- package/dist/{functions-CsOoN7I3.mjs.map → functions-D7lN5-JU.mjs.map} +1 -1
- package/dist/{generator-functions-Cg5QkM46-D6M4ayK9.mjs → generator-functions-Cg5QkM46-C1ByFzyT.mjs} +2 -2
- package/dist/{generator-functions-Cg5QkM46-D6M4ayK9.mjs.map → generator-functions-Cg5QkM46-C1ByFzyT.mjs.map} +1 -1
- package/dist/{index-BvH9bNl_.d.mts → index-0qfR8_db.d.mts} +17 -17
- package/dist/{index-BvH9bNl_.d.mts.map → index-0qfR8_db.d.mts.map} +1 -1
- package/dist/index-reference-BVkoanQn.d.mts +1 -0
- package/dist/{index-reference-4wsdeB7v-DCwswK-q.d.mts → index-reference-YHvh6wAL-BAhOS7RC.d.mts} +3 -3
- package/dist/{index-reference-4wsdeB7v-DCwswK-q.d.mts.map → index-reference-YHvh6wAL-BAhOS7RC.d.mts.map} +1 -1
- package/dist/middleware-DYiOUIpn.d.mts +1 -0
- package/dist/{middleware-DHkW6pRr-DM6hd9iZ.d.mts → middleware-JfHt_Ax8-DKXbos9y.d.mts} +3 -3
- package/dist/{middleware-DHkW6pRr-DM6hd9iZ.d.mts.map → middleware-JfHt_Ax8-DKXbos9y.d.mts.map} +1 -1
- package/dist/{middleware-yBAfiVWn-DZO0vCRQ.mjs → middleware-qY3R0WsS-8GWtk_Bf.mjs} +3 -3
- package/dist/{middleware-yBAfiVWn-DZO0vCRQ.mjs.map → middleware-qY3R0WsS-8GWtk_Bf.mjs.map} +1 -1
- package/dist/{migration-D7inCpXQ.d.mts → migration-qalbcIUs.d.mts} +2 -2
- package/dist/{migration-D7inCpXQ.d.mts.map → migration-qalbcIUs.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +17 -17
- package/dist/orm-client.mjs +6 -6
- package/dist/{pack-CNrW7w8L.mjs → pack-DOTaBfUC.mjs} +2 -2
- package/dist/{pack-CNrW7w8L.mjs.map → pack-DOTaBfUC.mjs.map} +1 -1
- package/dist/{plan-Cr4azjnG-CuL8FqXC.d.mts → plan-CMqVpPq6-Bllx5Zpk.d.mts} +3 -3
- package/dist/{plan-Cr4azjnG-CuL8FqXC.d.mts.map → plan-CMqVpPq6-Bllx5Zpk.d.mts.map} +1 -1
- package/dist/plan-Cg0h96GD.d.mts +2 -0
- package/dist/{query-lane-context-BCEoKy0_-CzmyavC9.d.mts → query-lane-context-DLSXDsDK-pEiQmuYy.d.mts} +5 -5
- package/dist/{query-lane-context-BCEoKy0_-CzmyavC9.d.mts.map → query-lane-context-DLSXDsDK-pEiQmuYy.d.mts.map} +1 -1
- package/dist/query-lane-context-Dqs5qCXx.d.mts +1 -0
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +5 -5
- 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 +3 -3
- package/dist/relational-core__ast.mjs +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
- package/dist/relational-core__collection-methods.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +2 -2
- package/dist/relational-core__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__functions.mjs +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__middleware.mjs +1 -1
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts → sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts} +3 -3
- package/dist/sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts.map +1 -0
- package/dist/{transaction-state-DR3nKTmH-D29jmVE-.d.mts → transaction-state-DR3nKTmH-BIKF_fP6.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-D29jmVE-.d.mts.map → transaction-state-DR3nKTmH-BIKF_fP6.d.mts.map} +1 -1
- package/dist/{types-NTQsD2MS-xcLtvKO9.mjs → types-BkTuhW3Z-BJfTjcxS.mjs} +3 -5
- package/dist/{types-NTQsD2MS-xcLtvKO9.mjs.map → types-BkTuhW3Z-BJfTjcxS.mjs.map} +1 -1
- package/dist/{types-COXfSNOP-GD5gtZcQ.d.mts → types-COXfSNOP-DcuULeD9.d.mts} +2 -2
- package/dist/{types-COXfSNOP-GD5gtZcQ.d.mts.map → types-COXfSNOP-DcuULeD9.d.mts.map} +1 -1
- package/dist/types-CvmPNREJ.d.mts +1 -0
- package/dist/{types-TXO7x1BA-CYYIY8NI.d.mts → types-NgqqVAo5-Be_uYGQx.d.mts} +6 -6
- package/dist/{types-TXO7x1BA-CYYIY8NI.d.mts.map → types-NgqqVAo5-Be_uYGQx.d.mts.map} +1 -1
- package/dist/{types-DriMIMNQ-BkbsW7w3.d.mts → types-ijhejJhK-EdACW3bY.d.mts} +5 -8
- package/dist/{types-DriMIMNQ-BkbsW7w3.d.mts.map → types-ijhejJhK-EdACW3bY.d.mts.map} +1 -1
- package/dist/{util-BBgcP3gI-CpL-0VuC.mjs → util-DixeJBri-Cad7x5ec.mjs} +5 -7
- package/dist/{util-BBgcP3gI-CpL-0VuC.mjs.map → util-DixeJBri-Cad7x5ec.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/collection-methods-BB8YH69u.d.mts +0 -1
- package/dist/control-4J_KkH9m.d.mts.map +0 -1
- package/dist/control-D1Er9MJE.mjs.map +0 -1
- package/dist/expression-CieaNuRM-B1uVqxwd.d.mts.map +0 -1
- package/dist/expression-D8HstQiB.d.mts +0 -2
- package/dist/index-reference-D8ewQRJr.d.mts +0 -1
- package/dist/middleware-gqy3l13N.d.mts +0 -1
- package/dist/plan-Di6Gs2JD.d.mts +0 -2
- package/dist/query-lane-context-VqH0mS9B.d.mts +0 -1
- package/dist/sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts.map +0 -1
- package/dist/types-B9wSEUsV.d.mts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as aggregateFnNames, H as frozenCodecRef, U as isAggregateFn } from "./types-
|
|
1
|
+
import { B as aggregateFnNames, H as frozenCodecRef, U as isAggregateFn } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
|
|
2
2
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { aggregateDescriptorKey, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, settleAggregateOverloads } from "@prisma/orm-framework/components/components";
|
|
@@ -123,4 +123,4 @@ function describeCandidate(value) {
|
|
|
123
123
|
//#endregion
|
|
124
124
|
export { isSqlAggregateDescriptor as n, buildSqlAggregateDescriptorRegistry as t };
|
|
125
125
|
|
|
126
|
-
//# sourceMappingURL=aggregate-descriptor-registry-
|
|
126
|
+
//# sourceMappingURL=aggregate-descriptor-registry-CkybswmO.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregate-descriptor-registry-ZrKjxwQe.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs"],"sourcesContent":["import { B as aggregateFnNames, H as isAggregateFn, Y as frozenCodecRef } from \"../types-NTQsD2MS.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/** The descriptor's own answer for a result set carrying no row, carried into resolution unchanged. */\nfunction resultNullability(descriptor) {\n\treturn descriptor.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultWire: descriptor.emptyResultWire\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 — plus, for a non-nullable result, the empty-result value; 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, adding `emptyResultWire` where `nullable` is false.\",\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\t...resultNullability(descriptor),\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\t...resultNullability(descriptor),\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;;AAEA,SAAS,kBAAkB,YAAY;CACtC,OAAO,WAAW,WAAW,EAAE,UAAU,KAAK,IAAI;EACjD,UAAU;EACV,iBAAiB,WAAW;CAC7B;AACD;;;;;;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,kBAAk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ports/aggregate-descriptor-registry.mjs"],"sourcesContent":["import { B as aggregateFnNames, H as isAggregateFn, Y as frozenCodecRef } from \"../types-BkTuhW3Z.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/** The descriptor's own answer for a result set carrying no row, carried into resolution unchanged. */\nfunction resultNullability(descriptor) {\n\treturn descriptor.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultWire: descriptor.emptyResultWire\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 — plus, for a non-nullable result, the empty-result value; 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, adding `emptyResultWire` where `nullable` is false.\",\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\t...resultNullability(descriptor),\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\t...resultNullability(descriptor),\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;;AAEA,SAAS,kBAAkB,YAAY;CACtC,OAAO,WAAW,WAAW,EAAE,UAAU,KAAK,IAAI;EACjD,UAAU;EACV,iBAAiB,WAAW;CAC7B;AACD;;;;;;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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as LockWaitPolicy, gt as LoweredStatement, h as AnyQueryAst, m as AnyParamRef } from "./types-
|
|
1
|
+
import { Dt as ProjectionItem, E as CodecRef$1, ft as LockWaitPolicy, gt as LoweredStatement, h as AnyQueryAst, m as AnyParamRef } from "./types-ijhejJhK-EdACW3bY.mjs";
|
|
2
2
|
import { c as SqlQueryable } from "./driver-types-DRsYeq3j-BimeCnUk.mjs";
|
|
3
|
-
import "./ddl-types-
|
|
3
|
+
import "./ddl-types-BeA1kjV1-C4d5owxE.mjs";
|
|
4
4
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { CodecCallContext, CodecDescriptorTemplateImpl, CodecImpl, CodecInstanceContext, CodecLookupWithDescriptors, DataTypeValue } from "@prisma/orm-framework/components/codec";
|
|
6
6
|
import { ColumnDefaultLiteralInputValue, ContractMarkerRecord, JsonValue } from "@prisma/orm-framework/contract/types";
|
|
@@ -278,15 +278,13 @@ declare function compact<T extends Record<string, unknown>>(o: T): T;
|
|
|
278
278
|
* Walks an AST's parameter references in first-encounter order and dedupes
|
|
279
279
|
* by ParamRef identity. The single canonical helper used by every consumer
|
|
280
280
|
* that aligns `plan.params` with metadata-by-index — the SQL builder lane,
|
|
281
|
-
* the SQL ORM client, the SQL runtime encoder, and the Postgres
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
* SQLite's `?`-placeholder renderer intentionally does NOT use this helper
|
|
285
|
-
* because it needs one params entry per occurrence in the SQL.
|
|
281
|
+
* the SQL ORM client, the SQL runtime encoder, and the Postgres `$N` and
|
|
282
|
+
* SQLite `?N` renderers' index maps — so the walks cannot drift in dedupe
|
|
283
|
+
* semantics.
|
|
286
284
|
*/
|
|
287
285
|
declare function collectOrderedParamRefs(ast: AnyQueryAst): ReadonlyArray<AnyParamRef>;
|
|
288
286
|
/** Whether a projection item's top-level expression is an aggregate, `json_agg` or window function. Nested expressions are not inspected. */
|
|
289
287
|
declare function isAggregateProjection(item: ProjectionItem): boolean;
|
|
290
288
|
//#endregion
|
|
291
289
|
export { sqlIntDescriptor as $, SqlTextDescriptor as A, lockStrengthCapabilities as B, SqlFloatCodec as C, SqlRawCodec as D, SqlIntDescriptor as E, encodeListLiteralDefault as F, sqlCharDescriptor as G, missingCapability as H, encodeLiteralDefault as I, sqlFloatDecode as J, sqlCharEncode as K, isAggregateProjection as L, SqlVarcharDescriptor as M, collectOrderedParamRefs as N, SqlRawDescriptor as O, compact as P, sqlIntDecode as Q, lockIncompatible as R, SqlCharDescriptor as S, SqlIntCodec as T, sqlCharColumn as U, lockWaitPolicyOf as V, sqlCharDecode as W, sqlFloatEncode as X, sqlFloatDescriptor as Y, sqlIntColumn as Z, SQL_INT_CODEC_ID as _, EncodedLiteralDefault as a, sqlTextDescriptor as at, SQL_VARCHAR_CODEC_ID as b, LockOptionCapabilities as c, sqlVarcharDecode as ct, LockWaitRequest as d, sqlIntEncode as et, Lowerer as f, SQL_FLOAT_CODEC_ID as g, SQL_CHAR_CODEC_ID as h, CapabilityRequirement as i, sqlTextDecode as it, SqlVarcharCodec as j, SqlTextCodec as k, LockStrengthCapabilities as l, sqlVarcharDescriptor as lt, MarkerReadResult as m, AdapterProfile as n, sqlRawDescriptor as nt, LiteralDefaultColumn as o, sqlTextEncode as ot, LowererContext as p, sqlFloatColumn as q, AdapterTarget as r, sqlTextColumn as rt, LockConflict as s, sqlVarcharColumn as st, Adapter as t, sqlRawColumn as tt, LockWaitOptions as u, sqlVarcharEncode as ut, SQL_RAW_CODEC_ID as v, SqlFloatDescriptor as w, SqlCharCodec as x, SQL_TEXT_CODEC_ID as y, lockOptionCapabilities as z };
|
|
292
|
-
//# sourceMappingURL=ast-
|
|
290
|
+
//# sourceMappingURL=ast-DcphKbq9.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-
|
|
1
|
+
{"version":3,"file":"ast-DcphKbq9.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/ast.d.mts"],"mappings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iBAAiB;EACjD,OAAO,gBAAgB,MAAM,mBAAqB;EAClD,SAAS,eAAe,MAAM,mBAAqB;EACnD,kBAAkB,OAAO;EACzB,gBAAgB,iBAAiB;;cAErB,yBAAyB,4BAA4B;WACxD;WACA;WACA;WACA;EACT,QAAQ,SAAS,aAAa,KAAK,yBAAyB;;cAEhD,kBAAkB;cAClB,eAAe,+DAA+D,WAAW;EACrG;;;;iBAIe,QAAQ,UAAU,yBAAyB,GAAG,IAAI;;;;;;;;;iBASlD,wBAAwB,KAAK,cAAc,cAAc;;iBAEzD,sBAAsB,MAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as frozenCodecRef } from "./types-
|
|
1
|
+
import { H as frozenCodecRef } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
|
|
2
2
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { withoutTrailing } from "@prisma/orm-framework/utils/text";
|
|
@@ -369,4 +369,4 @@ const sqlRawColumn = (sql) => column(sqlRawDescriptor.factory({ sql }), sqlRawDe
|
|
|
369
369
|
//#endregion
|
|
370
370
|
export { sqlCharDecode as A, sqlIntEncode as B, encodeLiteralDefault as C, lockWaitPolicyOf as D, lockStrengthCapabilities as E, sqlFloatDescriptor as F, sqlTextDescriptor as G, sqlRawDescriptor as H, sqlFloatEncode as I, sqlVarcharDecode as J, sqlTextEncode as K, sqlIntColumn as L, sqlCharEncode as M, sqlFloatColumn as N, missingCapability as O, sqlFloatDecode as P, sqlIntDecode as R, encodeListLiteralDefault as S, lockOptionCapabilities as T, sqlTextColumn as U, sqlRawColumn as V, sqlTextDecode as W, sqlVarcharEncode as X, sqlVarcharDescriptor as Y, SqlRawDescriptor as _, SQL_FLOAT_CODEC_ID as a, SqlVarcharCodec as b, SQL_TEXT_CODEC_ID as c, SqlCharDescriptor as d, SqlFloatCodec as f, SqlRawCodec as g, SqlIntDescriptor as h, SQL_CHAR_CODEC_ID as i, sqlCharDescriptor as j, sqlCharColumn as k, SQL_VARCHAR_CODEC_ID as l, SqlIntCodec as m, JsonDocumentProjection as n, SQL_INT_CODEC_ID as o, SqlFloatDescriptor as p, sqlVarcharColumn as q, NativeJsonValueProjection as r, SQL_RAW_CODEC_ID as s, CodecJsonValueProjection as t, SqlCharCodec as u, SqlTextCodec as v, lockIncompatible as w, SqlVarcharDescriptor as x, SqlTextDescriptor as y, sqlIntDescriptor as z };
|
|
371
371
|
|
|
372
|
-
//# sourceMappingURL=ast-
|
|
372
|
+
//# sourceMappingURL=ast-e_02t9Nt.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-D0miQ1B6.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/ast.mjs"],"sourcesContent":["import { A as ParamRef, B as aggregateFnNames, C as LiteralExpr, D as OperationExpr, E as NullCheckExpr, F as SelectAst, G as isQueryAst, H as isAggregateFn, I as SubqueryExpr, J as whereExprKinds, K as isWhereExpr, L as TableSource, M as ProjectionItem, N as RawExpr, O as OrExpr, P as RawQueryAst, R as UpdateAst, S as ListExpression, T as NotExpr, U as isOrderByDirection, V as checkLimitOffset, W as isOrderByNulls, Y as frozenCodecRef, _ 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 PreparedParamRef, k as OrderByItem, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, q as queryAstKinds, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as LockingClause, x as JsonObjectExpr, y as JoinAst, z as WindowFuncExpr } from \"../types-NTQsD2MS.mjs\";\nimport { a as DdlColumn, c as ForeignKeyConstraint, d as PrimaryKeyConstraint, f as UniqueConstraint, i as CheckExpressionConstraint, l as FunctionColumnDefault, n as opaqueSql, o as DdlColumnDefault, p as isDdlNode, r as renderOpaqueSql, s as DdlNode, t as OpaqueSql, u as LiteralColumnDefault } from \"../opaque-sql-Dset3kln.mjs\";\nimport { n as compact, r as isAggregateProjection, t as collectOrderedParamRefs } from \"../util-BBgcP3gI.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, floatToJson, readContractValue, readJsonFloat, readJsonInteger } from \"@internal/framework-components/codec\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { withoutTrailing } from \"@internal/utils/text\";\n//#region src/ast/ddl-default.ts\n/**\n* Reads a column's literal default as a value of the column's data type, converts it with the column's codec, built with its type parameters, and writes it with `toWire` for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.\n*\n* A `Date` is the one authored value JSON has no notation for, so the codec reads it into a value of the column's type with `toDataTypeValue`, and the Date it reads back from that value is encoded: the type and the codec check it as they check any other default. A `null` the type or codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a type that stores `null` (a JSON type) makes it the JSON value null. Any other value either refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.\n*/\nasync function encodeLiteralDefault(codecLookup, codecRef, value, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\tconst refused = (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause);\n\tif (value instanceof Date) return encodeDate(codec, value, refused);\n\treturn encodeWithCodec(codec, codecRef, value, refused);\n}\nasync function encodeDate(codec, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = codec.fromDataTypeValue(codec.toDataTypeValue(value));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\n}\n/**\n* Reads and encodes each element of a list column's literal default with the column's codec, as {@link encodeLiteralDefault} does a single value, so a `null` element the codec refuses is SQL NULL. `undefined` when no codec descriptor has the column's codec id. An element the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column and the element's 1-based position.\n*/\nasync function encodeListLiteralDefault(codecLookup, codecRef, elements, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\treturn Promise.all(elements.map((element, index) => encodeWithCodec(codec, codecRef, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));\n}\nasync function encodeWithCodec(codec, codecRef, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = readContractValue(codec, value, codecRef.typeParams);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tif (value === null) return { kind: \"sql-null\" };\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\n}\nfunction refusedDefault(where, codecId, value, elementPosition, cause) {\n\tconst reason = cause instanceof Error ? cause.message : String(cause);\n\tconst subject = elementPosition === void 0 ? \"default\" : `default (element ${elementPosition})`;\n\treturn structuredError(\"CONTRACT.DEFAULT_INVALID\", `Column \"${where.table}\".\"${where.column}\" has a ${subject} its codec ${codecId} refuses: ${reason}`, {\n\t\twhy: \"A contract.json that an earlier version emitted, or a migration.ts it planned, can hold a default that this version's codec refuses, and so can either file after a hand edit.\",\n\t\tfix: \"If contract.json holds the default, emit the contract again with this version, and correct the default in the contract source if emit refuses it. If a migration.ts sets it, correct it in that file.\",\n\t\tcause,\n\t\tmeta: {\n\t\t\ttable: where.table,\n\t\t\tcolumn: where.column,\n\t\t\tcodecId,\n\t\t\tvalue,\n\t\t\t...ifDefined(\"elementPosition\", elementPosition),\n\t\t\treason: \"codec-refused-default\"\n\t\t}\n\t});\n}\n//#endregion\n//#region src/ast/json-value-projection.ts\nvar JsonValueProjection = class {\n\tvalue;\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n\tfold(folder) {\n\t\treturn this.value.fold(folder);\n\t}\n\tcollectColumnRefs() {\n\t\treturn this.value.collectColumnRefs();\n\t}\n\tcollectParamRefs() {\n\t\treturn this.value.collectParamRefs();\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nvar CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {\n\tkind = \"codec\";\n\tcodec;\n\tconstructor(value, codec) {\n\t\tsuper(value);\n\t\tthis.codec = frozenCodecRef(codec);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.codec(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);\n\t}\n};\nvar NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {\n\tkind = \"native\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.native(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new NativeJsonValueProjection(this.value.rewrite(rewriter));\n\t}\n};\nvar JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {\n\tkind = \"document\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.document(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new JsonDocumentProjection(this.value.rewrite(rewriter));\n\t}\n};\n//#endregion\n//#region src/ast/locking.ts\n/** The `ORM.LOCK_INCOMPATIBLE` error for a lock refused because of `conflict`. */\nfunction lockIncompatible(conflict, message) {\n\treturn structuredError(\"ORM.LOCK_INCOMPATIBLE\", message, { meta: { conflict } });\n}\n/** The capability each lock strength needs. */\nconst lockStrengthCapabilities = {\n\tforUpdate: { sql: { forUpdate: true } },\n\tforNoKeyUpdate: { postgres: { forNoKeyUpdate: true } },\n\tforShare: { sql: { forShare: true } },\n\tforKeyShare: { postgres: { forKeyShare: true } }\n};\n/** The capability each locking option needs; the wait-policy keys equal the `LockWaitPolicy` values. */\nconst lockOptionCapabilities = {\n\tof: { sql: { lockOf: true } },\n\tnowait: { sql: { lockNowait: true } },\n\tskipLocked: { sql: { lockSkipLocked: true } }\n};\n/** The first flag in `requirement` that `capabilities` does not report as `true`, as `group.flag`. */\nfunction missingCapability(capabilities, requirement) {\n\tfor (const [group, flags] of Object.entries(requirement)) for (const flag of Object.keys(flags)) if (capabilities[group]?.[flag] !== true) return `${group}.${flag}`;\n}\n/** Turns `{ nowait, skipLocked }` into a wait policy, refusing both together with `ORM.ARGUMENT_INVALID`. */\nfunction lockWaitPolicyOf(methodName, options) {\n\tif (options?.nowait && options.skipLocked) throw structuredError(\"ORM.ARGUMENT_INVALID\", `${methodName}() takes nowait or skipLocked, not both`, { meta: { method: methodName } });\n\tif (options?.nowait) return \"nowait\";\n\tif (options?.skipLocked) return \"skipLocked\";\n}\n//#endregion\n//#region src/ast/sql-codec-helpers.ts\n/**\n* Shared encode/decode constants and codec id literals for the five SQL base codecs (`sql/char@1`, `sql/varchar@1`, `sql/int@1`, `sql/float@1`, `sql/text@1`).\n*\n* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.\n*/\nconst SQL_CHAR_CODEC_ID = \"sql/char@1\";\nconst SQL_VARCHAR_CODEC_ID = \"sql/varchar@1\";\nconst SQL_INT_CODEC_ID = \"sql/int@1\";\nconst SQL_FLOAT_CODEC_ID = \"sql/float@1\";\nconst SQL_TEXT_CODEC_ID = \"sql/text@1\";\nconst SQL_RAW_CODEC_ID = \"sql/raw@1\";\nconst sqlCharEncode = (value) => value;\n/** A `character` value as the database returns it, without the spaces that pad it to its length. Only spaces pad it, so a trailing tab or newline is part of the value. */\nconst sqlCharDecode = (wire) => withoutTrailing(wire, \" \");\nconst sqlVarcharEncode = (value) => value;\nconst sqlVarcharDecode = (wire) => wire;\nconst sqlIntEncode = (value) => value;\nconst sqlIntDecode = (wire) => wire;\nconst sqlFloatEncode = (value) => value;\nconst sqlFloatDecode = (wire) => wire;\nconst sqlTextEncode = (value) => value;\nconst sqlTextDecode = (wire) => wire;\n//#endregion\n//#region src/ast/sql-codecs.ts\n/** A family codec has no data type of its own, so only a target that adapts it, naming its data type, builds its codec. A column helper below names the codec for a contract; the target's adapted descriptor builds it. */\nfunction unadapted(codecId) {\n\tthrow new InternalError(`${codecId} is a SQL family template. A target adapts it with its own data type and builds its codecs; the template builds none.`);\n}\nvar SqlTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlTextEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlTextDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlTextDescriptor = new SqlTextDescriptor();\nconst sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);\nvar SqlIntCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlIntEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlIntDecode(wire);\n\t}\n\t/** A `number` holds an integer exactly only within the safe integer range. */\n\tfromDataTypeValue(value) {\n\t\treturn readJsonInteger(this.id, value.value, SAFE_INTEGER_RANGE);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlIntDescriptor = new SqlIntDescriptor();\nconst sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);\nvar SqlFloatCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlFloatEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlFloatDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloat(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(floatToJson(input));\n\t}\n};\nvar SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_FLOAT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlFloatDescriptor = new SqlFloatDescriptor();\nconst sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);\nvar SqlCharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlCharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlCharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_CHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlCharDescriptor = new SqlCharDescriptor();\nconst sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);\nvar SqlVarcharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlVarcharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlVarcharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_VARCHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlVarcharDescriptor = new SqlVarcharDescriptor();\nconst sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);\nfunction isJsonValue(value) {\n\tif (value === null) return true;\n\tswitch (typeof value) {\n\t\tcase \"string\":\n\t\tcase \"boolean\": return true;\n\t\tcase \"number\": return Number.isFinite(value);\n\t\tcase \"object\":\n\t\t\tif (Array.isArray(value)) return value.every(isJsonValue);\n\t\t\treturn Object.getPrototypeOf(value) === Object.prototype && Object.values(value).every(isJsonValue);\n\t\tdefault: return false;\n\t}\n}\n/**\n* The codec of a raw column, whose type no other data type claims. Values pass through unchanged and\n* are typed `unknown`, since nothing is known about them beyond what the database returns. A raw\n* column has no literal values, but that is its data type's rule: the data type's reader refuses\n* every value, so `toDataTypeValue` refuses every literal. ADR 273.\n*/\nvar SqlRawCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\tif (isJsonValue(input)) return this.dataTypeValueOf(input);\n\t\tthrow structuredError(\"RUNTIME.ENCODE_FAILED\", `${this.id} writes only JSON values as JSON`, { meta: { codecId: this.id } });\n\t}\n};\nvar SqlRawDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_RAW_CODEC_ID;\n\ttraits = [];\n\tenumRefusal = \"A raw column has a type Prisma does not interpret, so no member can be written as one of its values. No enum can use the raw codec; use a text enum instead.\";\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlRawDescriptor = new SqlRawDescriptor();\nconst sqlRawColumn = (sql) => column(sqlRawDescriptor.factory({ sql }), sqlRawDescriptor.codecId, { sql });\n//#endregion\nexport { 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, LockingClause, NativeJsonValueProjection, NotExpr, NullCheckExpr, OpaqueSql, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawQueryAst, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlRawCodec, SqlRawDescriptor, SqlTextCodec, SqlTextDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, aggregateFnNames, checkLimitOffset, collectOrderedParamRefs, compact, encodeListLiteralDefault, encodeLiteralDefault, frozenCodecRef, isAggregateFn, isAggregateProjection, isDdlNode, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability, opaqueSql, queryAstKinds, renderOpaqueSql, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlRawColumn, sqlRawDescriptor, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, whereExprKinds };\n\n//# sourceMappingURL=ast.mjs.map"],"mappings":";;;;;;;;;;;;AAcA,eAAe,qBAAqB,aAAa,UAAU,OAAO,OAAO;CACxE,MAAM,QAAQ,YAAY,aAAa,QAAQ;CAC/C,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;CAClC,MAAM,WAAW,UAAU,eAAe,OAAO,SAAS,SAAS,OAAO,KAAK,GAAG,KAAK;CACvF,IAAI,iBAAiB,MAAM,OAAO,WAAW,OAAO,OAAO,OAAO;CAClE,OAAO,gBAAgB,OAAO,UAAU,OAAO,OAAO;AACvD;AACA,eAAe,WAAW,OAAO,OAAO,SAAS;CAChD,IAAI;CACJ,IAAI;EACH,UAAU,MAAM,kBAAkB,MAAM,gBAAgB,KAAK,CAAC;CAC/D,SAAS,OAAO;EACf,IAAI,gBAAgB,KAAK,GAAG,MAAM;EAClC,MAAM,QAAQ,KAAK;CACpB;CACA,OAAO;EACN,MAAM;EACN,MAAM,MAAM,MAAM,OAAO,SAAS,CAAC,CAAC;CACrC;AACD;;;;AAIA,eAAe,yBAAyB,aAAa,UAAU,UAAU,OAAO;CAC/E,MAAM,QAAQ,YAAY,aAAa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,qBAAqB,QAAQ,MAAM,GAAG,qBAAqB,SAAS,MAAM;AAC3H,SAAS,YAAY,OAAO;CAC3B,IAAI,UAAU,MAAM,OAAO;CAC3B,QAAQ,OAAO,OAAf;EACC,KAAK;EACL,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,OAAO,OAAO,SAAS,KAAK;EAC3C,KAAK;GACJ,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,MAAM,WAAW;GACxD,OAAO,OAAO,eAAe,KAAK,MAAM,OAAO,aAAa,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,WAAW;EACnG,SAAS,OAAO;CACjB;AACD;;;;;;;AAOA,IAAI,cAAc,cAAc,UAAU;CACzC,MAAM,OAAO,OAAO,MAAM;EACzB,OAAO;CACR;CACA,MAAM,SAAS,MAAM,MAAM;EAC1B,OAAO;CACR;CACA,kBAAkB,OAAO;EACxB,OAAO,MAAM;CACd;CACA,gBAAgB,OAAO;EACtB,IAAI,YAAY,KAAK,GAAG,OAAO,KAAK,gBAAgB,KAAK;EACzD,MAAM,gBAAgB,yBAAyB,GAAG,KAAK,GAAG,mCAAmC,EAAE,MAAM,EAAE,SAAS,KAAK,GAAG,EAAE,CAAC;CAC5H;AACD;AACA,IAAI,mBAAmB,cAAc,4BAA4B;CAChE,UAAU;CACV,SAAS,CAAC;CACV,cAAc;CACd,eAAe,KAAK;CACpB,QAAQ,SAAS;EAChB,aAAa,UAAU,KAAK,OAAO;CACpC;AACD;AACA,MAAM,mBAAmB,IAAI,iBAAiB;AAC9C,MAAM,gBAAgB,QAAQ,OAAO,iBAAiB,QAAQ,EAAE,IAAI,CAAC,GAAG,iBAAiB,SAAS,EAAE,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"ast-e_02t9Nt.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/ast.mjs"],"sourcesContent":["import { A as ParamRef, B as aggregateFnNames, C as LiteralExpr, D as OperationExpr, E as NullCheckExpr, F as SelectAst, G as isQueryAst, H as isAggregateFn, I as SubqueryExpr, J as whereExprKinds, K as isWhereExpr, L as TableSource, M as ProjectionItem, N as RawExpr, O as OrExpr, P as RawQueryAst, R as UpdateAst, S as ListExpression, T as NotExpr, U as isOrderByDirection, V as checkLimitOffset, W as isOrderByNulls, Y as frozenCodecRef, _ 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 PreparedParamRef, k as OrderByItem, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, q as queryAstKinds, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as LockingClause, x as JsonObjectExpr, y as JoinAst, z as WindowFuncExpr } from \"../types-BkTuhW3Z.mjs\";\nimport { a as DdlColumn, c as ForeignKeyConstraint, d as PrimaryKeyConstraint, f as UniqueConstraint, i as CheckExpressionConstraint, l as FunctionColumnDefault, n as opaqueSql, o as DdlColumnDefault, p as isDdlNode, r as renderOpaqueSql, s as DdlNode, t as OpaqueSql, u as LiteralColumnDefault } from \"../opaque-sql-Dset3kln.mjs\";\nimport { n as compact, r as isAggregateProjection, t as collectOrderedParamRefs } from \"../util-DixeJBri.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, floatToJson, readContractValue, readJsonFloat, readJsonInteger } from \"@internal/framework-components/codec\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { withoutTrailing } from \"@internal/utils/text\";\n//#region src/ast/ddl-default.ts\n/**\n* Reads a column's literal default as a value of the column's data type, converts it with the column's codec, built with its type parameters, and writes it with `toWire` for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.\n*\n* A `Date` is the one authored value JSON has no notation for, so the codec reads it into a value of the column's type with `toDataTypeValue`, and the Date it reads back from that value is encoded: the type and the codec check it as they check any other default. A `null` the type or codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a type that stores `null` (a JSON type) makes it the JSON value null. Any other value either refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.\n*/\nasync function encodeLiteralDefault(codecLookup, codecRef, value, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\tconst refused = (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause);\n\tif (value instanceof Date) return encodeDate(codec, value, refused);\n\treturn encodeWithCodec(codec, codecRef, value, refused);\n}\nasync function encodeDate(codec, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = codec.fromDataTypeValue(codec.toDataTypeValue(value));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\n}\n/**\n* Reads and encodes each element of a list column's literal default with the column's codec, as {@link encodeLiteralDefault} does a single value, so a `null` element the codec refuses is SQL NULL. `undefined` when no codec descriptor has the column's codec id. An element the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column and the element's 1-based position.\n*/\nasync function encodeListLiteralDefault(codecLookup, codecRef, elements, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\treturn Promise.all(elements.map((element, index) => encodeWithCodec(codec, codecRef, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));\n}\nasync function encodeWithCodec(codec, codecRef, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = readContractValue(codec, value, codecRef.typeParams);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tif (value === null) return { kind: \"sql-null\" };\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\n}\nfunction refusedDefault(where, codecId, value, elementPosition, cause) {\n\tconst reason = cause instanceof Error ? cause.message : String(cause);\n\tconst subject = elementPosition === void 0 ? \"default\" : `default (element ${elementPosition})`;\n\treturn structuredError(\"CONTRACT.DEFAULT_INVALID\", `Column \"${where.table}\".\"${where.column}\" has a ${subject} its codec ${codecId} refuses: ${reason}`, {\n\t\twhy: \"A contract.json that an earlier version emitted, or a migration.ts it planned, can hold a default that this version's codec refuses, and so can either file after a hand edit.\",\n\t\tfix: \"If contract.json holds the default, emit the contract again with this version, and correct the default in the contract source if emit refuses it. If a migration.ts sets it, correct it in that file.\",\n\t\tcause,\n\t\tmeta: {\n\t\t\ttable: where.table,\n\t\t\tcolumn: where.column,\n\t\t\tcodecId,\n\t\t\tvalue,\n\t\t\t...ifDefined(\"elementPosition\", elementPosition),\n\t\t\treason: \"codec-refused-default\"\n\t\t}\n\t});\n}\n//#endregion\n//#region src/ast/json-value-projection.ts\nvar JsonValueProjection = class {\n\tvalue;\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n\tfold(folder) {\n\t\treturn this.value.fold(folder);\n\t}\n\tcollectColumnRefs() {\n\t\treturn this.value.collectColumnRefs();\n\t}\n\tcollectParamRefs() {\n\t\treturn this.value.collectParamRefs();\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nvar CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {\n\tkind = \"codec\";\n\tcodec;\n\tconstructor(value, codec) {\n\t\tsuper(value);\n\t\tthis.codec = frozenCodecRef(codec);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.codec(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);\n\t}\n};\nvar NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {\n\tkind = \"native\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.native(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new NativeJsonValueProjection(this.value.rewrite(rewriter));\n\t}\n};\nvar JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {\n\tkind = \"document\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.document(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new JsonDocumentProjection(this.value.rewrite(rewriter));\n\t}\n};\n//#endregion\n//#region src/ast/locking.ts\n/** The `ORM.LOCK_INCOMPATIBLE` error for a lock refused because of `conflict`. */\nfunction lockIncompatible(conflict, message) {\n\treturn structuredError(\"ORM.LOCK_INCOMPATIBLE\", message, { meta: { conflict } });\n}\n/** The capability each lock strength needs. */\nconst lockStrengthCapabilities = {\n\tforUpdate: { sql: { forUpdate: true } },\n\tforNoKeyUpdate: { postgres: { forNoKeyUpdate: true } },\n\tforShare: { sql: { forShare: true } },\n\tforKeyShare: { postgres: { forKeyShare: true } }\n};\n/** The capability each locking option needs; the wait-policy keys equal the `LockWaitPolicy` values. */\nconst lockOptionCapabilities = {\n\tof: { sql: { lockOf: true } },\n\tnowait: { sql: { lockNowait: true } },\n\tskipLocked: { sql: { lockSkipLocked: true } }\n};\n/** The first flag in `requirement` that `capabilities` does not report as `true`, as `group.flag`. */\nfunction missingCapability(capabilities, requirement) {\n\tfor (const [group, flags] of Object.entries(requirement)) for (const flag of Object.keys(flags)) if (capabilities[group]?.[flag] !== true) return `${group}.${flag}`;\n}\n/** Turns `{ nowait, skipLocked }` into a wait policy, refusing both together with `ORM.ARGUMENT_INVALID`. */\nfunction lockWaitPolicyOf(methodName, options) {\n\tif (options?.nowait && options.skipLocked) throw structuredError(\"ORM.ARGUMENT_INVALID\", `${methodName}() takes nowait or skipLocked, not both`, { meta: { method: methodName } });\n\tif (options?.nowait) return \"nowait\";\n\tif (options?.skipLocked) return \"skipLocked\";\n}\n//#endregion\n//#region src/ast/sql-codec-helpers.ts\n/**\n* Shared encode/decode constants and codec id literals for the five SQL base codecs (`sql/char@1`, `sql/varchar@1`, `sql/int@1`, `sql/float@1`, `sql/text@1`).\n*\n* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.\n*/\nconst SQL_CHAR_CODEC_ID = \"sql/char@1\";\nconst SQL_VARCHAR_CODEC_ID = \"sql/varchar@1\";\nconst SQL_INT_CODEC_ID = \"sql/int@1\";\nconst SQL_FLOAT_CODEC_ID = \"sql/float@1\";\nconst SQL_TEXT_CODEC_ID = \"sql/text@1\";\nconst SQL_RAW_CODEC_ID = \"sql/raw@1\";\nconst sqlCharEncode = (value) => value;\n/** A `character` value as the database returns it, without the spaces that pad it to its length. Only spaces pad it, so a trailing tab or newline is part of the value. */\nconst sqlCharDecode = (wire) => withoutTrailing(wire, \" \");\nconst sqlVarcharEncode = (value) => value;\nconst sqlVarcharDecode = (wire) => wire;\nconst sqlIntEncode = (value) => value;\nconst sqlIntDecode = (wire) => wire;\nconst sqlFloatEncode = (value) => value;\nconst sqlFloatDecode = (wire) => wire;\nconst sqlTextEncode = (value) => value;\nconst sqlTextDecode = (wire) => wire;\n//#endregion\n//#region src/ast/sql-codecs.ts\n/** A family codec has no data type of its own, so only a target that adapts it, naming its data type, builds its codec. A column helper below names the codec for a contract; the target's adapted descriptor builds it. */\nfunction unadapted(codecId) {\n\tthrow new InternalError(`${codecId} is a SQL family template. A target adapts it with its own data type and builds its codecs; the template builds none.`);\n}\nvar SqlTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlTextEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlTextDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlTextDescriptor = new SqlTextDescriptor();\nconst sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);\nvar SqlIntCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlIntEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlIntDecode(wire);\n\t}\n\t/** A `number` holds an integer exactly only within the safe integer range. */\n\tfromDataTypeValue(value) {\n\t\treturn readJsonInteger(this.id, value.value, SAFE_INTEGER_RANGE);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlIntDescriptor = new SqlIntDescriptor();\nconst sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);\nvar SqlFloatCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlFloatEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlFloatDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloat(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(floatToJson(input));\n\t}\n};\nvar SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_FLOAT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlFloatDescriptor = new SqlFloatDescriptor();\nconst sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);\nvar SqlCharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlCharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlCharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_CHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlCharDescriptor = new SqlCharDescriptor();\nconst sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);\nvar SqlVarcharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlVarcharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlVarcharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_VARCHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlVarcharDescriptor = new SqlVarcharDescriptor();\nconst sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);\nfunction isJsonValue(value) {\n\tif (value === null) return true;\n\tswitch (typeof value) {\n\t\tcase \"string\":\n\t\tcase \"boolean\": return true;\n\t\tcase \"number\": return Number.isFinite(value);\n\t\tcase \"object\":\n\t\t\tif (Array.isArray(value)) return value.every(isJsonValue);\n\t\t\treturn Object.getPrototypeOf(value) === Object.prototype && Object.values(value).every(isJsonValue);\n\t\tdefault: return false;\n\t}\n}\n/**\n* The codec of a raw column, whose type no other data type claims. Values pass through unchanged and\n* are typed `unknown`, since nothing is known about them beyond what the database returns. A raw\n* column has no literal values, but that is its data type's rule: the data type's reader refuses\n* every value, so `toDataTypeValue` refuses every literal. ADR 273.\n*/\nvar SqlRawCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\tif (isJsonValue(input)) return this.dataTypeValueOf(input);\n\t\tthrow structuredError(\"RUNTIME.ENCODE_FAILED\", `${this.id} writes only JSON values as JSON`, { meta: { codecId: this.id } });\n\t}\n};\nvar SqlRawDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_RAW_CODEC_ID;\n\ttraits = [];\n\tenumRefusal = \"A raw column has a type Prisma does not interpret, so no member can be written as one of its values. No enum can use the raw codec; use a text enum instead.\";\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlRawDescriptor = new SqlRawDescriptor();\nconst sqlRawColumn = (sql) => column(sqlRawDescriptor.factory({ sql }), sqlRawDescriptor.codecId, { sql });\n//#endregion\nexport { 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, LockingClause, NativeJsonValueProjection, NotExpr, NullCheckExpr, OpaqueSql, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawQueryAst, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlRawCodec, SqlRawDescriptor, SqlTextCodec, SqlTextDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, aggregateFnNames, checkLimitOffset, collectOrderedParamRefs, compact, encodeListLiteralDefault, encodeLiteralDefault, frozenCodecRef, isAggregateFn, isAggregateProjection, isDdlNode, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability, opaqueSql, queryAstKinds, renderOpaqueSql, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlRawColumn, sqlRawDescriptor, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, whereExprKinds };\n\n//# sourceMappingURL=ast.mjs.map"],"mappings":";;;;;;;;;;;;AAcA,eAAe,qBAAq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,OAAO;EACtB,IAAI,YAAY,KAAK,GAAG,OAAO,KAAK,gBAAgB,KAAK;EACzD,MAAM,gBAAgB,yBAAyB,GAAG,KAAK,GAAG,mCAAmC,EAAE,MAAM,EAAE,SAAS,KAAK,GAAG,EAAE,CAAC;CAC5H;AACD;AACA,IAAI,mBAAmB,cAAc,4BAA4B;CAChE,UAAU;CACV,SAAS,CAAC;CACV,cAAc;CACd,eAAe,KAAK;CACpB,QAAQ,SAAS;EAChB,aAAa,UAAU,KAAK,OAAO;CACpC;AACD;AACA,MAAM,mBAAmB,IAAI,iBAAiB;AAC9C,MAAM,gBAAgB,QAAQ,OAAO,iBAAiB,QAAQ,EAAE,IAAI,CAAC,GAAG,iBAAiB,SAAS,EAAE,IAAI,CAAC"}
|
package/dist/builder.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as Expression, x as ScopeField } from "./expression-
|
|
2
|
-
import { a as Subquery, r as Functions } from "./functions-
|
|
3
|
-
import { C as WhereFilter, S as UpdateQuery, d as QueryContext, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, o as GatedMethod, r as Db, s as GroupedQuery, t as AggregateFunctions, y as TableProxy } from "./db-D1d75IvM-
|
|
1
|
+
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
|
|
2
|
+
import { a as Subquery, r as Functions } from "./functions-CQrsCHCj.mjs";
|
|
3
|
+
import { C as WhereFilter, S as UpdateQuery, d as QueryContext, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, o as GatedMethod, r as Db, s as GroupedQuery, t as AggregateFunctions, y as TableProxy } from "./db-D1d75IvM-D5CqruQz.mjs";
|
|
4
4
|
export type { AggregateFunctions, Db, DeleteQuery, Expression, Functions, GatedMethod, GroupedQuery, InsertQuery, QueryContext, ResolveRow, Scope, ScopeField, SelectQuery, Subquery, TableProxy, UpdateQuery, WhereFilter };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { l as SqlStorage } from "./sql-storage-DeCAh5Hi-CEM-m8cs.mjs";
|
|
2
2
|
import "./types-CkAd8SWm.mjs";
|
|
3
3
|
import { i as SqlOperationEntry } from "./index-Nqc3OHR_.mjs";
|
|
4
|
-
import { l as RawCodecInferer } from "./expression-
|
|
5
|
-
import { t as ExpressionImpl } from "./expression-
|
|
6
|
-
import "./expression-
|
|
7
|
-
import { s as createFunctions } from "./functions-
|
|
8
|
-
import { a as FieldProxy, b as TableProxyContract, d as QueryContext, f as RawLane, h as Scope, r as Db, t as AggregateFunctions } from "./db-D1d75IvM-
|
|
9
|
-
import { a as SqlAggregateDescriptorRegistry, n as ExecutionContext } from "./query-lane-context-
|
|
10
|
-
import "./query-lane-context-
|
|
4
|
+
import { l as RawCodecInferer } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
|
|
5
|
+
import { t as ExpressionImpl } from "./expression-BWRsWR6O-BrUVz0V2.mjs";
|
|
6
|
+
import "./expression-CQHy0GY7.mjs";
|
|
7
|
+
import { s as createFunctions } from "./functions-CQrsCHCj.mjs";
|
|
8
|
+
import { a as FieldProxy, b as TableProxyContract, d as QueryContext, f as RawLane, h as Scope, r as Db, t as AggregateFunctions } from "./db-D1d75IvM-D5CqruQz.mjs";
|
|
9
|
+
import { a as SqlAggregateDescriptorRegistry, n as ExecutionContext } from "./query-lane-context-DLSXDsDK-pEiQmuYy.mjs";
|
|
10
|
+
import "./query-lane-context-Dqs5qCXx.mjs";
|
|
11
11
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
12
12
|
//#region ../../../2-sql-family/4-lanes/sql-builder/dist/runtime/index.d.mts
|
|
13
13
|
//#region src/runtime/field-proxy.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as ParamRef, F as SelectAst, G as isOrderByNulls, L as TableSource, M as ProjectionItem, R as UpdateAst, U as isAggregateFn, W as isOrderByDirection, _ as InsertAst, c as DeleteAst, g as IdentifierRef, k as OrderByItem, l as DerivedTableSource, n as AndExpr, o as ColumnRef, t as AggregateExpr, w as LockingClause, y as JoinAst } from "./types-
|
|
2
|
-
import { r as isAggregateProjection, t as collectOrderedParamRefs } from "./util-
|
|
3
|
-
import { D as lockWaitPolicyOf, E as lockStrengthCapabilities, T as lockOptionCapabilities, w as lockIncompatible } from "./ast-
|
|
4
|
-
import { i as createRawSql, s as toExpr, t as ExpressionImpl } from "./expression-impl-
|
|
1
|
+
import { A as ParamRef, F as SelectAst, G as isOrderByNulls, L as TableSource, M as ProjectionItem, R as UpdateAst, U as isAggregateFn, W as isOrderByDirection, _ as InsertAst, c as DeleteAst, g as IdentifierRef, k as OrderByItem, l as DerivedTableSource, n as AndExpr, o as ColumnRef, t as AggregateExpr, w as LockingClause, y as JoinAst } from "./types-BkTuhW3Z-BJfTjcxS.mjs";
|
|
2
|
+
import { r as isAggregateProjection, t as collectOrderedParamRefs } from "./util-DixeJBri-Cad7x5ec.mjs";
|
|
3
|
+
import { D as lockWaitPolicyOf, E as lockStrengthCapabilities, T as lockOptionCapabilities, w as lockIncompatible } from "./ast-e_02t9Nt.mjs";
|
|
4
|
+
import { i as createRawSql, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-CUKzBisY.mjs";
|
|
5
5
|
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-CiiFzMtb.mjs";
|
|
6
|
-
import { t as createFunctions } from "./functions-
|
|
6
|
+
import { t as createFunctions } from "./functions-D7lN5-JU.mjs";
|
|
7
7
|
import { t as createIndexReferences } from "./index-reference-BQSrkRfT.mjs";
|
|
8
8
|
import { assertAnnotationsApplicable } from "@prisma/orm-framework/components/runtime";
|
|
9
9
|
//#region ../../../2-sql-family/4-lanes/sql-builder/dist/runtime/index.mjs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as Expression, x as ScopeField } from "./expression-
|
|
2
|
-
import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-
|
|
3
|
-
import { t as IndexReference } from "./index-reference-
|
|
4
|
-
import "./index-reference-
|
|
5
|
-
import { C as WhereFilter, S as UpdateQuery, _ as TableInAnyNamespace, b as TableProxyContract, c as IndexReferences, d as QueryContext, f as RawLane, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, n as ContractRawTag, o as GatedMethod, p as RawTagFor, r as Db, s as GroupedQuery, t as AggregateFunctions, u as Namespace, v as TableNamesAcrossNamespaces, x as UnboundTables, y as TableProxy } from "./db-D1d75IvM-
|
|
1
|
+
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-DrYNeDbh.mjs";
|
|
2
|
+
import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-CQrsCHCj.mjs";
|
|
3
|
+
import { t as IndexReference } from "./index-reference-YHvh6wAL-BAhOS7RC.mjs";
|
|
4
|
+
import "./index-reference-BVkoanQn.mjs";
|
|
5
|
+
import { C as WhereFilter, S as UpdateQuery, _ as TableInAnyNamespace, b as TableProxyContract, c as IndexReferences, d as QueryContext, f as RawLane, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, n as ContractRawTag, o as GatedMethod, p as RawTagFor, r as Db, s as GroupedQuery, t as AggregateFunctions, u as Namespace, v as TableNamesAcrossNamespaces, x as UnboundTables, y as TableProxy } from "./db-D1d75IvM-D5CqruQz.mjs";
|
|
6
6
|
export type { AggregateFunctions, BooleanCodecType, ContractRawTag, Db, DeleteQuery, Expression, Functions, GatedMethod, GroupedQuery, IndexReference, IndexReferences, InsertQuery, Namespace, QueryContext, RawLane, RawTagFor, ResolveRow, Scope, ScopeField, SelectQuery, Subquery, TableInAnyNamespace, TableNamesAcrossNamespaces, TableProxy, TableProxyContract, UnboundTables, UpdateQuery, WhereFilter };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as StorageTable } from "./storage-table-Bf1ZjnxO-pUj6pyP0.mjs";
|
|
2
2
|
import "./types-CkAd8SWm.mjs";
|
|
3
|
-
import { t as IndexReference } from "./index-reference-
|
|
3
|
+
import { t as IndexReference } from "./index-reference-YHvh6wAL-BAhOS7RC.mjs";
|
|
4
4
|
import { ContractField, ContractRelation } from "@prisma/orm-framework/contract/types";
|
|
5
|
-
//#region ../../../2-sql-family/4-lanes/relational-core/dist/collection-methods-
|
|
5
|
+
//#region ../../../2-sql-family/4-lanes/relational-core/dist/collection-methods-D9CYfePl.d.mts
|
|
6
6
|
//#region src/collection-methods.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* One model, as a contribution's type half reads it: the contract's target, the model's name, its fields with their codec ids and type parameters, its relations, and its storage table with columns and indexes.
|
|
@@ -74,4 +74,4 @@ interface CollectionMethodContribution {
|
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
76
|
export { CollectionMethodModel as a, CollectionMethodRegistry as c, CollectionMethodContributionType as i, CollectionMethodTools as l, CollectionMethodContribution as n, CollectionMethodModelType as o, CollectionMethodContributionId as r, CollectionMethodReceiver as s, CollectionMethodBody as t, ContributedMethodSignature as u };
|
|
77
|
-
//# sourceMappingURL=collection-methods-
|
|
77
|
+
//# sourceMappingURL=collection-methods-D9CYfePl-DsDjYS6t.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-methods-
|
|
1
|
+
{"version":3,"file":"collection-methods-D9CYfePl-DsDjYS6t.d.mts","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/collection-methods-D9CYfePl.d.mts"],"mappings":";;;;;;;;;UAOU;WACC;WACA;WACA;WACA;WACA;aACE;aACA;;;;;;UAMH;WACC;WACA;WACA;;;;;UAKD;WACC,OAAO;WACP;cACG,eAAe;;;;;;UAMnB;;WAEC;;;KAGN,iCAAiC,cAAc;;UAE1C;WACC,KAAK,SAAS,mBAAmB;WACjC,SAAS,SAAS,eAAe;;;;;UAKlC;EACR,MAAM,YAAY,gBAAgB,OAAO,oCAAoC;EAC7E,QAAQ,QAAQ,gBAAgB,OAAO,oCAAoC;;;KAGxE,wBAAwB,YAAY,6BAA6B,kBAAkB;;UAE9E;WACC;WACA;WACA,QAAQ,SAAS,eAAe;WAChC,WAAW,SAAS,eAAe;WACnC,OAAO;;;;;UAKR;WACC;EACT,WAAW,OAAO,wBAAwB,SAAS,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./collection-methods-D9CYfePl-DsDjYS6t.mjs";
|
|
@@ -3,17 +3,17 @@ import { l as SqlStorage } from "./sql-storage-DeCAh5Hi-CEM-m8cs.mjs";
|
|
|
3
3
|
import { j as SqlControlDriverInstance } from "./types-DfKvtJwS-CrpWTGBJ.mjs";
|
|
4
4
|
import "./types-CkAd8SWm.mjs";
|
|
5
5
|
import { r as SqlOperationDescriptors } from "./index-Nqc3OHR_.mjs";
|
|
6
|
-
import { h as AnyQueryAst } from "./types-
|
|
6
|
+
import { h as AnyQueryAst } from "./types-ijhejJhK-EdACW3bY.mjs";
|
|
7
7
|
import { o as SqlExecuteRequest } from "./driver-types-DRsYeq3j-BimeCnUk.mjs";
|
|
8
|
-
import { a as DdlNode } from "./ddl-types-
|
|
9
|
-
import { p as LowererContext } from "./ast-
|
|
8
|
+
import { a as DdlNode } from "./ddl-types-BeA1kjV1-C4d5owxE.mjs";
|
|
9
|
+
import { p as LowererContext } from "./ast-DcphKbq9.mjs";
|
|
10
10
|
import { a as EnumMemberListDefault, i as EnumMemberDefault, n as DefaultFunctionCall, o as ParsedNullLiteral } from "./attribute-specs-DA_RwQFB.mjs";
|
|
11
11
|
import { S as SqlSchemaIRNode, b as SqlSchemaIR, p as SqlDefaultValue } from "./types-CuCxAQat-Dz8P4xyt.mjs";
|
|
12
12
|
import "./types-ljUNyiWe.mjs";
|
|
13
13
|
import "./validators-FJs8HvFr.mjs";
|
|
14
|
-
import { r as SqlControlAdapter } from "./control-adapter-BfyLe7rh-
|
|
14
|
+
import { r as SqlControlAdapter } from "./control-adapter-BfyLe7rh-C_rrUuhb.mjs";
|
|
15
15
|
import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CgKIgWq5-pEdfjam5.mjs";
|
|
16
|
-
import { C as SqlPlannerConflict, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, n as CreateSqlMigrationPlanOptions, p as SqlMigrationPlanner, t as CodecControlHooks, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-COXfSNOP-
|
|
16
|
+
import { C as SqlPlannerConflict, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, n as CreateSqlMigrationPlanOptions, p as SqlMigrationPlanner, t as CodecControlHooks, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-COXfSNOP-DcuULeD9.mjs";
|
|
17
17
|
import { t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-tqHKiJ88.mjs";
|
|
18
18
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
19
19
|
import { DataTypeSupport } from "@prisma/orm-framework/components/authoring";
|
|
@@ -22,7 +22,7 @@ import { ColumnDefault, Contract, ContractWithDomain, ControlPolicy } from "@pri
|
|
|
22
22
|
import { GeneratorFunctionRegistry, TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
23
23
|
import { PslDocumentAst } from "@prisma/orm-framework/components/psl-ast";
|
|
24
24
|
import { NotOk, Ok, Result } from "@prisma/orm-framework/utils/result";
|
|
25
|
-
import { AppliedMigrationStatement, AssembledAuthoringContributions, ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlMutationDefaultEntry, ControlStack, DiffSubjectGranularity, FieldCoordinate, ImportRequirement, MigratableTargetDescriptor, MigrationDataLossKind, MigrationOperationClass, MigrationOperationClass as MigrationOperationClass$1, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanSubjects, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MigrationRunnerFailureMeta, MigrationSubject, ModelCoordinate, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractBuildCapable, PslContractInferCapable, ResolvedFieldRenameStatement, ResolvedMigrationStatement, ResolvedModelRenameStatement, ResolvedRenameStatement, RowsWithoutValue, SchemaDiffIssue, SchemaOwnership, SchemaVerifier, SchemaViewCapable, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions as assembleAuthoringContributions$1 } from "@prisma/orm-framework/components/control";
|
|
25
|
+
import { AppliedMigrationStatement, AssembledAuthoringContributions, ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlMutationDefaultEntry, ControlStack, DiffSubjectGranularity, EnumValueCoordinate, EnumValueCoordinateJson, FieldCoordinate, ImportRequirement, KeepDataEdit, MigratableTargetDescriptor, MigrationDataLossKind, MigrationOperationClass, MigrationOperationClass as MigrationOperationClass$1, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanSubjects, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MigrationRunnerFailureMeta, MigrationSubject, ModelCoordinate, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractBuildCapable, PslContractInferCapable, ResolvedEnumValueRenameStatement, ResolvedFieldRenameStatement, ResolvedMigrationStatement, ResolvedModelRenameStatement, ResolvedRenameStatement, RowsWithoutValue, SchemaDiffIssue, SchemaOwnership, SchemaVerifier, SchemaViewCapable, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions as assembleAuthoringContributions$1 } from "@prisma/orm-framework/components/control";
|
|
26
26
|
import { EmissionSpi, TypesImportSpec } from "@prisma/orm-framework/components/emission";
|
|
27
27
|
//#region ../../../2-sql-family/9-family/dist/control.d.mts
|
|
28
28
|
//#region src/core/control-instance.d.ts
|
|
@@ -786,6 +786,75 @@ interface SchemaTables {
|
|
|
786
786
|
hasNamespace(namespaceId: string): boolean;
|
|
787
787
|
}
|
|
788
788
|
//#endregion
|
|
789
|
+
//#region src/core/migrations/enum-value-planning.d.ts
|
|
790
|
+
/** A stored value of an enum: the only values a rewrite compares and writes. */
|
|
791
|
+
type StoredEnumValue = string | number;
|
|
792
|
+
/**
|
|
793
|
+
* One column's rewrite of one stored value of an enum: `to` replaces `from`, or, when `to` is
|
|
794
|
+
* absent, `from` is removed. The column is named as the destination contract stores it.
|
|
795
|
+
*/
|
|
796
|
+
interface StoredValueRewrite {
|
|
797
|
+
/** The enum value whose stored value is rewritten, as the origin contract names it. */
|
|
798
|
+
readonly enumValue: EnumValueCoordinate;
|
|
799
|
+
readonly namespaceId: string;
|
|
800
|
+
readonly table: string;
|
|
801
|
+
readonly column: string;
|
|
802
|
+
/** The column's codec, which writes `from` and `to` as the database stores them. */
|
|
803
|
+
readonly codecRef: CodecRef;
|
|
804
|
+
/** Whether the column holds a list of the enum's values. */
|
|
805
|
+
readonly many: boolean;
|
|
806
|
+
readonly from: StoredEnumValue;
|
|
807
|
+
readonly to: StoredEnumValue | undefined;
|
|
808
|
+
/** The rename statement the rewrite carries out, if any. */
|
|
809
|
+
readonly statement: ResolvedEnumValueRenameStatement | undefined;
|
|
810
|
+
/**
|
|
811
|
+
* For a removal the plan asks about, the replacements that would keep its data instead, in the
|
|
812
|
+
* order they run; none when keeping it would merge it with another member's data.
|
|
813
|
+
*/
|
|
814
|
+
readonly keepData: readonly StoredValueReplacement[] | undefined;
|
|
815
|
+
/** Whether the value moves in a cycle with other values of the enum, so keeping its data swaps values. */
|
|
816
|
+
readonly swapsValues: boolean;
|
|
817
|
+
}
|
|
818
|
+
/** One replacement of a stored value by another. */
|
|
819
|
+
interface StoredValueReplacement {
|
|
820
|
+
readonly from: StoredEnumValue;
|
|
821
|
+
readonly to: StoredEnumValue;
|
|
822
|
+
}
|
|
823
|
+
type CodecSource = Pick<CodecLookupWithDescriptors, 'descriptorFor'>;
|
|
824
|
+
/**
|
|
825
|
+
* The rewrites of stored enum values a plan makes. Enums are compared by the stored value of each
|
|
826
|
+
* member (see `valueChanges`). A changed value is rewritten in every column, in the working schema,
|
|
827
|
+
* whose field the destination enum types: a rename statement replaces it, and any other change
|
|
828
|
+
* removes it, which the plan asks about, with the replacements that would keep its data. Changes
|
|
829
|
+
* that shift values along are ordered so none overwrites a value another still has to read; rename
|
|
830
|
+
* statements that move values in a cycle are refused, and other changes in a cycle keep their data
|
|
831
|
+
* through a temporary value. With no origin contract, nothing is known to have changed.
|
|
832
|
+
*/
|
|
833
|
+
declare function planEnumValueRewrites(input: {
|
|
834
|
+
readonly statements: readonly ResolvedMigrationStatement[];
|
|
835
|
+
readonly fromContract: Contract<SqlStorage> | null;
|
|
836
|
+
readonly contract: Contract<SqlStorage>;
|
|
837
|
+
readonly tables: SchemaTables;
|
|
838
|
+
/** The stack's codecs, which read stored values for messages. */
|
|
839
|
+
readonly codecs: CodecSource;
|
|
840
|
+
}): Result<readonly StoredValueRewrite[], SqlPlannerConflict>;
|
|
841
|
+
/**
|
|
842
|
+
* The applied statements with each enum value rename given the operations its rewrites lowered
|
|
843
|
+
* to, at their positions in the plan: the rewrites are ordered with the diff, not with the renames.
|
|
844
|
+
*/
|
|
845
|
+
declare function withEnumValueOperations(applied: readonly AppliedMigrationStatement[], operationIndexesOf: (statement: ResolvedEnumValueRenameStatement) => readonly number[]): readonly AppliedMigrationStatement[];
|
|
846
|
+
/** The codec of the column a stored value is in, and the stack's codecs, which build it. */
|
|
847
|
+
interface StoredValueCodec {
|
|
848
|
+
readonly codecRef: CodecRef;
|
|
849
|
+
readonly codecs: Pick<CodecLookupWithDescriptors, 'descriptorFor'>;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* The value the database stores for `value`, a stored value as the contract writes it: the column's
|
|
853
|
+
* codec reads it as a value of its data type and writes it with `toWire`, as a literal default is
|
|
854
|
+
* written. With no codec, or one the stack does not have, the value is used as written.
|
|
855
|
+
*/
|
|
856
|
+
declare function encodeStoredValue(value: StoredEnumValue, codec: StoredValueCodec | undefined): Promise<StoredEnumValue>;
|
|
857
|
+
//#endregion
|
|
789
858
|
//#region src/core/migrations/resolve-column-rename.d.ts
|
|
790
859
|
declare const COLUMN_RENAME_UNMATCHED_CODE = "MIGRATION.COLUMN_RENAME_UNMATCHED";
|
|
791
860
|
/**
|
|
@@ -1107,6 +1176,8 @@ interface SubjectStorage {
|
|
|
1107
1176
|
readonly table: string;
|
|
1108
1177
|
readonly column: string | undefined;
|
|
1109
1178
|
} | undefined;
|
|
1179
|
+
/** The enum value the operation is about, when it rewrites one stored value of an enum. */
|
|
1180
|
+
readonly enumValue?: EnumValueCoordinate;
|
|
1110
1181
|
}
|
|
1111
1182
|
/** What a codec hook's call is about: the column of the field event it was returned for. */
|
|
1112
1183
|
declare function fieldEventStorage(field: {
|
|
@@ -1126,9 +1197,10 @@ interface CallSubjects {
|
|
|
1126
1197
|
readonly operationCount: number;
|
|
1127
1198
|
/** The call's label, which names its operation before the plan's slots are filled. */
|
|
1128
1199
|
readonly label: string;
|
|
1129
|
-
/** What the call's operation loses, one entry per model, field or storage name, and how. */
|
|
1200
|
+
/** What the call's operation loses, one entry per model, field or storage name, how, and how to keep it. */
|
|
1130
1201
|
readonly dataLoss: readonly (SubjectStorage & {
|
|
1131
1202
|
readonly loss: MigrationDataLossKind;
|
|
1203
|
+
readonly keepDataEdit?: KeepDataEdit;
|
|
1132
1204
|
})[];
|
|
1133
1205
|
/** What the call's operation changes access to, and whether it widens it. */
|
|
1134
1206
|
readonly accessChanges: readonly (SubjectStorage & {
|
|
@@ -1235,6 +1307,28 @@ declare function rowsWithoutValueFailure<TOperation>(input: {
|
|
|
1235
1307
|
readonly reports: readonly RowsWithoutValue[];
|
|
1236
1308
|
} | undefined>;
|
|
1237
1309
|
//#endregion
|
|
1310
|
+
//#region src/core/migrations/rows-holding-value.d.ts
|
|
1311
|
+
/**
|
|
1312
|
+
* The enum value a removal check guards, with its stored value as the contract stores it and the
|
|
1313
|
+
* column's codec, which the call that removes it carries.
|
|
1314
|
+
*/
|
|
1315
|
+
interface RowsHoldingValueMark {
|
|
1316
|
+
readonly enumValue: EnumValueCoordinateJson;
|
|
1317
|
+
readonly value: string | number;
|
|
1318
|
+
readonly codecRef?: CodecRef;
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* The meta of the check before a stored enum value is removed from a column: it fails while rows
|
|
1322
|
+
* hold the value in a column that takes no NULL, and the runner then counts those rows.
|
|
1323
|
+
*/
|
|
1324
|
+
declare function rowsHoldingValueMeta(mark: RowsHoldingValueMark): {
|
|
1325
|
+
readonly rowsHoldingValue: RowsHoldingValueMark;
|
|
1326
|
+
};
|
|
1327
|
+
/** The enum value a check guards, as {@link rowsHoldingValueMeta} marks it. */
|
|
1328
|
+
declare function rowsHoldingValueOf(step: SqlMigrationPlanOperationStep): RowsHoldingValueMark | undefined;
|
|
1329
|
+
/** What a runner failure says of the rows that hold a stored value a column cannot lose: the value as the database stores it. */
|
|
1330
|
+
declare function rowsHoldingValueSummary(table: string, column: string, storedValue: unknown, rows: number): string;
|
|
1331
|
+
//#endregion
|
|
1238
1332
|
//#region src/core/migrations/sql-expression-text.d.ts
|
|
1239
1333
|
/**
|
|
1240
1334
|
* One way a target's SQL quotes a literal or an identifier. Inside the quote, the closing text
|
|
@@ -1412,5 +1506,5 @@ declare function contractColumns(contract: unknown): ContractColumns;
|
|
|
1412
1506
|
//#region src/exports/control.d.ts
|
|
1413
1507
|
declare const _default: SqlFamilyDescriptor;
|
|
1414
1508
|
//#endregion
|
|
1415
|
-
export {
|
|
1416
|
-
//# sourceMappingURL=control-
|
|
1509
|
+
export { StatementPlanningTarget as $, resolveTableRenameAgainst as $t, NoTable as A, encodeStoredValue as At, SchemaTables as B, partitionIssuesByControlPolicy as Bt, MigrationPlannerConflict$1 as C, contractToSchemaIR as Ct, NO_RENAMED_ORIGINS as D, createSqlTextSources as Dt, ModelTable as E, createMigrationPlan as Et, ReportedBody as F, fieldStatementColumns as Ft, SqlDescribedContractSpace as G, plannerFailure as Gt, SqlControlFamilyInstance as H, planFieldEventCalls as Ht, ReportedLiteralDefault as I, isUnfilledSlot as It, SqlQuotingRules as J, readReportedDefault as Jt, SqlPslBuildContext as K, plannerSuccess as Kt, RequiredColumn as L, modelRenameStorageEffect as Lt, PlannedStatements as M, fieldEventStorage as Mt, ReadColumnDefault as N, fieldOfColumn as Nt, NamespaceRename as O, detectDestructiveChanges as Ot, ReadReportedDefault as P, fieldRenameStorageEffect as Pt, StatementOwnership as Q, resolveColumnRenameAgainst as Qt, RequiredColumnMark as R, otherSpaceDeclaring as Rt, MigrationPlanner as S, contractNamespaceToSchemaIR as St, ModelStorageEffect as T, convertedColumnOf as Tt, SqlControlTargetDescriptor as U, planFieldEventOperations as Ut, SingleOperationCall as V, planEnumValueRewrites as Vt, SqlDefaultFunctionName as W, planStatements as Wt, SqlTextSources as X, requiredColumnOf as Xt, SqlSlot as Y, requiredColumnMeta as Yt, StatementColumn as Z, requiredColumnsOfMigration as Zt, INIT_ADDITIVE_POLICY as _, withEnumValueOperations as _n, assembleAuthoringContributions$1 as _t, ColumnRename as a, runnerFailure as an, SuppressionRecord as at, MigrationPlan$1 as b, columnTakesTemporaryValue as bt, ContractColumns as c, sqlDefaultFunctions as cn, TableNameCaseGuardTable as ct, ConvertedColumn as d, storageNameOfOperation as dn, TableRenameRequest as dt, rowsHoldingValueMeta as en, StoredEnumValue as et, DefaultResolver as f, subjectsOfCalls as fn, TargetMigrationsCapability as ft, FieldStorageEffect as g, unmatchedTableRename as gn, appliedStatementsInOrder as gt, FieldStatementColumns as h, unmatchedColumnRename as hn, _default as ht, ColumnOnOneSide as i, rowsWithoutValueSummary as in, SubjectStorage as it, PlanFieldEventOperationsOptions as j, extractCodecControlHooks as jt, NamespaceStatementTarget as k, detectTableNameCaseChanges as kt, ContractToSchemaIROptions as l, sqlOfSlot as ln, TableRename as lt, FieldEventCall as m, unknownCallNames as mn, WorkingSchemaOrigins as mt, CallSubjects as n, rowsHoldingValueSummary as nn, StoredValueReplacement as nt, ColumnRenameRequest as o, runnerSuccess as on, TABLE_NAME_CASE_CHANGED_CODE as ot, DefaultResolverColumn as p, unconvertedFieldOf as pn, TargetRefusal as pt, SqlQuote as q, readColumnDefault as qt, CallWithCompanions as r, rowsWithoutValueFailure as rn, StoredValueRewrite as rt, ContractColumn as s, slotSource as sn, TableMove as st, COLUMN_RENAME_UNMATCHED_CODE as t, rowsHoldingValueOf as tn, StoredValueCodec as tt, ControlPolicySubject as u, sqlTypeLookupsOf as un, TableRenameByHand as ut, MigrationOperationClass$1 as v, backfillOfDefaultedField as vt, MigrationPlannerResult as w, convertedColumnMeta as wt, MigrationPlanOperation$1 as x, contractColumns as xt, MigrationOperationPolicy$1 as y, checkSqlExpressionText as yt, RowsHoldingValueMark as z, partitionCallsByControlPolicy as zt };
|
|
1510
|
+
//# sourceMappingURL=control-CffuMKgt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-CffuMKgt.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmBU;WACC,kBAAkB,cAAc;WAChC,cAAc;;UAEf,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,wBAAwB,SAAS,cAAc,yBAAyB;;;;;;;;;EAS9O,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB,QAAQ;EACrD,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;EACrE,cAAc,WAAW;;;;cAIb,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV,oBAAoB;WACpB;aACE;eACE;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAG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