@prisma/orm-family-sql 0.17.0-dev.1 → 0.17.0-dev.2
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-DPV4z8MS.mjs +111 -0
- package/dist/aggregate-descriptor-registry-DPV4z8MS.mjs.map +1 -0
- package/dist/{ast-DSuzmsWn.d.mts → ast--BZUAzN1.d.mts} +3 -4
- package/dist/ast--BZUAzN1.d.mts.map +1 -0
- package/dist/{ast-BstHjAoG.mjs → ast-DDAyIKdt.mjs} +2 -2
- package/dist/ast-DDAyIKdt.mjs.map +1 -0
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +14 -10
- package/dist/builder__runtime.d.mts.map +1 -1
- package/dist/builder__runtime.mjs +161 -107
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +2 -2
- package/dist/codec-types-B_xmJL2m-CC_Q-_u9.mjs +24 -0
- package/dist/codec-types-B_xmJL2m-CC_Q-_u9.mjs.map +1 -0
- package/dist/{config-types-47qB33rW.d.mts → config-types-DKKhWdzf.d.mts} +2 -2
- package/dist/{config-types-47qB33rW.d.mts.map → config-types-DKKhWdzf.d.mts.map} +1 -1
- package/dist/{contract-builder-MvJJrQ-5.d.mts → contract-builder-Cj-lKWgM.d.mts} +4 -4
- package/dist/{contract-builder-MvJJrQ-5.d.mts.map → contract-builder-Cj-lKWgM.d.mts.map} +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-psl.d.mts +2 -2
- package/dist/contract-psl__provider.d.mts +1 -1
- package/dist/contract-ts.d.mts +2 -2
- package/dist/contract-ts__config-types.d.mts +1 -1
- package/dist/contract-ts__contract-builder.d.mts +1 -1
- package/dist/contract.d.mts +6 -6
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__types.d.mts +3 -3
- package/dist/contract__validators.d.mts +1 -1
- package/dist/{control-BHmsZudH.d.mts → control-BqrVERXN.d.mts} +10 -10
- package/dist/{control-BHmsZudH.d.mts.map → control-BqrVERXN.d.mts.map} +1 -1
- package/dist/{control-adapter-C99J7aEF-C-17lFY8.d.mts → control-adapter-C99J7aEF-mjOpiO_9.d.mts} +6 -6
- package/dist/{control-adapter-C99J7aEF-C-17lFY8.d.mts.map → control-adapter-C99J7aEF-mjOpiO_9.d.mts.map} +1 -1
- package/dist/control-adapter-xEtAQKd9.d.mts +1 -0
- package/dist/{control-B7iS4jv4.mjs → control-mG3RlNzm.mjs} +2 -2
- package/dist/{control-B7iS4jv4.mjs.map → control-mG3RlNzm.mjs.map} +1 -1
- package/dist/{db-DhMsmBS--DKENDi3l.d.mts → db-B5PMfDDd-BiWfkubp.d.mts} +65 -32
- package/dist/db-B5PMfDDd-BiWfkubp.d.mts.map +1 -0
- package/dist/{ddl-types-rrMsf77U-DGctYf-T.d.mts → ddl-types-h_3_pXmq-QBLq6WbP.d.mts} +4 -5
- package/dist/ddl-types-h_3_pXmq-QBLq6WbP.d.mts.map +1 -0
- package/dist/{diff-DhlzHOMD.d.mts → diff-CIIMSaVD.d.mts} +5 -5
- package/dist/{diff-DhlzHOMD.d.mts.map → diff-CIIMSaVD.d.mts.map} +1 -1
- package/dist/{dist-DrScXbhq.mjs → dist-CYkK9Vbk.mjs} +55 -2
- package/dist/dist-CYkK9Vbk.mjs.map +1 -0
- package/dist/{expression-RUO52bJB.mjs → expression-Dhu3dLiu.mjs} +2 -2
- package/dist/{expression-RUO52bJB.mjs.map → expression-Dhu3dLiu.mjs.map} +1 -1
- package/dist/{expression-DIf8F4Mc.d.mts → expression-KPBpeH4T.d.mts} +5 -6
- package/dist/expression-KPBpeH4T.d.mts.map +1 -0
- package/dist/{factories-B7tA4y9D.d.mts → factories-MfcqTt5R.d.mts} +2 -2
- package/dist/{factories-B7tA4y9D.d.mts.map → factories-MfcqTt5R.d.mts.map} +1 -1
- package/dist/family.d.mts +9 -9
- package/dist/family.mjs +1 -1
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +1 -1
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__runtime.d.mts +1 -1
- package/dist/{index-BgaTJRxj.d.mts → index-BZF7Wehu.d.mts} +3 -3
- package/dist/{index-BgaTJRxj.d.mts.map → index-BZF7Wehu.d.mts.map} +1 -1
- package/dist/{index-Bb9U36N4.d.mts → index-D_QTT11u.d.mts} +15 -16
- package/dist/index-D_QTT11u.d.mts.map +1 -0
- package/dist/{index-type-validation-DN0L2mqm.d.mts → index-type-validation-D_vuj-76.d.mts} +2 -2
- package/dist/{index-type-validation-DN0L2mqm.d.mts.map → index-type-validation-D_vuj-76.d.mts.map} +1 -1
- package/dist/{ir-B3bKMnGQ.d.mts → ir-Cvj3eU-K.d.mts} +2 -2
- package/dist/{ir-B3bKMnGQ.d.mts.map → ir-Cvj3eU-K.d.mts.map} +1 -1
- package/dist/lane-query-builder.d.mts +3 -3
- package/dist/middleware-ChwIEKBC.d.mts +1 -0
- package/dist/{middleware-B4XbF4d4-tfwBl6mX.d.mts → middleware-eb7YwdD4-D0M6ACQ-.d.mts} +3 -3
- package/dist/{middleware-B4XbF4d4-tfwBl6mX.d.mts.map → middleware-eb7YwdD4-D0M6ACQ-.d.mts.map} +1 -1
- package/dist/{migration-CW0ZJLxP.d.mts → migration-Dtyw2JeL.d.mts} +3 -3
- package/dist/{migration-CW0ZJLxP.d.mts.map → migration-Dtyw2JeL.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +82 -39
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +157 -122
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{plan-BTD8xFfa-Dd_K-A1R.d.mts → plan-Bmp5R9sq-DKMRkx6Z.d.mts} +4 -4
- package/dist/plan-Bmp5R9sq-DKMRkx6Z.d.mts.map +1 -0
- package/dist/plan-mKgmSe0R.d.mts +2 -0
- package/dist/query-lane-context-Dcj4eXUl.d.mts +1 -0
- package/dist/{query-lane-context-DtdVMqoz-C2Tj5QHA.d.mts → query-lane-context-DjyAyYht-HDNYE_oF.d.mts} +62 -6
- package/dist/query-lane-context-DjyAyYht-HDNYE_oF.d.mts.map +1 -0
- package/dist/relational-core.d.mts +12 -13
- package/dist/relational-core.mjs +4 -3
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +12 -0
- package/dist/relational-core__aggregate-descriptor-registry.d.mts.map +1 -0
- package/dist/relational-core__aggregate-descriptor-registry.mjs +2 -0
- package/dist/relational-core__ast.d.mts +3 -4
- package/dist/relational-core__ast.mjs +3 -2
- package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
- package/dist/relational-core__contract-free.d.mts +3 -4
- package/dist/relational-core__contract-free.d.mts.map +1 -1
- package/dist/relational-core__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +1 -1
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +3 -3
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{runtime-DNewRuec.d.mts → runtime-DXPO2ytG.d.mts} +2 -2
- package/dist/{runtime-DNewRuec.d.mts.map → runtime-DXPO2ytG.d.mts.map} +1 -1
- package/dist/runtime.d.mts +3 -3
- package/dist/runtime.mjs +12 -3
- package/dist/runtime.mjs.map +1 -1
- package/dist/{schema-differ-DpG_gnur-g5_iks8G.d.mts → schema-differ-DpG_gnur-zSwkxqxK.d.mts} +2 -2
- package/dist/{schema-differ-DpG_gnur-g5_iks8G.d.mts.map → schema-differ-DpG_gnur-zSwkxqxK.d.mts.map} +1 -1
- package/dist/{sql-execution-plan-CJmsCP7n-DoEpNn7r.d.mts → sql-execution-plan-Da_d82pz-IHBEmGSa.d.mts} +3 -3
- package/dist/sql-execution-plan-Da_d82pz-IHBEmGSa.d.mts.map +1 -0
- package/dist/{types-DIBA80mc-wf5wLmON.d.mts → types-BwePDa3m-BVrPIi8V.d.mts} +117 -5
- package/dist/types-BwePDa3m-BVrPIi8V.d.mts.map +1 -0
- package/dist/types-Cty2fvYD.d.mts +1 -0
- package/dist/{types-BgkZru_1-H7yfikSQ.mjs → types-D43EhRac-DOJmnq_t.mjs} +4 -21
- package/dist/types-D43EhRac-DOJmnq_t.mjs.map +1 -0
- package/dist/{types-CuDrWc5v-ISVXBmBs.d.mts → types-D_plAPEe-DqK5It_K.d.mts} +30 -4
- package/dist/types-D_plAPEe-DqK5It_K.d.mts.map +1 -0
- package/dist/{types-IqZMLrFC-DtdJNICr.d.mts → types-IqZMLrFC-C1Zu2oo9.d.mts} +5 -5
- package/dist/{types-IqZMLrFC-DtdJNICr.d.mts.map → types-IqZMLrFC-C1Zu2oo9.d.mts.map} +1 -1
- package/dist/{types-Dl20lxky-DC_jdA0T.d.mts → types-dD8JJfeD-BOvMw2Iu.d.mts} +9 -9
- package/dist/{types-Dl20lxky-DC_jdA0T.d.mts.map → types-dD8JJfeD-BOvMw2Iu.d.mts.map} +1 -1
- package/dist/{types-BchwQpmO.d.mts → types-wy2-Y8wQ.d.mts} +2 -2
- package/dist/{types-BchwQpmO.d.mts.map → types-wy2-Y8wQ.d.mts.map} +1 -1
- package/dist/{validators-CxeHhHrf.d.mts → validators-Ds_fvIs_.d.mts} +2 -2
- package/dist/{validators-CxeHhHrf.d.mts.map → validators-Ds_fvIs_.d.mts.map} +1 -1
- package/package.json +19 -18
- package/dist/ast-BstHjAoG.mjs.map +0 -1
- package/dist/ast-DSuzmsWn.d.mts.map +0 -1
- package/dist/codec-types-MOaceoPi-C5eL2sao.d.mts +0 -116
- package/dist/codec-types-MOaceoPi-C5eL2sao.d.mts.map +0 -1
- package/dist/control-adapter-4y1O8Ps3.d.mts +0 -1
- package/dist/db-DhMsmBS--DKENDi3l.d.mts.map +0 -1
- package/dist/ddl-types-rrMsf77U-DGctYf-T.d.mts.map +0 -1
- package/dist/dist-DrScXbhq.mjs.map +0 -1
- package/dist/expression-DIf8F4Mc.d.mts.map +0 -1
- package/dist/index-Bb9U36N4.d.mts.map +0 -1
- package/dist/middleware-ByRsXxxq.d.mts +0 -1
- package/dist/plan-BTD8xFfa-Dd_K-A1R.d.mts.map +0 -1
- package/dist/plan-Cm4jaoNM.d.mts +0 -2
- package/dist/query-lane-context-Bz8XJZ45.d.mts +0 -1
- package/dist/query-lane-context-DtdVMqoz-C2Tj5QHA.d.mts.map +0 -1
- package/dist/sql-execution-plan-CJmsCP7n-DoEpNn7r.d.mts.map +0 -1
- package/dist/types-BgkZru_1-H7yfikSQ.mjs.map +0 -1
- package/dist/types-CuDrWc5v-ISVXBmBs.d.mts.map +0 -1
- package/dist/types-DIBA80mc-wf5wLmON.d.mts.map +0 -1
- package/dist/types-DMxc5KZa.d.mts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddl-types-h_3_pXmq-QBLq6WbP.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/ddl-types-h_3_pXmq.d.mts"],"mappings":";;;;;;;;;;;;;;;UAaU;WACC;;UAED,wBAAwB;EAChC,QAAQ,MAAM,sBAAsB,KAAK,yBAAyB;EAClE,SAAS,MAAM,uBAAuB,KAAK,yBAAyB;;uBAE/C;oBACH;WACT,OAAO,GAAG,SAAS,wBAAwB,IAAI,KAAK,yBAAyB;YAC5E;;cAEE,6BAA6B;WAChC;WACA,OAAO;EAChB,YAAY,OAAO;EACnB,OAAO,GAAG,SAAS,wBAAwB,IAAI,KAAK,yBAAyB;;cAEjE,8BAA8B;WACjC;WACA;EACT,YAAY;EACZ,OAAO,GAAG,SAAS,wBAAwB,IAAI,KAAK,yBAAyB;;KAE1E,sBAAsB,uBAAuB;cACpC;WACH;WACA;WACA;WACA;WACA,UAAU;;WAEV,WAAW;EACpB,YAAY;aACD;aACA;aACA;aACA;aACA,UAAU;aACV,WAAW;;;uBAGD;oBACH;;;;;;;EAOlB;YACU;EACV,oBAAoB;;iBAEL,UAAU,iBAAiB,SAAS;;;;;;;;cAQvC;WACH;WACA,SAAS;WACT;EACT,YAAY;aACD;aACA;;;;;;;;;;cAUC;WACH;WACA,SAAS;WACT;WACA,YAAY;WACZ,UAAU;WACV,UAAU;WACV;EACT,YAAY;aACD;aACA;aACA;aACA,WAAW;aACX,WAAW;aACX;;;;;;;;;;cAUC;WACH;WACA,SAAS;WACT;EACT,YAAY;aACD;aACA;;;;;;;;;;;;cAYC;WACH;WACA;WACA;EACT,YAAY;aACD;aACA;;;KAGR,qBAAqB,uBAAuB,uBAAuB,mBAAmB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as SqlStorage } from "./sql-storage-B0QwiTg6-B8DVctJm.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-wy2-Y8wQ.mjs";
|
|
3
3
|
import { v as SqlSchemaIRNode } from "./types-CvbBw1Jo-3KQdErJY.mjs";
|
|
4
4
|
import "./types-TvBZ2Ne9.mjs";
|
|
5
|
-
import "./control-adapter-C99J7aEF-
|
|
6
|
-
import { n as CodecControlHooks } from "./types-IqZMLrFC-
|
|
7
|
-
import { t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-
|
|
5
|
+
import "./control-adapter-C99J7aEF-mjOpiO_9.mjs";
|
|
6
|
+
import { n as CodecControlHooks } from "./types-IqZMLrFC-C1Zu2oo9.mjs";
|
|
7
|
+
import { t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-zSwkxqxK.mjs";
|
|
8
8
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
9
9
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
10
10
|
import { DiffSubjectGranularity, SchemaDiffIssue, VerifierIssueCategory, VerifyDatabaseSchemaResult } from "@prisma/orm-framework/components/control";
|
|
@@ -101,4 +101,4 @@ interface VerifySqlSchemaByDiffInput {
|
|
|
101
101
|
declare function verifySqlSchemaByDiff(input: VerifySqlSchemaByDiffInput): VerifyDatabaseSchemaResult;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { VerifySqlSchemaByDiffInput as a, computeSqlDiffVerdict as c, StorageTypeVerdictInput as i, computeStorageTypeVerdict as l, SqlDiffVerdictInput as n, classifyDiffSubjectGranularity as o, StorageTypeVerdict as r, classifySqlDiffIssue as s, SqlDiffVerdict as t, verifySqlSchemaByDiff as u };
|
|
104
|
-
//# sourceMappingURL=diff-
|
|
104
|
+
//# sourceMappingURL=diff-CIIMSaVD.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-
|
|
1
|
+
{"version":3,"file":"diff-CIIMSaVD.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/diff.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAmBiB,+BAA+B,OAAO,iBAAiB,gBAAgB,qBAAqB,yBAAyB;;;;;;;;;;;;;iBAarH,qBAAqB,OAAO,iBAAiB,gBAAgB,qBAAqB,yBAAyB;UAClH;;WAEC,iBAAiB;;WAEjB,uBAAuB,OAAO,oBAAoB;WAClD;WACA,sBAAsB;;WAEtB,gBAAgB,qBAAqB;;UAEtC;WACC,mBAAmB;WACnB,mBAAmB;;;;;;;;;iBASb,sBAAsB,OAAO,sBAAsB;UAC1D;WACC,UAAU,SAAS;;;;;;;WAOnB,gBAAgB;aACd,QAAQ;;WAEV,YAAY,oBAAoB;;;;;;;;;UASjC;WACC,mBAAmB;WACnB,mBAAmB;;iBAEb,0BAA0B,OAAO,0BAA0B;UAClE;WACC,UAAU,SAAS;WACnB,QAAQ;WACR;WACA,qBAAqB,cAAc;;WAEnC,YAAY;;WAEZ,gBAAgB,qBAAqB;;;;;;;;;iBAS/B,sBAAsB,OAAO,6BAA6B"}
|
|
@@ -3,6 +3,7 @@ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { renderValueSetType, serializeNamespaceId, serializeObjectKey, serializeValue } from "@prisma/orm-toolchain/emitter/domain-type-generation";
|
|
5
5
|
import { isSafeTypeExpression } from "@prisma/orm-toolchain/emitter/type-expression-safety";
|
|
6
|
+
import { settleAggregateOverloads } from "@prisma/orm-framework/components/components";
|
|
6
7
|
//#region ../../../2-sql/3-tooling/emitter/dist/index.mjs
|
|
7
8
|
function sqlEmitterError(code, message, options) {
|
|
8
9
|
return structuredError(code, message, options);
|
|
@@ -14,6 +15,57 @@ function sqlEmitterValidationError(message, meta) {
|
|
|
14
15
|
meta
|
|
15
16
|
});
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Render the aggregate result map from the overloads the stack contributes, settled against the codecs it contributes.
|
|
20
|
+
*
|
|
21
|
+
* Every emitted row is keyed by a contributed codec, whichever rung settled it. Trait fallbacks reach only the contributed codecs to begin with, and an exact overload naming an uncontributed codec is dropped here — settling keeps such a row, because naming a codec id is a claim that stands on its own and the runtime honours it for whatever ref reaches it, but a target may register codecs its adapter withholds, and an emitted type over one of those would advertise availability no contract can use.
|
|
22
|
+
*
|
|
23
|
+
* Only the two rungs that name a codec are materialized; the input-agnostic overload stays a single row, which a consumer reads when no per-codec row claims its input.
|
|
24
|
+
*/
|
|
25
|
+
function generateAggregateTypes(options) {
|
|
26
|
+
const descriptors = options?.aggregateDescriptors ?? [];
|
|
27
|
+
const codecs = options?.codecDescriptors ?? [];
|
|
28
|
+
if (descriptors.length === 0) return "Record<string, never>";
|
|
29
|
+
const contributedIds = new Set(codecs.map((codec) => codec.codecId));
|
|
30
|
+
const settled = settleAggregateOverloads(descriptors, codecs);
|
|
31
|
+
const ambiguity = settled.ambiguities[0];
|
|
32
|
+
if (ambiguity !== void 0) throw sqlEmitterError("CONTRACT.AGGREGATE_DESCRIPTOR_AMBIGUOUS", `Aggregate '${ambiguity.operation}' has no single result type over codec '${ambiguity.codecId}': traits ${ambiguity.traits.join(", ")} all claim it.`, {
|
|
33
|
+
why: "Emitted result types must name one codec per aggregate and input.",
|
|
34
|
+
fix: `Contribute an exact descriptor for '${ambiguity.operation}' over '${ambiguity.codecId}', or narrow the overlapping trait contributions.`,
|
|
35
|
+
meta: {
|
|
36
|
+
operation: ambiguity.operation,
|
|
37
|
+
codecId: ambiguity.codecId,
|
|
38
|
+
traits: ambiguity.traits
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return `{ ${[...settled.operations].sort(([left], [right]) => left.localeCompare(right)).map(([operation, entry]) => {
|
|
42
|
+
const members = [`readonly byCodec: { ${[...entry.byCodecId].filter(([codecId]) => contributedIds.has(codecId)).sort(([left], [right]) => left.localeCompare(right)).map(([codecId, descriptor]) => {
|
|
43
|
+
return `readonly ${serializeObjectKey(codecId)}: ${renderAggregateResult(descriptor, codecId, contributedIds)}`;
|
|
44
|
+
}).join("; ")} }`];
|
|
45
|
+
const withoutInput = entry.noInput ?? entry.anyInput;
|
|
46
|
+
if (withoutInput !== void 0) members.push(`readonly withoutInput: ${renderAggregateResult(withoutInput, void 0, contributedIds)}`);
|
|
47
|
+
if (entry.anyInput !== void 0) members.push(`readonly anyInput: ${renderAggregateResult(entry.anyInput, void 0, contributedIds)}`);
|
|
48
|
+
return `readonly ${serializeObjectKey(operation)}: { ${members.join("; ")} }`;
|
|
49
|
+
}).join("; ")} }`;
|
|
50
|
+
}
|
|
51
|
+
/** One row of the map: the codec the result carries, and whether it can be null. A `self` result carries the codec of the input it was resolved for. */
|
|
52
|
+
function renderAggregateResult(descriptor, inputCodecId, contributedIds) {
|
|
53
|
+
const output = descriptor.output.kind === "self" ? inputCodecId : descriptor.output.codecId;
|
|
54
|
+
if (output === void 0) throw sqlEmitterError("CONTRACT.AGGREGATE_DESCRIPTOR_AMBIGUOUS", `Aggregate '${descriptor.operation}' declares its own input's codec as its result but answers calls that carry no input.`, {
|
|
55
|
+
why: "A result that reuses its input needs an input to reuse.",
|
|
56
|
+
fix: "Name the result codec on the descriptor.",
|
|
57
|
+
meta: { operation: descriptor.operation }
|
|
58
|
+
});
|
|
59
|
+
if (!contributedIds.has(output)) throw sqlEmitterError("CONTRACT.AGGREGATE_OUTPUT_CODEC_MISSING", `Aggregate '${descriptor.operation}' names result codec '${output}', which the stack does not contribute.`, {
|
|
60
|
+
why: "An emitted result type names a codec in the contract codec map; a codec the stack does not contribute has no emitted type to name.",
|
|
61
|
+
fix: "Contribute the codec, or declare a result codec the stack contributes.",
|
|
62
|
+
meta: {
|
|
63
|
+
operation: descriptor.operation,
|
|
64
|
+
outputCodecId: output
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return `{ readonly output: ${serializeValue(output)}; readonly nullable: ${descriptor.nullable} }`;
|
|
68
|
+
}
|
|
17
69
|
function serializeTypeParamsLiteral(params) {
|
|
18
70
|
if (!params || Object.keys(params).length === 0) return "Record<string, never>";
|
|
19
71
|
const entries = [];
|
|
@@ -232,6 +284,7 @@ const sqlEmission = {
|
|
|
232
284
|
return [
|
|
233
285
|
"export type LaneCodecTypes = CodecTypes;",
|
|
234
286
|
`export type QueryOperationTypes = ${queryOperationAliases.length > 0 ? queryOperationAliases.join(" & ") : "Record<string, never>"};`,
|
|
287
|
+
`export type AggregateTypes = ${generateAggregateTypes(options)};`,
|
|
235
288
|
"type DefaultLiteralValue<CodecId extends string, Encoded> =",
|
|
236
289
|
" CodecId extends keyof CodecTypes",
|
|
237
290
|
" ? Encoded extends CodecTypes[CodecId]['json']",
|
|
@@ -241,7 +294,7 @@ const sqlEmission = {
|
|
|
241
294
|
].join("\n");
|
|
242
295
|
},
|
|
243
296
|
getTypeMapsExpression() {
|
|
244
|
-
return "TypeMapsType<CodecTypes, QueryOperationTypes, FieldOutputTypes, FieldInputTypes, StorageColumnTypes, StorageColumnInputTypes>";
|
|
297
|
+
return "TypeMapsType<CodecTypes, QueryOperationTypes, FieldOutputTypes, FieldInputTypes, StorageColumnTypes, StorageColumnInputTypes, AggregateTypes>";
|
|
245
298
|
},
|
|
246
299
|
getContractWrapper(contractBaseName, typeMapsName) {
|
|
247
300
|
return [
|
|
@@ -411,4 +464,4 @@ function generateStorageNamespacesType(namespaces) {
|
|
|
411
464
|
//#endregion
|
|
412
465
|
export { sqlEmission as t };
|
|
413
466
|
|
|
414
|
-
//# sourceMappingURL=dist-
|
|
467
|
+
//# sourceMappingURL=dist-CYkK9Vbk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-CYkK9Vbk.mjs","names":[],"sources":["../../../../2-sql/3-tooling/emitter/dist/index.mjs"],"sourcesContent":["import { renderValueSetType, serializeNamespaceId, serializeObjectKey, serializeValue } from \"@internal/emitter/domain-type-generation\";\nimport { isSafeTypeExpression } from \"@internal/emitter/type-expression-safety\";\nimport { settleAggregateOverloads } from \"@internal/framework-components/components\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/errors.ts\nfunction sqlEmitterError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\nfunction sqlEmitterValidationError(message, meta) {\n\treturn sqlEmitterError(\"CONTRACT.VALIDATION_FAILED\", message, {\n\t\twhy: \"The contract given to the SQL emitter failed structural validation.\",\n\t\tfix: \"Regenerate the contract from its authoring source; do not hand-edit contract JSON.\",\n\t\tmeta\n\t});\n}\n//#endregion\n//#region src/index.ts\n/**\n* Render the aggregate result map from the overloads the stack contributes, settled against the codecs it contributes.\n*\n* Every emitted row is keyed by a contributed codec, whichever rung settled it. Trait fallbacks reach only the contributed codecs to begin with, and an exact overload naming an uncontributed codec is dropped here — settling keeps such a row, because naming a codec id is a claim that stands on its own and the runtime honours it for whatever ref reaches it, but a target may register codecs its adapter withholds, and an emitted type over one of those would advertise availability no contract can use.\n*\n* Only the two rungs that name a codec are materialized; the input-agnostic overload stays a single row, which a consumer reads when no per-codec row claims its input.\n*/\nfunction generateAggregateTypes(options) {\n\tconst descriptors = options?.aggregateDescriptors ?? [];\n\tconst codecs = options?.codecDescriptors ?? [];\n\tif (descriptors.length === 0) return \"Record<string, never>\";\n\tconst contributedIds = new Set(codecs.map((codec) => codec.codecId));\n\tconst settled = settleAggregateOverloads(descriptors, codecs);\n\tconst ambiguity = settled.ambiguities[0];\n\tif (ambiguity !== void 0) throw sqlEmitterError(\"CONTRACT.AGGREGATE_DESCRIPTOR_AMBIGUOUS\", `Aggregate '${ambiguity.operation}' has no single result type over codec '${ambiguity.codecId}': traits ${ambiguity.traits.join(\", \")} all claim it.`, {\n\t\twhy: \"Emitted result types must name one codec per aggregate and input.\",\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\treturn `{ ${[...settled.operations].sort(([left], [right]) => left.localeCompare(right)).map(([operation, entry]) => {\n\t\tconst members = [`readonly byCodec: { ${[...entry.byCodecId].filter(([codecId]) => contributedIds.has(codecId)).sort(([left], [right]) => left.localeCompare(right)).map(([codecId, descriptor]) => {\n\t\t\treturn `readonly ${serializeObjectKey(codecId)}: ${renderAggregateResult(descriptor, codecId, contributedIds)}`;\n\t\t}).join(\"; \")} }`];\n\t\tconst withoutInput = entry.noInput ?? entry.anyInput;\n\t\tif (withoutInput !== void 0) members.push(`readonly withoutInput: ${renderAggregateResult(withoutInput, void 0, contributedIds)}`);\n\t\tif (entry.anyInput !== void 0) members.push(`readonly anyInput: ${renderAggregateResult(entry.anyInput, void 0, contributedIds)}`);\n\t\treturn `readonly ${serializeObjectKey(operation)}: { ${members.join(\"; \")} }`;\n\t}).join(\"; \")} }`;\n}\n/** One row of the map: the codec the result carries, and whether it can be null. A `self` result carries the codec of the input it was resolved for. */\nfunction renderAggregateResult(descriptor, inputCodecId, contributedIds) {\n\tconst output = descriptor.output.kind === \"self\" ? inputCodecId : descriptor.output.codecId;\n\tif (output === void 0) throw sqlEmitterError(\"CONTRACT.AGGREGATE_DESCRIPTOR_AMBIGUOUS\", `Aggregate '${descriptor.operation}' declares its own input's codec as its result but answers calls that carry no input.`, {\n\t\twhy: \"A result that reuses its input needs an input to reuse.\",\n\t\tfix: \"Name the result codec on the descriptor.\",\n\t\tmeta: { operation: descriptor.operation }\n\t});\n\tif (!contributedIds.has(output)) throw sqlEmitterError(\"CONTRACT.AGGREGATE_OUTPUT_CODEC_MISSING\", `Aggregate '${descriptor.operation}' names result codec '${output}', which the stack does not contribute.`, {\n\t\twhy: \"An emitted result type names a codec in the contract codec map; a codec the stack does not contribute has no emitted type to name.\",\n\t\tfix: \"Contribute the codec, or declare a result codec the stack contributes.\",\n\t\tmeta: {\n\t\t\toperation: descriptor.operation,\n\t\t\toutputCodecId: output\n\t\t}\n\t});\n\treturn `{ readonly output: ${serializeValue(output)}; readonly nullable: ${descriptor.nullable} }`;\n}\nfunction serializeTypeParamsLiteral(params) {\n\tif (!params || Object.keys(params).length === 0) return \"Record<string, never>\";\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(params)) entries.push(`readonly ${serializeObjectKey(key)}: ${serializeValue(value)}`);\n\treturn `{ ${entries.join(\"; \")} }`;\n}\nconst sqlEmission = {\n\tid: \"sql\",\n\tvalidateTypes(contract, _ctx) {\n\t\tconst storage = contract.storage;\n\t\tif (!storage?.namespaces) return;\n\t\tconst typeIdRegex = /^([^/]+)\\/([^@]+)@(\\d+)$/;\n\t\tfor (const ns of Object.values(storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) for (const [colName, colUnknown] of Object.entries(table.columns)) {\n\t\t\tconst codecId = colUnknown.codecId;\n\t\t\tif (!codecId) throw sqlEmitterValidationError(`Column \"${colName}\" in table \"${tableName}\" is missing codecId`, {\n\t\t\t\ttable: tableName,\n\t\t\t\tcolumn: colName\n\t\t\t});\n\t\t\tif (!codecId.match(typeIdRegex)?.[1]) throw sqlEmitterValidationError(`Column \"${colName}\" in table \"${tableName}\" has invalid codec ID format \"${codecId}\". Expected format: ns/name@version`, {\n\t\t\t\ttable: tableName,\n\t\t\t\tcolumn: colName,\n\t\t\t\tcodecId\n\t\t\t});\n\t\t}\n\t},\n\tvalidateStructure(contract) {\n\t\tif (contract.targetFamily !== \"sql\") throw sqlEmitterValidationError(`Expected targetFamily \"sql\", got \"${contract.targetFamily}\"`, { targetFamily: contract.targetFamily });\n\t\tconst storage = contract.storage;\n\t\tif (!storage?.namespaces) throw sqlEmitterValidationError(\"SQL contract must have storage.namespaces\", {});\n\t\tconst tableNamesSeenAcrossNamespaces = /* @__PURE__ */ new Map();\n\t\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) for (const tableName of Object.keys(ns.entries.table ?? {})) {\n\t\t\tconst existingNs = tableNamesSeenAcrossNamespaces.get(tableName);\n\t\t\tif (existingNs !== void 0 && existingNs !== nsId) throw sqlEmitterError(\"CONTRACT.NAME_DUPLICATE\", `Duplicate table name \"${tableName}\" in namespaces \"${existingNs}\" and \"${nsId}\"`, {\n\t\t\t\twhy: \"Two SQL namespaces declare a table with the same name, which is ambiguous for emission.\",\n\t\t\t\tfix: \"Rename one of the tables so every table name is unique across namespaces.\",\n\t\t\t\tmeta: {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tnamespaces: [existingNs, nsId]\n\t\t\t\t}\n\t\t\t});\n\t\t\ttableNamesSeenAcrossNamespaces.set(tableName, nsId);\n\t\t}\n\t\tconst tableNames = /* @__PURE__ */ new Set();\n\t\tfor (const ns of Object.values(storage.namespaces)) for (const t of Object.keys(ns.entries.table ?? {})) tableNames.add(t);\n\t\tfor (const [namespaceId, domainNs] of Object.entries(contract.domain.namespaces)) {\n\t\t\tconst models = domainNs.models;\n\t\t\tfor (const [modelName, model] of Object.entries(models)) {\n\t\t\t\tconst qualifiedName = `${namespaceId}:${modelName}`;\n\t\t\t\tif (!model.storage?.table) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" is missing storage.table`, { model: qualifiedName });\n\t\t\t\tif (!model.storage.namespaceId) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" is missing storage.namespaceId`, { model: qualifiedName });\n\t\t\t\tif (model.storage.namespaceId !== namespaceId) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" storage.namespaceId \"${model.storage.namespaceId}\" does not match domain namespace \"${namespaceId}\"`, {\n\t\t\t\t\tmodel: qualifiedName,\n\t\t\t\t\tstorageNamespaceId: model.storage.namespaceId,\n\t\t\t\t\tdomainNamespaceId: namespaceId\n\t\t\t\t});\n\t\t\t\tconst tableName = model.storage.table;\n\t\t\t\tconst table = entityAt(storage, {\n\t\t\t\t\tnamespaceId,\n\t\t\t\t\tentityKind: \"table\",\n\t\t\t\t\tentityName: tableName\n\t\t\t\t});\n\t\t\t\tif (!table) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" references non-existent table \"${namespaceId}.${tableName}\"`, {\n\t\t\t\t\tmodel: qualifiedName,\n\t\t\t\t\ttable: `${namespaceId}.${tableName}`\n\t\t\t\t});\n\t\t\t\tconst columnNames = new Set(Object.keys(table.columns));\n\t\t\t\tconst storageFields = model.storage.fields;\n\t\t\t\tif (!storageFields || Object.keys(storageFields).length === 0) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" is missing storage.fields`, { model: qualifiedName });\n\t\t\t\tfor (const [fieldName, field] of Object.entries(storageFields)) {\n\t\t\t\t\tif (!field.column) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" field \"${fieldName}\" is missing column property`, {\n\t\t\t\t\t\tmodel: qualifiedName,\n\t\t\t\t\t\tfield: fieldName\n\t\t\t\t\t});\n\t\t\t\t\tif (!columnNames.has(field.column)) throw sqlEmitterValidationError(`Model \"${qualifiedName}\" field \"${fieldName}\" references non-existent column \"${field.column}\" in table \"${tableName}\"`, {\n\t\t\t\t\t\tmodel: qualifiedName,\n\t\t\t\t\t\tfield: fieldName,\n\t\t\t\t\t\tcolumn: field.column,\n\t\t\t\t\t\ttable: tableName\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (!model.relations || typeof model.relations !== \"object\") throw sqlEmitterValidationError(`Model \"${qualifiedName}\" is missing required field \"relations\" (must be an object)`, { model: qualifiedName });\n\t\t\t}\n\t\t}\n\t\tfor (const ns of Object.values(storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) {\n\t\t\tconst columnNames = new Set(Object.keys(table.columns));\n\t\t\tif (!Array.isArray(table.uniques)) throw sqlEmitterValidationError(`Table \"${tableName}\" is missing required field \"uniques\" (must be an array)`, { table: tableName });\n\t\t\tif (!Array.isArray(table.indexes)) throw sqlEmitterValidationError(`Table \"${tableName}\" is missing required field \"indexes\" (must be an array)`, { table: tableName });\n\t\t\tif (!Array.isArray(table.foreignKeys)) throw sqlEmitterValidationError(`Table \"${tableName}\" is missing required field \"foreignKeys\" (must be an array)`, { table: tableName });\n\t\t\tif (table.primaryKey) {\n\t\t\t\tfor (const colName of table.primaryKey.columns) if (!columnNames.has(colName)) throw sqlEmitterValidationError(`Table \"${tableName}\" primaryKey references non-existent column \"${colName}\"`, {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tcolumn: colName\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const unique of table.uniques) for (const colName of unique.columns) if (!columnNames.has(colName)) throw sqlEmitterValidationError(`Table \"${tableName}\" unique constraint references non-existent column \"${colName}\"`, {\n\t\t\t\ttable: tableName,\n\t\t\t\tcolumn: colName\n\t\t\t});\n\t\t\tfor (const index of table.indexes) for (const colName of index.columns) if (!columnNames.has(colName)) throw sqlEmitterValidationError(`Table \"${tableName}\" index references non-existent column \"${colName}\"`, {\n\t\t\t\ttable: tableName,\n\t\t\t\tcolumn: colName\n\t\t\t});\n\t\t\tfor (const fk of table.foreignKeys) {\n\t\t\t\tfor (const colName of fk.source.columns) if (!columnNames.has(colName)) throw sqlEmitterValidationError(`Table \"${tableName}\" foreignKey references non-existent column \"${colName}\"`, {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tcolumn: colName\n\t\t\t\t});\n\t\t\t\tconst referencedTable = entityAt(storage, {\n\t\t\t\t\tnamespaceId: fk.target.namespaceId,\n\t\t\t\t\tentityKind: \"table\",\n\t\t\t\t\tentityName: fk.target.tableName\n\t\t\t\t});\n\t\t\t\tif (!referencedTable) throw sqlEmitterValidationError(`Table \"${tableName}\" foreignKey references non-existent table \"${fk.target.tableName}\" in namespace \"${fk.target.namespaceId}\"`, {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\ttargetTable: fk.target.tableName,\n\t\t\t\t\ttargetNamespace: fk.target.namespaceId\n\t\t\t\t});\n\t\t\t\tconst referencedColumnNames = new Set(Object.keys(referencedTable.columns));\n\t\t\t\tfor (const colName of fk.target.columns) if (!referencedColumnNames.has(colName)) throw sqlEmitterValidationError(`Table \"${tableName}\" foreignKey references non-existent column \"${colName}\" in table \"${fk.target.tableName}\"`, {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tcolumn: colName,\n\t\t\t\t\ttargetTable: fk.target.tableName\n\t\t\t\t});\n\t\t\t\tif (fk.source.columns.length !== fk.target.columns.length) throw sqlEmitterValidationError(`Table \"${tableName}\" foreignKey column count (${fk.source.columns.length}) does not match referenced column count (${fk.target.columns.length})`, {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tsourceColumnCount: fk.source.columns.length,\n\t\t\t\t\ttargetColumnCount: fk.target.columns.length\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\tgenerateStorageType(contract, storageHashTypeName) {\n\t\tconst storage = contract.storage;\n\t\tconst namespacesType = generateStorageNamespacesType(storage.namespaces);\n\t\tconst docTypes = generateDocumentScopedStorageTypesType(storage.types);\n\t\treturn `{ readonly namespaces: ${namespacesType}${docTypes === void 0 ? \"\" : `; readonly types: ${docTypes}`}; readonly storageHash: ${storageHashTypeName} }`;\n\t},\n\tgenerateModelStorageType(_modelName, model) {\n\t\tconst sqlModel = model;\n\t\tconst tableName = sqlModel.storage.table;\n\t\tconst storageFields = sqlModel.storage.fields;\n\t\tconst storageParts = [`readonly table: ${serializeValue(tableName)}`, `readonly namespaceId: ${serializeValue(sqlModel.storage.namespaceId)}`];\n\t\tif (Object.keys(storageFields).length > 0) {\n\t\t\tconst fieldParts = [];\n\t\t\tfor (const [fieldName, field] of Object.entries(storageFields)) fieldParts.push(`readonly ${serializeObjectKey(fieldName)}: { readonly column: ${serializeValue(field.column)} }`);\n\t\t\tstorageParts.push(`readonly fields: { ${fieldParts.join(\"; \")} }`);\n\t\t}\n\t\treturn `{ ${storageParts.join(\"; \")} }`;\n\t},\n\tresolveFieldTypeParams(_modelName, fieldName, model, contract) {\n\t\tconst sqlModel = model;\n\t\tconst storageField = sqlModel.storage?.fields?.[fieldName];\n\t\tif (!storageField) return void 0;\n\t\tconst storage = contract.storage;\n\t\tif (!storage) return void 0;\n\t\tconst tableName = sqlModel.storage.table;\n\t\tconst storageNamespaceId = sqlModel.storage.namespaceId;\n\t\tif (!storageNamespaceId) return void 0;\n\t\tconst table = entityAt(storage, {\n\t\t\tnamespaceId: storageNamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t\tif (!table) return void 0;\n\t\tconst column = table.columns[storageField.column];\n\t\tif (!column) return void 0;\n\t\tif (column.typeRef) {\n\t\t\tconst typeInstance = storage.types?.[column.typeRef];\n\t\t\tif (typeInstance === void 0) return void 0;\n\t\t\treturn typeInstance.typeParams;\n\t\t}\n\t\treturn column.typeParams;\n\t},\n\tresolveFieldValueSet(_modelName, fieldName, model, contract) {\n\t\tconst sqlModel = blindCast(model);\n\t\tconst storageField = sqlModel.storage?.fields?.[fieldName];\n\t\tif (!storageField) return void 0;\n\t\tconst storage = blindCast(contract.storage);\n\t\tif (!storage) return void 0;\n\t\tconst storageNamespaceId = sqlModel.storage.namespaceId;\n\t\tif (!storageNamespaceId) return void 0;\n\t\tconst column = entityAt(storage, {\n\t\t\tnamespaceId: storageNamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: sqlModel.storage.table\n\t\t})?.columns[storageField.column];\n\t\tif (!column?.valueSet) return void 0;\n\t\tconst valueSet = entityAt(storage, {\n\t\t\tnamespaceId: column.valueSet.namespaceId,\n\t\t\tentityKind: column.valueSet.entityKind,\n\t\t\tentityName: column.valueSet.entityName\n\t\t});\n\t\tif (!valueSet) return void 0;\n\t\treturn {\n\t\t\tencodedValues: valueSet.values,\n\t\t\tcodecId: column.codecId\n\t\t};\n\t},\n\tgetStorageTypeExports(contract, codecLookup) {\n\t\tconst storage = blindCast(contract.storage);\n\t\tif (!storage?.namespaces) return void 0;\n\t\tconst outputMap = generateStorageColumnTypesMap(storage, \"output\", codecLookup);\n\t\tconst inputMap = generateStorageColumnTypesMap(storage, \"input\", codecLookup);\n\t\treturn [`export type StorageColumnTypes = ${outputMap};`, `export type StorageColumnInputTypes = ${inputMap};`].join(\"\\n\");\n\t},\n\tgetFamilyImports(resolveImportSpecifier) {\n\t\treturn [\n\t\t\t\"import type {\",\n\t\t\t\" ContractWithTypeMaps,\",\n\t\t\t\" TypeMaps as TypeMapsType,\",\n\t\t\t`} from '${resolveImportSpecifier(\"@internal/sql-contract/types\")}';`\n\t\t];\n\t},\n\tgetFamilyTypeAliases(options) {\n\t\tconst queryOperationAliases = (options?.queryOperationTypeImports ?? []).filter((imp) => imp.named === \"QueryOperationTypes\").map((imp) => `${imp.alias}<CodecTypes>`);\n\t\treturn [\n\t\t\t\"export type LaneCodecTypes = CodecTypes;\",\n\t\t\t`export type QueryOperationTypes = ${queryOperationAliases.length > 0 ? queryOperationAliases.join(\" & \") : \"Record<string, never>\"};`,\n\t\t\t`export type AggregateTypes = ${generateAggregateTypes(options)};`,\n\t\t\t\"type DefaultLiteralValue<CodecId extends string, Encoded> =\",\n\t\t\t\" CodecId extends keyof CodecTypes\",\n\t\t\t\" ? Encoded extends CodecTypes[CodecId]['json']\",\n\t\t\t\" ? Encoded\",\n\t\t\t\" : CodecTypes[CodecId]['json']\",\n\t\t\t\" : Encoded;\"\n\t\t].join(\"\\n\");\n\t},\n\tgetTypeMapsExpression() {\n\t\treturn \"TypeMapsType<CodecTypes, QueryOperationTypes, FieldOutputTypes, FieldInputTypes, StorageColumnTypes, StorageColumnInputTypes, AggregateTypes>\";\n\t},\n\tgetContractWrapper(contractBaseName, typeMapsName) {\n\t\treturn [\n\t\t\t`export type Contract = ContractWithTypeMaps<${contractBaseName}, ${typeMapsName}>;`,\n\t\t\t\"\",\n\t\t\t\"export type Namespaces = Contract['storage']['namespaces'];\"\n\t\t].join(\"\\n\");\n\t}\n};\nfunction columnTypeParams(storage, column) {\n\tif (column.typeRef) {\n\t\tconst typeInstance = storage.types?.[column.typeRef];\n\t\tif (typeInstance === void 0) return void 0;\n\t\treturn blindCast(typeInstance).typeParams;\n\t}\n\treturn column.typeParams;\n}\nfunction renderRefinedCodecType(column, side, params, codecLookup) {\n\tif (codecLookup && params && Object.keys(params).length > 0) {\n\t\tconst rendered = side === \"output\" ? codecLookup.renderOutputTypeFor(column.codecId, params) : codecLookup.renderInputTypeFor?.(column.codecId, params);\n\t\tif (rendered && isSafeTypeExpression(rendered)) return rendered;\n\t}\n\treturn `CodecTypes[${serializeValue(column.codecId)}][${serializeValue(side)}]`;\n}\nfunction computeColumnType(storage, column, side, codecLookup) {\n\tlet base;\n\tif (column.valueSet) {\n\t\tconst valueSet = entityAt(storage, {\n\t\t\tnamespaceId: column.valueSet.namespaceId,\n\t\t\tentityKind: column.valueSet.entityKind,\n\t\t\tentityName: column.valueSet.entityName\n\t\t});\n\t\tbase = valueSet ? renderValueSetType(valueSet.values, column.codecId, side, codecLookup) : void 0;\n\t}\n\tif (base === void 0) base = renderRefinedCodecType(column, side, columnTypeParams(storage, column), codecLookup);\n\tif (column.many === true) base = `ReadonlyArray<${base}>`;\n\treturn column.nullable ? `${base} | null` : base;\n}\nfunction generateStorageColumnTypesMap(storage, side, codecLookup) {\n\tconst namespaceEntries = Object.entries(storage.namespaces ?? {}).sort(([a], [b]) => a.localeCompare(b));\n\tif (namespaceEntries.length === 0) return \"Record<string, never>\";\n\tconst nsParts = [];\n\tfor (const [nsId, ns] of namespaceEntries) {\n\t\tconst tables = blindCast(ns.entries.table ?? {});\n\t\tconst tableEntries = Object.entries(tables).sort(([a], [b]) => a.localeCompare(b));\n\t\tconst tableParts = [];\n\t\tfor (const [tableName, table] of tableEntries) {\n\t\t\tconst colEntries = Object.entries(table.columns).sort(([a], [b]) => a.localeCompare(b));\n\t\t\tconst colParts = [];\n\t\t\tfor (const [colName, col] of colEntries) {\n\t\t\t\tconst colType = computeColumnType(storage, col, side, codecLookup);\n\t\t\t\tcolParts.push(`readonly ${serializeObjectKey(colName)}: ${colType}`);\n\t\t\t}\n\t\t\tconst colMap = colParts.length > 0 ? `{ ${colParts.join(\"; \")} }` : \"{}\";\n\t\t\ttableParts.push(`readonly ${serializeObjectKey(tableName)}: ${colMap}`);\n\t\t}\n\t\tconst tableMap = tableParts.length > 0 ? `{ ${tableParts.join(\"; \")} }` : \"{}\";\n\t\tnsParts.push(`readonly ${serializeObjectKey(nsId)}: ${tableMap}`);\n\t}\n\treturn `{ ${nsParts.join(\"; \")} }`;\n}\nfunction generateDocumentScopedStorageTypesType(types) {\n\tif (!types || Object.keys(types).length === 0) return;\n\tconst typeEntries = [];\n\tfor (const [typeName, typeInstance] of Object.entries(types)) {\n\t\tconst codecInstanceShape = typeInstance;\n\t\tif (typeof codecInstanceShape.codecId !== \"string\" || typeof codecInstanceShape.nativeType !== \"string\") throw sqlEmitterError(\"CONTRACT.TYPE_UNKNOWN\", `Unknown storage type kind for \"${typeName}\" in document-scoped storage.types; expected a codec-instance triple.`, {\n\t\t\twhy: \"A storage.types entry is not a codec-instance triple, so its column type cannot be emitted.\",\n\t\t\tfix: \"Regenerate the contract from its authoring source; storage.types entries must carry codecId and nativeType.\",\n\t\t\tmeta: { type: typeName }\n\t\t});\n\t\tconst codecId = serializeValue(codecInstanceShape.codecId);\n\t\tconst nativeType = serializeValue(codecInstanceShape.nativeType);\n\t\tconst typeParamsStr = serializeTypeParamsLiteral(codecInstanceShape.typeParams);\n\t\ttypeEntries.push(`readonly ${typeName}: { readonly kind: 'codec-instance'; readonly codecId: ${codecId}; readonly nativeType: ${nativeType}; readonly typeParams: ${typeParamsStr} }`);\n\t}\n\treturn `{ ${typeEntries.join(\"; \")} }`;\n}\n/**\n* Literalizes the `valueSet` entries slot — a core SQL entity kind (alongside\n* `table`), not a pack-contributed one, so naming it here isn't a\n* family→target layering leak. This is the only non-`table` entries slot with\n* a type-level consumer (`db.nativeEnums`, `packages/3-extensions/postgres`):\n* pack-contributed slots (`role`, `policy`, `native_enum`, …) have none and\n* are not emitted.\n*/\nfunction generateValueSetBlockType(valueSets) {\n\treturn `{ ${Object.entries(valueSets).sort(([a], [b]) => a.localeCompare(b)).map(([name, valueSet]) => `readonly ${serializeObjectKey(name)}: ${serializeValue(valueSet)}`).join(\"; \")} }`;\n}\nfunction namespaceSerializedKind(ns) {\n\tconst kind = ns.kind;\n\tif (kind === \"schema\") return `readonly kind: '${ns.id === UNBOUND_NAMESPACE_ID ? \"postgres-unbound-schema\" : \"postgres-schema\"}'`;\n\tif (typeof kind === \"string\") return `readonly kind: ${serializeValue(kind)}`;\n\tthrow sqlEmitterError(\"CONTRACT.NAMESPACE_INVALID\", `Namespace '${ns.id}' has no string kind — all namespaces must be target concretions with a defined kind property.`, {\n\t\twhy: \"The namespace is not a target concretion, so the emitter cannot serialize its kind.\",\n\t\tfix: \"Regenerate the contract with a target pack that materializes every namespace as a target concretion.\",\n\t\tmeta: { namespace: ns.id }\n\t});\n}\nfunction generateTableLiteralType(table) {\n\tconst columns = [];\n\tfor (const [colName, col] of Object.entries(table.columns)) {\n\t\tconst nullable = col.nullable ? \"true\" : \"false\";\n\t\tconst nativeType = serializeValue(col.nativeType);\n\t\tconst codecId = serializeValue(col.codecId);\n\t\tconst defaultSpec = col.default ? col.default.kind === \"literal\" ? `; readonly default: { readonly kind: 'literal'; readonly value: DefaultLiteralValue<${codecId}, ${serializeValue(col.default.value)}> }` : `; readonly default: { readonly kind: 'function'; readonly expression: ${serializeValue(col.default.expression)} }` : \"\";\n\t\tconst typeParamsSpec = col.typeParams && Object.keys(col.typeParams).length > 0 ? `; readonly typeParams: ${serializeTypeParamsLiteral(col.typeParams)}` : \"\";\n\t\tconst typeRefSpec = col.typeRef ? `; readonly typeRef: ${serializeValue(col.typeRef)}` : \"\";\n\t\tcolumns.push(`readonly ${colName}: { readonly nativeType: ${nativeType}; readonly codecId: ${codecId}; readonly nullable: ${nullable}${defaultSpec}${typeParamsSpec}${typeRefSpec} }`);\n\t}\n\tconst tableParts = [`columns: { ${columns.join(\"; \")} }`];\n\tif (table.primaryKey) {\n\t\tconst pkParts = [`readonly columns: readonly [${table.primaryKey.columns.map((c) => serializeValue(c)).join(\", \")}]`];\n\t\tif (table.primaryKey.name) pkParts.push(`readonly name: ${serializeValue(table.primaryKey.name)}`);\n\t\ttableParts.push(`primaryKey: { ${pkParts.join(\"; \")} }`);\n\t}\n\tconst uniques = table.uniques.map((u) => {\n\t\tconst parts = [`readonly columns: readonly [${u.columns.map((c) => serializeValue(c)).join(\", \")}]`];\n\t\tif (u.name) parts.push(`readonly name: ${serializeValue(u.name)}`);\n\t\treturn `{ ${parts.join(\"; \")} }`;\n\t}).join(\", \");\n\ttableParts.push(`uniques: readonly [${uniques}]`);\n\tconst indexes = table.indexes.map((i) => {\n\t\tconst parts = [`readonly name: ${serializeValue(i.name)}`];\n\t\tif (i.prefix !== void 0) parts.push(`readonly prefix: ${serializeValue(i.prefix)}`);\n\t\tif (i.columns !== void 0) parts.push(`readonly columns: readonly [${i.columns.map((c) => serializeValue(c)).join(\", \")}]`);\n\t\tif (i.expression !== void 0) parts.push(`readonly expression: ${serializeValue(i.expression)}`);\n\t\tif (i.where !== void 0) parts.push(`readonly where: ${serializeValue(i.where)}`);\n\t\tparts.push(`readonly unique: ${i.unique}`);\n\t\tif (i.type !== void 0) parts.push(`readonly type: ${serializeValue(i.type)}`);\n\t\tif (i.options !== void 0) parts.push(`readonly options: ${serializeValue(i.options)}`);\n\t\treturn `{ ${parts.join(\"; \")} }`;\n\t}).join(\", \");\n\ttableParts.push(`indexes: readonly [${indexes}]`);\n\tconst fks = table.foreignKeys.map((fk) => {\n\t\tconst srcCols = fk.source.columns.map((c) => serializeValue(c)).join(\", \");\n\t\tconst tgtCols = fk.target.columns.map((c) => serializeValue(c)).join(\", \");\n\t\tconst srcRef = `{ readonly namespaceId: ${serializeNamespaceId(String(fk.source.namespaceId))}; readonly tableName: ${serializeValue(fk.source.tableName)}; readonly columns: readonly [${srcCols}] }`;\n\t\tconst tgtRef = `{ readonly namespaceId: ${serializeNamespaceId(String(fk.target.namespaceId))}; readonly tableName: ${serializeValue(fk.target.tableName)}; readonly columns: readonly [${tgtCols}] }`;\n\t\tconst parts = [`readonly source: ${srcRef}`, `readonly target: ${tgtRef}`];\n\t\tif (fk.name) parts.push(`readonly name: ${serializeValue(fk.name)}`);\n\t\treturn `{ ${parts.join(\"; \")} }`;\n\t}).join(\", \");\n\ttableParts.push(`foreignKeys: readonly [${fks}]`);\n\treturn `{ ${tableParts.join(\"; \")} }`;\n}\nfunction generateTablesMapType(tables) {\n\tconst tableEntries = [];\n\tfor (const [tableName, table] of Object.entries(tables).sort(([a], [b]) => a.localeCompare(b))) tableEntries.push(`readonly ${tableName}: ${generateTableLiteralType(table)}`);\n\tif (tableEntries.length === 0) return \"{}\";\n\treturn `{ ${tableEntries.join(\"; \")} }`;\n}\nfunction generateStorageNamespacesType(namespaces) {\n\tconst entries = Object.entries(namespaces ?? {}).sort(([a], [b]) => a.localeCompare(b));\n\tif (entries.length === 0) return \"Record<string, never>\";\n\tconst parts = [];\n\tfor (const [name, ns] of entries) {\n\t\tconst kindSuffix = `; ${namespaceSerializedKind(ns)}`;\n\t\tconst entriesParts = [`readonly table: ${generateTablesMapType(ns.entries.table ?? {})}`];\n\t\tconst valueSetEntries = ns.entries.valueSet;\n\t\tif (valueSetEntries !== void 0 && Object.keys(valueSetEntries).length > 0) entriesParts.push(`readonly valueSet: ${generateValueSetBlockType(valueSetEntries)}`);\n\t\tconst entriesType = `{ ${entriesParts.join(\"; \")} }`;\n\t\tparts.push(`readonly ${serializeObjectKey(name)}: { readonly id: ${serializeValue(ns.id)}${kindSuffix}; readonly entries: ${entriesType} }`);\n\t}\n\treturn `{ ${parts.join(\"; \")} }`;\n}\n//#endregion\nexport { sqlEmission };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,gBAAgB,MAAM,SAAS,SAAS;CAChD,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;AACA,SAAS,0BAA0B,SAAS,MAAM;CACjD,OAAO,gBAAgB,8BAA8B,SAAS;EAC7D,KAAK;EACL,KAAK;EACL;CACD,CAAC;AACF;;;;;;;;AAUA,SAAS,uBAAuB,SAAS;CACxC,MAAM,cAAc,SAAS,wBAAwB,CAAC;CACtD,MAAM,SAAS,SAAS,oBAAoB,CAAC;CAC7C,IAAI,YAAY,WAAW,GAAG,OAAO;CACrC,MAAM,iBAAiB,IAAI,IAAI,OAAO,KAAK,UAAU,MAAM,OAAO,CAAC;CACnE,MAAM,UAAU,yBAAyB,aAAa,MAAM;CAC5D,MAAM,YAAY,QAAQ,YAAY;CACtC,IAAI,cAAc,KAAK,GAAG,MAAM,gBAAgB,2CAA2C,cAAc,UAAU,UAAU,0CAA0C,UAAU,QAAQ,YAAY,UAAU,OAAO,KAAK,IAAI,EAAE,iBAAiB;EACjP,KAAK;EACL,KAAK,uCAAuC,UAAU,UAAU,UAAU,UAAU,QAAQ;EAC5F,MAAM;GACL,WAAW,UAAU;GACrB,SAAS,UAAU;GACnB,QAAQ,UAAU;EACnB;CACD,CAAC;CACD,OAAO,KAAK,CAAC,GAAG,QAAQ,UAAU,CAAC,CAA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AAC,OAAO,EAAE,cAAc,CAAC,CAAC,GAAG,aAAa,KAAK,YAAY,UAAU,IAAI,yBAAyB,KAAK,GAAG;CAC7K,IAAI,aAAa,WAAW,GAAG,OAAO;CACtC,OAAO,KAAK,aAAa,KAAK,IAAI,EAAE;AACrC;AACA,SAAS,8BAA8B,YAAY;CAClD,MAAM,UAAU,OAAO,QAAQ,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CACtF,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,CAAC,MAAM,OAAO,SAAS;EACjC,MAAM,aAAa,KAAK,wBAAwB,EAAE;EAClD,MAAM,eAAe,CAAC,mBAAmB,sBAAsB,GAAG,QAAQ,SAAS,CAAC,CAAC,GAAG;EACxF,MAAM,kBAAkB,GAAG,QAAQ;EACnC,IAAI,oBAAoB,KAAK,KAAK,OAAO,KAAK,eAAe,CAAC,CAAC,SAAS,GAAG,aAAa,KAAK,sBAAsB,0BAA0B,eAAe,GAAG;EAC/J,MAAM,cAAc,KAAK,aAAa,KAAK,IAAI,EAAE;EACjD,MAAM,KAAK,YAAY,mBAAmB,IAAI,EAAE,mBAAmB,eAAe,GAAG,EAAE,IAAI,WAAW,sBAAsB,YAAY,GAAG;CAC5I;CACA,OAAO,KAAK,MAAM,KAAK,IAAI,EAAE;AAC9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as OperationExpr, M as RawExpr, k as ParamRef } from "./types-
|
|
1
|
+
import { E as OperationExpr, M as RawExpr, k as ParamRef } from "./types-D43EhRac-DOJmnq_t.mjs";
|
|
2
2
|
import { runtimeError } from "@prisma/orm-framework/components/runtime";
|
|
3
3
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/expression.mjs
|
|
4
4
|
/**
|
|
@@ -106,4 +106,4 @@ var RawSqlBuilderImpl = class {
|
|
|
106
106
|
//#endregion
|
|
107
107
|
export { toExpr as a, param as i, codecOf as n, createRawSql as r, buildOperation as t };
|
|
108
108
|
|
|
109
|
-
//# sourceMappingURL=expression-
|
|
109
|
+
//# sourceMappingURL=expression-Dhu3dLiu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-
|
|
1
|
+
{"version":3,"file":"expression-Dhu3dLiu.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/expression.mjs"],"sourcesContent":["import { E as OperationExpr, M as RawExpr, k as ParamRef } from \"../types-D43EhRac.mjs\";\nimport { runtimeError } from \"@internal/framework-components/runtime\";\n//#region src/expression.ts\n/**\n* Resolve a raw value or an Expression into an AST expression node.\n*\n* When `value` is an Expression (duck-typed by its `buildAst` method), the AST it wraps is returned. Otherwise the value is embedded as a ParamRef tagged with the caller-supplied {@link CodecRef} (when known). The runtime resolves the ref via `contractCodecs.forCodecRef(codec)`; content-keyed memoisation collapses repeated lookups for the same logical column onto one shared codec.\n*\n* Operation implementations that compare a column-bound expression to a user value derive the column's {@link CodecRef} from the column-bound side (via {@link codecOf}) and forward it here so encode-side dispatch resolves to the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction toExpr(value, codec) {\n\tif (isExpressionLike(value)) return value.buildAst();\n\tif (codec === void 0) throw runtimeError(\"RUNTIME.PARAM_REF_CODEC_REQUIRED\", `Cannot construct a ParamRef for a ${value === null ? \"null\" : typeof value} value without an explicit codec. Provide a CodecRef at the call site or use a column-bound builder path.`);\n\treturn ParamRef.of(value, { codec });\n}\n/**\n* Construct a `ParamRef` for a value whose codec identity is known at call time. Use this when interpolating a value into a raw SQL expression and the codec cannot be inferred from context — e.g. `param(myDate, { codecId: 'pg/timestamptz@1' })`.\n*/\nfunction param(value, opts) {\n\treturn ParamRef.of(value, { codec: { codecId: opts.codecId } });\n}\n/**\n* Derive the {@link CodecRef} carried by an expression-like value.\n*\n* Resolution order:\n* 1. `wrapper.codec` — explicit column-bound {@link CodecRef} stamped at field-proxy time.\n* 2. `wrapper.returnType.codec` — scope-level codec when the scope was built from contract storage.\n* 3. `{ codecId: wrapper.returnType.codecId }` — minimal ref derived from the expression's declared codec id (covers synthetic expressions like `count()` whose returnType has a known codec id but no explicit column binding).\n*\n* Returns `undefined` for raw scalar values (non-expression-like).\n*/\nfunction codecOf(value) {\n\tif (!isExpressionLike(value)) return void 0;\n\tconst wrapper = value;\n\tif (wrapper.codec) return wrapper.codec;\n\tif (wrapper.returnType?.codec) return wrapper.returnType.codec;\n\tif (wrapper.returnType?.codecId) return { codecId: wrapper.returnType.codecId };\n}\nfunction isExpressionLike(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\";\n}\n/**\n* Construct an OperationExpr AST node and wrap it as a typed Expression. Operation implementations use this to turn their user-facing arguments into the AST node the compilation pipeline eventually lowers to SQL.\n*/\nfunction buildOperation(spec) {\n\tconst [self, ...rest] = spec.args;\n\tconst op = new OperationExpr({\n\t\tmethod: spec.method,\n\t\tself,\n\t\targs: rest.length > 0 ? rest : void 0,\n\t\treturns: spec.returns,\n\t\tlowering: spec.lowering\n\t});\n\treturn {\n\t\treturnType: spec.returns,\n\t\tbuildAst: () => op\n\t};\n}\nfunction resolveInterpolation(adapter, value) {\n\tif (isExpressionLike(value)) return value.buildAst();\n\tif (value instanceof ParamRef) return value;\n\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"string\" || typeof value === \"boolean\" || value instanceof Uint8Array) return ParamRef.of(value, { codec: { codecId: adapter.inferCodec(value) } });\n\tthrow runtimeError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\");\n}\n/**\n* Create a tagged-template builder for raw SQL expressions. The returned tag accepts SQL string fragments interleaved with typed {@link Expression}, {@link ParamRef}, or bare {@link RawSqlLiteral} interpolations. Call `.returns(spec)` on the result to obtain a typed {@link Expression} whose AST is a {@link RawExpr}.\n*\n* Bare {@link RawSqlLiteral} interpolations are wrapped as `ParamRef` nodes with the codec resolved via `adapter.inferCodec(value)`. Use {@link param} when the codec cannot be inferred from the value alone (e.g. `Date`).\n*/\nfunction createRawSql(adapter) {\n\treturn (strings, ...values) => {\n\t\tconst parts = [];\n\t\tparts.push(strings[0] ?? \"\");\n\t\tvalues.forEach((value, i) => {\n\t\t\tparts.push(resolveInterpolation(adapter, value));\n\t\t\tparts.push(strings[i + 1] ?? \"\");\n\t\t});\n\t\treturn new RawSqlBuilderImpl(parts);\n\t};\n}\nvar RawSqlBuilderImpl = class {\n\tparts;\n\tconstructor(parts) {\n\t\tthis.parts = parts;\n\t}\n\treturns(spec) {\n\t\tconst codecId = typeof spec === \"string\" ? spec : spec.codecId;\n\t\tconst nullable = typeof spec === \"string\" ? false : spec.nullable ?? false;\n\t\tconst paramSpec = {\n\t\t\tcodecId,\n\t\t\tnullable\n\t\t};\n\t\tconst node = new RawExpr({\n\t\t\tparts: this.parts,\n\t\t\treturns: paramSpec\n\t\t});\n\t\treturn {\n\t\t\treturnType: {\n\t\t\t\tcodecId,\n\t\t\t\tnullable\n\t\t\t},\n\t\t\tbuildAst: () => node\n\t\t};\n\t}\n};\n//#endregion\nexport { buildOperation, codecOf, createRawSql, param, toExpr };\n\n//# sourceMappingURL=expression.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,OAAO,OAAO,OAAO;CAC7B,IAAI,iBAAiB,KAAK,GAAG,OAAO,MAAM,SAAS;CACnD,IAAI,UAAU,KAAK,GAAG,MAAM,aAAa,oCAAoC,qCAAqC,UAAU,OAAO,SAAS,OAAO,MAAM,0GAA0G;CACnQ,OAAO,SAAS,GAAG,OAAO,EAAE,MAAM,CAAC;AACpC;;;;AAIA,SAAS,MAAM,OAAO,MAAM;CAC3B,OAAO,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AAC/D;;;;;;;;;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CAAC;EACD,OAAO,IAAI,kBAAkB,KAAK;CACnC;AACD;AACA,IAAI,oBAAoB,MAAM;CAC7B;CACA,YAAY,OAAO;EAClB,KAAK,QAAQ;CACd;CACA,QAAQ,MAAM;EACb,MAAM,UAAU,OAAO,SAAS,WAAW,OAAO,KAAK;EACvD,MAAM,WAAW,OAAO,SAAS,WAAW,QAAQ,KAAK,YAAY;EACrE,MAAM,YAAY;GACjB;GACA;EACD;EACA,MAAM,OAAO,IAAI,QAAQ;GACxB,OAAO,KAAK;GACZ,SAAS;EACV,CAAC;EACD,OAAO;GACN,YAAY;IACX;IACA;GACD;GACA,gBAAgB;EACjB;CACD;AACD"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import { at as ParamRef, dt as RawSqlLiteral, o as AnyExpression } from "./types-DIBA80mc-wf5wLmON.mjs";
|
|
1
|
+
import { S as QueryOperationReturn } from "./types-D_plAPEe-DqK5It_K.mjs";
|
|
2
|
+
import "./types-wy2-Y8wQ.mjs";
|
|
3
|
+
import { t as SqlLoweringSpec } from "./index-BZF7Wehu.mjs";
|
|
4
|
+
import { Ct as RawSqlLiteral, T as CodecRef$1, _t as ParamRef, s as AnyExpression } from "./types-BwePDa3m-BVrPIi8V.mjs";
|
|
6
5
|
import { ParamSpec } from "@prisma/orm-framework/operations";
|
|
7
6
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/expression.d.mts
|
|
8
7
|
//#region src/expression.d.ts
|
|
@@ -164,4 +163,4 @@ type RawSqlInterpolation = Expression<ScopeField> | ParamRef | RawSqlLiteral;
|
|
|
164
163
|
declare function createRawSql(adapter: RawCodecInferer): RawSqlTag;
|
|
165
164
|
//#endregion
|
|
166
165
|
export { Expression as a, RawSqlTag as c, TraitExpression as d, buildOperation as f, toExpr as g, param as h, CodecValue as i, ScalarListExpression as l, createRawSql as m, CodecExpression as n, RawCodecInferer as o, codecOf as p, CodecTypesBase as r, RawSqlBuilder as s, BuildOperationSpec as t, ScopeField as u };
|
|
167
|
-
//# sourceMappingURL=expression-
|
|
166
|
+
//# sourceMappingURL=expression-KPBpeH4T.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expression-KPBpeH4T.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/expression.d.mts"],"mappings":";;;;;;;KAKK;EACH;EACA;;;;;;;;EAQA;;;;EAIA,QAAQ;;KAEL,iBAAiB;WACX;WACA;;;;;KAKN,WAAW,UAAU,cAAc;WAC7B,YAAY;EACrB,YAAY;;KAET,kBAAkB,WAAW;WACvB;IACP,+CAA+C,WAAW,cAAc,GAAG;WACpE,cAAc;KACpB,iCAAiC,KAAK,2BAA2B;KACjE,WAAW,KAAK;;;;;KAKhB,WAAW,wBAAwB,0BAA0B,WAAW;WAClE;OACJ,sBAAsB,KAAK,GAAG,6BAA6B,WAAW;;;;;;;;;;;;;;;KAexE,gBAAgB,wBAAwB,0BAA0B,WAAW;WACvE;MACL;EACJ,SAAS;EACT,UAAU;EACV;KACG,WAAW,SAAS,UAAU;;;;;;;KAO9B,qBAAqB,wBAAwB,4BAA4B;EAC5E,SAAS;EACT,UAAU;EACV;;;;;;;KAOG,gBAAgB,kCAAkC,0BAA0B,WAAW;WACjF;MACL,gBAAgB,kBAAkB,IAAI,SAAS,UAAU;;;;;;;;iBAQ9C,OAAO,gBAAgB,QAAQ,aAAW;;;;iBAI1C,MAAM,GAAG,OAAO,GAAG;EAClC;IACE;;;;;;;;;;;iBAWa,QAAQ,iBAAiB;UAChC,mBAAmB,UAAU;WAC5B;;;;WAIA,gBAAgB,kBAAkB;WAClC,SAAS,IAAI;WACb,UAAU;;;;;iBAKJ,eAAe,UAAU,YAAY,MAAM,mBAAmB,KAAK,WAAW;;;;;;;;;;;;;UAarF;EACR,WAAW,OAAO;;;UAGV;EACR,QAAQ,kBAAkB,MAAM,IAAI;IAClC,SAAS;IACT;;EAEF,QAAQ,kBAAkB,2BAA2B;aAC1C,SAAS;aACT,WAAW;MAClB;IACF,SAAS;IACT,UAAU;;;;KAIT,aAAa,SAAS,yBAAyB,QAAQ,0BAA0B;KACjF,sBAAsB,WAAW,cAAc,WAAW;;;;;;iBAM9C,aAAa,SAAS,kBAAkB"}
|
|
@@ -2,7 +2,7 @@ import { t as ForeignKey } from "./foreign-key-BSy9u4O4-BnsOe5Nf.mjs";
|
|
|
2
2
|
import { r as UniqueConstraint, t as PrimaryKey } from "./unique-constraint-jQWfH7dg-zLWtFp99.mjs";
|
|
3
3
|
import { t as Index } from "./sql-index-DsI8HAeK-BJsn-jvD.mjs";
|
|
4
4
|
import { a as StorageTable, i as StorageColumnInput, r as StorageColumn } from "./storage-table-BBaAmanc-BwR37LMA.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { A as SqlModelStorage, k as SqlModelFieldStorage, y as ForeignKeyOptions } from "./types-D_plAPEe-DqK5It_K.mjs";
|
|
6
6
|
import { ScalarFieldType } from "@prisma/orm-framework/contract/types";
|
|
7
7
|
//#region ../../../2-sql/1-core/contract/dist/factories.d.mts
|
|
8
8
|
//#region src/factories.d.ts
|
|
@@ -36,4 +36,4 @@ declare function model(tableName: string, fields: Record<string, SqlModelFieldSt
|
|
|
36
36
|
};
|
|
37
37
|
//#endregion
|
|
38
38
|
export { pk as a, model as i, fk as n, table as o, index as r, unique as s, col as t };
|
|
39
|
-
//# sourceMappingURL=factories-
|
|
39
|
+
//# sourceMappingURL=factories-MfcqTt5R.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factories-
|
|
1
|
+
{"version":3,"file":"factories-MfcqTt5R.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/factories.d.mts"],"mappings":";;;;;;;;iBAOiB,IAAI,oBAAoB,iBAAiB,oBAAoB;WACnE;IACP;iBACa,MAAM,6BAA6B;iBACnC,UAAU,6BAA6B;iBACvC,MAAM,cAAc,4BAA4B;WACtD;WACA;WACA;WACA,UAAU;IACjB;iBACa,GAAG,sBAAsB,+BAA+B,yBAAyB,kCAAkC,OAAO;EACzI;IACE;iBACa,MAAM,SAAS,eAAe,gBAAgB,qBAAqB;EAClF,KAAK;EACL,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;IACb;iBACa,MAAM,mBAAmB,QAAQ,eAAe,uBAAuB,YAAY,yBAAyB;EAC3H,SAAS;EACT,QAAQ;aACG;aACA,MAAM;;EAEjB,WAAW"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-DUwyRJmP.mjs";
|
|
2
|
-
import { i as SqlControlAdapter, n as Lowerer, o as arraysEqual, r as NativeTypeNormalizer, t as ExecuteRequestLowerer } from "./control-adapter-C99J7aEF-
|
|
3
|
-
import { A as SqlPlannerSuccessResult, C as SqlMigrationRunnerSuccessValue, D as SqlPlannerConflictLocation, E as SqlPlannerConflictKind, O as SqlPlannerFailureResult, S as SqlMigrationRunnerResult, T as SqlPlannerConflict, _ as SqlMigrationRunner, a as FieldEvent, b as SqlMigrationRunnerExecuteOptions, c as SqlControlAdapterDescriptor, d as SqlMigrationPlanContractInfo, f as SqlMigrationPlanOperation, g as SqlMigrationPlannerPlanOptions, h as SqlMigrationPlanner, i as ExpandNativeTypeInput, j as StorageTypePlanResult, k as SqlPlannerResult, l as SqlControlExtensionDescriptor, m as SqlMigrationPlanOperationTarget, n as CodecControlHooks, o as FieldEventContext, p as SqlMigrationPlanOperationStep, r as CreateSqlMigrationPlanOptions, s as ResolveIdentityValueInput, u as SqlMigrationPlan, v as SqlMigrationRunnerErrorCode, w as SqlPlanTargetDetails, x as SqlMigrationRunnerFailure, y as SqlMigrationRunnerExecuteCallbacks } from "./types-IqZMLrFC-
|
|
4
|
-
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-
|
|
5
|
-
import { A as partitionCallsByControlPolicy, B as temporalCodecPresetWithPrecision, C as buildNativeTypeExpander, D as createMigrationPlan, E as controlPolicyForCall, F as resolveValueSetValues, I as runnerFailure, L as runnerSuccess, M as planFieldEventOperations, N as plannerFailure, O as detectDestructiveChanges, P as plannerSuccess, R as temporalAuthoringPresets, S as assembleAuthoringContributions, T as contractToSchemaIR, V as timestampNowControlDescriptor, _ as SqlControlTargetDescriptor, a as EnumNamespaceSchemaResolver, b as TargetMigrationsCapability, c as MigrationOperationPolicy, d as MigrationPlanner, f as MigrationPlannerConflict, g as SqlControlFamilyInstance, h as PlanFieldEventOperationsOptions, i as DefaultResolver, j as partitionIssuesByControlPolicy, k as extractCodecControlHooks, l as MigrationPlan, m as NativeTypeExpander, n as ControlPolicySubject, o as INIT_ADDITIVE_POLICY, p as MigrationPlannerResult, r as DefaultRenderer, s as MigrationOperationClass, t as ContractToSchemaIROptions, u as MigrationPlanOperation, v as SqlDescribedContractSpace, w as contractNamespaceToSchemaIR, y as SuppressionRecord, z as temporalCodecPreset } from "./control-
|
|
6
|
-
import "./control-adapter-
|
|
7
|
-
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-
|
|
8
|
-
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-
|
|
9
|
-
import { t as SqlMigration } from "./migration-
|
|
2
|
+
import { i as SqlControlAdapter, n as Lowerer, o as arraysEqual, r as NativeTypeNormalizer, t as ExecuteRequestLowerer } from "./control-adapter-C99J7aEF-mjOpiO_9.mjs";
|
|
3
|
+
import { A as SqlPlannerSuccessResult, C as SqlMigrationRunnerSuccessValue, D as SqlPlannerConflictLocation, E as SqlPlannerConflictKind, O as SqlPlannerFailureResult, S as SqlMigrationRunnerResult, T as SqlPlannerConflict, _ as SqlMigrationRunner, a as FieldEvent, b as SqlMigrationRunnerExecuteOptions, c as SqlControlAdapterDescriptor, d as SqlMigrationPlanContractInfo, f as SqlMigrationPlanOperation, g as SqlMigrationPlannerPlanOptions, h as SqlMigrationPlanner, i as ExpandNativeTypeInput, j as StorageTypePlanResult, k as SqlPlannerResult, l as SqlControlExtensionDescriptor, m as SqlMigrationPlanOperationTarget, n as CodecControlHooks, o as FieldEventContext, p as SqlMigrationPlanOperationStep, r as CreateSqlMigrationPlanOptions, s as ResolveIdentityValueInput, u as SqlMigrationPlan, v as SqlMigrationRunnerErrorCode, w as SqlPlanTargetDetails, x as SqlMigrationRunnerFailure, y as SqlMigrationRunnerExecuteCallbacks } from "./types-IqZMLrFC-C1Zu2oo9.mjs";
|
|
4
|
+
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-zSwkxqxK.mjs";
|
|
5
|
+
import { A as partitionCallsByControlPolicy, B as temporalCodecPresetWithPrecision, C as buildNativeTypeExpander, D as createMigrationPlan, E as controlPolicyForCall, F as resolveValueSetValues, I as runnerFailure, L as runnerSuccess, M as planFieldEventOperations, N as plannerFailure, O as detectDestructiveChanges, P as plannerSuccess, R as temporalAuthoringPresets, S as assembleAuthoringContributions, T as contractToSchemaIR, V as timestampNowControlDescriptor, _ as SqlControlTargetDescriptor, a as EnumNamespaceSchemaResolver, b as TargetMigrationsCapability, c as MigrationOperationPolicy, d as MigrationPlanner, f as MigrationPlannerConflict, g as SqlControlFamilyInstance, h as PlanFieldEventOperationsOptions, i as DefaultResolver, j as partitionIssuesByControlPolicy, k as extractCodecControlHooks, l as MigrationPlan, m as NativeTypeExpander, n as ControlPolicySubject, o as INIT_ADDITIVE_POLICY, p as MigrationPlannerResult, r as DefaultRenderer, s as MigrationOperationClass, t as ContractToSchemaIROptions, u as MigrationPlanOperation, v as SqlDescribedContractSpace, w as contractNamespaceToSchemaIR, y as SuppressionRecord, z as temporalCodecPreset } from "./control-BqrVERXN.mjs";
|
|
6
|
+
import "./control-adapter-xEtAQKd9.mjs";
|
|
7
|
+
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-CIIMSaVD.mjs";
|
|
8
|
+
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-Cvj3eU-K.mjs";
|
|
9
|
+
import { t as SqlMigration } from "./migration-Dtyw2JeL.mjs";
|
|
10
10
|
import { _ as toEnumMemberName, a as PslPrinterOptions, b as toModelName, c as PslTypeResolution, d as deriveBackRelationFieldName, f as deriveRelationFieldName, g as pluralize, h as parseRawDefault, i as InferredRelations, l as RelationField, m as mapDefault, n as DefaultMappingResult, o as PslTypeMap, p as inferRelations, r as EnumInfo, s as PslTypeReference, t as DefaultMappingOptions, u as buildChildRelationField, v as toEnumName, y as toFieldName } from "./psl-infer-6je61Z6J.mjs";
|
|
11
|
-
import { a as timestampNowRuntimeGenerator, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-
|
|
11
|
+
import { a as timestampNowRuntimeGenerator, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-DXPO2ytG.mjs";
|
|
12
12
|
import { n as parseContractMarkerRow, t as ContractMarkerRow } from "./verify-zDRnw0Rn.mjs";
|
|
13
13
|
export { type CodecControlHooks, type ContractMarkerRow, type ContractToSchemaIROptions, type ControlPolicySubject, type CreateSqlMigrationPlanOptions, type DefaultMappingOptions, type DefaultMappingResult, type DefaultRenderer, type DefaultResolver, type EnumInfo, type EnumNamespaceSchemaResolver, type ExecuteRequestLowerer, type ExpandNativeTypeInput, type FieldEvent, type FieldEventContext, INIT_ADDITIVE_POLICY, type InferredRelations, type Lowerer, SqlMigration as Migration, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type NativeTypeExpander, type NativeTypeNormalizer, type PlanFieldEventOperationsOptions, type PslPrinterOptions, type PslTypeMap, type PslTypeReference, type PslTypeResolution, type RelationField, type ResolveIdentityValueInput, type ResolvedDomainModel, type ResolvedStorageTable, SqlContractSerializer, SqlContractSerializerBase, type SqlControlAdapter, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDescribedContractSpace, type SqlDiffVerdict, type SqlDiffVerdictInput, type SqlEntityHydrationFactory, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, SqlSchemaVerifierBase, type StorageTypePlanResult, type StorageTypeVerdict, type StorageTypeVerdictInput, type SuppressionRecord, type TargetMigrationsCapability, UNBOUND_DOMAIN_NAMESPACE_ID, type VerifySqlSchemaByDiffInput, arraysEqual, assembleAuthoringContributions, buildChildRelationField, buildNativeTypeExpander, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, extractCodecControlHooks, inferRelations, mapDefault, parseContractMarkerRow, parseRawDefault, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventOperations, plannerFailure, plannerSuccess, pluralize, resolveDomainModel, resolveStorageTable, resolveValueSetValues, runnerFailure, runnerSuccess, temporalAuthoringPresets, temporalCodecPreset, temporalCodecPresetWithPrecision, timestampNowControlDescriptor, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, verifySqlSchemaByDiff };
|
package/dist/family.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { a as computeStorageTypeVerdict, i as computeSqlDiffVerdict, n as classi
|
|
|
3
3
|
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-2oBWuxTe-B9hzBBv1.mjs";
|
|
4
4
|
import { n as parseContractMarkerRow } from "./verify-E6Dd2vYp-gYwnlhLm.mjs";
|
|
5
5
|
import { a as timestampNowControlDescriptor, i as temporalCodecPresetWithPrecision, n as temporalAuthoringPresets, r as temporalCodecPreset } from "./timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs";
|
|
6
|
-
import { _ as runnerSuccess, a as contractToSchemaIR, c as createMigrationPlan, d as partitionIssuesByControlPolicy, f as planFieldEventOperations, g as runnerFailure, h as resolveValueSetValues, i as contractNamespaceToSchemaIR, l as detectDestructiveChanges, m as plannerSuccess, n as assembleAuthoringContributions, o as controlPolicyForCall, p as plannerFailure, r as buildNativeTypeExpander, t as INIT_ADDITIVE_POLICY, u as partitionCallsByControlPolicy } from "./control-
|
|
6
|
+
import { _ as runnerSuccess, a as contractToSchemaIR, c as createMigrationPlan, d as partitionIssuesByControlPolicy, f as planFieldEventOperations, g as runnerFailure, h as resolveValueSetValues, i as contractNamespaceToSchemaIR, l as detectDestructiveChanges, m as plannerSuccess, n as assembleAuthoringContributions, o as controlPolicyForCall, p as plannerFailure, r as buildNativeTypeExpander, t as INIT_ADDITIVE_POLICY, u as partitionCallsByControlPolicy } from "./control-mG3RlNzm.mjs";
|
|
7
7
|
import { t as arraysEqual } from "./diff-B16bL_IR.mjs";
|
|
8
8
|
import { t as SqlSchemaVerifierBase } from "./ir-I-xciGUH.mjs";
|
|
9
9
|
import { t as SqlMigration } from "./migration-CK4oePIo.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as SqlControlAdapterDescriptor, i as SqlControlAdapter, n as Lowerer, t as ExecuteRequestLowerer } from "./control-adapter-C99J7aEF-
|
|
2
|
-
import "./control-adapter-
|
|
1
|
+
import { a as SqlControlAdapterDescriptor, i as SqlControlAdapter, n as Lowerer, t as ExecuteRequestLowerer } from "./control-adapter-C99J7aEF-mjOpiO_9.mjs";
|
|
2
|
+
import "./control-adapter-xEtAQKd9.mjs";
|
|
3
3
|
export type { ExecuteRequestLowerer, Lowerer, SqlControlAdapter, SqlControlAdapterDescriptor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SqlPlannerSuccessResult, C as SqlMigrationRunnerSuccessValue, D as SqlPlannerConflictLocation, E as SqlPlannerConflictKind, O as SqlPlannerFailureResult, S as SqlMigrationRunnerResult, T as SqlPlannerConflict, _ as SqlMigrationRunner, a as FieldEvent, b as SqlMigrationRunnerExecuteOptions, c as SqlControlAdapterDescriptor, d as SqlMigrationPlanContractInfo, f as SqlMigrationPlanOperation, g as SqlMigrationPlannerPlanOptions, h as SqlMigrationPlanner, i as ExpandNativeTypeInput, j as StorageTypePlanResult, k as SqlPlannerResult, l as SqlControlExtensionDescriptor, m as SqlMigrationPlanOperationTarget, n as CodecControlHooks, o as FieldEventContext, p as SqlMigrationPlanOperationStep, r as CreateSqlMigrationPlanOptions, s as ResolveIdentityValueInput, u as SqlMigrationPlan, v as SqlMigrationRunnerErrorCode, w as SqlPlanTargetDetails, x as SqlMigrationRunnerFailure, y as SqlMigrationRunnerExecuteCallbacks } from "./types-IqZMLrFC-
|
|
2
|
-
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-
|
|
3
|
-
import { A as partitionCallsByControlPolicy, B as temporalCodecPresetWithPrecision, C as buildNativeTypeExpander, D as createMigrationPlan, E as controlPolicyForCall, F as resolveValueSetValues, I as runnerFailure, L as runnerSuccess, M as planFieldEventOperations, N as plannerFailure, O as detectDestructiveChanges, P as plannerSuccess, R as temporalAuthoringPresets, S as assembleAuthoringContributions, T as contractToSchemaIR, V as timestampNowControlDescriptor, _ as SqlControlTargetDescriptor, a as EnumNamespaceSchemaResolver, b as TargetMigrationsCapability, c as MigrationOperationPolicy, d as MigrationPlanner, f as MigrationPlannerConflict, g as SqlControlFamilyInstance, h as PlanFieldEventOperationsOptions, i as DefaultResolver, j as partitionIssuesByControlPolicy, k as extractCodecControlHooks, l as MigrationPlan, m as NativeTypeExpander, n as ControlPolicySubject, o as INIT_ADDITIVE_POLICY, p as MigrationPlannerResult, r as DefaultRenderer, s as MigrationOperationClass, t as ContractToSchemaIROptions, u as MigrationPlanOperation, v as SqlDescribedContractSpace, w as contractNamespaceToSchemaIR, x as _default, y as SuppressionRecord, z as temporalCodecPreset } from "./control-
|
|
1
|
+
import { A as SqlPlannerSuccessResult, C as SqlMigrationRunnerSuccessValue, D as SqlPlannerConflictLocation, E as SqlPlannerConflictKind, O as SqlPlannerFailureResult, S as SqlMigrationRunnerResult, T as SqlPlannerConflict, _ as SqlMigrationRunner, a as FieldEvent, b as SqlMigrationRunnerExecuteOptions, c as SqlControlAdapterDescriptor, d as SqlMigrationPlanContractInfo, f as SqlMigrationPlanOperation, g as SqlMigrationPlannerPlanOptions, h as SqlMigrationPlanner, i as ExpandNativeTypeInput, j as StorageTypePlanResult, k as SqlPlannerResult, l as SqlControlExtensionDescriptor, m as SqlMigrationPlanOperationTarget, n as CodecControlHooks, o as FieldEventContext, p as SqlMigrationPlanOperationStep, r as CreateSqlMigrationPlanOptions, s as ResolveIdentityValueInput, u as SqlMigrationPlan, v as SqlMigrationRunnerErrorCode, w as SqlPlanTargetDetails, x as SqlMigrationRunnerFailure, y as SqlMigrationRunnerExecuteCallbacks } from "./types-IqZMLrFC-C1Zu2oo9.mjs";
|
|
2
|
+
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-zSwkxqxK.mjs";
|
|
3
|
+
import { A as partitionCallsByControlPolicy, B as temporalCodecPresetWithPrecision, C as buildNativeTypeExpander, D as createMigrationPlan, E as controlPolicyForCall, F as resolveValueSetValues, I as runnerFailure, L as runnerSuccess, M as planFieldEventOperations, N as plannerFailure, O as detectDestructiveChanges, P as plannerSuccess, R as temporalAuthoringPresets, S as assembleAuthoringContributions, T as contractToSchemaIR, V as timestampNowControlDescriptor, _ as SqlControlTargetDescriptor, a as EnumNamespaceSchemaResolver, b as TargetMigrationsCapability, c as MigrationOperationPolicy, d as MigrationPlanner, f as MigrationPlannerConflict, g as SqlControlFamilyInstance, h as PlanFieldEventOperationsOptions, i as DefaultResolver, j as partitionIssuesByControlPolicy, k as extractCodecControlHooks, l as MigrationPlan, m as NativeTypeExpander, n as ControlPolicySubject, o as INIT_ADDITIVE_POLICY, p as MigrationPlannerResult, r as DefaultRenderer, s as MigrationOperationClass, t as ContractToSchemaIROptions, u as MigrationPlanOperation, v as SqlDescribedContractSpace, w as contractNamespaceToSchemaIR, x as _default, y as SuppressionRecord, z as temporalCodecPreset } from "./control-BqrVERXN.mjs";
|
|
4
4
|
export { type CodecControlHooks, type ContractToSchemaIROptions, type ControlPolicySubject, type CreateSqlMigrationPlanOptions, type DefaultRenderer, type DefaultResolver, type EnumNamespaceSchemaResolver, type ExpandNativeTypeInput, type FieldEvent, type FieldEventContext, INIT_ADDITIVE_POLICY, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type NativeTypeExpander, type PlanFieldEventOperationsOptions, type ResolveIdentityValueInput, type SqlControlAdapterDescriptor, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDescribedContractSpace, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, type StorageTypePlanResult, type SuppressionRecord, type TargetMigrationsCapability, assembleAuthoringContributions, buildNativeTypeExpander, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, _default as default, detectDestructiveChanges, extractCodecControlHooks, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventOperations, plannerFailure, plannerSuccess, resolveValueSetValues, runnerFailure, runnerSuccess, temporalAuthoringPresets, temporalCodecPreset, temporalCodecPresetWithPrecision, timestampNowControlDescriptor };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { o as extractCodecControlHooks } from "./schema-verify-vtFZbmGq-BNfTr6fU.mjs";
|
|
2
2
|
import { a as timestampNowControlDescriptor, i as temporalCodecPresetWithPrecision, n as temporalAuthoringPresets, r as temporalCodecPreset } from "./timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs";
|
|
3
|
-
import { _ as runnerSuccess, a as contractToSchemaIR, c as createMigrationPlan, d as partitionIssuesByControlPolicy, f as planFieldEventOperations, g as runnerFailure, h as resolveValueSetValues, i as contractNamespaceToSchemaIR, l as detectDestructiveChanges, m as plannerSuccess, n as assembleAuthoringContributions, o as controlPolicyForCall, p as plannerFailure, r as buildNativeTypeExpander, s as control_default, t as INIT_ADDITIVE_POLICY, u as partitionCallsByControlPolicy } from "./control-
|
|
3
|
+
import { _ as runnerSuccess, a as contractToSchemaIR, c as createMigrationPlan, d as partitionIssuesByControlPolicy, f as planFieldEventOperations, g as runnerFailure, h as resolveValueSetValues, i as contractNamespaceToSchemaIR, l as detectDestructiveChanges, m as plannerSuccess, n as assembleAuthoringContributions, o as controlPolicyForCall, p as plannerFailure, r as buildNativeTypeExpander, s as control_default, t as INIT_ADDITIVE_POLICY, u as partitionCallsByControlPolicy } from "./control-mG3RlNzm.mjs";
|
|
4
4
|
export { INIT_ADDITIVE_POLICY, assembleAuthoringContributions, buildNativeTypeExpander, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, control_default as default, detectDestructiveChanges, extractCodecControlHooks, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventOperations, plannerFailure, plannerSuccess, resolveValueSetValues, runnerFailure, runnerSuccess, temporalAuthoringPresets, temporalCodecPreset, temporalCodecPresetWithPrecision, timestampNowControlDescriptor };
|
package/dist/family__diff.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { o as arraysEqual, r as NativeTypeNormalizer } from "./control-adapter-C99J7aEF-
|
|
2
|
-
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-
|
|
1
|
+
import { o as arraysEqual, r as NativeTypeNormalizer } from "./control-adapter-C99J7aEF-mjOpiO_9.mjs";
|
|
2
|
+
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-CIIMSaVD.mjs";
|
|
3
3
|
export { type NativeTypeNormalizer, type SqlDiffVerdict, type SqlDiffVerdictInput, type StorageTypeVerdict, type StorageTypeVerdictInput, type VerifySqlSchemaByDiffInput, arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
|
package/dist/family__ir.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-
|
|
1
|
+
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-Cvj3eU-K.mjs";
|
|
2
2
|
export { SqlContractSerializer, SqlContractSerializerBase, type SqlEntityHydrationFactory, SqlSchemaVerifierBase };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SqlMigration } from "./migration-
|
|
1
|
+
import { t as SqlMigration } from "./migration-Dtyw2JeL.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-DUwyRJmP.mjs";
|
|
2
|
-
import { a as timestampNowRuntimeGenerator, i as sqlRuntimeFamilyDescriptor, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-
|
|
2
|
+
import { a as timestampNowRuntimeGenerator, i as sqlRuntimeFamilyDescriptor, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-DXPO2ytG.mjs";
|
|
3
3
|
export { type ResolvedDomainModel, type ResolvedStorageTable, UNBOUND_DOMAIN_NAMESPACE_ID, sqlRuntimeFamilyDescriptor as default, resolveDomainModel, resolveStorageTable, timestampNowRuntimeGenerator };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./types-
|
|
1
|
+
import { w as QueryOperationTypeEntry } from "./types-D_plAPEe-DqK5It_K.mjs";
|
|
2
|
+
import "./types-wy2-Y8wQ.mjs";
|
|
3
3
|
import { OperationDescriptor, OperationDescriptors, OperationRegistry } from "@prisma/orm-framework/operations";
|
|
4
4
|
//#region ../../../2-sql/1-core/operations/dist/index.d.mts
|
|
5
5
|
//#region src/index.d.ts
|
|
@@ -22,4 +22,4 @@ type SqlOperationRegistry = OperationRegistry<SqlOperationEntry>;
|
|
|
22
22
|
declare function createSqlOperationRegistry(): SqlOperationRegistry;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { SqlOperationRegistry as a, SqlOperationEntry as i, SqlOperationDescriptor as n, createSqlOperationRegistry as o, SqlOperationDescriptors as r, SqlLoweringSpec as t };
|
|
25
|
-
//# sourceMappingURL=index-
|
|
25
|
+
//# sourceMappingURL=index-BZF7Wehu.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BZF7Wehu.d.mts","names":[],"sources":["../../../../2-sql/1-core/operations/dist/index.d.mts"],"mappings":";;;;;UAGU;WACC;WACA;WACA;;;;;;;;;KASN,oBAAoB;KACpB,yBAAyB,oBAAoB;KAC7C,0BAA0B,qBAAqB;KAC/C,uBAAuB,kBAAkB;iBAC7B,8BAA8B"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { a as CodecRef$1, n as Codec$1, p as SqlCodecCallContext, s as ContractCodecRegistry } from "./codec-types-MOaceoPi-C5eL2sao.mjs";
|
|
2
1
|
import { c as SqlStorage } from "./sql-storage-B0QwiTg6-B8DVctJm.mjs";
|
|
3
|
-
import "./types-
|
|
4
|
-
import { r as SqlOperationDescriptors } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
import { E as SqlQueryable, _ as SqlDriver, g as SqlConnection, o as MarkerReadResult, t as Adapter } from "./ast
|
|
7
|
-
import { a as Expression, i as CodecValue, o as RawCodecInferer, r as CodecTypesBase } from "./expression-
|
|
8
|
-
import { t as SqlExecutionPlan } from "./sql-execution-plan-
|
|
9
|
-
import { t as SqlQueryPlan } from "./plan-
|
|
10
|
-
import "./plan-
|
|
11
|
-
import { n as CodecDescriptorRegistry, r as ExecutionContext } from "./query-lane-context-
|
|
12
|
-
import "./query-lane-context-
|
|
13
|
-
import { i as SqlParamRefMutator } from "./middleware-
|
|
14
|
-
import "./middleware-
|
|
15
|
-
import { y as RuntimeScope } from "./types-
|
|
16
|
-
import "./types-
|
|
2
|
+
import "./types-wy2-Y8wQ.mjs";
|
|
3
|
+
import { r as SqlOperationDescriptors } from "./index-BZF7Wehu.mjs";
|
|
4
|
+
import { Et as SqlCodecCallContext, O as ContractCodecRegistry, T as CodecRef$1, lt as LoweredParam, m as AnyQueryAst, ut as LoweredStatement, x as Codec$1 } from "./types-BwePDa3m-BVrPIi8V.mjs";
|
|
5
|
+
import { E as SqlQueryable, _ as SqlDriver, g as SqlConnection, o as MarkerReadResult, t as Adapter } from "./ast--BZUAzN1.mjs";
|
|
6
|
+
import { a as Expression, i as CodecValue, o as RawCodecInferer, r as CodecTypesBase } from "./expression-KPBpeH4T.mjs";
|
|
7
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-Da_d82pz-IHBEmGSa.mjs";
|
|
8
|
+
import { t as SqlQueryPlan } from "./plan-Bmp5R9sq-DKMRkx6Z.mjs";
|
|
9
|
+
import "./plan-mKgmSe0R.mjs";
|
|
10
|
+
import { n as CodecDescriptorRegistry, r as ExecutionContext } from "./query-lane-context-DjyAyYht-HDNYE_oF.mjs";
|
|
11
|
+
import "./query-lane-context-Dcj4eXUl.mjs";
|
|
12
|
+
import { i as SqlParamRefMutator } from "./middleware-eb7YwdD4-D0M6ACQ-.mjs";
|
|
13
|
+
import "./middleware-ChwIEKBC.mjs";
|
|
14
|
+
import { y as RuntimeScope } from "./types-dD8JJfeD-BOvMw2Iu.mjs";
|
|
15
|
+
import "./types-Cty2fvYD.mjs";
|
|
17
16
|
import { Contract, JsonValue, PlanMeta } from "@prisma/orm-framework/contract/types";
|
|
18
17
|
import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
|
|
19
18
|
import { AfterExecuteResult, AfterExecuteResult as AfterExecuteResult$1, AsyncIterableResult, ExecutionPlan, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeLog as Log, RuntimeMiddleware, RuntimeMiddlewareContext } from "@prisma/orm-framework/components/runtime";
|
|
@@ -508,4 +507,4 @@ interface LintsOptions {
|
|
|
508
507
|
declare function lints(options?: LintsOptions): SqlMiddleware;
|
|
509
508
|
//#endregion
|
|
510
509
|
export { RuntimeQueryable as A, SqlRuntimeDriverInstance as B, PreparedStatementImpl as C, RuntimeFamilyAdapter as D, RuntimeConnection as E, SqlMiddleware as F, TelemetryOutcome as G, SqlRuntimeExtensionInstance as H, SqlMiddlewareContext as I, createExecutionContext as J, TransactionContext as K, SqlRuntimeAdapterDescriptor as L, RuntimeTransaction as M, SqlExecutionStack as N, RuntimeMutationDefaultGenerator as O, SqlExecutionStackWithDriver as P, withTransaction as Q, SqlRuntimeAdapterInstance as R, PreparedStatement as S, Runtime as T, SqlRuntimeTargetDescriptor as U, SqlRuntimeExtensionDescriptor as V, SqlStaticContributions as W, deriveParamMetadata as X, createSqlExecutionStack as Y, encodeParamsWithMetadata as Z, GeneratorStability as _, budgets as a, ParamsFromDeclaration as b, lints as c, validateContractCodecMappings as d, BindSiteParams as f, DeclaredNullable as g, DeclaredCodecId as h, Log as i, RuntimeTelemetryEvent as j, RuntimeParameterizedCodecDescriptor as k, lowerSqlPlan as l, Declaration as m, BudgetsOptions as n, createAstCodecRegistry as o, ConnectionProvider as p, VerifyMarkerOption as q, LintsOptions as r, extractCodecIds as s, AfterExecuteResult$1 as t, validateCodecRegistryCompleteness as u, MarkerReader as v, PreparedStatementInternals as w, PrepareCallback as x, ParamSpec as y, SqlRuntimeBase as z };
|
|
511
|
-
//# sourceMappingURL=index-
|
|
510
|
+
//# sourceMappingURL=index-D_QTT11u.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D_QTT11u.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/prepared-statement-D4zOlprk.d.mts","../../../../2-sql/5-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;UAaU;WACC,OAAO;WACP;;iBAEM,oBAAoB,KAAK,uBAAuB;iBAChD,yBAAyB,4BAA4B,mBAAmB,iBAAiB,KAAK,qBAAqB,iBAAiB,wBAAwB;;;UAGnK,6BAA6B;WAC5B,UAAU,SAAS;;;;;;UAMpB;WACC,KAAK;WACL,MAAM;;UAEP,cAAc,kBAAkB,0BAA0B,iCAAiC,kBAAkB,kBAAkB,mBAAmB;WACjJ;;;;;;;;;;;;;;;;;;;EAmBT,eAAe,OAAO,WAAW,KAAK,uBAAuB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BrE,eAAe,MAAM,kBAAkB,KAAK,sBAAsB,SAAS,mBAAmB,oBAAoB;EAClH,OAAO,KAAK,yBAAyB,MAAM,kBAAkB,KAAK,uBAAuB;EACzF,cAAc,MAAM,kBAAkB,QAAQ,oBAAoB,KAAK,uBAAuB;;;;KAI3F;EACH;EACA;;UAEQ;WACC,SAAS;WACT,QAAQ,oBAAoB;WAC5B,YAAY,oBAAoB;WAChC,gBAAgB;WAChB,aAAa;;;;KAenB,UAAU,WAAW,iBAAiB,yBAAyB;WACzD,eAAe;WACf,aAAa;WACb;;KAEN,YAAY,WAAW,iBAAiB,kBAAkB,SAAS,eAAe,UAAU;KAC5F,gBAAgB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BAAkB,QAAQ,QAAQ,UAAU,wBAAwB,oBAAoB;;;;;;;;;;;;;;iBCrazF,uBAAuB,aAAa,0BAA0B;;;iBAG9D,gBAAgB,UAAU,SAAS,cAAc;iBACjD,8BAA8B,UAAU,yBAAyB,UAAU,SAAS;iBACpF,kCAAkC,UAAU,yBAAyB,UAAU,SAAS;;;;;;;;;;;;iBAYxF,aAAa,KAAK,SAAS,QAAQ,aAAa,SAAS,aAAa,mBAAmB,UAAU,SAAS,aAAa,WAAW,aAAa,OAAO,iBAAiB;;;UAGhL;WACC;WACA;WACA,YAAY;WACZ;WACA;aACE;aACA;;;iBAGI,QAAQ,UAAU,iBAAiB;;;UAG1C;WACC;aACE;aACA;aACA;aACA;aACA;;WAEF;;;;;;;;;;;;;;;;iBAgBM,MAAM,UAAU,eAAe"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as SqlStorage } from "./sql-storage-B0QwiTg6-B8DVctJm.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-D_plAPEe-DqK5It_K.mjs";
|
|
3
3
|
import { a as IndexTypeRegistry } from "./index-types-DPVhsW0v-D-BikM4h.mjs";
|
|
4
4
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
//#region ../../../2-sql/1-core/contract/dist/index-type-validation.d.mts
|
|
@@ -7,4 +7,4 @@ import { Contract } from "@prisma/orm-framework/contract/types";
|
|
|
7
7
|
declare function validateIndexTypes(contract: Contract<SqlStorage>, indexTypeRegistry: IndexTypeRegistry): void;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { validateIndexTypes as t };
|
|
10
|
-
//# sourceMappingURL=index-type-validation-
|
|
10
|
+
//# sourceMappingURL=index-type-validation-D_vuj-76.d.mts.map
|
package/dist/{index-type-validation-DN0L2mqm.d.mts.map → index-type-validation-D_vuj-76.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-type-validation-
|
|
1
|
+
{"version":3,"file":"index-type-validation-D_vuj-76.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/index-type-validation.d.mts"],"mappings":";;;;;;iBAKiB,mBAAmB,UAAU,SAAS,aAAa,mBAAmB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as SqlStorage, s as SqlNamespaceInput, u as SqlStorageTypeEntry } from "./sql-storage-B0QwiTg6-B8DVctJm.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-wy2-Y8wQ.mjs";
|
|
3
3
|
import { AnyEntityKindDescriptor, Namespace } from "@prisma/orm-framework/components/ir";
|
|
4
4
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { ContractSerializer, SchemaDiffIssue, SchemaVerifier, SchemaVerifyOptions, SchemaVerifyResult } from "@prisma/orm-framework/components/control";
|
|
@@ -120,4 +120,4 @@ declare abstract class SqlSchemaVerifierBase<TContract, TSchema> implements Sche
|
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
122
|
export { SqlSchemaVerifierBase as i, SqlContractSerializerBase as n, SqlEntityHydrationFactory as r, SqlContractSerializer as t };
|
|
123
|
-
//# sourceMappingURL=ir-
|
|
123
|
+
//# sourceMappingURL=ir-Cvj3eU-K.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ir-
|
|
1
|
+
{"version":3,"file":"ir-Cvj3eU-K.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/ir.d.mts"],"mappings":";;;;;;;;KAMK,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;uBAyBX,0BAA0B,kBAAkB,SAAS,wBAAwB,mBAAmB;qBAClG,yBAAyB,oBAAoB;mBAC/C;mBACA;EACjB,YAAY,0BAA0B,oBAAoB,4BAA4B,2BAA2B;EACjH,oBAAoB,UAAU,YAAY,WAAW,gBAAgB;EACrE,kBAAkB,UAAU,YAAY;EACxC,0DAA0D;EAC1D,kDAAkD;YACxC,0BAA0B,gBAAgB,SAAS;YACnD,kBAAkB,WAAW,SAAS,cAAc,SAAS;YAC7D,uBAAuB,YAAY,SAAS,eAAe,4BAA4B,SAAS,eAAe;YAC/G,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;YAClF,wBAAwB,OAAO,sBAAsB;YACrD,wBAAwB,UAAU,SAAS,cAAc;;;;;;;;;;;YAWzD,0BAA0B,SAAS,SAAS,eAAe,SAAS,6BAA6B,eAAe,eAAe;UACjI;YACE,oBAAoB,iBAAiB;UACvC;;;;;;;;;;;;;;;;;;cAkBI,8BAA8B,0BAA0B,SAAS;EAC7E;;;;;;;;;;;;;;;;;;;;;;;;uBAwBqB,sBAAsB,WAAW,oBAAoB,eAAe,WAAW;EACpG,aAAa,SAAS,oBAAoB,WAAW,WAAW;;;;;;;qBAO7C,sBAAsB,SAAS,oBAAoB,WAAW,oBAAoB;;;;;;qBAMlF,uBAAuB,SAAS,oBAAoB,WAAW,oBAAoB"}
|