@prisma/orm-family-sql 8.0.0-rc.11-dev.29 → 8.0.0-rc.11-dev.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ast-BAsreJBG.d.mts → ast-D7JjbK8E.d.mts} +3 -3
- package/dist/{ast-BAsreJBG.d.mts.map → ast-D7JjbK8E.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-C1ogrr_x-DZtwhqV-.mjs → authoring-type-constructors-C1ogrr_x-BziNu7gs.mjs} +2 -2
- package/dist/{authoring-type-constructors-C1ogrr_x-DZtwhqV-.mjs.map → authoring-type-constructors-C1ogrr_x-BziNu7gs.mjs.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +8 -8
- package/dist/builder__types.d.mts +2 -2
- package/dist/{config-types-Bd3ud-mX.d.mts → config-types-C-rrJ_8P.d.mts} +3 -3
- package/dist/{config-types-Bd3ud-mX.d.mts.map → config-types-C-rrJ_8P.d.mts.map} +1 -1
- package/dist/{config-types-tDX8p7v3.mjs → config-types-jBPoHm6t.mjs} +2 -2
- package/dist/{config-types-tDX8p7v3.mjs.map → config-types-jBPoHm6t.mjs.map} +1 -1
- package/dist/{contract-builder-Bwe2diF2.d.mts → contract-builder-C8uKThYB.d.mts} +23 -5
- package/dist/contract-builder-C8uKThYB.d.mts.map +1 -0
- package/dist/{contract-builder-D1f6k8r4.mjs → contract-builder-CkT67-Wq.mjs} +50 -3
- package/dist/contract-builder-CkT67-Wq.mjs.map +1 -0
- package/dist/contract-prisma7__provider.d.mts +1 -1
- package/dist/contract-prisma7__provider.mjs +4 -4
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +4 -4
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +3 -3
- package/dist/contract-psl__attribute-specs.d.mts.map +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +4 -4
- package/dist/contract-ts.mjs +4 -4
- package/dist/contract-ts__config-types.d.mts +1 -1
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +3 -3
- package/dist/contract-ts__contract-builder.mjs +3 -3
- package/dist/contract.d.mts +6 -6
- package/dist/contract.mjs +2 -2
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__types.d.mts +2 -2
- package/dist/contract__validators.d.mts +2 -2
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-D7OmKjH2.d.mts → control-CuiTzy6O.d.mts} +25 -16
- package/dist/control-CuiTzy6O.d.mts.map +1 -0
- package/dist/{control-adapter-C99J7aEF-BLc1Uog8.d.mts → control-adapter-C99J7aEF-QiVMjPGA.d.mts} +8 -8
- package/dist/{control-adapter-C99J7aEF-BLc1Uog8.d.mts.map → control-adapter-C99J7aEF-QiVMjPGA.d.mts.map} +1 -1
- package/dist/control-adapter-DjoDaUzQ.d.mts +1 -0
- package/dist/{control-DCVNWLzt.mjs → control-dqbsNN69.mjs} +45 -7
- package/dist/control-dqbsNN69.mjs.map +1 -0
- package/dist/{db-BhQdL6Za-817R9elv.d.mts → db-BhQdL6Za-CnAcF6Zh.d.mts} +8 -8
- package/dist/{db-BhQdL6Za-817R9elv.d.mts.map → db-BhQdL6Za-CnAcF6Zh.d.mts.map} +1 -1
- package/dist/{ddl-types-CA-aj1rO-B_BdxyXC.d.mts → ddl-types-CA-aj1rO-_giNpXNM.d.mts} +3 -3
- package/dist/{ddl-types-CA-aj1rO-B_BdxyXC.d.mts.map → ddl-types-CA-aj1rO-_giNpXNM.d.mts.map} +1 -1
- package/dist/{derived-checks-DGjY5t7S-CzJmkeZR.mjs → derived-checks-DGjY5t7S-DofD5V_2.mjs} +2 -2
- package/dist/{derived-checks-DGjY5t7S-CzJmkeZR.mjs.map → derived-checks-DGjY5t7S-DofD5V_2.mjs.map} +1 -1
- package/dist/{derived-checks-DPdD01O0-DNBs1ZDA.d.mts → derived-checks-DPdD01O0-DCKdvxNK.d.mts} +2 -2
- package/dist/{derived-checks-DPdD01O0-DNBs1ZDA.d.mts.map → derived-checks-DPdD01O0-DCKdvxNK.d.mts.map} +1 -1
- package/dist/{diff-DkowDnsu.d.mts → diff-BB4zE5J1.d.mts} +8 -8
- package/dist/{diff-DkowDnsu.d.mts.map → diff-BB4zE5J1.d.mts.map} +1 -1
- package/dist/{expression-BtebKpK2.d.mts → expression-C7JqFgwS.d.mts} +6 -6
- package/dist/{expression-BtebKpK2.d.mts.map → expression-C7JqFgwS.d.mts.map} +1 -1
- package/dist/{factories-P3qBQhO-.d.mts → factories-B9PfKd5k.d.mts} +2 -2
- package/dist/{factories-P3qBQhO-.d.mts.map → factories-B9PfKd5k.d.mts.map} +1 -1
- package/dist/family.d.mts +12 -11
- package/dist/family.mjs +4 -3
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +5 -4
- package/dist/family__control.mjs +3 -2
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.d.mts.map +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__runtime.d.mts +1 -1
- package/dist/{index-CLAshwKN.d.mts → index-C6_--MKi.d.mts} +3 -3
- package/dist/{index-CLAshwKN.d.mts.map → index-C6_--MKi.d.mts.map} +1 -1
- package/dist/{index-BR7KsOHN.d.mts → index-DfRCPDMK.d.mts} +10 -10
- package/dist/{index-BR7KsOHN.d.mts.map → index-DfRCPDMK.d.mts.map} +1 -1
- package/dist/{index-type-validation-CZ5L2lli.d.mts → index-type-validation-BFiTwZub.d.mts} +2 -2
- package/dist/{index-type-validation-CZ5L2lli.d.mts.map → index-type-validation-BFiTwZub.d.mts.map} +1 -1
- package/dist/{interpreter-9qyRPSGy-ufALmXNY.mjs → interpreter-9Ru2E-MH-CQdWmnh8.mjs} +72 -21
- package/dist/interpreter-9Ru2E-MH-CQdWmnh8.mjs.map +1 -0
- package/dist/{ir-R9GE8gsm.d.mts → ir-BLgW_h-1.d.mts} +2 -2
- package/dist/{ir-R9GE8gsm.d.mts.map → ir-BLgW_h-1.d.mts.map} +1 -1
- package/dist/middleware-Bef0uiio.d.mts +1 -0
- package/dist/{middleware-CAQqWuBd-pOZt5VBK.d.mts → middleware-CAQqWuBd-D-9cpkrQ.d.mts} +2 -2
- package/dist/{middleware-CAQqWuBd-pOZt5VBK.d.mts.map → middleware-CAQqWuBd-D-9cpkrQ.d.mts.map} +1 -1
- package/dist/{migration-CYCOGLPS.d.mts → migration-ClbaU5Om.d.mts} +3 -3
- package/dist/{migration-CYCOGLPS.d.mts.map → migration-ClbaU5Om.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +13 -13
- package/dist/plan-BcpzUEU8.d.mts +2 -0
- package/dist/{plan-oIjoMLQN-Cgljp0gc.d.mts → plan-oIjoMLQN-VIXmqAKW.d.mts} +3 -3
- package/dist/{plan-oIjoMLQN-Cgljp0gc.d.mts.map → plan-oIjoMLQN-VIXmqAKW.d.mts.map} +1 -1
- package/dist/{prepared-statement-DZtymlzd-De0k07Cc.d.mts → prepared-statement-DZtymlzd-D_INawdF.d.mts} +15 -15
- package/dist/{prepared-statement-DZtymlzd-De0k07Cc.d.mts.map → prepared-statement-DZtymlzd-D_INawdF.d.mts.map} +1 -1
- package/dist/{psl-infer-tLt9U1UP.d.mts → psl-infer-CLZsT2Hz.d.mts} +3 -3
- package/dist/{psl-infer-tLt9U1UP.d.mts.map → psl-infer-CLZsT2Hz.d.mts.map} +1 -1
- package/dist/query-lane-context-C708TwHD.d.mts +1 -0
- package/dist/{query-lane-context-cqWxvUWZ-DU48PEoC.d.mts → query-lane-context-cqWxvUWZ-Cl8U5ljU.d.mts} +4 -4
- package/dist/{query-lane-context-cqWxvUWZ-DU48PEoC.d.mts.map → query-lane-context-cqWxvUWZ-Cl8U5ljU.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +11 -11
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
- package/dist/relational-core__contract-free.d.mts +3 -3
- package/dist/relational-core__expression.d.mts +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 +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{runtime-CFokmlux.d.mts → runtime-C-gasTpn.d.mts} +3 -3
- package/dist/{runtime-CFokmlux.d.mts.map → runtime-C-gasTpn.d.mts.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DpG_gnur-CLds_Z0t.d.mts → schema-differ-DpG_gnur-DrAcUO68.d.mts} +5 -5
- package/dist/{schema-differ-DpG_gnur-CLds_Z0t.d.mts.map → schema-differ-DpG_gnur-DrAcUO68.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.d.mts +2 -2
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{sql-attribute-specs-DWUP6JTq-5-fgijvM.mjs → sql-attribute-specs-CHSP1wKs-D5T2TZQ8.mjs} +14 -7
- package/dist/sql-attribute-specs-CHSP1wKs-D5T2TZQ8.mjs.map +1 -0
- package/dist/{sql-contract-serializer-Bxu4a5oQ-D0lKpb4a.mjs → sql-contract-serializer-Bxu4a5oQ-CNy5ONMn.mjs} +2 -2
- package/dist/{sql-contract-serializer-Bxu4a5oQ-D0lKpb4a.mjs.map → sql-contract-serializer-Bxu4a5oQ-CNy5ONMn.mjs.map} +1 -1
- package/dist/{sql-execution-plan-2C68q5Jo-5sJRnbj0.d.mts → sql-execution-plan-2C68q5Jo-BCQaqOt4.d.mts} +2 -2
- package/dist/{sql-execution-plan-2C68q5Jo-5sJRnbj0.d.mts.map → sql-execution-plan-2C68q5Jo-BCQaqOt4.d.mts.map} +1 -1
- package/dist/{types-BDUG29Df-LE85dIXP.d.mts → types-BDUG29Df-DRoC4zw1.d.mts} +2 -2
- package/dist/{types-BDUG29Df-LE85dIXP.d.mts.map → types-BDUG29Df-DRoC4zw1.d.mts.map} +1 -1
- package/dist/{types-BFPRCYGW-BmBCa10J.d.mts → types-BFPRCYGW-Cmlh0DI_.d.mts} +8 -8
- package/dist/{types-BFPRCYGW-BmBCa10J.d.mts.map → types-BFPRCYGW-Cmlh0DI_.d.mts.map} +1 -1
- package/dist/{types-C36_3E6_.d.mts → types-BmgtemBx.d.mts} +2 -2
- package/dist/{types-C36_3E6_.d.mts.map → types-BmgtemBx.d.mts.map} +1 -1
- package/dist/{types-C6k9x_Je-DkvHNHEX.d.mts → types-CHOgKgHg-DMlDrQz6.d.mts} +15 -3
- package/dist/types-CHOgKgHg-DMlDrQz6.d.mts.map +1 -0
- package/dist/types-D3XRY_cO.d.mts +1 -0
- package/dist/{types-DhYcyD0K-Brj7SwFA.d.mts → types-DhYcyD0K-DImmT7YD.d.mts} +2 -2
- package/dist/{types-DhYcyD0K-Brj7SwFA.d.mts.map → types-DhYcyD0K-DImmT7YD.d.mts.map} +1 -1
- package/dist/{types-CZn-8Rsg-Bv6arhpI.mjs → types-DvrIPGUN-wxavfzyJ.mjs} +5 -2
- package/dist/types-DvrIPGUN-wxavfzyJ.mjs.map +1 -0
- package/dist/types-ZDEZdGgX.d.mts +1 -0
- package/dist/{types-thCvr3t--BKg5flQM.d.mts → types-thCvr3t--B9fvzq0z.d.mts} +8 -8
- package/dist/{types-thCvr3t--BKg5flQM.d.mts.map → types-thCvr3t--B9fvzq0z.d.mts.map} +1 -1
- package/dist/{validators-CbqMxQfW.d.mts → validators-DvtOcB04.d.mts} +11 -3
- package/dist/validators-DvtOcB04.d.mts.map +1 -0
- package/dist/{validators-DD98VrpC.mjs → validators-y6eLjhcb.mjs} +0 -0
- package/dist/validators-y6eLjhcb.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/contract-builder-Bwe2diF2.d.mts.map +0 -1
- package/dist/contract-builder-D1f6k8r4.mjs.map +0 -1
- package/dist/control-D7OmKjH2.d.mts.map +0 -1
- package/dist/control-DCVNWLzt.mjs.map +0 -1
- package/dist/control-adapter-DfLKiViv.d.mts +0 -1
- package/dist/interpreter-9qyRPSGy-ufALmXNY.mjs.map +0 -1
- package/dist/middleware-ERea8Bpj.d.mts +0 -1
- package/dist/plan-DT6ur9_C.d.mts +0 -2
- package/dist/query-lane-context-Dra2wgIo.d.mts +0 -1
- package/dist/sql-attribute-specs-DWUP6JTq-5-fgijvM.mjs.map +0 -1
- package/dist/types-9RtQn3mX.d.mts +0 -1
- package/dist/types-C6k9x_Je-DkvHNHEX.d.mts.map +0 -1
- package/dist/types-CZn-8Rsg-Bv6arhpI.mjs.map +0 -1
- package/dist/types-DL0mGtxm.d.mts +0 -1
- package/dist/validators-CbqMxQfW.d.mts.map +0 -1
- package/dist/validators-DD98VrpC.mjs.map +0 -1
package/dist/contract-psl.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./contract-builder-
|
|
2
|
+
import "./types-BmgtemBx.mjs";
|
|
3
|
+
import "./contract-builder-C8uKThYB.mjs";
|
|
4
4
|
import { AuthoringContributions } from "@prisma/orm-framework/components/authoring";
|
|
5
5
|
import { ColumnDefault, Contract, ExecutionMutationDefaultPhases, ValueSetRef } from "@prisma/orm-framework/contract/types";
|
|
6
6
|
import { SymbolTable } from "@prisma/orm-framework/psl-parser";
|
|
7
7
|
import { SourceFile } from "@prisma/orm-framework/psl-parser/syntax";
|
|
8
|
+
import { ControlMutationDefaults, ControlMutationDefaults as ControlMutationDefaults$1, DefaultFunctionLoweringContext, MutationDefaultGeneratorDescriptor } from "@prisma/orm-framework/components/control";
|
|
8
9
|
import { Result } from "@prisma/orm-framework/utils/result";
|
|
9
10
|
import { CapabilityMatrix, ExtensionPackRef, TargetPackRef } from "@prisma/orm-framework/components/components";
|
|
10
11
|
import { CodecLookup } from "@prisma/orm-framework/components/codec";
|
|
11
|
-
import { ControlMutationDefaults, ControlMutationDefaults as ControlMutationDefaults$1, DefaultFunctionLoweringContext, MutationDefaultGeneratorDescriptor } from "@prisma/orm-framework/components/control";
|
|
12
12
|
import { ContractSourceDiagnostic, ContractSourceDiagnostics } from "@prisma/orm-framework/config/config-types";
|
|
13
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-
|
|
13
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-BxP8swdK.d.mts
|
|
14
14
|
//#region src/psl-column-resolution.d.ts
|
|
15
15
|
type ColumnDescriptor = {
|
|
16
16
|
readonly codecId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-psl.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/interpreter-
|
|
1
|
+
{"version":3,"file":"contract-psl.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/interpreter-BxP8swdK.d.mts"],"mappings":";;;;;;;;;;;;;;KAYK;WACM;WACA;WACA;WACA,aAAa;;;;;;;;;WASb,WAAW;;;;UAyDZ;WACC,aAAa;WACb,YAAY;WACZ;WACA,QAAQ;WACR,yBAAyB,oBAAoB;WAC7C;WACA,qCAAqC;WACrC,0BAA0B;WAC1B,yBAAyB;;;;;;;;;;WAUzB,4BAA4B,oBAAoB;;WAEhD,kBAAkB,OAAO,sBAAsB;WAC/C,cAAc;WACd,2BAA2B;;WAE3B;aACE;aACA;;WAEF,cAAc;;iBASR,kCAAkC,OAAO,yCAAyC,OAAO,UAAU"}
|
package/dist/contract-psl.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as interpretPslDocumentToSqlContract } from "./interpreter-
|
|
1
|
+
import { i as interpretPslDocumentToSqlContract } from "./interpreter-9Ru2E-MH-CQdWmnh8.mjs";
|
|
2
2
|
export { interpretPslDocumentToSqlContract };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AttributeSpec, FieldAttributeCtx, FieldAttributeSpecContext, ModelAttributeCtx, NumLiteral, TypedFuncCall } from "@prisma/orm-framework/psl-parser";
|
|
1
|
+
import { AttributeSpec, FieldAttributeCtx, FieldAttributeSpecContext, ModelAttributeCtx, NumLiteral, ParsedTaggedLiteral, TypedFuncCall } from "@prisma/orm-framework/psl-parser";
|
|
2
2
|
import "@prisma/orm-framework/components/control";
|
|
3
3
|
import "@prisma/orm-framework/components/psl-ast";
|
|
4
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-
|
|
4
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-BMHQqN8C.d.mts
|
|
5
5
|
//#region src/sql-attribute-specs.d.ts
|
|
6
|
-
type DefaultArgValue = string | NumLiteral | boolean | (string | NumLiteral | boolean)[] | TypedFuncCall;
|
|
6
|
+
type DefaultArgValue = string | NumLiteral | boolean | (string | NumLiteral | boolean)[] | TypedFuncCall | ParsedTaggedLiteral;
|
|
7
7
|
declare function defaultFieldSpec(ctx: FieldAttributeSpecContext): AttributeSpec<{
|
|
8
8
|
value: DefaultArgValue;
|
|
9
9
|
}, FieldAttributeCtx>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-psl__attribute-specs.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-
|
|
1
|
+
{"version":3,"file":"contract-psl__attribute-specs.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-BMHQqN8C.d.mts"],"mappings":";;;;;KAMK,2BAA2B,iCAAiC,0BAA0B,gBAAgB;iBAC1F,iBAAiB,KAAK,4BAA4B;EACjE,OAAO;GACN;cACW;WACH;aACE,WAAW;MAClB;OACC;aACM,UAAU;MACjB;eACS;OACR;aACM,cAAc;MACrB;eACS;OACR;aACM,aAAa;MACpB;eACS;eACA;eACA;eACA;eACA;eACA;eACA,UAAU;OAClB;aACM,aAAa;eACX;eACA;eACA;OACR;aACM,eAAe;MACtB;OACC;aACM,qBAAqB;MAC5B;OACC;aACM,YAAY;MACnB;MACA;OACC;;WAEI;aACE,WAAW;MAClB;OACC;aACM,UAAU;eACR;OACR;aACM,cAAc;eACZ;OACR;aACM,eAAe;MACtB;MACA;OACC;aACM,gBAAgB;MACvB;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,gBAAgB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as sqlAttributeSpecs } from "./sql-attribute-specs-
|
|
1
|
+
import { s as sqlAttributeSpecs } from "./sql-attribute-specs-CHSP1wKs-D5T2TZQ8.mjs";
|
|
2
2
|
export { sqlAttributeSpecs };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
|
|
2
|
-
import "./types-
|
|
2
|
+
import "./types-BmgtemBx.mjs";
|
|
3
3
|
import { ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
4
4
|
import { ExtensionPackRef, TargetPackRef } from "@prisma/orm-framework/components/components";
|
|
5
5
|
import { ContractConfig } from "@prisma/orm-framework/config/config-types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as applySqlSpecifierControlPolicy } from "./derived-checks-DGjY5t7S-
|
|
2
|
-
import { i as interpretPslDocumentToSqlContract } from "./interpreter-
|
|
1
|
+
import { t as applySqlSpecifierControlPolicy } from "./derived-checks-DGjY5t7S-DofD5V_2.mjs";
|
|
2
|
+
import { i as interpretPslDocumentToSqlContract } from "./interpreter-9Ru2E-MH-CQdWmnh8.mjs";
|
|
3
3
|
import { collectScalarTypeConstructors } from "@prisma/orm-framework/components/authoring";
|
|
4
4
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
5
5
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-psl__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/provider.mjs"],"sourcesContent":["import { n as interpretPslDocumentToSqlContract } from \"./interpreter-
|
|
1
|
+
{"version":3,"file":"contract-psl__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/provider.mjs"],"sourcesContent":["import { n as interpretPslDocumentToSqlContract } from \"./interpreter-9Ru2E-MH.mjs\";\nimport { buildSymbolTable, rangeToPslSpan } from \"@internal/psl-parser\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { collectScalarTypeConstructors } from \"@internal/framework-components/authoring\";\nimport { withSeedDiagnostics } from \"@internal/psl-parser/interpret\";\nimport { applySqlSpecifierControlPolicy } from \"@internal/sql-contract-ts/contract-builder\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { readFile } from \"node:fs/promises\";\nimport { parse } from \"@internal/psl-parser/syntax\";\nimport { basename, extname } from \"pathe\";\n//#region src/provider.ts\n/**\n* Derives the emit output path from the schema input path so artefacts land\n* colocated with the source (e.g. `src/contract/schema.prisma` →\n* `src/contract/contract.json`). The provider owns this because it is the\n* only layer that knows the input path; the upstream `normalizeContractConfig`\n* default is a last-resort fallback for providers that don't carry one.\n*/\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\tconst ext = extname(schemaPath);\n\tif (ext.length === 0) return `${schemaPath}.json`;\n\tconst base = schemaPath.slice(0, -ext.length);\n\tif (basename(base) === \"schema\") return `${base.slice(0, -6)}contract.json`;\n\treturn `${base}.json`;\n}\nfunction mapParseDiagnostics(diagnostics, sourceFile, sourceId) {\n\treturn diagnostics.map((diagnostic) => ({\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\tsourceId,\n\t\tspan: rangeToPslSpan(diagnostic.range, sourceFile)\n\t}));\n}\nfunction prismaContract(schemaPath, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tinterpret(input, context) {\n\t\t\t\tconst scalarColumnDescriptors = collectScalarTypeConstructors(context.authoringContributions.type);\n\t\t\t\treturn interpretPslDocumentToSqlContract({\n\t\t\t\t\tsymbolTable: input.symbolTable,\n\t\t\t\t\tsourceFile: input.sourceFile,\n\t\t\t\t\tsourceId: input.sourceId,\n\t\t\t\t\tseedDiagnostics: [],\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\tscalarColumnDescriptors,\n\t\t\t\t\t...ifDefined(\"composedExtensions\", context.composedExtensions.length > 0 ? [...context.composedExtensions] : void 0),\n\t\t\t\t\tcomposedExtensionContracts: context.composedExtensionContracts,\n\t\t\t\t\t...ifDefined(\"composedExtensionPackRefs\", options.composedExtensionPackRefs?.length ? options.composedExtensionPackRefs : void 0),\n\t\t\t\t\tcontrolMutationDefaults: context.controlMutationDefaults,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tcapabilities: context.capabilities,\n\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\t...ifDefined(\"enumInferenceCodecs\", options.enumInferenceCodecs)\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync load(context) {\n\t\t\t\tconst [absoluteSchemaPath] = context.resolvedInputs;\n\t\t\t\tif (absoluteSchemaPath === void 0) throw new InternalError(\"prismaContract: context.resolvedInputs is empty. The CLI config loader should populate it positional-matched with source.inputs.\");\n\t\t\t\tlet schema;\n\t\t\t\ttry {\n\t\t\t\t\tschema = await readFile(absoluteSchemaPath, \"utf-8\");\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst message = String(error);\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: `Failed to read Prisma schema at \"${schemaPath}\"`,\n\t\t\t\t\t\tdiagnostics: [{\n\t\t\t\t\t\t\tcode: \"PSL_SCHEMA_READ_FAILED\",\n\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tschemaPath,\n\t\t\t\t\t\t\tabsoluteSchemaPath,\n\t\t\t\t\t\t\tcause: message\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst { document, sourceFile, diagnostics: parseDiagnostics } = parse(schema);\n\t\t\t\tconst { table: symbolTable, diagnostics: symbolTableDiagnostics } = buildSymbolTable({\n\t\t\t\t\tdocument,\n\t\t\t\t\tsourceFile,\n\t\t\t\t\tpslBlockDescriptors: context.authoringContributions.pslBlockDescriptors\n\t\t\t\t});\n\t\t\t\tconst seedDiagnostics = [...mapParseDiagnostics(parseDiagnostics, sourceFile, schemaPath), ...mapParseDiagnostics(symbolTableDiagnostics, sourceFile, schemaPath)];\n\t\t\t\tconst interpreted = withSeedDiagnostics(this.interpret({\n\t\t\t\t\tdocument,\n\t\t\t\t\tsourceFile,\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t}, context), seedDiagnostics);\n\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prismaContract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,SAAS,4BAA4B,YAAY;CAChD,MAAM,MAAM,QAAQ,UAAU;CAC9B,IAAI,IAAI,WAAW,GAAG,OAAO,GAAG,WAAW;CAC3C,MAAM,OAAO,WAAW,MAAM,GAAG,CAAC,IAAI,MAAM;CAC5C,IAAI,SAAS,IAAI,MAAM,UAAU,OAAO,GAAG,KAAK,MAAM,GAAG,EAAE,EAAE;CAC7D,OAAO,GAAG,KAAK;AAChB;AACA,SAAS,oBAAoB,aAAa,YAAY,UAAU;CAC/D,OAAO,YAAY,KAAK,gBAAgB;EACvC,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB;EACA,MAAM,eAAe,WAAW,OAAO,UAAU;CAClD,EAAE;AACH;AACA,SAAS,eAAe,YAAY,SAAS;CAC5C,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,QAAQ,CAAC,UAAU;GACnB,UAAU,OAAO,SAAS;IACzB,MAAM,0BAA0B,8BAA8B,QAAQ,uBAAuB,IAAI;IACjG,OAAO,kCAAkC;KACxC,aAAa,MAAM;KACnB,YAAY,MAAM;KAClB,UAAU,MAAM;KAChB,iBAAiB,CAAC;KAClB,QAAQ,QAAQ;KAChB,wBAAwB,QAAQ;KAChC;KACA,GAAG,UAAU,sBAAsB,QAAQ,mBAAmB,SAAS,IAAI,CAAC,GAAG,QAAQ,kBAAkB,IAAI,KAAK,CAAC;KACnH,4BAA4B,QAAQ;KACpC,GAAG,UAAU,6BAA6B,QAAQ,2BAA2B,SAAS,QAAQ,4BAA4B,KAAK,CAAC;KAChI,yBAAyB,QAAQ;KACjC,iBAAiB,QAAQ;KACzB,cAAc,QAAQ;KACtB,aAAa,QAAQ;KACrB,GAAG,UAAU,uBAAuB,QAAQ,mBAAmB;IAChE,CAAC;GACF;GACA,MAAM,KAAK,SAAS;IACnB,MAAM,CAAC,sBAAsB,QAAQ;IACrC,IAAI,uBAAuB,KAAK,GAAG,MAAM,IAAI,cAAc,kIAAkI;IAC7L,IAAI;IACJ,IAAI;KACH,SAAS,MAAM,SAAS,oBAAoB,OAAO;IACpD,SAAS,OAAO;KACf,MAAM,UAAU,OAAO,KAAK;KAC5B,OAAO,MAAM;MACZ,SAAS,oCAAoC,WAAW;MACxD,aAAa,CAAC;OACb,MAAM;OACN;OACA,UAAU;MACX,CAAC;MACD,MAAM;OACL;OACA;OACA,OAAO;MACR;KACD,CAAC;IACF;IACA,MAAM,EAAE,UAAU,YAAY,aAAa,qBAAqB,MAAM,MAAM;IAC5E,MAAM,EAAE,OAAO,aAAa,aAAa,2BAA2B,iBAAiB;KACpF;KACA;KACA,qBAAqB,QAAQ,uBAAuB;IACrD,CAAC;IACD,MAAM,kBAAkB,CAAC,GAAG,oBAAoB,kBAAkB,YAAY,UAAU,GAAG,GAAG,oBAAoB,wBAAwB,YAAY,UAAU,CAAC;IACjK,MAAM,cAAc,oBAAoB,KAAK,UAAU;KACtD;KACA;KACA;KACA,UAAU;IACX,GAAG,OAAO,GAAG,eAAe;IAC5B,IAAI,CAAC,YAAY,IAAI,OAAO;IAC5B,OAAO,GAAG,+BAA+B,YAAY,OAAO,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GACnH;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
|
package/dist/contract-ts.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as CheckKind } from "./naming-CV9j2pXl-KARaDReS.mjs";
|
|
2
|
-
import { n as applySqlSpecifierControlPolicy, t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-
|
|
3
|
-
import { A as
|
|
4
|
-
import { i as typescriptContractFromPath, n as emptyContract, r as typescriptContract, t as ContractConfig } from "./config-types-
|
|
5
|
-
export { type AttachedEntities, type AuthoredColumnDefault, type AuthoredColumnDefaultLiteralValue, type BoundEnumType, type CheckKind, type CheckNode, type CodecInput, type CodecTypeMap, type ComposedAuthoringHelpers, type ContractConfig, type ContractDefinition, type ContractInput, type ContractModelBuilder, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldNode, type ForeignKeyNode, type IndexNode, type MergeEnums, type ModelLike, type ModelNode, type PrimaryKeyNode, type RelationNode, type ScalarFieldBuilder, type SqlNamespaceFactory, type TargetFieldRef, type UniqueConstraintNode, applySqlSpecifierControlPolicy, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, emptyContract, enumType, extensionModel, field, member, model, rel, typescriptContract, typescriptContractFromPath };
|
|
2
|
+
import { n as applySqlSpecifierControlPolicy, t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-DCKdvxNK.mjs";
|
|
3
|
+
import { A as buildSqlContractFromDefinition, B as sql, C as ScalarFieldBuilder, D as bindEnumType, E as autoincrement, F as field, I as member, L as model, M as defineContract, N as enumType, O as buildBoundContract, P as extensionModel, R as now, S as RelationNode, T as UniqueConstraintNode, _ as IndexNode, a as CheckNode, b as ModelNode, c as ComposedAuthoringHelpers, d as ContractModelBuilder, f as EnumMember, g as ForeignKeyNode, h as FieldNode, i as BoundEnumType, j as check, k as buildContractDefinition, l as ContractDefinition, m as ExtractCodecTypesFromPack, n as AuthoredColumnDefault, o as CodecInput, p as EnumTypeHandle, r as AuthoredColumnDefaultLiteralValue, s as CodecTypeMap, t as AttachedEntities, u as ContractInput, v as MergeEnums, w as TargetFieldRef, x as PrimaryKeyNode, y as ModelLike, z as rel } from "./contract-builder-C8uKThYB.mjs";
|
|
4
|
+
import { i as typescriptContractFromPath, n as emptyContract, r as typescriptContract, t as ContractConfig } from "./config-types-C-rrJ_8P.mjs";
|
|
5
|
+
export { type AttachedEntities, type AuthoredColumnDefault, type AuthoredColumnDefaultLiteralValue, type BoundEnumType, type CheckKind, type CheckNode, type CodecInput, type CodecTypeMap, type ComposedAuthoringHelpers, type ContractConfig, type ContractDefinition, type ContractInput, type ContractModelBuilder, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldNode, type ForeignKeyNode, type IndexNode, type MergeEnums, type ModelLike, type ModelNode, type PrimaryKeyNode, type RelationNode, type ScalarFieldBuilder, type SqlNamespaceFactory, type TargetFieldRef, type UniqueConstraintNode, applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, emptyContract, enumType, extensionModel, field, member, model, now, rel, sql, typescriptContract, typescriptContractFromPath };
|
package/dist/contract-ts.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-DGjY5t7S-
|
|
2
|
-
import { a as
|
|
3
|
-
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-
|
|
4
|
-
export { applySqlSpecifierControlPolicy, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, emptyContract, enumType, extensionModel, field, member, model, rel, typescriptContract, typescriptContractFromPath };
|
|
1
|
+
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-DGjY5t7S-DofD5V_2.mjs";
|
|
2
|
+
import { a as check, c as extensionModel, d as model, f as now, i as buildContractDefinition, l as field, m as sql, n as bindEnumType, o as defineContract, p as rel, r as buildBoundContract, s as enumType, t as autoincrement, u as member } from "./contract-builder-CkT67-Wq.mjs";
|
|
3
|
+
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-jBPoHm6t.mjs";
|
|
4
|
+
export { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, emptyContract, enumType, extensionModel, field, member, model, now, rel, sql, typescriptContract, typescriptContractFromPath };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as typescriptContractFromPath, n as emptyContract, r as typescriptContract, t as ContractConfig } from "./config-types-
|
|
1
|
+
import { i as typescriptContractFromPath, n as emptyContract, r as typescriptContract, t as ContractConfig } from "./config-types-C-rrJ_8P.mjs";
|
|
2
2
|
export { type ContractConfig, emptyContract, typescriptContract, typescriptContractFromPath };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-
|
|
1
|
+
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-jBPoHm6t.mjs";
|
|
2
2
|
export { emptyContract, typescriptContract, typescriptContractFromPath };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as CheckKind } from "./naming-CV9j2pXl-KARaDReS.mjs";
|
|
2
|
-
import { n as applySqlSpecifierControlPolicy, t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-
|
|
3
|
-
import { A as
|
|
4
|
-
export { type AttachedEntities, type AuthoredColumnDefault, type AuthoredColumnDefaultLiteralValue, type BoundEnumType, type CheckKind, type CheckNode, type CodecInput, type CodecTypeMap, type ComposedAuthoringHelpers, type ContractDefinition, type ContractInput, type ContractModelBuilder, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldNode, type ForeignKeyNode, type IndexNode, type MergeEnums, type ModelLike, type ModelNode, type PrimaryKeyNode, type RelationNode, type ScalarFieldBuilder, type SqlNamespaceFactory, type TargetFieldRef, type UniqueConstraintNode, applySqlSpecifierControlPolicy, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, enumType, extensionModel, field, member, model, rel };
|
|
2
|
+
import { n as applySqlSpecifierControlPolicy, t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-DCKdvxNK.mjs";
|
|
3
|
+
import { A as buildSqlContractFromDefinition, B as sql, C as ScalarFieldBuilder, D as bindEnumType, E as autoincrement, F as field, I as member, L as model, M as defineContract, N as enumType, O as buildBoundContract, P as extensionModel, R as now, S as RelationNode, T as UniqueConstraintNode, _ as IndexNode, a as CheckNode, b as ModelNode, c as ComposedAuthoringHelpers, d as ContractModelBuilder, f as EnumMember, g as ForeignKeyNode, h as FieldNode, i as BoundEnumType, j as check, k as buildContractDefinition, l as ContractDefinition, m as ExtractCodecTypesFromPack, n as AuthoredColumnDefault, o as CodecInput, p as EnumTypeHandle, r as AuthoredColumnDefaultLiteralValue, s as CodecTypeMap, t as AttachedEntities, u as ContractInput, v as MergeEnums, w as TargetFieldRef, x as PrimaryKeyNode, y as ModelLike, z as rel } from "./contract-builder-C8uKThYB.mjs";
|
|
4
|
+
export { type AttachedEntities, type AuthoredColumnDefault, type AuthoredColumnDefaultLiteralValue, type BoundEnumType, type CheckKind, type CheckNode, type CodecInput, type CodecTypeMap, type ComposedAuthoringHelpers, type ContractDefinition, type ContractInput, type ContractModelBuilder, type EnumMember, type EnumTypeHandle, type ExtractCodecTypesFromPack, type FieldNode, type ForeignKeyNode, type IndexNode, type MergeEnums, type ModelLike, type ModelNode, type PrimaryKeyNode, type RelationNode, type ScalarFieldBuilder, type SqlNamespaceFactory, type TargetFieldRef, type UniqueConstraintNode, applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, enumType, extensionModel, field, member, model, now, rel, sql };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-DGjY5t7S-
|
|
2
|
-
import { a as
|
|
3
|
-
export { applySqlSpecifierControlPolicy, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, enumType, extensionModel, field, member, model, rel };
|
|
1
|
+
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-DGjY5t7S-DofD5V_2.mjs";
|
|
2
|
+
import { a as check, c as extensionModel, d as model, f as now, i as buildContractDefinition, l as field, m as sql, n as bindEnumType, o as defineContract, p as rel, r as buildBoundContract, s as enumType, t as autoincrement, u as member } from "./contract-builder-CkT67-Wq.mjs";
|
|
3
|
+
export { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract, enumType, extensionModel, field, member, model, now, rel, sql };
|
package/dist/contract.d.mts
CHANGED
|
@@ -7,8 +7,8 @@ import { i as StorageTableInput, n as StorageColumnInput, r as StorageTable, t a
|
|
|
7
7
|
import { n as StorageValueSetInput, r as isStorageValueSet, t as StorageValueSet } from "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
|
|
8
8
|
import { a as SqlNamespaceEntries, c as SqlStorage, d as StorageTypeInstance, f as StorageTypeInstanceInput, g as toStorageTypeInstance, h as isStorageTypeInstance, i as SqlNamespaceBase, l as SqlStorageInput, m as isSqlAuthoringContributions, n as SqlAuthoringContributions, o as SqlNamespaceFactory, p as isMaterializedSqlNamespace, r as SqlNamespace, s as SqlNamespaceInput, t as CODEC_INSTANCE_KIND, u as SqlStorageTypeEntry } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
|
|
9
9
|
import { i as indexInputFromSerialized, n as SerializedIndex, r as checkConstraintInputFromSerialized, t as SerializedCheckConstraint } from "./serialized-index-CrgG8ct1-DG3JpHc7.mjs";
|
|
10
|
-
import { A as SqlModelStorage, C as QueryOperationSelfSpec, D as ResolveCodecTypes, E as QueryOperationTypesOf, F as TypeMapsPhantomKey, I as applyFkDefaults, M as StorageColumnInputTypesOf, N as StorageColumnTypesOf, O as SqlControlDriverInstance, P as TypeMaps, S as QueryOperationReturn, T as QueryOperationTypesBase, _ as FieldInputTypesOf, a as CodecTypesOf, b as NamespacedFieldTypeMap, c as DEFAULT_FK_INDEX, d as ExtractFieldInputTypes, f as ExtractFieldOutputTypes, g as ExtractTypeMapsFromContract, h as ExtractStorageColumnTypes, i as AggregateTypesOf, j as SqlQueryOperationTypes, k as SqlModelFieldStorage, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, n as AggregateResultType, o as ContractWithTypeMaps, p as ExtractQueryOperationTypes, r as AggregateTypesBase, s as DEFAULT_FK_CONSTRAINT, t as AggregateOperationTypes, u as ExtractCodecTypes, v as FieldOutputTypesOf, w as QueryOperationTypeEntry, x as NamespacedStorageColumnTypeMap, y as ForeignKeyOptions } from "./types-BDUG29Df-
|
|
11
|
-
import { a as ShapeSpec, i as Shape, n as RelationNamesOf, o as StorageColumnMapAt, r as Scalars, s as StorageColumnTypeAcrossNamespaces, t as RelationKeys } from "./types-
|
|
10
|
+
import { A as SqlModelStorage, C as QueryOperationSelfSpec, D as ResolveCodecTypes, E as QueryOperationTypesOf, F as TypeMapsPhantomKey, I as applyFkDefaults, M as StorageColumnInputTypesOf, N as StorageColumnTypesOf, O as SqlControlDriverInstance, P as TypeMaps, S as QueryOperationReturn, T as QueryOperationTypesBase, _ as FieldInputTypesOf, a as CodecTypesOf, b as NamespacedFieldTypeMap, c as DEFAULT_FK_INDEX, d as ExtractFieldInputTypes, f as ExtractFieldOutputTypes, g as ExtractTypeMapsFromContract, h as ExtractStorageColumnTypes, i as AggregateTypesOf, j as SqlQueryOperationTypes, k as SqlModelFieldStorage, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, n as AggregateResultType, o as ContractWithTypeMaps, p as ExtractQueryOperationTypes, r as AggregateTypesBase, s as DEFAULT_FK_CONSTRAINT, t as AggregateOperationTypes, u as ExtractCodecTypes, v as FieldOutputTypesOf, w as QueryOperationTypeEntry, x as NamespacedStorageColumnTypeMap, y as ForeignKeyOptions } from "./types-BDUG29Df-DRoC4zw1.mjs";
|
|
11
|
+
import { a as ShapeSpec, i as Shape, n as RelationNamesOf, o as StorageColumnMapAt, r as Scalars, s as StorageColumnTypeAcrossNamespaces, t as RelationKeys } from "./types-BmgtemBx.mjs";
|
|
12
12
|
import { a as ResolvedPackEntityHandle, c as providesEntityHandleLowering, i as ResolvedEntityHandleRef, n as LoweredPackEntity, o as ResolvedPslModelRefs, r as PackEntityHandle, s as SqlEntityHandleLoweringContribution, t as EntityHandleLoweringInput } from "./entity-handle-lowering-hook-CIvRKBfa.mjs";
|
|
13
13
|
import { i as lowerAuthoredIndex, n as AuthoredIndexMethod, r as exactNameBodyWarning, t as AuthoredIndexInput } from "./index-naming-Ct65z5Xk.mjs";
|
|
14
14
|
import { a as IndexTypeRegistry, i as IndexTypeRegistration, n as IndexTypeEntry, o as createIndexTypeRegistry, r as IndexTypeMap, s as defineIndexTypes, t as IndexTypeBuilder } from "./index-types-DPVhsW0v-D-BikM4h.mjs";
|
|
@@ -17,12 +17,12 @@ import { n as lowerAuthoredCheck, t as AuthoredCheckInput } from "./authored-che
|
|
|
17
17
|
import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-CYnW_sGn.mjs";
|
|
18
18
|
import { a as SqlSingleNamespaceView, i as SqlSingleNamespaceAccessors, n as SqlBuiltinKind, o as buildSqlSchemaQualifiedView, r as SqlSchemaQualifiedView, s as buildSqlSingleNamespaceView, t as SQL_BUILTIN_KINDS } from "./contract-view-CPHxoAEX.mjs";
|
|
19
19
|
import { n as tableEntityKind, r as valueSetEntityKind, t as composeSqlEntityKinds } from "./entity-kinds-B5cUFU22.mjs";
|
|
20
|
-
import { a as pk, i as model, n as fk, o as table, r as index, s as unique, t as col } from "./factories-
|
|
20
|
+
import { a as pk, i as model, n as fk, o as table, r as index, s as unique, t as col } from "./factories-B9PfKd5k.mjs";
|
|
21
21
|
import { a as isBackedByColumnKeys, i as backingIndexColumnKeys, n as ForeignKeyAuthoringInput, o as materializeForeignKeysAndIndexes, r as MaterializedTableConstraints, t as BackingIndexCandidates } from "./foreign-key-materialization-CkvOzJWy.mjs";
|
|
22
|
-
import { t as validateIndexTypes } from "./index-type-validation-
|
|
22
|
+
import { t as validateIndexTypes } from "./index-type-validation-BFiTwZub.mjs";
|
|
23
23
|
import { t as StorageTypeMetadata } from "./pack-types-BcLTpwbv.mjs";
|
|
24
24
|
import { t as REFERENTIAL_ACTION_SQL } from "./referential-action-sql-DJ9ps6-S.mjs";
|
|
25
25
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-Nyrgk4h8.mjs";
|
|
26
|
-
import { C as
|
|
26
|
+
import { C as validateSqlContractFully, E as validateStorageSemantics, S as validateModelStorageReferences, T as validateStorage, _ as createSqlContractSchema, a as ContractEnumSchema, b as resolveSqlToOneRelationStorage, c as ForeignKeySourceSchema, d as SqlToOneRelationStorage, f as StorageTableSchema, g as createNamespaceEntrySchema, h as checkSqlDefaultBody, i as ColumnDefaultSchema, l as IndexSchema, m as ValidateSqlContractFullyOptions, n as ColumnDefaultFunctionSchema, o as ForeignKeyReferenceSchema, p as StorageValueSetSchema, r as ColumnDefaultLiteralSchema, s as ForeignKeySchema, t as CheckConstraintSchema, u as ReferentialActionSchema, v as createSqlStorageSchema, w as validateSqlStorageConsistency, x as validateModel, y as reservedSqlDefaultBody } from "./validators-DvtOcB04.mjs";
|
|
27
27
|
import { n as deriveValueSetFromEntity, r as providesValueSetDerivation, t as SqlValueSetDerivingEntityTypeOutput } from "./value-set-derivation-hook-BhgGVtw0.mjs";
|
|
28
|
-
export { type AggregateOperationTypes, type AggregateResultType, type AggregateTypesBase, type AggregateTypesOf, type AuthoredCheckInput, type AuthoredIndexInput, type AuthoredIndexMethod, type BackingIndexCandidates, CODEC_INSTANCE_KIND, CheckConstraint, type CheckConstraintInput, CheckConstraintSchema, type CodecTypesOf, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, type ContractWithTypeMaps, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, type EntityHandleLoweringInput, type ExtractAggregateTypes, type ExtractCodecTypes, type ExtractFieldInputTypes, type ExtractFieldOutputTypes, type ExtractQueryOperationTypes, type ExtractStorageColumnInputTypes, type ExtractStorageColumnTypes, type ExtractTypeMapsFromContract, type FieldInputTypesOf, type FieldOutputTypesOf, ForeignKey, type ForeignKeyAuthoringInput, type ForeignKeyInput, type ForeignKeyOptions, ForeignKeyReference, type ForeignKeyReferenceInput, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, Index, type IndexInput, IndexSchema, type IndexTypeBuilder, type IndexTypeEntry, type IndexTypeMap, type IndexTypeRegistration, type IndexTypeRegistry, type LoweredPackEntity, type MaterializedTableConstraints, type NamespacedFieldTypeMap, type NamespacedStorageColumnTypeMap, type PackEntityHandle, PrimaryKey, type PrimaryKeyInput, type QueryOperationReturn, type QueryOperationSelfSpec, type QueryOperationTypeEntry, type QueryOperationTypesBase, type QueryOperationTypesOf, REFERENTIAL_ACTION_SQL, type ReferentialAction, ReferentialActionSchema, RelationKeys, type RelationNamesOf, type ResolveCodecTypes, type ResolvedEntityHandleRef, type ResolvedPackEntityHandle, type ResolvedPslModelRefs, type ResolvedStorageTable, SQL_BUILTIN_KINDS, type Scalars, type SerializedCheckConstraint, type SerializedIndex, type Shape, type ShapeSpec, type SqlAuthoringContributions, type SqlBuiltinKind, type SqlControlDriverInstance, type SqlEntityHandleLoweringContribution, type SqlModelFieldStorage, type SqlModelStorage, type SqlNamespace, SqlNamespaceBase, type SqlNamespaceEntries, type SqlNamespaceFactory, type SqlNamespaceInput, SqlNode, type SqlQueryOperationTypes, type SqlSchemaQualifiedView, type SqlSingleNamespaceAccessors, type SqlSingleNamespaceView, SqlStorage, type SqlStorageInput, type SqlStorageTypeEntry, type SqlToOneRelationStorage, type SqlValueSetDerivingEntityTypeOutput, StorageColumn, type StorageColumnInput, type StorageColumnInputTypesOf, type StorageColumnMapAt, type StorageColumnTypeAcrossNamespaces, type StorageColumnTypesOf, StorageTable, type StorageTableInput, StorageTableSchema, type StorageTypeInstance, type StorageTypeInstanceInput, type StorageTypeMetadata, StorageValueSet, type StorageValueSetInput, StorageValueSetSchema, type TypeMaps, type TypeMapsPhantomKey, UniqueConstraint, type UniqueConstraintInput, ValidateSqlContractFullyOptions, applyFkDefaults, backingIndexColumnKeys, buildSqlSchemaQualifiedView, buildSqlSingleNamespaceView, checkConstraintInputFromSerialized, col, composeSqlEntityKinds, createIndexTypeRegistry, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, defineIndexTypes, deriveValueSetFromEntity, exactNameBodyWarning, fk, index, indexInputFromSerialized, isBackedByColumnKeys, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, lowerAuthoredCheck, lowerAuthoredIndex, materializeForeignKeysAndIndexes, model, pk, providesEntityHandleLowering, providesValueSetDerivation, resolveSqlToOneRelationStorage, resolveStorageTable, sqlContractCanonicalizationHooks, table, tableEntityKind, toStorageTypeInstance, unique, validateIndexTypes, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueSetEntityKind };
|
|
28
|
+
export { type AggregateOperationTypes, type AggregateResultType, type AggregateTypesBase, type AggregateTypesOf, type AuthoredCheckInput, type AuthoredIndexInput, type AuthoredIndexMethod, type BackingIndexCandidates, CODEC_INSTANCE_KIND, CheckConstraint, type CheckConstraintInput, CheckConstraintSchema, type CodecTypesOf, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, type ContractWithTypeMaps, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, type EntityHandleLoweringInput, type ExtractAggregateTypes, type ExtractCodecTypes, type ExtractFieldInputTypes, type ExtractFieldOutputTypes, type ExtractQueryOperationTypes, type ExtractStorageColumnInputTypes, type ExtractStorageColumnTypes, type ExtractTypeMapsFromContract, type FieldInputTypesOf, type FieldOutputTypesOf, ForeignKey, type ForeignKeyAuthoringInput, type ForeignKeyInput, type ForeignKeyOptions, ForeignKeyReference, type ForeignKeyReferenceInput, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, Index, type IndexInput, IndexSchema, type IndexTypeBuilder, type IndexTypeEntry, type IndexTypeMap, type IndexTypeRegistration, type IndexTypeRegistry, type LoweredPackEntity, type MaterializedTableConstraints, type NamespacedFieldTypeMap, type NamespacedStorageColumnTypeMap, type PackEntityHandle, PrimaryKey, type PrimaryKeyInput, type QueryOperationReturn, type QueryOperationSelfSpec, type QueryOperationTypeEntry, type QueryOperationTypesBase, type QueryOperationTypesOf, REFERENTIAL_ACTION_SQL, type ReferentialAction, ReferentialActionSchema, RelationKeys, type RelationNamesOf, type ResolveCodecTypes, type ResolvedEntityHandleRef, type ResolvedPackEntityHandle, type ResolvedPslModelRefs, type ResolvedStorageTable, SQL_BUILTIN_KINDS, type Scalars, type SerializedCheckConstraint, type SerializedIndex, type Shape, type ShapeSpec, type SqlAuthoringContributions, type SqlBuiltinKind, type SqlControlDriverInstance, type SqlEntityHandleLoweringContribution, type SqlModelFieldStorage, type SqlModelStorage, type SqlNamespace, SqlNamespaceBase, type SqlNamespaceEntries, type SqlNamespaceFactory, type SqlNamespaceInput, SqlNode, type SqlQueryOperationTypes, type SqlSchemaQualifiedView, type SqlSingleNamespaceAccessors, type SqlSingleNamespaceView, SqlStorage, type SqlStorageInput, type SqlStorageTypeEntry, type SqlToOneRelationStorage, type SqlValueSetDerivingEntityTypeOutput, StorageColumn, type StorageColumnInput, type StorageColumnInputTypesOf, type StorageColumnMapAt, type StorageColumnTypeAcrossNamespaces, type StorageColumnTypesOf, StorageTable, type StorageTableInput, StorageTableSchema, type StorageTypeInstance, type StorageTypeInstanceInput, type StorageTypeMetadata, StorageValueSet, type StorageValueSetInput, StorageValueSetSchema, type TypeMaps, type TypeMapsPhantomKey, UniqueConstraint, type UniqueConstraintInput, ValidateSqlContractFullyOptions, applyFkDefaults, backingIndexColumnKeys, buildSqlSchemaQualifiedView, buildSqlSingleNamespaceView, checkConstraintInputFromSerialized, checkSqlDefaultBody, col, composeSqlEntityKinds, createIndexTypeRegistry, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, defineIndexTypes, deriveValueSetFromEntity, exactNameBodyWarning, fk, index, indexInputFromSerialized, isBackedByColumnKeys, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, lowerAuthoredCheck, lowerAuthoredIndex, materializeForeignKeysAndIndexes, model, pk, providesEntityHandleLowering, providesValueSetDerivation, reservedSqlDefaultBody, resolveSqlToOneRelationStorage, resolveStorageTable, sqlContractCanonicalizationHooks, table, tableEntityKind, toStorageTypeInstance, unique, validateIndexTypes, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueSetEntityKind };
|
package/dist/contract.mjs
CHANGED
|
@@ -13,6 +13,6 @@ import { n as defineIndexTypes, t as createIndexTypeRegistry } from "./index-typ
|
|
|
13
13
|
import { t as REFERENTIAL_ACTION_SQL } from "./referential-action-sql-DSqkrySN.mjs";
|
|
14
14
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
15
15
|
import { a as SqlNamespaceBase, c as isMaterializedSqlNamespace, d as toStorageTypeInstance, i as RelationKeys, l as isSqlAuthoringContributions, n as DEFAULT_FK_CONSTRAINT, o as SqlStorage, r as DEFAULT_FK_INDEX, s as applyFkDefaults, t as CODEC_INSTANCE_KIND, u as isStorageTypeInstance } from "./types-D0B65hip.mjs";
|
|
16
|
-
import { a as
|
|
16
|
+
import { a as createSqlStorageSchema, c as validateModel, d as validateSqlStorageConsistency, f as validateStorage, i as createSqlContractSchema, l as validateModelStorageReferences, n as checkSqlDefaultBody, o as reservedSqlDefaultBody, p as validateStorageSemantics, r as createNamespaceEntrySchema, s as resolveSqlToOneRelationStorage, t as ContractEnumSchema, u as validateSqlContractFully } from "./validators-y6eLjhcb.mjs";
|
|
17
17
|
import { n as providesValueSetDerivation, t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
18
|
-
export { CODEC_INSTANCE_KIND, CheckConstraint, CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, ForeignKey, ForeignKeyReference, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, Index, IndexSchema, PrimaryKey, REFERENTIAL_ACTION_SQL, ReferentialActionSchema, RelationKeys, SQL_BUILTIN_KINDS, SqlNamespaceBase, SqlNode, SqlStorage, StorageColumn, StorageTable, StorageTableSchema, StorageValueSet, StorageValueSetSchema, UniqueConstraint, applyFkDefaults, backingIndexColumnKeys, buildSqlSchemaQualifiedView, buildSqlSingleNamespaceView, checkConstraintInputFromSerialized, col, composeSqlEntityKinds, createIndexTypeRegistry, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, defineIndexTypes, deriveValueSetFromEntity, exactNameBodyWarning, fk, index, indexInputFromSerialized, isBackedByColumnKeys, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, lowerAuthoredCheck, lowerAuthoredIndex, materializeForeignKeysAndIndexes, model, pk, providesEntityHandleLowering, providesValueSetDerivation, resolveSqlToOneRelationStorage, resolveStorageTable, sqlContractCanonicalizationHooks, table, tableEntityKind, toStorageTypeInstance, unique, validateIndexTypes, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueSetEntityKind };
|
|
18
|
+
export { CODEC_INSTANCE_KIND, CheckConstraint, CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, ForeignKey, ForeignKeyReference, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, Index, IndexSchema, PrimaryKey, REFERENTIAL_ACTION_SQL, ReferentialActionSchema, RelationKeys, SQL_BUILTIN_KINDS, SqlNamespaceBase, SqlNode, SqlStorage, StorageColumn, StorageTable, StorageTableSchema, StorageValueSet, StorageValueSetSchema, UniqueConstraint, applyFkDefaults, backingIndexColumnKeys, buildSqlSchemaQualifiedView, buildSqlSingleNamespaceView, checkConstraintInputFromSerialized, checkSqlDefaultBody, col, composeSqlEntityKinds, createIndexTypeRegistry, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, defineIndexTypes, deriveValueSetFromEntity, exactNameBodyWarning, fk, index, indexInputFromSerialized, isBackedByColumnKeys, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, lowerAuthoredCheck, lowerAuthoredIndex, materializeForeignKeysAndIndexes, model, pk, providesEntityHandleLowering, providesValueSetDerivation, reservedSqlDefaultBody, resolveSqlToOneRelationStorage, resolveStorageTable, sqlContractCanonicalizationHooks, table, tableEntityKind, toStorageTypeInstance, unique, validateIndexTypes, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueSetEntityKind };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as pk, i as model, n as fk, o as table, r as index, s as unique, t as col } from "./factories-
|
|
1
|
+
import { a as pk, i as model, n as fk, o as table, r as index, s as unique, t as col } from "./factories-B9PfKd5k.mjs";
|
|
2
2
|
export { col, fk, index, model, pk, table, unique };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as validateIndexTypes } from "./index-type-validation-
|
|
1
|
+
import { t as validateIndexTypes } from "./index-type-validation-BFiTwZub.mjs";
|
|
2
2
|
export { validateIndexTypes };
|
|
@@ -7,6 +7,6 @@ import { i as StorageTableInput, n as StorageColumnInput, r as StorageTable, t a
|
|
|
7
7
|
import { n as StorageValueSetInput, r as isStorageValueSet, t as StorageValueSet } from "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
|
|
8
8
|
import { a as SqlNamespaceEntries, c as SqlStorage, d as StorageTypeInstance, f as StorageTypeInstanceInput, g as toStorageTypeInstance, h as isStorageTypeInstance, i as SqlNamespaceBase, l as SqlStorageInput, m as isSqlAuthoringContributions, n as SqlAuthoringContributions, o as SqlNamespaceFactory, p as isMaterializedSqlNamespace, r as SqlNamespace, s as SqlNamespaceInput, t as CODEC_INSTANCE_KIND, u as SqlStorageTypeEntry } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
|
|
9
9
|
import { i as indexInputFromSerialized, n as SerializedIndex, r as checkConstraintInputFromSerialized, t as SerializedCheckConstraint } from "./serialized-index-CrgG8ct1-DG3JpHc7.mjs";
|
|
10
|
-
import { A as SqlModelStorage, C as QueryOperationSelfSpec, D as ResolveCodecTypes, E as QueryOperationTypesOf, F as TypeMapsPhantomKey, I as applyFkDefaults, M as StorageColumnInputTypesOf, N as StorageColumnTypesOf, O as SqlControlDriverInstance, P as TypeMaps, S as QueryOperationReturn, T as QueryOperationTypesBase, _ as FieldInputTypesOf, a as CodecTypesOf, b as NamespacedFieldTypeMap, c as DEFAULT_FK_INDEX, d as ExtractFieldInputTypes, f as ExtractFieldOutputTypes, g as ExtractTypeMapsFromContract, h as ExtractStorageColumnTypes, i as AggregateTypesOf, j as SqlQueryOperationTypes, k as SqlModelFieldStorage, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, n as AggregateResultType, o as ContractWithTypeMaps, p as ExtractQueryOperationTypes, r as AggregateTypesBase, s as DEFAULT_FK_CONSTRAINT, t as AggregateOperationTypes, u as ExtractCodecTypes, v as FieldOutputTypesOf, w as QueryOperationTypeEntry, x as NamespacedStorageColumnTypeMap, y as ForeignKeyOptions } from "./types-BDUG29Df-
|
|
11
|
-
import { a as ShapeSpec, i as Shape, n as RelationNamesOf, o as StorageColumnMapAt, r as Scalars, s as StorageColumnTypeAcrossNamespaces, t as RelationKeys } from "./types-
|
|
10
|
+
import { A as SqlModelStorage, C as QueryOperationSelfSpec, D as ResolveCodecTypes, E as QueryOperationTypesOf, F as TypeMapsPhantomKey, I as applyFkDefaults, M as StorageColumnInputTypesOf, N as StorageColumnTypesOf, O as SqlControlDriverInstance, P as TypeMaps, S as QueryOperationReturn, T as QueryOperationTypesBase, _ as FieldInputTypesOf, a as CodecTypesOf, b as NamespacedFieldTypeMap, c as DEFAULT_FK_INDEX, d as ExtractFieldInputTypes, f as ExtractFieldOutputTypes, g as ExtractTypeMapsFromContract, h as ExtractStorageColumnTypes, i as AggregateTypesOf, j as SqlQueryOperationTypes, k as SqlModelFieldStorage, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, n as AggregateResultType, o as ContractWithTypeMaps, p as ExtractQueryOperationTypes, r as AggregateTypesBase, s as DEFAULT_FK_CONSTRAINT, t as AggregateOperationTypes, u as ExtractCodecTypes, v as FieldOutputTypesOf, w as QueryOperationTypeEntry, x as NamespacedStorageColumnTypeMap, y as ForeignKeyOptions } from "./types-BDUG29Df-DRoC4zw1.mjs";
|
|
11
|
+
import { a as ShapeSpec, i as Shape, n as RelationNamesOf, o as StorageColumnMapAt, r as Scalars, s as StorageColumnTypeAcrossNamespaces, t as RelationKeys } from "./types-BmgtemBx.mjs";
|
|
12
12
|
export { type AggregateOperationTypes, type AggregateResultType, type AggregateTypesBase, type AggregateTypesOf, CODEC_INSTANCE_KIND, CheckConstraint, type CheckConstraintInput, type CodecTypesOf, type ContractWithTypeMaps, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, type ExtractAggregateTypes, type ExtractCodecTypes, type ExtractFieldInputTypes, type ExtractFieldOutputTypes, type ExtractQueryOperationTypes, type ExtractStorageColumnInputTypes, type ExtractStorageColumnTypes, type ExtractTypeMapsFromContract, type FieldInputTypesOf, type FieldOutputTypesOf, ForeignKey, type ForeignKeyInput, type ForeignKeyOptions, ForeignKeyReference, type ForeignKeyReferenceInput, Index, type IndexInput, type NamespacedFieldTypeMap, type NamespacedStorageColumnTypeMap, PrimaryKey, type PrimaryKeyInput, type QueryOperationReturn, type QueryOperationSelfSpec, type QueryOperationTypeEntry, type QueryOperationTypesBase, type QueryOperationTypesOf, type ReferentialAction, RelationKeys, type RelationNamesOf, type ResolveCodecTypes, type Scalars, type SerializedCheckConstraint, type SerializedIndex, type Shape, type ShapeSpec, type SqlAuthoringContributions, type SqlControlDriverInstance, type SqlModelFieldStorage, type SqlModelStorage, type SqlNamespace, SqlNamespaceBase, type SqlNamespaceEntries, type SqlNamespaceFactory, type SqlNamespaceInput, SqlNode, type SqlQueryOperationTypes, SqlStorage, type SqlStorageInput, type SqlStorageTypeEntry, StorageColumn, type StorageColumnInput, type StorageColumnInputTypesOf, type StorageColumnMapAt, type StorageColumnTypeAcrossNamespaces, type StorageColumnTypesOf, StorageTable, type StorageTableInput, type StorageTypeInstance, type StorageTypeInstanceInput, StorageValueSet, type StorageValueSetInput, type TypeMaps, type TypeMapsPhantomKey, UniqueConstraint, type UniqueConstraintInput, applyFkDefaults, checkConstraintInputFromSerialized, indexInputFromSerialized, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, toStorageTypeInstance };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, type SqlToOneRelationStorage, StorageTableSchema, StorageValueSetSchema, ValidateSqlContractFullyOptions, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, resolveSqlToOneRelationStorage, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics };
|
|
1
|
+
import { C as validateSqlContractFully, E as validateStorageSemantics, S as validateModelStorageReferences, T as validateStorage, _ as createSqlContractSchema, a as ContractEnumSchema, b as resolveSqlToOneRelationStorage, c as ForeignKeySourceSchema, d as SqlToOneRelationStorage, f as StorageTableSchema, g as createNamespaceEntrySchema, h as checkSqlDefaultBody, i as ColumnDefaultSchema, l as IndexSchema, m as ValidateSqlContractFullyOptions, n as ColumnDefaultFunctionSchema, o as ForeignKeyReferenceSchema, p as StorageValueSetSchema, r as ColumnDefaultLiteralSchema, s as ForeignKeySchema, t as CheckConstraintSchema, u as ReferentialActionSchema, v as createSqlStorageSchema, w as validateSqlStorageConsistency, x as validateModel, y as reservedSqlDefaultBody } from "./validators-DvtOcB04.mjs";
|
|
2
|
+
export { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, type SqlToOneRelationStorage, StorageTableSchema, StorageValueSetSchema, ValidateSqlContractFullyOptions, checkSqlDefaultBody, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, reservedSqlDefaultBody, resolveSqlToOneRelationStorage, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as ForeignKeyReferenceSchema, c as IndexSchema, d as StorageValueSetSchema, i as ColumnDefaultSchema, l as ReferentialActionSchema, n as ColumnDefaultFunctionSchema, o as ForeignKeySchema, r as ColumnDefaultLiteralSchema, s as ForeignKeySourceSchema, t as CheckConstraintSchema, u as StorageTableSchema } from "./entity-kinds-D7vwoN_T-CCBwFJy0.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, StorageTableSchema, StorageValueSetSchema, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, resolveSqlToOneRelationStorage, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics };
|
|
2
|
+
import { a as createSqlStorageSchema, c as validateModel, d as validateSqlStorageConsistency, f as validateStorage, i as createSqlContractSchema, l as validateModelStorageReferences, n as checkSqlDefaultBody, o as reservedSqlDefaultBody, p as validateStorageSemantics, r as createNamespaceEntrySchema, s as resolveSqlToOneRelationStorage, t as ContractEnumSchema, u as validateSqlContractFully } from "./validators-y6eLjhcb.mjs";
|
|
3
|
+
export { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, StorageTableSchema, StorageValueSetSchema, checkSqlDefaultBody, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, reservedSqlDefaultBody, resolveSqlToOneRelationStorage, validateModel, validateModelStorageReferences, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { t as StorageColumn } from "./storage-table-DSeWszOL-CI-cItEK.mjs";
|
|
2
2
|
import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
|
|
3
|
-
import { O as SqlControlDriverInstance } from "./types-BDUG29Df-
|
|
4
|
-
import "./types-
|
|
5
|
-
import { r as SqlOperationDescriptors } from "./index-
|
|
6
|
-
import { m as AnyQueryAst } from "./types-DhYcyD0K-
|
|
3
|
+
import { O as SqlControlDriverInstance } from "./types-BDUG29Df-DRoC4zw1.mjs";
|
|
4
|
+
import "./types-BmgtemBx.mjs";
|
|
5
|
+
import { r as SqlOperationDescriptors } from "./index-C6_--MKi.mjs";
|
|
6
|
+
import { m as AnyQueryAst } from "./types-DhYcyD0K-DImmT7YD.mjs";
|
|
7
7
|
import { o as SqlExecuteRequest } from "./driver-types-BQtRkOJ0-Bv2RPSfr.mjs";
|
|
8
|
-
import { s as DdlNode } from "./ddl-types-CA-aj1rO-
|
|
9
|
-
import { a as LowererContext } from "./ast-
|
|
10
|
-
import
|
|
11
|
-
import "./types-
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
8
|
+
import { s as DdlNode } from "./ddl-types-CA-aj1rO-_giNpXNM.mjs";
|
|
9
|
+
import { a as LowererContext } from "./ast-D7JjbK8E.mjs";
|
|
10
|
+
import "./validators-DvtOcB04.mjs";
|
|
11
|
+
import { g as SqlSchemaIR, v as SqlSchemaIRNode } from "./types-CHOgKgHg-DMlDrQz6.mjs";
|
|
12
|
+
import "./types-D3XRY_cO.mjs";
|
|
13
|
+
import { i as SqlControlAdapter } from "./control-adapter-C99J7aEF-QiVMjPGA.mjs";
|
|
14
|
+
import { A as SqlPlannerSuccessResult, C as SqlMigrationRunnerSuccessValue, O as SqlPlannerFailureResult, T as SqlPlannerConflict, _ as SqlMigrationRunner, h as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, u as SqlMigrationPlan, v as SqlMigrationRunnerErrorCode, x as SqlMigrationRunnerFailure } from "./types-BFPRCYGW-Cmlh0DI_.mjs";
|
|
15
|
+
import { t as SqlSchemaDiffFn } from "./schema-differ-DpG_gnur-DrAcUO68.mjs";
|
|
15
16
|
import { ColumnDefault, Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
17
|
+
import { ContractSerializer, ControlDefaultLiteralTagEntry, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, DiffSubjectGranularity, MigratableTargetDescriptor, MigrationOperationClass, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MutationDefaultGeneratorDescriptor, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractInferCapable, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable, SignDatabaseResult, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions } from "@prisma/orm-framework/components/control";
|
|
16
18
|
import { NotOk, Ok } from "@prisma/orm-framework/utils/result";
|
|
17
19
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
18
|
-
import { ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, DiffSubjectGranularity, MigratableTargetDescriptor, MigrationOperationClass, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MutationDefaultGeneratorDescriptor, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractInferCapable, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable, SignDatabaseResult, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions } from "@prisma/orm-framework/components/control";
|
|
19
20
|
import { EmissionSpi, TypesImportSpec } from "@prisma/orm-framework/components/emission";
|
|
20
|
-
import { PslDocumentAst } from "@prisma/orm-framework/components/psl-ast";
|
|
21
|
+
import { ContributedPslDiagnosticCode, PslDocumentAst } from "@prisma/orm-framework/components/psl-ast";
|
|
21
22
|
//#region ../../../2-sql/9-family/dist/control.d.mts
|
|
22
23
|
//#region src/core/control-instance.d.ts
|
|
23
24
|
interface SqlTypeMetadata {
|
|
@@ -457,7 +458,7 @@ declare class SqlFamilyDescriptor implements ControlFamilyDescriptor<'sql', SqlC
|
|
|
457
458
|
readonly index?: boolean;
|
|
458
459
|
}, import("@prisma/orm-framework/psl-parser").FieldAttributeCtx>;
|
|
459
460
|
readonly default: (ctx: import("@prisma/orm-framework/psl-parser").FieldAttributeSpecContext) => import("@prisma/orm-framework/psl-parser").AttributeSpec<{
|
|
460
|
-
value: string | boolean | import("@prisma/orm-framework/psl-parser").NumLiteral | (string | boolean | import("@prisma/orm-framework/psl-parser").NumLiteral)[] | import("@prisma/orm-framework/psl-parser").TypedFuncCall;
|
|
461
|
+
value: string | boolean | import("@prisma/orm-framework/psl-parser").NumLiteral | (string | boolean | import("@prisma/orm-framework/psl-parser").NumLiteral)[] | import("@prisma/orm-framework/psl-parser").TypedFuncCall | import("@prisma/orm-framework/psl-parser").ParsedTaggedLiteral;
|
|
461
462
|
}, import("@prisma/orm-framework/psl-parser").FieldAttributeCtx>;
|
|
462
463
|
};
|
|
463
464
|
};
|
|
@@ -866,6 +867,14 @@ declare function detectTableNameCaseChanges(input: {
|
|
|
866
867
|
readonly namespaceIdOf: (issue: SchemaDiffIssue) => string;
|
|
867
868
|
}): SqlPlannerConflict[];
|
|
868
869
|
//#endregion
|
|
870
|
+
//#region src/core/sql-default-literal-tag.d.ts
|
|
871
|
+
/** A `` @default(sql`...`) `` body the SQL family refuses to lower. */
|
|
872
|
+
declare const PSL_INVALID_DEFAULT_SQL: ContributedPslDiagnosticCode;
|
|
873
|
+
/**
|
|
874
|
+
* The `` sql`...` `` default literal every SQL target registers: the canonical body becomes the expression verbatim. A body that is exactly `now()` or `autoincrement()` is refused so the named form is written instead.
|
|
875
|
+
*/
|
|
876
|
+
declare function sqlDefaultLiteralTagEntry(usage: string): ControlDefaultLiteralTagEntry;
|
|
877
|
+
//#endregion
|
|
869
878
|
//#region src/core/timestamp-now-generator.d.ts
|
|
870
879
|
/**
|
|
871
880
|
* Canonical id for the wall-clock-now mutation default generator.
|
|
@@ -1090,5 +1099,5 @@ declare function temporalCodecPreset<const CodecId extends string, const NativeT
|
|
|
1090
1099
|
//#region src/exports/control.d.ts
|
|
1091
1100
|
declare const _default: SqlFamilyDescriptor;
|
|
1092
1101
|
//#endregion
|
|
1093
|
-
export {
|
|
1094
|
-
//# sourceMappingURL=control-
|
|
1102
|
+
export { controlPolicyForCall as A, runnerFailure as B, TableNameCaseGuardTable as C, buildNativeTypeExpander as D, assembleAuthoringContributions as E, partitionCallsByControlPolicy as F, temporalCodecPresetWithPrecision as G, sqlDefaultLiteralTagEntry as H, partitionIssuesByControlPolicy as I, temporalStringAuthoringPresets as K, planFieldEventOperations as L, detectDestructiveChanges as M, detectTableNameCaseChanges as N, contractNamespaceToSchemaIR as O, extractCodecControlHooks as P, plannerFailure as R, TIMESTAMP_NOW_GENERATOR_ID as S, _default as T, temporalAuthoringPresets as U, runnerSuccess as V, temporalCodecPreset as W, SqlControlFamilyInstance as _, EnumNamespaceSchemaResolver as a, SuppressionRecord as b, MigrationOperationPolicy$1 as c, MigrationPlanner as d, MigrationPlannerConflict$1 as f, PlanFieldEventOperationsOptions as g, PSL_INVALID_DEFAULT_SQL as h, DefaultResolver as i, createMigrationPlan as j, contractToSchemaIR as k, MigrationPlan$1 as l, NativeTypeExpander as m, ControlPolicySubject as n, INIT_ADDITIVE_POLICY as o, MigrationPlannerResult as p, timestampNowControlDescriptor as q, DefaultRenderer as r, MigrationOperationClass as s, ContractToSchemaIROptions as t, MigrationPlanOperation$1 as u, SqlControlTargetDescriptor as v, TargetMigrationsCapability as w, TABLE_NAME_CASE_CHANGED_CODE as x, SqlDescribedContractSpace as y, plannerSuccess as z };
|
|
1103
|
+
//# sourceMappingURL=control-CuiTzy6O.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-CuiTzy6O.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAeU;WACC;WACA;WACA;WACA;;KAEN,0BAA0B,YAAY;UACjC;WACC,kBAAkB,cAAc;WAChC,cAAc;WACd,sBAAsB;;UAEvB,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,yBAAyB;;;;;;;;;EAS/L,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,KAAK;aACM,QAAQ;aACR;aACA;aACA;MACP,QAAQ;EACZ,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB;EAC7C,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;;;;cAIzD,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV;aACE;eACE;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAGJ;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;6BACA;;;;;qBAKR;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;;;aAKR;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;;;;;;;aAOZ,gEAAgE;aAChE;eACE;iBACE;iBACA;iBACA;iBACA;iBACA;mBACE;;iBAEF;iBACA;iBACA;mBACE,2CAA2C;YAClD;4CACgC;;;;aAI/B;eACE;iBACE,0CAA0C;UACjD;0CACgC;iBACzB,yCAAyC;UAChD;mBACS;0CACuB;iBACzB,6CAA6C;UACpD;mBACS;0CACuB;iBACzB,4CAA4C;UACnD;mBACS;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA,UAAU;0CACa;iBACzB,4CAA4C;mBAC1C;mBACA;mBACA;0CACuB;iBACzB,8CAA8C;UACrD;0CACgC;iBACzB,oDAAoD;UAC3D;0CACgC;iBACzB,2CAA2C;UAClD;UACA;0CACgC;;eAE3B;iBACE,0CAA0C;UACjD;0CACgC;iBACzB,yCAAyC;mBACvC;0CACuB;iBACzB,6CAA6C;mBAC3C;0CACuB;iBACzB,8CAA8C;UACrD;UACA;0CACgC;iBACzB,+CAA+C;UACtD;mBACS;mBACA;mBACA;mBACA;mBACA;mBACA;0CACuB;iBACzB,UAAU,oCAAoC,6DAA6D;UAClH,yDAAyD,gEAAgE,+CAA+C,+CAA+C;0CACvL;;;;EAIxC,OAAO,0BAA0B,OAAO,oBAAoB,aAAa;;;;iBAI1D,yBAAyB,aAAa,cAAc,iDAAiD,YAAY;;;;;;;;;;;;;UAaxH;WACC;WACA,UAAU,SAAS;;UAEpB,2BAA2B,0BAA0B,gBAAgB,kBAAkB,SAAS,cAAc,SAAS,qBAAqB,kCAAkC,WAAW;WACxL,wBAAwB;;;;;;;WAOxB,oBAAoB,mBAAmB;;;;;;;WAOvC,gBAAgB,eAAe,WAAW;;;;;;;;;;WAU1C,oBAAoB,QAAQ,iBAAiB,8BAA8B,gCAAgC;;;;;;;;WAQ3G,YAAY;;;;;;;;;;;WAWZ,6BAA6B,qBAAqB;;;;;;;;;;;;WAYlD,qBAAqB;EAC9B,cAAc,SAAS,kBAAkB,aAAa,oBAAoB;EAC1E,aAAa,QAAQ,2BAA2B,mBAAmB;;;;;;;;;;;;;;KAchE,sBAAsB;WAChB;WACA;WACA,aAAa;;;;;;;;;;;KAWnB,mBAAmB,KAAK,eAAe,QAAQ;;;;;;;;;;KAU/C,mBAAmB,KAAK,eAAe,+BAA+B;;;;;;;;;;;;;;KActE,+BAA+B,SAAS,YAAY;;;;;;;;;;iBAUxC,yBAAyB,MAAM,mBAAmB,IAAI,sBAAsB;UACnF;WACC;WACA,mBAAmB;WACnB,gBAAgB;WAChB,iBAAiB;;;;;;;;WAQjB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BvB,4BAA4B,SAAS,YAAY,qBAAqB,SAAS,4BAA4B;iBAC3G,mBAAmB,UAAU,SAAS,oBAAoB,SAAS,4BAA4B;;;;;;;;;;;;;;;UAetG;WACC;WACA;WACA;WACA;;;;;;WAMA;WACA,4BAA4B;;;;;;;;WAQ5B;;;;;;;;;;;;;;;UAeD;WACC,SAAS;WACT,QAAQ;WACR;WACA;;;;;;;;;iBASM,qBAAqB,SAAS,kCAAkC,sBAAsB,4BAA4B;;;;;;;;;;;;;;iBAclH,8BAA8B,OAAO;WAC3C,gBAAgB;WAChB,UAAU,SAAS;WACnB,8BAA8B,MAAM,UAAU;WAC9C,qBAAqB,MAAM;;WAE3B,eAAe;WACf,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BjB,+BAA+B,QAAQ;WAC7C,iBAAiB;WACjB,UAAU,SAAS;;;;;WAKnB,8BAA8B,OAAO,WAAW;;;;;;;;;;;;WAYhD,6BAA6B,OAAO;;WAEpC,oBAAoB;WACpB,uBAAuB;;;;UAIxB;;;;;WAKC,eAAe,SAAS;;;;WAIxB,aAAa,SAAS;;;;;;;;;;WAUtB,YAAY,oBAAoB;;iBAE1B,yBAAyB,SAAS,2CAA2C;;;;;;;;;iBAS7E,wBAAwB,sBAAsB,cAAc,mDAAmD;WACrH;WACA;WACA,aAAa;;;;iBAIP,oBAAoB,gBAAgB,SAAS,8BAA8B,kBAAkB,iBAAiB;iBAC9G,eAAe,gBAAgB,MAAM,iBAAiB,iBAAiB,oBAAoB,uBAAuB,wBAAwB;iBAC1I,eAAe,oBAAoB,uBAAuB;;;;iBAI1D,cAAc;EAC7B;EACA;IACE,GAAG;;;;iBAIU,cAAc,MAAM,6BAA6B,iBAAiB;EACjF;EACA,OAAO;IACL,MAAM;;;;;;cAMI,sBAAsB;;;cAGtB;;UAEJ;WACC;;;;;;;;;;;;;iBAaM,2BAA2B;WACjC,iBAAiB;WACjB,UAAU,OAAO,oBAAoB;WACrC,gBAAgB,OAAO;IAC9B;;;;cAIU,yBAAyB;;;;iBAItB,0BAA0B,gBAAgB;;;;;;;;;;;;;;cAc7C;;;;;;;;;;;;iBAYG,iCAAiC;;;;;;;;;;;iBAWjC,+BAA+B,8BAA8B,iCAAiC,oCAAoC,4BAA4B;WACpK,SAAS;WACT,YAAY;WACZ,cAAc;;WAEd;aACE;aACA;eACE,SAAS;eACT,YAAY;eACZ;iBACE;mBACE;mBACA,qBAAqB;;;;;WAK7B;aACE;aACA;eACE,SAAS;eACT,YAAY;eACZ;iBACE;mBACE;mBACA,qBAAqB;;iBAEvB;mBACE;mBACA,qBAAqB;;;;;;iBAMvB,qCAAqC,8BAA8B,iCAAiC,oCAAoC,4BAA4B;WAC1K,SAAS;WACT,YAAY;WACZ,cAAc;;WAEd;aACE;aACA;eACE,SAAS;eACT,YAAY;eACZ;iBACE;mBACE;mBACA,qBAAqB;;;;;WAK7B;aACE;aACA;eACE,SAAS;eACT,YAAY;eACZ;iBACE;mBACE;mBACA,qBAAqB;;iBAEvB;mBACE;mBACA,qBAAqB;;;;;;;;;;;;;;;iBAevB,uCAAuC,8BAA8B,iCAAiC,oCAAoC,4BAA4B;WAC5K,SAAS;WACT,YAAY;WACZ,cAAc;;WAEd;WACA;aACE;aACA;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT,YAAY;aACZ;eACE;iBACE;iBACA;;;aAGJ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;eAI3B;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;;;;;;;;;iBAYzB,0BAA0B,8BAA8B,2BAA2B;WACzF,SAAS;WACT,YAAY;;WAEZ;WACA;aACE;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT,YAAY;aACZ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;eAIN;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;;;;;;cASP,UAAU"}
|
package/dist/{control-adapter-C99J7aEF-BLc1Uog8.d.mts → control-adapter-C99J7aEF-QiVMjPGA.d.mts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { O as SqlControlDriverInstance } from "./types-BDUG29Df-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { m as AnyQueryAst, ut as LoweredStatement } from "./types-DhYcyD0K-
|
|
1
|
+
import { O as SqlControlDriverInstance } from "./types-BDUG29Df-DRoC4zw1.mjs";
|
|
2
|
+
import "./types-BmgtemBx.mjs";
|
|
3
|
+
import { m as AnyQueryAst, ut as LoweredStatement } from "./types-DhYcyD0K-DImmT7YD.mjs";
|
|
4
4
|
import { o as SqlExecuteRequest } from "./driver-types-BQtRkOJ0-Bv2RPSfr.mjs";
|
|
5
|
-
import { s as DdlNode } from "./ddl-types-CA-aj1rO-
|
|
6
|
-
import { a as LowererContext } from "./ast-
|
|
7
|
-
import { v as SqlSchemaIRNode } from "./types-
|
|
8
|
-
import "./types-
|
|
5
|
+
import { s as DdlNode } from "./ddl-types-CA-aj1rO-_giNpXNM.mjs";
|
|
6
|
+
import { a as LowererContext } from "./ast-D7JjbK8E.mjs";
|
|
7
|
+
import { v as SqlSchemaIRNode } from "./types-CHOgKgHg-DMlDrQz6.mjs";
|
|
8
|
+
import "./types-D3XRY_cO.mjs";
|
|
9
9
|
import { ColumnDefault, ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
10
10
|
import { ControlAdapterInstance, ControlStack } from "@prisma/orm-framework/components/control";
|
|
11
11
|
//#region ../../../2-sql/9-family/dist/control-adapter-C99J7aEF.d.mts
|
|
@@ -189,4 +189,4 @@ interface SqlControlAdapterDescriptor<TTarget extends string = string> {
|
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
export { SqlControlAdapterDescriptor as a, SqlControlAdapter as i, Lowerer as n, arraysEqual as o, NativeTypeNormalizer as r, ExecuteRequestLowerer as t };
|
|
192
|
-
//# sourceMappingURL=control-adapter-C99J7aEF-
|
|
192
|
+
//# sourceMappingURL=control-adapter-C99J7aEF-QiVMjPGA.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-adapter-C99J7aEF-
|
|
1
|
+
{"version":3,"file":"control-adapter-C99J7aEF-QiVMjPGA.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control-adapter-C99J7aEF.d.mts"],"mappings":";;;;;;;;;;;;;;;;KAUK,qBAAqB,oBAAoB,uBAAuB;;;;;;KAMhE,wBAAwB;;;;iBAIZ,YAAY,sBAAsB;;;;;;;;;;UAUzC;EACR,MAAM,KAAK,cAAc,SAAS,SAAS,0BAA0B;;;;;;;;UAQ7D,8BAA8B;EACtC,sBAAsB,KAAK,cAAc,SAAS,UAAU,0BAA0B,QAAQ;;;;;;;;UAQtF,kBAAkB,yCAAyC,8BAA8B,UAAU;;;;;;;;;;;;;;;;EAgB3G,WAAW,QAAQ,yBAAyB,UAAU,gBAAgB,QAAQ;;;;;;;;EAQ9E,eAAe,QAAQ,yBAAyB,WAAW,QAAQ,oBAAoB;;;;;EAKvF,WAAW,QAAQ,yBAAyB,UAAU,iBAAiB,iBAAiB;;;;;;;EAOxF,aAAa,QAAQ,yBAAyB,UAAU,eAAe;aAC5D;aACA;aACA;MACP;;;;;;;EAOJ,WAAW,QAAQ,yBAAyB,UAAU,eAAe;aAC1D;aACA;aACA;MACP;;;;;;;;EAQJ,aAAa,QAAQ,yBAAyB,UAAU,eAAe,sBAAsB;aAClF;aACA;aACA;MACP;;;;;;;EAOJ,iBAAiB,QAAQ,yBAAyB,UAAU,eAAe;aAChE;aACA;aACA;aACA;aACA;aACA;aACA;MACP;;;;;;;;;;;;;;;;;;EAkBJ,WAAW,QAAQ,yBAAyB,UAAU,oBAAoB,kBAAkB,QAAQ;;;;;;WAM3F,mBAAmB;;;;;;WAMnB,sBAAsB;;;;;EAK/B,yCAAyC;;;;;EAKzC,uCAAuC;;;;;;;;UAQ/B,4BAA4B;;;;;;;EAOpC,OAAO,OAAO,oBAAoB,WAAW,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./control-adapter-C99J7aEF-QiVMjPGA.mjs";
|
|
@@ -2,21 +2,22 @@ import { u as namingOf } from "./naming-DKr4TJd7-Cszhq9RV.mjs";
|
|
|
2
2
|
import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
|
|
3
3
|
import { c as StorageTable } from "./storage-table-ZzbR-xzQ-BRoTQE_2.mjs";
|
|
4
4
|
import { u as isStorageTypeInstance } from "./types-D0B65hip.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-y6eLjhcb.mjs";
|
|
6
|
+
import { c as SqlSchemaIR, n as RelationalSchemaNodeKind, u as SqlTableIR } from "./types-DvrIPGUN-wxavfzyJ.mjs";
|
|
7
|
+
import { s as sqlAttributeSpecs } from "./sql-attribute-specs-CHSP1wKs-D5T2TZQ8.mjs";
|
|
7
8
|
import { t as sqlEmission } from "./dist-D5__KJs-.mjs";
|
|
8
|
-
import { i as sqlFamilyPslBlockDescriptors, n as sqlFamilyAuthoringTypes, r as sqlFamilyEntityTypes, t as sqlFamilyAuthoringFieldPresets } from "./authoring-type-constructors-C1ogrr_x-
|
|
9
|
+
import { i as sqlFamilyPslBlockDescriptors, n as sqlFamilyAuthoringTypes, r as sqlFamilyEntityTypes, t as sqlFamilyAuthoringFieldPresets } from "./authoring-type-constructors-C1ogrr_x-BziNu7gs.mjs";
|
|
9
10
|
import { n as classifyDiffSubjectGranularity, o as extractCodecControlHooks, s as verifySqlSchemaByDiff, t as classifyDiffEntityKind } from "./schema-verify-C_PEdlAr-CmXrFuW1.mjs";
|
|
10
11
|
import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
|
|
11
|
-
import { t as SqlContractSerializer } from "./sql-contract-serializer-Bxu4a5oQ-
|
|
12
|
+
import { t as SqlContractSerializer } from "./sql-contract-serializer-Bxu4a5oQ-CNy5ONMn.mjs";
|
|
12
13
|
import { t as collectSupportedCodecTypeIds } from "./verify-ChiDeTk8-HEewdjrM.mjs";
|
|
13
14
|
import { isPlainRecord } from "@prisma/orm-framework/components/ir";
|
|
14
15
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
15
16
|
import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
16
17
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
17
18
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
18
|
-
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
19
19
|
import { APP_SPACE_ID, SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, issueOutcome } from "@prisma/orm-framework/components/control";
|
|
20
|
+
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
20
21
|
import { assertDescriptorSelfConsistency } from "@prisma/orm-toolchain/migration-tools/spaces";
|
|
21
22
|
//#region ../../../2-sql/9-family/dist/control.mjs
|
|
22
23
|
function isDdlStatement(sqlStatement) {
|
|
@@ -617,6 +618,7 @@ function convertColumn(name, column, storageTypes, expandNativeType, renderDefau
|
|
|
617
618
|
...ifDefined("default", column.default != null && renderDefault ? renderDefault(column.default, column) : void 0),
|
|
618
619
|
resolvedNativeType,
|
|
619
620
|
...ifDefined("resolvedDefault", resolvedColumnDefault),
|
|
621
|
+
...ifDefined("authoredDefault", rawColumnDefault),
|
|
620
622
|
codecRef: buildColumnCodecRef(resolved, column.many),
|
|
621
623
|
codecBaseNativeType: resolved.nativeType,
|
|
622
624
|
...column.typeRef !== void 0 ? { codecNamedType: true } : {}
|
|
@@ -1315,8 +1317,44 @@ function detectTableNameCaseChanges(input) {
|
|
|
1315
1317
|
}
|
|
1316
1318
|
return conflicts;
|
|
1317
1319
|
}
|
|
1320
|
+
/** A `` @default(sql`...`) `` body the SQL family refuses to lower. */
|
|
1321
|
+
const PSL_INVALID_DEFAULT_SQL = "PSL_INVALID_DEFAULT_SQL";
|
|
1322
|
+
/**
|
|
1323
|
+
* The `` sql`...` `` default literal every SQL target registers: the canonical body becomes the expression verbatim. A body that is exactly `now()` or `autoincrement()` is refused so the named form is written instead.
|
|
1324
|
+
*/
|
|
1325
|
+
function sqlDefaultLiteralTagEntry(usage) {
|
|
1326
|
+
return {
|
|
1327
|
+
usage,
|
|
1328
|
+
documentation: "Uses the SQL in the string, verbatim, as the column's default expression.",
|
|
1329
|
+
lower: ({ literal, context }) => {
|
|
1330
|
+
const reject = (message) => ({
|
|
1331
|
+
ok: false,
|
|
1332
|
+
diagnostic: {
|
|
1333
|
+
code: PSL_INVALID_DEFAULT_SQL,
|
|
1334
|
+
message,
|
|
1335
|
+
sourceId: context.sourceId,
|
|
1336
|
+
span: literal.span
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
const reserved = reservedSqlDefaultBody(literal.body);
|
|
1340
|
+
if (reserved !== void 0) return reject(`Write @default(${reserved}()) instead of ${literal.tag}\`${reserved}()\`; ${reserved}() is a Prisma default function, not raw SQL.`);
|
|
1341
|
+
const reason = checkSqlDefaultBody(literal.body);
|
|
1342
|
+
if (reason !== void 0) return reject(reason);
|
|
1343
|
+
return {
|
|
1344
|
+
ok: true,
|
|
1345
|
+
value: {
|
|
1346
|
+
kind: "storage",
|
|
1347
|
+
defaultValue: {
|
|
1348
|
+
kind: "function",
|
|
1349
|
+
expression: literal.body
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1318
1356
|
var control_default = new SqlFamilyDescriptor();
|
|
1319
1357
|
//#endregion
|
|
1320
|
-
export {
|
|
1358
|
+
export { plannerSuccess as _, buildNativeTypeExpander as a, sqlDefaultLiteralTagEntry as b, controlPolicyForCall as c, detectDestructiveChanges as d, detectTableNameCaseChanges as f, plannerFailure as g, planFieldEventOperations as h, assembleAuthoringContributions as i, control_default as l, partitionIssuesByControlPolicy as m, PSL_INVALID_DEFAULT_SQL as n, contractNamespaceToSchemaIR as o, partitionCallsByControlPolicy as p, TABLE_NAME_CASE_CHANGED_CODE as r, contractToSchemaIR as s, INIT_ADDITIVE_POLICY as t, createMigrationPlan as u, runnerFailure as v, runnerSuccess as y };
|
|
1321
1359
|
|
|
1322
|
-
//# sourceMappingURL=control-
|
|
1360
|
+
//# sourceMappingURL=control-dqbsNN69.mjs.map
|