@prisma/orm-family-sql 8.0.0-rc.17-dev.2 → 8.0.0-rc.17-dev.4
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-DUU5OVjo.mjs → ast-De8XGuVW.mjs} +2 -2
- package/dist/{ast-DUU5OVjo.mjs.map → ast-De8XGuVW.mjs.map} +1 -1
- package/dist/{ast-Bmb-2vbO.d.mts → ast-Dp6lQXUX.d.mts} +3 -3
- package/dist/{ast-Bmb-2vbO.d.mts.map → ast-Dp6lQXUX.d.mts.map} +1 -1
- package/dist/{authored-check-naming-C8_TvzU6.d.mts → authored-check-naming-CK6T_Dfh.d.mts} +2 -2
- package/dist/{authored-check-naming-C8_TvzU6.d.mts.map → authored-check-naming-CK6T_Dfh.d.mts.map} +1 -1
- package/dist/{authored-check-naming-BBdhHujS.mjs → authored-check-naming-CO3GA46Y.mjs} +3 -3
- package/dist/{authored-check-naming-BBdhHujS.mjs.map → authored-check-naming-CO3GA46Y.mjs.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-BLYHcBXG.d.mts → authoring-entity-types-CZ-vdwYS-BQPeBSla.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-BLYHcBXG.d.mts.map → authoring-entity-types-CZ-vdwYS-BQPeBSla.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-0Iv2zdwS-ClKI8Uuk.mjs → authoring-type-constructors-0Iv2zdwS-CcpLSwei.mjs} +2 -2
- package/dist/{authoring-type-constructors-0Iv2zdwS-ClKI8Uuk.mjs.map → authoring-type-constructors-0Iv2zdwS-CcpLSwei.mjs.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +9 -9
- package/dist/builder__runtime.mjs +129 -2
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +3 -3
- package/dist/{check-constraint-B7qGu6rc-agxAjKLG.d.mts → check-constraint-B7qGu6rc-CBVYAMwG.d.mts} +2 -2
- package/dist/{check-constraint-B7qGu6rc-agxAjKLG.d.mts.map → check-constraint-B7qGu6rc-CBVYAMwG.d.mts.map} +1 -1
- package/dist/{codec-descriptor-registry-CdIIOkuE.mjs → codec-descriptor-registry-CYK0Wzja.mjs} +2 -2
- package/dist/{codec-descriptor-registry-CdIIOkuE.mjs.map → codec-descriptor-registry-CYK0Wzja.mjs.map} +1 -1
- package/dist/{config-types-DB6gRJ5K.d.mts → config-types-Ci51fcnp.d.mts} +4 -4
- package/dist/{config-types-DB6gRJ5K.d.mts.map → config-types-Ci51fcnp.d.mts.map} +1 -1
- package/dist/{config-types-D0sxpKAN.mjs → config-types-DsRO_uxd.mjs} +3 -3
- package/dist/{config-types-D0sxpKAN.mjs.map → config-types-DsRO_uxd.mjs.map} +1 -1
- package/dist/{contract-builder-tEax3I2q.mjs → contract-builder-DEtvdts6.mjs} +15 -9
- package/dist/contract-builder-DEtvdts6.mjs.map +1 -0
- package/dist/{contract-builder-V5pFHDv3.d.mts → contract-builder-DWQhH8FQ.d.mts} +21 -13
- package/dist/contract-builder-DWQhH8FQ.d.mts.map +1 -0
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +2 -2
- package/dist/contract-prisma7__provider.mjs +8 -8
- package/dist/contract-psl.d.mts +3 -3
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +2 -2
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +3 -3
- package/dist/contract-ts.d.mts +5 -5
- package/dist/contract-ts.mjs +3 -3
- 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 +4 -4
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{contract-view-C1xX3yIj.d.mts → contract-view-CijuTaer.d.mts} +2 -2
- package/dist/{contract-view-C1xX3yIj.d.mts.map → contract-view-CijuTaer.d.mts.map} +1 -1
- package/dist/contract.d.mts +19 -19
- package/dist/contract.mjs +14 -14
- package/dist/contract__authored-check-naming.d.mts +1 -1
- package/dist/contract__authored-check-naming.mjs +1 -1
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__data-type.mjs +1 -1
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/contract__entity-kinds.mjs +1 -1
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__factories.mjs +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.mjs +2 -2
- package/dist/contract__index-naming.d.mts +1 -1
- package/dist/contract__index-naming.mjs +1 -1
- package/dist/contract__index-type-validation.d.mts +2 -2
- package/dist/contract__index-type-validation.mjs +1 -1
- package/dist/contract__index-types.d.mts +3 -3
- package/dist/contract__index-types.mjs +2 -2
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__types.d.mts +7 -7
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-C5Yy0n3w.mjs → control-4kwMnHYO.mjs} +13 -13
- package/dist/{control-C5Yy0n3w.mjs.map → control-4kwMnHYO.mjs.map} +1 -1
- package/dist/{control-B3Mb21Md.d.mts → control-BK2oKZmT.d.mts} +16 -16
- package/dist/{control-B3Mb21Md.d.mts.map → control-BK2oKZmT.d.mts.map} +1 -1
- package/dist/{control-adapter-CkFfBVei-BLYeKcLW.d.mts → control-adapter-CkFfBVei-DH5DAObc.d.mts} +8 -8
- package/dist/{control-adapter-CkFfBVei-BLYeKcLW.d.mts.map → control-adapter-CkFfBVei-DH5DAObc.d.mts.map} +1 -1
- package/dist/control-adapter-DB7MPI5L.d.mts +1 -0
- package/dist/{data-type-CAPmGXg9.mjs → data-type-C_PI_Jsa.mjs} +2 -2
- package/dist/{data-type-CAPmGXg9.mjs.map → data-type-C_PI_Jsa.mjs.map} +1 -1
- package/dist/{db-D7R5zKiH-P7Tg4ZXk.d.mts → db-DB1FVK1P-DbwoL7vg.d.mts} +48 -11
- package/dist/db-DB1FVK1P-DbwoL7vg.d.mts.map +1 -0
- package/dist/{ddl-types-DtKZjNtN-CByECwns.d.mts → ddl-types-DtKZjNtN-CwtcEWLd.d.mts} +3 -3
- package/dist/{ddl-types-DtKZjNtN-CByECwns.d.mts.map → ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map} +1 -1
- package/dist/{derived-checks-D5zdlyyh-CPofdm1W.mjs → derived-checks-CfXjGvNH-CrXoMrPU.mjs} +22 -32
- package/dist/derived-checks-CfXjGvNH-CrXoMrPU.mjs.map +1 -0
- package/dist/{derived-checks-DpPkO6Dt-D3M7YEr2.d.mts → derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts} +3 -3
- package/dist/{derived-checks-DpPkO6Dt-D3M7YEr2.d.mts.map → derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts.map} +1 -1
- package/dist/{diff-CBqsNkxe.d.mts → diff-l4-qJpTV.d.mts} +8 -8
- package/dist/{diff-CBqsNkxe.d.mts.map → diff-l4-qJpTV.d.mts.map} +1 -1
- package/dist/{dist-Dm_hQ-hh.mjs → dist-D8EkCena.mjs} +2 -2
- package/dist/{dist-Dm_hQ-hh.mjs.map → dist-D8EkCena.mjs.map} +1 -1
- package/dist/{entity-kinds-O3V1K26U-B8TUrsX2.mjs → entity-kinds-DDTkNIr9-DJ2EIO94.mjs} +5 -5
- package/dist/{entity-kinds-O3V1K26U-B8TUrsX2.mjs.map → entity-kinds-DDTkNIr9-DJ2EIO94.mjs.map} +1 -1
- package/dist/{entity-kinds--HvqT50S.d.mts → entity-kinds-DqUYen0Y.d.mts} +5 -5
- package/dist/{entity-kinds--HvqT50S.d.mts.map → entity-kinds-DqUYen0Y.d.mts.map} +1 -1
- package/dist/{expression-DE893va7.d.mts → expression-CvXfXCGs.d.mts} +7 -7
- package/dist/{expression-DE893va7.d.mts.map → expression-CvXfXCGs.d.mts.map} +1 -1
- package/dist/{factories-DzLBAAvj.d.mts → factories-BVIVyHQU.d.mts} +4 -4
- package/dist/{factories-DzLBAAvj.d.mts.map → factories-BVIVyHQU.d.mts.map} +1 -1
- package/dist/{factories-Bp41Aity.mjs → factories-CScqMnFk.mjs} +3 -3
- package/dist/{factories-Bp41Aity.mjs.map → factories-CScqMnFk.mjs.map} +1 -1
- package/dist/family.d.mts +13 -13
- package/dist/family.mjs +6 -6
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +3 -3
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__diff.mjs +1 -1
- 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.mjs +2 -2
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{foreign-key-materialization-D0Ltg78T.d.mts → foreign-key-materialization-DBYDet74.d.mts} +6 -4
- package/dist/foreign-key-materialization-DBYDet74.d.mts.map +1 -0
- package/dist/{foreign-key-materialization-Cv3q8Pix.mjs → foreign-key-materialization-DyoakLGY.mjs} +16 -7
- package/dist/foreign-key-materialization-DyoakLGY.mjs.map +1 -0
- package/dist/{index-oNRBExeI.d.mts → index-BzAG1PFV.d.mts} +11 -11
- package/dist/{index-oNRBExeI.d.mts.map → index-BzAG1PFV.d.mts.map} +1 -1
- package/dist/{index-CnpTmyXs.d.mts → index-We-mbWnZ.d.mts} +3 -3
- package/dist/{index-CnpTmyXs.d.mts.map → index-We-mbWnZ.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-C7wLMPwF.mjs → index-equivalence-DswCiq5l-_gF1Un8p.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-C7wLMPwF.mjs.map → index-equivalence-DswCiq5l-_gF1Un8p.mjs.map} +1 -1
- package/dist/{index-naming-Cj1Anq-T-NX841eiU.mjs → index-naming-BOcJT1B3-CeEoP8t3.mjs} +7 -5
- package/dist/index-naming-BOcJT1B3-CeEoP8t3.mjs.map +1 -0
- package/dist/{index-naming-UEtT94f5.d.mts → index-naming-C7pme5Pj.d.mts} +4 -3
- package/dist/index-naming-C7pme5Pj.d.mts.map +1 -0
- package/dist/index-type-validation-Bcme_Ust.mjs +42 -0
- package/dist/index-type-validation-Bcme_Ust.mjs.map +1 -0
- package/dist/index-type-validation-D7-fPxIJ.d.mts +16 -0
- package/dist/index-type-validation-D7-fPxIJ.d.mts.map +1 -0
- package/dist/index-types-ByX8MLso.d.mts +1 -0
- package/dist/index-types-H1O43iYT-ONvDbszL.d.mts +66 -0
- package/dist/index-types-H1O43iYT-ONvDbszL.d.mts.map +1 -0
- package/dist/index-types-pC_5vADQ-TTUXAfmL.mjs +95 -0
- package/dist/index-types-pC_5vADQ-TTUXAfmL.mjs.map +1 -0
- package/dist/{interpreter-DlG-2o64-DmykcFbp.mjs → interpreter-DlG-2o64-CDb20sM1.mjs} +7 -7
- package/dist/{interpreter-DlG-2o64-DmykcFbp.mjs.map → interpreter-DlG-2o64-CDb20sM1.mjs.map} +1 -1
- package/dist/{ir-BPrf_vgX.d.mts → ir-OBn7ct21.d.mts} +3 -3
- package/dist/{ir-BPrf_vgX.d.mts.map → ir-OBn7ct21.d.mts.map} +1 -1
- package/dist/middleware-FHkIPvYR.d.mts +1 -0
- package/dist/{middleware-mLwvcOLS-SaqhgsmA.d.mts → middleware-mLwvcOLS-wIYSKgog.d.mts} +2 -2
- package/dist/{middleware-mLwvcOLS-SaqhgsmA.d.mts.map → middleware-mLwvcOLS-wIYSKgog.d.mts.map} +1 -1
- package/dist/{migration-C_J49WKy.d.mts → migration-DEK3Hxlo.d.mts} +4 -4
- package/dist/{migration-C_J49WKy.d.mts.map → migration-DEK3Hxlo.d.mts.map} +1 -1
- package/dist/{naming-C1OcnGJg-DB1o9TS6.d.mts → naming-BcD36g9T-DFyaudUa.d.mts} +3 -10
- package/dist/{naming-C1OcnGJg-DB1o9TS6.d.mts.map → naming-BcD36g9T-DFyaudUa.d.mts.map} +1 -1
- package/dist/{naming-DkG_OegU-DpENNdZX.mjs → naming-CT8tRisJ-DLHKo0Hm.mjs} +9 -10
- package/dist/{naming-DkG_OegU-DpENNdZX.mjs.map → naming-CT8tRisJ-DLHKo0Hm.mjs.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +22 -25
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +20 -7
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{pack-DZtuLikU.d.mts → pack-D3L1b4Ag.d.mts} +2 -2
- package/dist/{pack-DZtuLikU.d.mts.map → pack-D3L1b4Ag.d.mts.map} +1 -1
- package/dist/plan-_8dKi13Q.d.mts +2 -0
- package/dist/{plan-cGEaSXHv-BeW-cC5v.d.mts → plan-cGEaSXHv-j0w37mVT.d.mts} +4 -4
- package/dist/{plan-cGEaSXHv-BeW-cC5v.d.mts.map → plan-cGEaSXHv-j0w37mVT.d.mts.map} +1 -1
- package/dist/{prepared-statement-YtgdlN7e-CI1fD5IM.d.mts → prepared-statement-YtgdlN7e-D4MSU3i0.d.mts} +16 -16
- package/dist/{prepared-statement-YtgdlN7e-CI1fD5IM.d.mts.map → prepared-statement-YtgdlN7e-D4MSU3i0.d.mts.map} +1 -1
- package/dist/{psl-build-B5iMVWHu.mjs → psl-build-DTE03hcr.mjs} +2 -2
- package/dist/{psl-build-B5iMVWHu.mjs.map → psl-build-DTE03hcr.mjs.map} +1 -1
- package/dist/{psl-column-resolution-CNtNJ7g7-CEuutj8I.d.mts → psl-column-resolution-CNtNJ7g7-DOrhyw4S.d.mts} +2 -2
- package/dist/{psl-column-resolution-CNtNJ7g7-CEuutj8I.d.mts.map → psl-column-resolution-CNtNJ7g7-DOrhyw4S.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-BW0ZuqBd-Dv18ERa7.mjs → psl-field-resolution-BW0ZuqBd--WxiBxb0.mjs} +4 -4
- package/dist/{psl-field-resolution-BW0ZuqBd-Dv18ERa7.mjs.map → psl-field-resolution-BW0ZuqBd--WxiBxb0.mjs.map} +1 -1
- package/dist/{psl-infer-B0yuv-j_.mjs → psl-infer-DHO72J_m.mjs} +2 -2
- package/dist/{psl-infer-B0yuv-j_.mjs.map → psl-infer-DHO72J_m.mjs.map} +1 -1
- package/dist/{psl-infer-DkPZJnUM.d.mts → psl-infer-DsHE9xAU.d.mts} +3 -3
- package/dist/{psl-infer-DkPZJnUM.d.mts.map → psl-infer-DsHE9xAU.d.mts.map} +1 -1
- package/dist/{query-lane-context-CJoNBspB-CR_n8DNB.d.mts → query-lane-context-CJoNBspB--ieuKEei.d.mts} +5 -5
- package/dist/{query-lane-context-CJoNBspB-CR_n8DNB.d.mts.map → query-lane-context-CJoNBspB--ieuKEei.d.mts.map} +1 -1
- package/dist/query-lane-context-DNt2DeQu.d.mts +1 -0
- package/dist/relational-core.d.mts +11 -11
- package/dist/relational-core.mjs +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +3 -3
- package/dist/relational-core__ast.mjs +1 -1
- package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- 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/{resolve-storage-table-B7m9cFy4.d.mts → resolve-storage-table-wSUswl-4.d.mts} +3 -3
- package/dist/{resolve-storage-table-B7m9cFy4.d.mts.map → resolve-storage-table-wSUswl-4.d.mts.map} +1 -1
- package/dist/{runtime-Ca7PVQcJ.d.mts → runtime-BHJXmBhw.d.mts} +2 -2
- package/dist/{runtime-Ca7PVQcJ.d.mts.map → runtime-BHJXmBhw.d.mts.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +2 -2
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-CqWOkoW9-BABSAGGB.d.mts → schema-differ-CqWOkoW9-DQkzKV8b.d.mts} +5 -5
- package/dist/{schema-differ-CqWOkoW9-BABSAGGB.d.mts.map → schema-differ-CqWOkoW9-DQkzKV8b.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__naming.d.mts +1 -1
- package/dist/schema-ir__naming.mjs +1 -1
- package/dist/schema-ir__types.d.mts +2 -2
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-DIfHSB4I-Dx3Tq9hf.mjs → schema-verify-DIfHSB4I-k8l0LZZB.mjs} +4 -4
- package/dist/{schema-verify-DIfHSB4I-Dx3Tq9hf.mjs.map → schema-verify-DIfHSB4I-k8l0LZZB.mjs.map} +1 -1
- package/dist/{serialized-index-C26m_DWu-CnNi8WAI.mjs → serialized-index-C26m_DWu-BjU519sW.mjs} +3 -3
- package/dist/{serialized-index-C26m_DWu-CnNi8WAI.mjs.map → serialized-index-C26m_DWu-BjU519sW.mjs.map} +1 -1
- package/dist/{serialized-index-CrgG8ct1-D64Figsu.d.mts → serialized-index-CrgG8ct1-DDfHKUEK.d.mts} +3 -3
- package/dist/{serialized-index-CrgG8ct1-D64Figsu.d.mts.map → serialized-index-CrgG8ct1-DDfHKUEK.d.mts.map} +1 -1
- package/dist/{sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs → sql-contract-serializer-DDaAVCQr-CGG0I8ur.mjs} +5 -5
- package/dist/{sql-contract-serializer-DDaAVCQr-c3jZiPS3.mjs.map → sql-contract-serializer-DDaAVCQr-CGG0I8ur.mjs.map} +1 -1
- package/dist/{sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts → sql-execution-plan-C7XauPPu-eskZJbmm.d.mts} +2 -2
- package/dist/{sql-execution-plan-C7XauPPu-BFhGKvp4.d.mts.map → sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map} +1 -1
- package/dist/{sql-index-ByAAE7K8-DPkZtr7t.d.mts → sql-index-ByAAE7K8-BpbPBWPD.d.mts} +2 -2
- package/dist/{sql-index-ByAAE7K8-DPkZtr7t.d.mts.map → sql-index-ByAAE7K8-BpbPBWPD.d.mts.map} +1 -1
- package/dist/{sql-storage-BTlJLUID-O6fBB_am.d.mts → sql-storage-BTlJLUID-CGy3wuH4.d.mts} +2 -2
- package/dist/{sql-storage-BTlJLUID-O6fBB_am.d.mts.map → sql-storage-BTlJLUID-CGy3wuH4.d.mts.map} +1 -1
- package/dist/{storage-table-B7OSPl3G-EOodFPzq.mjs → storage-table-B7OSPl3G-p1j6AjMS.mjs} +2 -2
- package/dist/{storage-table-B7OSPl3G-EOodFPzq.mjs.map → storage-table-B7OSPl3G-p1j6AjMS.mjs.map} +1 -1
- package/dist/{storage-table-WXeVNycx-tlFMnbig.d.mts → storage-table-WXeVNycx-BCwDhdq5.d.mts} +4 -4
- package/dist/{storage-table-WXeVNycx-tlFMnbig.d.mts.map → storage-table-WXeVNycx-BCwDhdq5.d.mts.map} +1 -1
- package/dist/types-BCPHaykc.d.mts +1 -0
- package/dist/{types-BJQcLx-8-DY221fiX.d.mts → types-BJQcLx-8-BHNxJ_df.d.mts} +10 -10
- package/dist/{types-BJQcLx-8-DY221fiX.d.mts.map → types-BJQcLx-8-BHNxJ_df.d.mts.map} +1 -1
- package/dist/{types-CzxOObSY-DEfjmbj1.d.mts → types-CzxOObSY-CxZ_bdVi.d.mts} +9 -9
- package/dist/{types-CzxOObSY-DEfjmbj1.d.mts.map → types-CzxOObSY-CxZ_bdVi.d.mts.map} +1 -1
- package/dist/{types-Cz_bcUWN-CC3lFQOi.mjs → types-D0GFxty0-CP8b4dR3.mjs} +4 -4
- package/dist/{types-Cz_bcUWN-CC3lFQOi.mjs.map → types-D0GFxty0-CP8b4dR3.mjs.map} +1 -1
- package/dist/{types-DFZhLz18-C_h0u-Zx.d.mts → types-DFZhLz18-Msi8wwig.d.mts} +6 -6
- package/dist/{types-DFZhLz18-C_h0u-Zx.d.mts.map → types-DFZhLz18-Msi8wwig.d.mts.map} +1 -1
- package/dist/{types-CLsPsUiw-Db1BsN9R.d.mts → types-DIZSW9JI-DNUF-RnL.d.mts} +3 -3
- package/dist/{types-CLsPsUiw-Db1BsN9R.d.mts.map → types-DIZSW9JI-DNUF-RnL.d.mts.map} +1 -1
- package/dist/{types-C7oOtFcJ.mjs → types-DXrO0fxT.mjs} +2 -2
- package/dist/{types-C7oOtFcJ.mjs.map → types-DXrO0fxT.mjs.map} +1 -1
- package/dist/types-DqSCaTK3.d.mts +1 -0
- package/dist/{types-Sh5HuaZE-B_FQUPng.d.mts → types-Sh5HuaZE-CqThc46M.d.mts} +2 -2
- package/dist/{types-Sh5HuaZE-B_FQUPng.d.mts.map → types-Sh5HuaZE-CqThc46M.d.mts.map} +1 -1
- package/dist/{types-BURWzacK.d.mts → types-Uv3oTMAb.d.mts} +7 -7
- package/dist/{types-BURWzacK.d.mts.map → types-Uv3oTMAb.d.mts.map} +1 -1
- package/dist/{validators-oyDG5mVX.mjs → validators-CIfn8ezs.mjs} +5 -5
- package/dist/{validators-oyDG5mVX.mjs.map → validators-CIfn8ezs.mjs.map} +1 -1
- package/dist/{validators-Cr_FFJAG.d.mts → validators-COcD3_iw.d.mts} +3 -3
- package/dist/{validators-Cr_FFJAG.d.mts.map → validators-COcD3_iw.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/contract-builder-V5pFHDv3.d.mts.map +0 -1
- package/dist/contract-builder-tEax3I2q.mjs.map +0 -1
- package/dist/control-adapter-BXQ29_fa.d.mts +0 -1
- package/dist/db-D7R5zKiH-P7Tg4ZXk.d.mts.map +0 -1
- package/dist/derived-checks-D5zdlyyh-CPofdm1W.mjs.map +0 -1
- package/dist/foreign-key-materialization-Cv3q8Pix.mjs.map +0 -1
- package/dist/foreign-key-materialization-D0Ltg78T.d.mts.map +0 -1
- package/dist/index-naming-Cj1Anq-T-NX841eiU.mjs.map +0 -1
- package/dist/index-naming-UEtT94f5.d.mts.map +0 -1
- package/dist/index-type-validation-B925ye4q.d.mts +0 -10
- package/dist/index-type-validation-B925ye4q.d.mts.map +0 -1
- package/dist/index-type-validation-COH4d78M.mjs +0 -17
- package/dist/index-type-validation-COH4d78M.mjs.map +0 -1
- package/dist/index-types-CNhHgKHi.d.mts +0 -1
- package/dist/index-types-DJQ_xwaE.mjs +0 -40
- package/dist/index-types-DJQ_xwaE.mjs.map +0 -1
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts +0 -31
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts.map +0 -1
- package/dist/middleware-DwaZ6s12.d.mts +0 -1
- package/dist/plan-Dhl03MtT.d.mts +0 -2
- package/dist/query-lane-context-BaoHpLsE.d.mts +0 -1
- package/dist/types-D6XuABFQ.d.mts +0 -1
- package/dist/types-DLjT0ADz.d.mts +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { t as StorageColumn } from "./storage-table-WXeVNycx-
|
|
2
|
-
import { l as SqlStorage } from "./sql-storage-BTlJLUID-
|
|
3
|
-
import { O as SqlControlDriverInstance } from "./types-DFZhLz18-
|
|
4
|
-
import "./types-
|
|
5
|
-
import { r as SqlOperationDescriptors } from "./index-
|
|
6
|
-
import { h as AnyQueryAst } from "./types-Sh5HuaZE-
|
|
1
|
+
import { t as StorageColumn } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
|
|
2
|
+
import { l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
|
|
3
|
+
import { O as SqlControlDriverInstance } from "./types-DFZhLz18-Msi8wwig.mjs";
|
|
4
|
+
import "./types-Uv3oTMAb.mjs";
|
|
5
|
+
import { r as SqlOperationDescriptors } from "./index-We-mbWnZ.mjs";
|
|
6
|
+
import { h as AnyQueryAst } from "./types-Sh5HuaZE-CqThc46M.mjs";
|
|
7
7
|
import { o as SqlExecuteRequest } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
|
|
8
|
-
import { a as DdlNode } from "./ddl-types-DtKZjNtN-
|
|
9
|
-
import { p as LowererContext } from "./ast-
|
|
8
|
+
import { a as DdlNode } from "./ddl-types-DtKZjNtN-CwtcEWLd.mjs";
|
|
9
|
+
import { p as LowererContext } from "./ast-Dp6lQXUX.mjs";
|
|
10
10
|
import { s as SqlTypeLookups } from "./data-type-CpqSDmR_.mjs";
|
|
11
|
-
import { _ as SqlSchemaIR, y as SqlSchemaIRNode } from "./types-
|
|
12
|
-
import "./types-
|
|
11
|
+
import { _ as SqlSchemaIR, y as SqlSchemaIRNode } from "./types-DIZSW9JI-DNUF-RnL.mjs";
|
|
12
|
+
import "./types-DqSCaTK3.mjs";
|
|
13
13
|
import { t as SQL_EXPRESSION_DATA_TYPE_ID } from "./sql-expression-DE_MTt3T.mjs";
|
|
14
|
-
import "./validators-
|
|
15
|
-
import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-
|
|
16
|
-
import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CZ-vdwYS-
|
|
17
|
-
import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-CzxOObSY-
|
|
18
|
-
import { t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9-
|
|
14
|
+
import "./validators-COcD3_iw.mjs";
|
|
15
|
+
import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-DH5DAObc.mjs";
|
|
16
|
+
import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CZ-vdwYS-BQPeBSla.mjs";
|
|
17
|
+
import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-CzxOObSY-CxZ_bdVi.mjs";
|
|
18
|
+
import { t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9-DQkzKV8b.mjs";
|
|
19
19
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
20
20
|
import { DataTypeSupport, PresetStorageTemplate, TIMESTAMP_NOW_GENERATOR_ID } from "@prisma/orm-framework/components/authoring";
|
|
21
21
|
import { CodecLookupWithDescriptors, DataType } from "@prisma/orm-framework/components/codec";
|
|
@@ -1180,4 +1180,4 @@ declare function temporalCodecPresetWithPrecision<const CodecId extends string,
|
|
|
1180
1180
|
declare const _default: SqlFamilyDescriptor;
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
export { partitionIssuesByControlPolicy as $, SqlDescribedContractSpace as A, _default as B, NoTable as C, SingleOperationCall as D, SchemaTables as E, TABLE_NAME_CASE_CHANGED_CODE as F, createMigrationPlan as G, contractNamespaceToSchemaIR as H, TableNameCaseGuardTable as I, extractCodecControlHooks as J, detectDestructiveChanges as K, TableRename as L, StatementPlanningTarget as M, SubjectStorage as N, SqlControlFamilyInstance as O, SuppressionRecord as P, partitionCallsByControlPolicy as Q, TableRenameRequest as R, ModelTable as S, PlannedStatements as T, contractToSchemaIR as U, assembleAuthoringContributions as V, controlPolicyForCall as W, fieldRenameStorageEffect as X, fieldEventStorage as Y, modelRenameStorageEffect as Z, MigrationPlanOperation$1 as _, ColumnRename as a, resolveColumnRenameAgainst as at, MigrationPlannerResult as b, ControlPolicySubject as c, runnerSuccess as ct, FieldEventCall as d, subjectsOfCalls as dt, planFieldEventCalls as et, FieldStorageEffect as f, temporalCodecPresetWithPrecision as ft, MigrationPlan$1 as g, unmatchedTableRename as gt, MigrationOperationPolicy$1 as h, unmatchedColumnRename as ht, ColumnOnOneSide as i, plannerSuccess as it, SqlPslBuildContext as j, SqlControlTargetDescriptor as k, DefaultRenderer as l, sqlTypeLookupsOf as lt, MigrationOperationClass$1 as m, unknownCallNames as mt, CallSubjects as n, planStatements as nt, ColumnRenameRequest as o, resolveTableRenameAgainst as ot, INIT_ADDITIVE_POLICY as p, temporalStringAuthoringPresets as pt, detectTableNameCaseChanges as q, CallWithCompanions as r, plannerFailure as rt, ContractToSchemaIROptions as s, runnerFailure as st, COLUMN_RENAME_UNMATCHED_CODE as t, planFieldEventOperations as tt, DefaultResolver as u, storageNameOfOperation as ut, MigrationPlanner as v, PlanFieldEventOperationsOptions as w, ModelStorageEffect as x, MigrationPlannerConflict$1 as y, TargetMigrationsCapability as z };
|
|
1183
|
-
//# sourceMappingURL=control-
|
|
1183
|
+
//# sourceMappingURL=control-BK2oKZmT.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-
|
|
1
|
+
{"version":3,"file":"control-BK2oKZmT.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAqBU;WACC,kBAAkB,cAAc;WAChC,cAAc;;UAEf,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,wBAAwB,SAAS,cAAc,yBAAyB;;;;;;;;;EAS9O,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB;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;EACrE,cAAc,WAAW;;;;cAIb,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV,oBAAoB;WACpB;aACE;eACE;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAGJ;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;6BACA;;;;;qBAKR;;;iBAGJ;mBACE;mBACA;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gBAAgB,6BAA6B,oCAAoC,4BAA4B,OAAO;WAC/J,cAAc;;WAEd;aACE;aACA,QAAQ,KAAK;eACX,cAAc;;eAEd;iBACE;mBACE;mBACA,IAAI;;;;;WAKZ;aACE;aACA,QAAQ,KAAK;eACX,cAAc;;eAEd;iBACE;mBACE;mBACA,IAAI;;iBAEN;mBACE;mBACA,IAAI;;;;;;;;;;;;;;;iBAeN,uCAAuC,8BAA8B,oCAAoC,4BAA4B;WAC3I,SAAS;WACT,cAAc;;WAEd;WACA;aACE;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT;eACE;iBACE;iBACA;;;aAGJ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;eAI3B;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;;;;;;cAS5B,UAAU"}
|
package/dist/{control-adapter-CkFfBVei-BLYeKcLW.d.mts → control-adapter-CkFfBVei-DH5DAObc.d.mts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { O as SqlControlDriverInstance } from "./types-DFZhLz18-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { h as AnyQueryAst, ht as LoweredStatement } from "./types-Sh5HuaZE-
|
|
1
|
+
import { O as SqlControlDriverInstance } from "./types-DFZhLz18-Msi8wwig.mjs";
|
|
2
|
+
import "./types-Uv3oTMAb.mjs";
|
|
3
|
+
import { h as AnyQueryAst, ht as LoweredStatement } from "./types-Sh5HuaZE-CqThc46M.mjs";
|
|
4
4
|
import { o as SqlExecuteRequest } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
|
|
5
|
-
import { a as DdlNode, r as DdlColumn } from "./ddl-types-DtKZjNtN-
|
|
6
|
-
import { p as LowererContext } from "./ast-
|
|
7
|
-
import { y as SqlSchemaIRNode } from "./types-
|
|
8
|
-
import "./types-
|
|
5
|
+
import { a as DdlNode, r as DdlColumn } from "./ddl-types-DtKZjNtN-CwtcEWLd.mjs";
|
|
6
|
+
import { p as LowererContext } from "./ast-Dp6lQXUX.mjs";
|
|
7
|
+
import { y as SqlSchemaIRNode } from "./types-DIZSW9JI-DNUF-RnL.mjs";
|
|
8
|
+
import "./types-DqSCaTK3.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-CkFfBVei.d.mts
|
|
@@ -189,4 +189,4 @@ interface SqlControlAdapterDescriptor<TTarget extends string = string> {
|
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
export { arraysEqual as a, SqlControlAdapterDescriptor as i, Lowerer as n, SqlControlAdapter as r, ExecuteRequestLowerer as t };
|
|
192
|
-
//# sourceMappingURL=control-adapter-CkFfBVei-
|
|
192
|
+
//# sourceMappingURL=control-adapter-CkFfBVei-DH5DAObc.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-adapter-CkFfBVei-
|
|
1
|
+
{"version":3,"file":"control-adapter-CkFfBVei-DH5DAObc.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control-adapter-CkFfBVei.d.mts"],"mappings":";;;;;;;;;;;;;;;;KAUK,qBAAqB,oBAAoB,uBAAuB;;;;iBAIpD,YAAY,sBAAsB;;;;;;;;;;UAUzC;EACR,MAAM,KAAK,cAAc,SAAS,SAAS,0BAA0B;;;;;;;;UAQ7D,8BAA8B;EACtC,sBAAsB,KAAK,cAAc,SAAS,UAAU,0BAA0B,QAAQ;;;;EAI9F,oBAAoB,QAAQ,WAAW,gBAAgB;;;;;;;;UAQ/C,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;;;;EAIJ,gBAAgB,GAAG,QAAQ,yBAAyB,UAAU,UAAU,QAAQ,KAAK,QAAQ;;;;EAI7F,WAAW,QAAQ,yBAAyB,WAAW;;;;;;;;;;;;;;;;;;EAkBvD,WAAW,QAAQ,yBAAyB,UAAU,oBAAoB,kBAAkB,QAAQ;;;;;;WAM3F,mBAAmB;;;;;EAK5B,yCAAyC;;;;;EAKzC,uCAAuC;;;;;;;;UAQ/B,4BAA4B;;;;;;;EAOpC,OAAO,OAAO,oBAAoB,WAAW,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./control-adapter-CkFfBVei-DH5DAObc.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as contractError } from "./contract-errors-BCN6RVI5-5IHBF_lg.mjs";
|
|
2
|
+
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
2
3
|
import { dataType, objectSchemaKeys } from "@prisma/orm-framework/components/codec";
|
|
3
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
|
-
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
5
5
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
6
6
|
import { type } from "arktype";
|
|
7
7
|
//#region ../../../2-sql/1-core/contract/dist/data-type.mjs
|
|
@@ -294,4 +294,4 @@ function resolvedWith(type$3, params) {
|
|
|
294
294
|
//#endregion
|
|
295
295
|
export { renderSqlTypeName as a, sqlDataType as c, unquotedSqlBaseNameOfCodec as d, validateSqlTypeParams as f, renderSqlCatalogText as i, sqlDataTypeOfCodec as l, findSqlDataTypeCollision as n, resolveReportedSqlType as o, isSqlDataType as r, sqlBaseName as s, dataTypeParams as t, unquotedSqlBaseName as u };
|
|
296
296
|
|
|
297
|
-
//# sourceMappingURL=data-type-
|
|
297
|
+
//# sourceMappingURL=data-type-C_PI_Jsa.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-type-CAPmGXg9.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/data-type.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { t as numeralText } from \"./numeral-text-Cqu87pVe.mjs\";\nimport { dataType, objectSchemaKeys } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { type } from \"arktype\";\n//#region src/sql-data-type.ts\nconst PLACEHOLDER = /\\{([A-Za-z][A-Za-z0-9]*)\\}/g;\nconst LITERAL_CHARACTERS = /^[a-z0-9_ (),.]*$/;\nconst REGEXP_SPECIAL = /[.*+?^${}()|[\\]\\\\]/g;\nfunction paramKeysOf(id, schema) {\n\tif (schema === void 0) return [];\n\tconst keys = objectSchemaKeys(schema);\n\tif (keys === void 0) refuseDeclaration(id, \"its parameter schema must be an arktype object schema.\");\n\treturn keys;\n}\nfunction placeholdersOf(text) {\n\treturn [...text.matchAll(PLACEHOLDER)].map((match) => match[1] ?? \"\");\n}\nfunction placeholderSetOf(text) {\n\treturn [...placeholdersOf(text)].sort().join(\",\");\n}\nfunction patternOf(text) {\n\tconst escaped = text.replace(REGEXP_SPECIAL, \"\\\\$&\");\n\treturn new RegExp(`^${escaped.replace(/\\\\\\{[A-Za-z][A-Za-z0-9]*\\\\\\}/g, \"(\\\\d+)\")}$`);\n}\nfunction refuseDeclaration(id, why) {\n\tthrow new InternalError(`Data type ${id}: ${why}`);\n}\nfunction checkText(id, text, paramKeys) {\n\tconst quoted = JSON.stringify(text.text);\n\tconst refuse = (why) => refuseDeclaration(id, `the text ${quoted} ${why}.`);\n\tif (text.text === \"\") refuse(\"is empty\");\n\tif (text.text !== text.text.trim()) refuse(\"starts or ends with a space\");\n\tif (text.text.includes(\" \")) refuse(\"has two spaces in a row\");\n\tconst literal = text.text.replace(PLACEHOLDER, \"\");\n\tif (literal.includes(\"{\") || literal.includes(\"}\")) refuse(\"has a placeholder that is not written {name}\");\n\tif (!LITERAL_CHARACTERS.test(literal)) refuse(\"must be lower case and contain only letters, digits, spaces, brackets, commas, dots, underscores and placeholders\");\n\tfor (const name of placeholdersOf(text.text)) if (!paramKeys.includes(name)) refuse(`names the parameter {${name}}, which the type does not declare`);\n\tif (text.display === void 0) return;\n\tconst display = JSON.stringify(text.display);\n\tif (text.display.toLowerCase() !== text.text.toLowerCase()) refuse(`has the display ${display}, which differs from it beyond letter case`);\n\tif (placeholdersOf(text.display).join(\",\") !== placeholdersOf(text.text).join(\",\")) refuse(`has the display ${display}, which writes a placeholder differently`);\n}\nfunction checkMarks(id, texts) {\n\tconst marked = /* @__PURE__ */ new Map();\n\tfor (const text of texts) {\n\t\tconst key = placeholderSetOf(text.text);\n\t\tconst entry = marked.get(key) ?? {};\n\t\tfor (const mark of [\"written\", \"catalog\"]) {\n\t\t\tif (text[mark] !== true) continue;\n\t\t\tconst other = entry[mark];\n\t\t\tif (other !== void 0) refuseDeclaration(id, `the texts ${JSON.stringify(other)} and ${JSON.stringify(text.text)} have the same placeholders and are both ${mark}.`);\n\t\t\tentry[mark] = text.text;\n\t\t}\n\t\tmarked.set(key, entry);\n\t}\n}\nfunction checkKindClaim(id, spec) {\n\tif (spec.claimsKind === void 0) {\n\t\tif (spec.render !== void 0) refuseDeclaration(id, \"render is allowed only together with claimsKind.\");\n\t\tif (spec.fromReported !== void 0) refuseDeclaration(id, \"fromReported is allowed only together with claimsKind.\");\n\t\treturn;\n\t}\n\tif (spec.texts !== void 0) refuseDeclaration(id, \"a type that claims a kind declares no texts.\");\n}\nconst identity = (params) => params;\nfunction acceptsParams(type$1, params) {\n\treturn type$1.params === void 0 || !(type$1.params(params) instanceof type.errors);\n}\nfunction checkNormalFormsWritten(type) {\n\tconst written = new Set(type.sql.texts.filter((text) => text.written === true).map((text) => placeholderSetOf(text.text)));\n\tif (written.size === 0) return;\n\tconst probes = [{}, ...type.sql.texts.map((text) => Object.fromEntries(placeholdersOf(text.text).map((name) => [name, 1])))];\n\tfor (const probe of probes) {\n\t\tif (!acceptsParams(type, probe)) continue;\n\t\tconst normalKeys = presentKeys(type.sql.normalize(probe));\n\t\tif (!written.has([...normalKeys].sort().join(\",\"))) refuseDeclaration(type.id, `the parameters ${formatKeys(Object.keys(probe))} have the normal form ${formatKeys(normalKeys)}, which no written text takes.`);\n\t}\n}\n/** Declare a SQL data type, refusing a declaration that breaks a rule of the module. */\nfunction sqlDataType(id, spec) {\n\tconst { params: _untypedParams, ...declared } = dataType(id, spec);\n\tconst texts = spec.texts ?? [];\n\tconst paramKeys = paramKeysOf(declared.id, spec.params);\n\tfor (const text of texts) checkText(declared.id, text, paramKeys);\n\tcheckMarks(declared.id, texts);\n\tcheckKindClaim(declared.id, spec);\n\tconst type = {\n\t\t...declared,\n\t\t...ifDefined(\"params\", spec.params),\n\t\tsql: {\n\t\t\ttexts,\n\t\t\tclaimsKind: spec.claimsKind,\n\t\t\tnormalize: spec.normalize ?? identity,\n\t\t\trender: spec.render,\n\t\t\tfromReported: spec.fromReported\n\t\t}\n\t};\n\tcheckNormalFormsWritten(type);\n\treturn type;\n}\n/** Whether `type` is a data type a SQL column can have. `sql/expression` is the one data type no column has. */\nfunction isSqlDataType(type) {\n\treturn \"sql\" in type;\n}\n/** The parameters of `typeParams` that `type` declares; codec-owned keys are dropped. */\nfunction dataTypeParams(type, typeParams) {\n\tif (typeParams === void 0) return {};\n\tconst kept = {};\n\tfor (const key of paramKeysOf(type.id, type.params)) if (Object.hasOwn(typeParams, key)) kept[key] = typeParams[key];\n\treturn kept;\n}\nfunction presentKeys(params) {\n\treturn Object.keys(params).filter((key) => params[key] !== void 0);\n}\nfunction formatKeys(keys) {\n\treturn `[${[...keys].sort().join(\", \")}]`;\n}\n/** The parameters, when `type` accepts them; otherwise `CONTRACT.TYPE_PARAMS_INVALID` naming each parameter at fault. */\nfunction validateSqlTypeParams(type$2, params) {\n\tif (type$2.params === void 0) return blindCast(params);\n\tconst result = type$2.params(params);\n\tif (result instanceof type.errors) throw contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type$2.id}: ${result.summary}`, { meta: {\n\t\tdataType: type$2.id,\n\t\tparameters: [...new Set(result.map((error) => error.path.map(String).join(\".\")))]\n\t} });\n\treturn blindCast(params);\n}\nfunction pickText(type, mark, keys) {\n\tconst candidates = type.sql.texts.filter((text) => text[mark] === true);\n\tconst wanted = [...keys].sort().join(\",\");\n\tconst found = candidates.find((text) => placeholderSetOf(text.text) === wanted);\n\tif (found !== void 0) return found;\n\tconst verb = mark === \"written\" ? \"written\" : \"reported\";\n\tconst takes = candidates.length === 0 ? `it is never ${verb}` : `it is ${verb} with ${candidates.map((text) => formatKeys(placeholdersOf(text.text))).join(\", \")}`;\n\tthrow contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id} cannot be ${verb} with parameters ${formatKeys(keys)}; ${takes}`, { meta: {\n\t\tdataType: type.id,\n\t\tparameters: [...keys]\n\t} });\n}\nfunction substitute(type, text, params) {\n\treturn (text.display ?? text.text).replace(PLACEHOLDER, (_, name) => {\n\t\tconst value = params[name];\n\t\tif (!Number.isSafeInteger(value)) throw contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id}: the parameter ${name} is written into the type name and must be an integer`, { meta: {\n\t\t\tdataType: type.id,\n\t\t\tparameters: [name]\n\t\t} });\n\t\treturn String(value);\n\t});\n}\n/** The name of `type` with no parameters, for places where parameters must not appear. */\nfunction sqlBaseName(type, params) {\n\tif (type.sql.render !== void 0) return type.sql.render(validateSqlTypeParams(type, params));\n\tconst fewest = type.sql.texts.filter((text) => text.written === true).reduce((best, text) => best === void 0 || placeholdersOf(text.text).length < placeholdersOf(best.text).length ? text : best, void 0);\n\tif (fewest === void 0) throw new InternalError(`Data type ${type.id} has no written text and no render, so it has no base name.`);\n\tconst name = fewest.display ?? fewest.text;\n\tif (placeholdersOf(fewest.text).length === 0) return name;\n\tconst bracket = name.indexOf(\"(\");\n\treturn bracket === -1 ? name : name.slice(0, bracket);\n}\n/**\n* The base name of `type` with `params`, unquoted. It differs from {@link sqlBaseName} only for a\n* type that claims a kind: there it is the `typeName` parameter as written (`app.status`), where\n* `sqlBaseName` gives the quoted name `render` writes into SQL (`\"app\".\"status\"`).\n*/\nfunction unquotedSqlBaseName(type, params) {\n\tif (type.sql.claimsKind === void 0) return sqlBaseName(type, params);\n\tconst { typeName } = validateSqlTypeParams(type, params);\n\tif (typeof typeName !== \"string\") throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" but declares no string typeName parameter.`);\n\treturn typeName;\n}\nconst ADD_THE_CODEC_PACK = \"Add the pack that provides the codec, and so declares its data type, to the configuration: to `extensions` in prisma.config or in defineContract.\";\n/** The SQL data type the codec `codecId` represents. */\nfunction sqlDataTypeOfCodec(codecId, lookups) {\n\tconst descriptor = lookups.codecLookup.descriptorFor(codecId);\n\tif (descriptor === void 0) throw contractError(\"CONTRACT.CODEC_DESCRIPTOR_MISSING\", `No codec \"${codecId}\" is registered, so its column type cannot be named.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: { codecId }\n\t});\n\tconst type = lookups.dataTypeLookup.get(descriptor.dataType);\n\tif (type === void 0) throw contractError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tif (!isSqlDataType(type)) throw new InternalError(`Data type ${type.id} is not a SQL data type, so it has no type name.`);\n\treturn type;\n}\n/** {@link unquotedSqlBaseName} of the data type the codec `codecId` represents. */\nfunction unquotedSqlBaseNameOfCodec(codecId, typeParams, lookups) {\n\tconst type = sqlDataTypeOfCodec(codecId, lookups);\n\treturn unquotedSqlBaseName(type, dataTypeParams(type, typeParams));\n}\n/** The text a migration writes for `type` with the raw `params`. */\nfunction renderSqlTypeName(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.render !== void 0) return type.sql.render(validated);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"written\", presentKeys(params).filter((key) => Object.hasOwn(normalized, key))), params);\n}\n/** The text the database catalog prints for `type` with `params`, in their normal form. */\nfunction renderSqlCatalogText(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.claimsKind !== void 0) throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" and has no catalog text.`);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"catalog\", presentKeys(normalized)), normalized);\n}\nfunction prepareReportedText(text) {\n\tlet prepared = \"\";\n\tlet quoted = false;\n\tlet spacePending = false;\n\tfor (const character of text.trim()) {\n\t\tif (!quoted && /\\s/.test(character)) {\n\t\t\tspacePending = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (spacePending && !/[(,]$/.test(prepared) && character !== \")\") prepared += \" \";\n\t\tspacePending = false;\n\t\tif (character === \"\\\"\") quoted = !quoted;\n\t\tprepared += quoted ? character : character.toLowerCase();\n\t}\n\treturn prepared;\n}\nfunction claims(text) {\n\treturn text.catalog === true || text.written !== true;\n}\nfunction claimingTexts(type) {\n\treturn type.sql.texts.filter(claims).map((text) => text.text);\n}\nfunction textsCollide(a, b) {\n\tconst withOnes = (text) => text.replace(PLACEHOLDER, \"1\");\n\treturn patternOf(a).test(withOnes(b)) || patternOf(b).test(withOnes(a));\n}\nfunction collisionBetween(first, second) {\n\tconst kind = first.sql.claimsKind;\n\tif (kind !== void 0 && kind === second.sql.claimsKind) return {\n\t\tby: \"kind\",\n\t\tkind\n\t};\n\tfor (const a of claimingTexts(first)) {\n\t\tconst b = claimingTexts(second).find((text) => textsCollide(a, text));\n\t\tif (b !== void 0) return {\n\t\t\tby: \"text\",\n\t\t\tfirst: a,\n\t\t\tsecond: b\n\t\t};\n\t}\n}\n/**\n* The first two SQL data types in `types` that would both recognise one reported type: a claiming\n* text of each collides, or both claim the same kind. Two texts collide when either one's pattern\n* matches the other with each placeholder written as 1.\n*/\nfunction findSqlDataTypeCollision(types) {\n\tconst sqlTypes = types.filter(isSqlDataType);\n\tfor (const [index, first] of sqlTypes.entries()) for (const second of sqlTypes.slice(index + 1)) {\n\t\tconst claims = collisionBetween(first, second);\n\t\tif (claims !== void 0) return {\n\t\t\tfirst,\n\t\t\tsecond,\n\t\t\tclaims\n\t\t};\n\t}\n}\n/**\n* The data type that claims a reported type, with its parameters in normal form, or undefined when\n* no type in `dataTypes` claims it or its parameters fail the type's schema.\n*/\nfunction resolveReportedSqlType(reported, dataTypes) {\n\tconst sqlTypes = dataTypes.filter(isSqlDataType);\n\tif (reported.kind !== void 0) {\n\t\tconst claimant = sqlTypes.find((type) => type.sql.claimsKind === reported.kind);\n\t\tif (claimant === void 0) return void 0;\n\t\treturn resolvedWith(claimant, claimant.sql.fromReported?.(reported) ?? {});\n\t}\n\tconst text = prepareReportedText(reported.text);\n\tfor (const type of sqlTypes) for (const candidate of type.sql.texts) {\n\t\tif (!claims(candidate)) continue;\n\t\tconst match = patternOf(candidate.text).exec(text);\n\t\tif (match === null) continue;\n\t\treturn resolvedWith(type, Object.fromEntries(placeholdersOf(candidate.text).map((name, index) => [name, Number.parseInt(match[index + 1] ?? \"\", 10)])));\n\t}\n}\nfunction resolvedWith(type$3, params) {\n\tif (type$3.params !== void 0 && type$3.params(params) instanceof type.errors) return void 0;\n\treturn {\n\t\tdataType: type$3.id,\n\t\ttypeParams: type$3.sql.normalize(params)\n\t};\n}\n//#endregion\nexport { dataTypeParams, findSqlDataTypeCollision, isSqlDataType, numeralText, renderSqlCatalogText, renderSqlTypeName, resolveReportedSqlType, sqlBaseName, sqlDataType, sqlDataTypeOfCodec, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateSqlTypeParams };\n\n//# sourceMappingURL=data-type.mjs.map"],"mappings":";;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,SAAS,YAAY,IAAI,QAAQ;CAChC,IAAI,WAAW,KAAK,GAAG,OAAO,CAAC;CAC/B,MAAM,OAAO,iBAAiB,MAAM;CACpC,IAAI,SAAS,KAAK,GAAG,kBAAkB,IAAI,wDAAwD;CACnG,OAAO;AACR;AACA,SAAS,eAAe,MAAM;CAC7B,OAAO,CAAC,GAAG,KAAK,SAAS,WAAW,CAAC,CAAC,CAAC,KAAK,UAAU,MAAM,MAAM,EAAE;AACrE;AACA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,CAAC,GAAG,eAAe,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG;AACjD;AACA,SAAS,UAAU,MAAM;CACxB,MAAM,UAAU,KAAK,QAAQ,gBAAgB,MAAM;CACnD,OAAO,IAAI,OAAO,IAAI,QAAQ,QAAQ,iCAAiC,QAAQ,EAAE,EAAE;AACpF;AACA,SAAS,kBAAkB,IAAI,KAAK;CACnC,MAAM,IAAI,cAAc,aAAa,GAAG,IAAI,KAAK;AAClD;AACA,SAAS,UAAU,IAAI,MAAM,WAAW;CACvC,MAAM,SAAS,KAAK,UAAU,KAAK,IAAI;CACvC,MAAM,UAAU,QAAQ,kBAAkB,IAAI,YAAY,OAAO,GAAG,IAAI,EAAE;CAC1E,IAA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,CAAC;CAC1E;CACA,MAAM,OAAO,oBAAoB,SAAS,IAAI;CAC9C,KAAK,MAAM,QAAQ,UAAU,KAAK,MAAM,aAAa,KAAK,IAAI,OAAO;EACpE,IAAI,CAAC,OAAO,SAAS,GAAG;EACxB,MAAM,QAAQ,UAAU,UAAU,IAAI,CAAC,CAAC,KAAK,IAAI;EACjD,IAAI,UAAU,MAAM;EACpB,OAAO,aAAa,MAAM,OAAO,YAAY,eAAe,UAAU,IAAI,CAAC,CAAC,KAAK,MAAM,UAAU,CAAC,MAAM,OAAO,SAAS,MAAM,QAAQ,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;CACvJ;AACD;AACA,SAAS,aAAa,QAAQ,QAAQ;CACrC,IAAI,OAAO,WAAW,KAAK,KAAK,OAAO,OAAO,MAAM,aAAa,KAAK,QAAQ,OAAO,KAAK;CAC1F,OAAO;EACN,UAAU,OAAO;EACjB,YAAY,OAAO,IAAI,UAAU,MAAM;CACxC;AACD"}
|
|
1
|
+
{"version":3,"file":"data-type-C_PI_Jsa.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/data-type.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { t as numeralText } from \"./numeral-text-Cqu87pVe.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { dataType, objectSchemaKeys } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { type } from \"arktype\";\n//#region src/sql-data-type.ts\nconst PLACEHOLDER = /\\{([A-Za-z][A-Za-z0-9]*)\\}/g;\nconst LITERAL_CHARACTERS = /^[a-z0-9_ (),.]*$/;\nconst REGEXP_SPECIAL = /[.*+?^${}()|[\\]\\\\]/g;\nfunction paramKeysOf(id, schema) {\n\tif (schema === void 0) return [];\n\tconst keys = objectSchemaKeys(schema);\n\tif (keys === void 0) refuseDeclaration(id, \"its parameter schema must be an arktype object schema.\");\n\treturn keys;\n}\nfunction placeholdersOf(text) {\n\treturn [...text.matchAll(PLACEHOLDER)].map((match) => match[1] ?? \"\");\n}\nfunction placeholderSetOf(text) {\n\treturn [...placeholdersOf(text)].sort().join(\",\");\n}\nfunction patternOf(text) {\n\tconst escaped = text.replace(REGEXP_SPECIAL, \"\\\\$&\");\n\treturn new RegExp(`^${escaped.replace(/\\\\\\{[A-Za-z][A-Za-z0-9]*\\\\\\}/g, \"(\\\\d+)\")}$`);\n}\nfunction refuseDeclaration(id, why) {\n\tthrow new InternalError(`Data type ${id}: ${why}`);\n}\nfunction checkText(id, text, paramKeys) {\n\tconst quoted = JSON.stringify(text.text);\n\tconst refuse = (why) => refuseDeclaration(id, `the text ${quoted} ${why}.`);\n\tif (text.text === \"\") refuse(\"is empty\");\n\tif (text.text !== text.text.trim()) refuse(\"starts or ends with a space\");\n\tif (text.text.includes(\" \")) refuse(\"has two spaces in a row\");\n\tconst literal = text.text.replace(PLACEHOLDER, \"\");\n\tif (literal.includes(\"{\") || literal.includes(\"}\")) refuse(\"has a placeholder that is not written {name}\");\n\tif (!LITERAL_CHARACTERS.test(literal)) refuse(\"must be lower case and contain only letters, digits, spaces, brackets, commas, dots, underscores and placeholders\");\n\tfor (const name of placeholdersOf(text.text)) if (!paramKeys.includes(name)) refuse(`names the parameter {${name}}, which the type does not declare`);\n\tif (text.display === void 0) return;\n\tconst display = JSON.stringify(text.display);\n\tif (text.display.toLowerCase() !== text.text.toLowerCase()) refuse(`has the display ${display}, which differs from it beyond letter case`);\n\tif (placeholdersOf(text.display).join(\",\") !== placeholdersOf(text.text).join(\",\")) refuse(`has the display ${display}, which writes a placeholder differently`);\n}\nfunction checkMarks(id, texts) {\n\tconst marked = /* @__PURE__ */ new Map();\n\tfor (const text of texts) {\n\t\tconst key = placeholderSetOf(text.text);\n\t\tconst entry = marked.get(key) ?? {};\n\t\tfor (const mark of [\"written\", \"catalog\"]) {\n\t\t\tif (text[mark] !== true) continue;\n\t\t\tconst other = entry[mark];\n\t\t\tif (other !== void 0) refuseDeclaration(id, `the texts ${JSON.stringify(other)} and ${JSON.stringify(text.text)} have the same placeholders and are both ${mark}.`);\n\t\t\tentry[mark] = text.text;\n\t\t}\n\t\tmarked.set(key, entry);\n\t}\n}\nfunction checkKindClaim(id, spec) {\n\tif (spec.claimsKind === void 0) {\n\t\tif (spec.render !== void 0) refuseDeclaration(id, \"render is allowed only together with claimsKind.\");\n\t\tif (spec.fromReported !== void 0) refuseDeclaration(id, \"fromReported is allowed only together with claimsKind.\");\n\t\treturn;\n\t}\n\tif (spec.texts !== void 0) refuseDeclaration(id, \"a type that claims a kind declares no texts.\");\n}\nconst identity = (params) => params;\nfunction acceptsParams(type$1, params) {\n\treturn type$1.params === void 0 || !(type$1.params(params) instanceof type.errors);\n}\nfunction checkNormalFormsWritten(type) {\n\tconst written = new Set(type.sql.texts.filter((text) => text.written === true).map((text) => placeholderSetOf(text.text)));\n\tif (written.size === 0) return;\n\tconst probes = [{}, ...type.sql.texts.map((text) => Object.fromEntries(placeholdersOf(text.text).map((name) => [name, 1])))];\n\tfor (const probe of probes) {\n\t\tif (!acceptsParams(type, probe)) continue;\n\t\tconst normalKeys = presentKeys(type.sql.normalize(probe));\n\t\tif (!written.has([...normalKeys].sort().join(\",\"))) refuseDeclaration(type.id, `the parameters ${formatKeys(Object.keys(probe))} have the normal form ${formatKeys(normalKeys)}, which no written text takes.`);\n\t}\n}\n/** Declare a SQL data type, refusing a declaration that breaks a rule of the module. */\nfunction sqlDataType(id, spec) {\n\tconst { params: _untypedParams, ...declared } = dataType(id, spec);\n\tconst texts = spec.texts ?? [];\n\tconst paramKeys = paramKeysOf(declared.id, spec.params);\n\tfor (const text of texts) checkText(declared.id, text, paramKeys);\n\tcheckMarks(declared.id, texts);\n\tcheckKindClaim(declared.id, spec);\n\tconst type = {\n\t\t...declared,\n\t\t...ifDefined(\"params\", spec.params),\n\t\tsql: {\n\t\t\ttexts,\n\t\t\tclaimsKind: spec.claimsKind,\n\t\t\tnormalize: spec.normalize ?? identity,\n\t\t\trender: spec.render,\n\t\t\tfromReported: spec.fromReported\n\t\t}\n\t};\n\tcheckNormalFormsWritten(type);\n\treturn type;\n}\n/** Whether `type` is a data type a SQL column can have. `sql/expression` is the one data type no column has. */\nfunction isSqlDataType(type) {\n\treturn \"sql\" in type;\n}\n/** The parameters of `typeParams` that `type` declares; codec-owned keys are dropped. */\nfunction dataTypeParams(type, typeParams) {\n\tif (typeParams === void 0) return {};\n\tconst kept = {};\n\tfor (const key of paramKeysOf(type.id, type.params)) if (Object.hasOwn(typeParams, key)) kept[key] = typeParams[key];\n\treturn kept;\n}\nfunction presentKeys(params) {\n\treturn Object.keys(params).filter((key) => params[key] !== void 0);\n}\nfunction formatKeys(keys) {\n\treturn `[${[...keys].sort().join(\", \")}]`;\n}\n/** The parameters, when `type` accepts them; otherwise `CONTRACT.TYPE_PARAMS_INVALID` naming each parameter at fault. */\nfunction validateSqlTypeParams(type$2, params) {\n\tif (type$2.params === void 0) return blindCast(params);\n\tconst result = type$2.params(params);\n\tif (result instanceof type.errors) throw contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type$2.id}: ${result.summary}`, { meta: {\n\t\tdataType: type$2.id,\n\t\tparameters: [...new Set(result.map((error) => error.path.map(String).join(\".\")))]\n\t} });\n\treturn blindCast(params);\n}\nfunction pickText(type, mark, keys) {\n\tconst candidates = type.sql.texts.filter((text) => text[mark] === true);\n\tconst wanted = [...keys].sort().join(\",\");\n\tconst found = candidates.find((text) => placeholderSetOf(text.text) === wanted);\n\tif (found !== void 0) return found;\n\tconst verb = mark === \"written\" ? \"written\" : \"reported\";\n\tconst takes = candidates.length === 0 ? `it is never ${verb}` : `it is ${verb} with ${candidates.map((text) => formatKeys(placeholdersOf(text.text))).join(\", \")}`;\n\tthrow contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id} cannot be ${verb} with parameters ${formatKeys(keys)}; ${takes}`, { meta: {\n\t\tdataType: type.id,\n\t\tparameters: [...keys]\n\t} });\n}\nfunction substitute(type, text, params) {\n\treturn (text.display ?? text.text).replace(PLACEHOLDER, (_, name) => {\n\t\tconst value = params[name];\n\t\tif (!Number.isSafeInteger(value)) throw contractError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${type.id}: the parameter ${name} is written into the type name and must be an integer`, { meta: {\n\t\t\tdataType: type.id,\n\t\t\tparameters: [name]\n\t\t} });\n\t\treturn String(value);\n\t});\n}\n/** The name of `type` with no parameters, for places where parameters must not appear. */\nfunction sqlBaseName(type, params) {\n\tif (type.sql.render !== void 0) return type.sql.render(validateSqlTypeParams(type, params));\n\tconst fewest = type.sql.texts.filter((text) => text.written === true).reduce((best, text) => best === void 0 || placeholdersOf(text.text).length < placeholdersOf(best.text).length ? text : best, void 0);\n\tif (fewest === void 0) throw new InternalError(`Data type ${type.id} has no written text and no render, so it has no base name.`);\n\tconst name = fewest.display ?? fewest.text;\n\tif (placeholdersOf(fewest.text).length === 0) return name;\n\tconst bracket = name.indexOf(\"(\");\n\treturn bracket === -1 ? name : name.slice(0, bracket);\n}\n/**\n* The base name of `type` with `params`, unquoted. It differs from {@link sqlBaseName} only for a\n* type that claims a kind: there it is the `typeName` parameter as written (`app.status`), where\n* `sqlBaseName` gives the quoted name `render` writes into SQL (`\"app\".\"status\"`).\n*/\nfunction unquotedSqlBaseName(type, params) {\n\tif (type.sql.claimsKind === void 0) return sqlBaseName(type, params);\n\tconst { typeName } = validateSqlTypeParams(type, params);\n\tif (typeof typeName !== \"string\") throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" but declares no string typeName parameter.`);\n\treturn typeName;\n}\nconst ADD_THE_CODEC_PACK = \"Add the pack that provides the codec, and so declares its data type, to the configuration: to `extensions` in prisma.config or in defineContract.\";\n/** The SQL data type the codec `codecId` represents. */\nfunction sqlDataTypeOfCodec(codecId, lookups) {\n\tconst descriptor = lookups.codecLookup.descriptorFor(codecId);\n\tif (descriptor === void 0) throw contractError(\"CONTRACT.CODEC_DESCRIPTOR_MISSING\", `No codec \"${codecId}\" is registered, so its column type cannot be named.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: { codecId }\n\t});\n\tconst type = lookups.dataTypeLookup.get(descriptor.dataType);\n\tif (type === void 0) throw contractError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\tfix: ADD_THE_CODEC_PACK,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tif (!isSqlDataType(type)) throw new InternalError(`Data type ${type.id} is not a SQL data type, so it has no type name.`);\n\treturn type;\n}\n/** {@link unquotedSqlBaseName} of the data type the codec `codecId` represents. */\nfunction unquotedSqlBaseNameOfCodec(codecId, typeParams, lookups) {\n\tconst type = sqlDataTypeOfCodec(codecId, lookups);\n\treturn unquotedSqlBaseName(type, dataTypeParams(type, typeParams));\n}\n/** The text a migration writes for `type` with the raw `params`. */\nfunction renderSqlTypeName(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.render !== void 0) return type.sql.render(validated);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"written\", presentKeys(params).filter((key) => Object.hasOwn(normalized, key))), params);\n}\n/** The text the database catalog prints for `type` with `params`, in their normal form. */\nfunction renderSqlCatalogText(type, params) {\n\tconst validated = validateSqlTypeParams(type, params);\n\tif (type.sql.claimsKind !== void 0) throw new InternalError(`Data type ${type.id} claims the kind \"${type.sql.claimsKind}\" and has no catalog text.`);\n\tconst normalized = type.sql.normalize(validated);\n\treturn substitute(type, pickText(type, \"catalog\", presentKeys(normalized)), normalized);\n}\nfunction prepareReportedText(text) {\n\tlet prepared = \"\";\n\tlet quoted = false;\n\tlet spacePending = false;\n\tfor (const character of text.trim()) {\n\t\tif (!quoted && /\\s/.test(character)) {\n\t\t\tspacePending = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (spacePending && !/[(,]$/.test(prepared) && character !== \")\") prepared += \" \";\n\t\tspacePending = false;\n\t\tif (character === \"\\\"\") quoted = !quoted;\n\t\tprepared += quoted ? character : character.toLowerCase();\n\t}\n\treturn prepared;\n}\nfunction claims(text) {\n\treturn text.catalog === true || text.written !== true;\n}\nfunction claimingTexts(type) {\n\treturn type.sql.texts.filter(claims).map((text) => text.text);\n}\nfunction textsCollide(a, b) {\n\tconst withOnes = (text) => text.replace(PLACEHOLDER, \"1\");\n\treturn patternOf(a).test(withOnes(b)) || patternOf(b).test(withOnes(a));\n}\nfunction collisionBetween(first, second) {\n\tconst kind = first.sql.claimsKind;\n\tif (kind !== void 0 && kind === second.sql.claimsKind) return {\n\t\tby: \"kind\",\n\t\tkind\n\t};\n\tfor (const a of claimingTexts(first)) {\n\t\tconst b = claimingTexts(second).find((text) => textsCollide(a, text));\n\t\tif (b !== void 0) return {\n\t\t\tby: \"text\",\n\t\t\tfirst: a,\n\t\t\tsecond: b\n\t\t};\n\t}\n}\n/**\n* The first two SQL data types in `types` that would both recognise one reported type: a claiming\n* text of each collides, or both claim the same kind. Two texts collide when either one's pattern\n* matches the other with each placeholder written as 1.\n*/\nfunction findSqlDataTypeCollision(types) {\n\tconst sqlTypes = types.filter(isSqlDataType);\n\tfor (const [index, first] of sqlTypes.entries()) for (const second of sqlTypes.slice(index + 1)) {\n\t\tconst claims = collisionBetween(first, second);\n\t\tif (claims !== void 0) return {\n\t\t\tfirst,\n\t\t\tsecond,\n\t\t\tclaims\n\t\t};\n\t}\n}\n/**\n* The data type that claims a reported type, with its parameters in normal form, or undefined when\n* no type in `dataTypes` claims it or its parameters fail the type's schema.\n*/\nfunction resolveReportedSqlType(reported, dataTypes) {\n\tconst sqlTypes = dataTypes.filter(isSqlDataType);\n\tif (reported.kind !== void 0) {\n\t\tconst claimant = sqlTypes.find((type) => type.sql.claimsKind === reported.kind);\n\t\tif (claimant === void 0) return void 0;\n\t\treturn resolvedWith(claimant, claimant.sql.fromReported?.(reported) ?? {});\n\t}\n\tconst text = prepareReportedText(reported.text);\n\tfor (const type of sqlTypes) for (const candidate of type.sql.texts) {\n\t\tif (!claims(candidate)) continue;\n\t\tconst match = patternOf(candidate.text).exec(text);\n\t\tif (match === null) continue;\n\t\treturn resolvedWith(type, Object.fromEntries(placeholdersOf(candidate.text).map((name, index) => [name, Number.parseInt(match[index + 1] ?? \"\", 10)])));\n\t}\n}\nfunction resolvedWith(type$3, params) {\n\tif (type$3.params !== void 0 && type$3.params(params) instanceof type.errors) return void 0;\n\treturn {\n\t\tdataType: type$3.id,\n\t\ttypeParams: type$3.sql.normalize(params)\n\t};\n}\n//#endregion\nexport { dataTypeParams, findSqlDataTypeCollision, isSqlDataType, numeralText, renderSqlCatalogText, renderSqlTypeName, resolveReportedSqlType, sqlBaseName, sqlDataType, sqlDataTypeOfCodec, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateSqlTypeParams };\n\n//# sourceMappingURL=data-type.mjs.map"],"mappings":";;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,qBAAqB;AAC3B,MAAM,iBAAiB;AACvB,SAAS,YAAY,IAAI,QAAQ;CAChC,IAAI,WAAW,KAAK,GAAG,OAAO,CAAC;CAC/B,MAAM,OAAO,iBAAiB,MAAM;CACpC,IAAI,SAAS,KAAK,GAAG,kBAAkB,IAAI,wDAAwD;CACnG,OAAO;AACR;AACA,SAAS,eAAe,MAAM;CAC7B,OAAO,CAAC,GAAG,KAAK,SAAS,WAAW,CAAC,CAAC,CAAC,KAAK,UAAU,MAAM,MAAM,EAAE;AACrE;AACA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,CAAC,GAAG,eAAe,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG;AACjD;AACA,SAAS,UAAU,MAAM;CACxB,MAAM,UAAU,KAAK,QAAQ,gBAAgB,MAAM;CACnD,OAAO,IAAI,OAAO,IAAI,QAAQ,QAAQ,iCAAiC,QAAQ,E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uB,UAAU,WAAW;CACpD,MAAM,WAAW,UAAU,OAAO,aAAa;CAC/C,IAAI,SAAS,SAAS,KAAK,GAAG;EAC7B,MAAM,WAAW,SAAS,MAAM,SAAS,KAAK,IAAI,eAAe,SAAS,IAAI;EAC9E,IAAI,aAAa,KAAK,GAAG,OAAO,KAAK;EACrC,OAAO,aAAa,UAAU,SAAS,IAAI,eAAe,QAAQ,KAAK,CAAC,CAAC;CAC1E;CACA,MAAM,OAAO,oBAAoB,SAAS,IAAI;CAC9C,KAAK,MAAM,QAAQ,UAAU,KAAK,MAAM,aAAa,KAAK,IAAI,OAAO;EACpE,IAAI,CAAC,OAAO,SAAS,GAAG;EACxB,MAAM,QAAQ,UAAU,UAAU,IAAI,CAAC,CAAC,KAAK,IAAI;EACjD,IAAI,UAAU,MAAM;EACpB,OAAO,aAAa,MAAM,OAAO,YAAY,eAAe,UAAU,IAAI,CAAC,CAAC,KAAK,MAAM,UAAU,CAAC,MAAM,OAAO,SAAS,MAAM,QAAQ,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;CACvJ;AACD;AACA,SAAS,aAAa,QAAQ,QAAQ;CACrC,IAAI,OAAO,WAAW,KAAK,KAAK,OAAO,OAAO,MAAM,aAAa,KAAK,QAAQ,OAAO,KAAK;CAC1F,OAAO;EACN,UAAU,OAAO;EACjB,YAAY,OAAO,IAAI,UAAU,MAAM;CACxC;AACD"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { r as StorageTable } from "./storage-table-WXeVNycx-
|
|
2
|
-
import { T as QueryOperationTypesBase, h as ExtractStorageColumnTypes, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, p as ExtractQueryOperationTypes, r as AggregateTypesBase, u as ExtractCodecTypes } from "./types-DFZhLz18-
|
|
3
|
-
import { o as StorageColumnMapAt } from "./types-
|
|
4
|
-
import { Mt as SelectAst, St as OrderByNulls, l as AnyFromSource } from "./types-Sh5HuaZE-
|
|
5
|
-
import { c as LockOptionCapabilities, l as LockStrengthCapabilities, u as LockWaitOptions } from "./ast-
|
|
6
|
-
import { n as SqlQueryPlan } from "./plan-cGEaSXHv-
|
|
7
|
-
import { S as TraitExpression, c as RawAffectedCountQuery, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, o as Expression, r as CodecExpression, s as NoReservedRowColumn, x as ScopeField, y as RawSqlTag } from "./expression-
|
|
8
|
-
import "./plan-
|
|
1
|
+
import { r as StorageTable } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
|
|
2
|
+
import { T as QueryOperationTypesBase, h as ExtractStorageColumnTypes, l as ExtractAggregateTypes, m as ExtractStorageColumnInputTypes, p as ExtractQueryOperationTypes, r as AggregateTypesBase, u as ExtractCodecTypes } from "./types-DFZhLz18-Msi8wwig.mjs";
|
|
3
|
+
import { o as StorageColumnMapAt } from "./types-Uv3oTMAb.mjs";
|
|
4
|
+
import { Mt as SelectAst, St as OrderByNulls, l as AnyFromSource } from "./types-Sh5HuaZE-CqThc46M.mjs";
|
|
5
|
+
import { c as LockOptionCapabilities, l as LockStrengthCapabilities, u as LockWaitOptions } from "./ast-Dp6lQXUX.mjs";
|
|
6
|
+
import { n as SqlQueryPlan } from "./plan-cGEaSXHv-j0w37mVT.mjs";
|
|
7
|
+
import { S as TraitExpression, c as RawAffectedCountQuery, f as RawRowQuery, g as RawSqlInterpolation, h as RawSqlBuilder, i as CodecTypesBase, o as Expression, r as CodecExpression, s as NoReservedRowColumn, x as ScopeField, y as RawSqlTag } from "./expression-CvXfXCGs.mjs";
|
|
8
|
+
import "./plan-_8dKi13Q.mjs";
|
|
9
9
|
import { AnnotationValue, OperationKind, ValidAnnotations } from "@prisma/orm-framework/components/runtime";
|
|
10
|
-
//#region ../../../2-sql/4-lanes/sql-builder/dist/db-
|
|
10
|
+
//#region ../../../2-sql/4-lanes/sql-builder/dist/db-DB1FVK1P.d.mts
|
|
11
11
|
//#region src/scope.d.ts
|
|
12
12
|
type GatedMethod<Capabilities, Required, Method> = Capabilities extends Required ? Method : never;
|
|
13
13
|
declare const JoinOuterScope: unique symbol;
|
|
@@ -213,6 +213,41 @@ type ResolveRow<Row extends Record<string, ScopeField>, CodecTypes extends Recor
|
|
|
213
213
|
readonly output: unknown;
|
|
214
214
|
}>, PreResolved extends Record<string, unknown> = Record<string, never>> = Expand<{ -readonly [K in keyof Row]: string extends keyof PreResolved ? ResolveField<Row[K], CodecTypes> : K extends keyof PreResolved ? ApplyNullable<NonNullable<PreResolved[K & keyof PreResolved]>, Row[K]> : ResolveField<Row[K], CodecTypes>; }>;
|
|
215
215
|
//#endregion
|
|
216
|
+
//#region src/types/index-reference.d.ts
|
|
217
|
+
/**
|
|
218
|
+
* An index of a table as a query reads it: its columns, bound to the table's alias, its type and its options. A query operation that searches what an index covers, such as Postgres's `fullTextMatches`, takes it in place of the columns and settings the index was built with.
|
|
219
|
+
*/
|
|
220
|
+
interface IndexReference<Columns extends Readonly<Record<string, Expression<ScopeField>>> = Readonly<Record<string, Expression<ScopeField>>>, Type extends string | undefined = string | undefined, Options extends Readonly<Record<string, unknown>> | undefined = Readonly<Record<string, unknown>> | undefined> {
|
|
221
|
+
/** The index's columns by name, each the column of the aliased table; empty for an expression index. */
|
|
222
|
+
readonly columns: Columns;
|
|
223
|
+
readonly type: Type;
|
|
224
|
+
readonly options: Options;
|
|
225
|
+
}
|
|
226
|
+
/** The name the contract source gave an index: the prefix of a wire name, or an exact (`map:`) name. */
|
|
227
|
+
type AuthoredIndexName<I> = I extends {
|
|
228
|
+
readonly prefix: infer Prefix extends string;
|
|
229
|
+
} ? Prefix : I extends {
|
|
230
|
+
readonly name: infer Name extends string;
|
|
231
|
+
} ? Name : never;
|
|
232
|
+
type IndexColumnExpressions<Fields, I> = I extends {
|
|
233
|
+
readonly columns: infer Columns extends readonly string[];
|
|
234
|
+
} ? { readonly [Column in Columns[number]]: Column extends keyof Fields ? Fields[Column] extends ScopeField ? Expression<Fields[Column]> : never : never; } : Record<never, never>;
|
|
235
|
+
type IndexTypeOf<I> = I extends {
|
|
236
|
+
readonly type: infer Type extends string;
|
|
237
|
+
} ? Type : undefined;
|
|
238
|
+
type IndexOptionsOf<I> = I extends {
|
|
239
|
+
readonly options: infer Options extends Record<string, unknown>;
|
|
240
|
+
} ? Options : undefined;
|
|
241
|
+
/** The indexes of `I` whose authored name is `Key`. */
|
|
242
|
+
type IndexesNamed<I, Key> = I extends unknown ? AuthoredIndexName<I> extends Key ? I : never : never;
|
|
243
|
+
type IsUnion<T, Whole = T> = T extends unknown ? ([Whole] extends [T] ? false : true) : never;
|
|
244
|
+
/**
|
|
245
|
+
* A table's indexes, keyed by the name the contract source gave each: the `name:` prefix, or the `map:` name. An unnamed index, such as a derived foreign-key backing index, appears under its default prefix. A name that more than one index shares is left out, as reading it is refused at runtime.
|
|
246
|
+
*/
|
|
247
|
+
type IndexReferences<C extends TableProxyContract, NsId extends string, Name extends string, Table = NamespaceTable<C, NsId, Name>, Fields = StorageTableToScopeTable<NamespaceTable<C, NsId, Name>>> = Table extends {
|
|
248
|
+
readonly indexes: readonly (infer I)[];
|
|
249
|
+
} ? { readonly [Key in AuthoredIndexName<I> as true extends IsUnion<IndexesNamed<I, Key>> ? never : Key]: IndexReference<IndexColumnExpressions<Fields, IndexesNamed<I, Key>>, IndexTypeOf<IndexesNamed<I, Key>>, IndexOptionsOf<IndexesNamed<I, Key>>>; } : never;
|
|
250
|
+
//#endregion
|
|
216
251
|
//#region src/types/mutation-query.d.ts
|
|
217
252
|
type ReturningCapability = {
|
|
218
253
|
sql: {
|
|
@@ -535,6 +570,8 @@ type WhereFilter<C extends TableProxyContract, NsId extends keyof C['storage']['
|
|
|
535
570
|
interface TableProxy<C extends TableProxyContract, NsId extends string, Name extends string, Alias extends string = Name, AvailableScope extends Scope = DefaultScope<Name, NamespaceTable<C, NsId, Name>>, QC extends QueryContext = ContractToQC<C, NsId, Name>> extends JoinSource<StorageTableToScopeTable<NamespaceTable<C, NsId, Name>>, Alias>, WithSelect<QC, AvailableScope, EmptyRow>, WithJoin<QC, AvailableScope, C['capabilities']> {
|
|
536
571
|
/** The table's columns, for naming in a raw statement's row spec. */
|
|
537
572
|
readonly columns: ColumnRefs<C, NsId, Name>;
|
|
573
|
+
/** The table's indexes, keyed by the name the contract source gave each, with their columns bound to this table's alias. */
|
|
574
|
+
readonly indexes: IndexReferences<C, NsId, Name>;
|
|
538
575
|
as<NewAlias extends string>(newAlias: NewAlias): TableProxy<C, NsId, Name, NewAlias, RebindScope<AvailableScope, Alias, NewAlias>, QC>;
|
|
539
576
|
insert(rows: ReadonlyArray<ResolvedInsertValues<C, NsId, NamespaceTable<C, NsId, Name>, Name, QC['codecTypes']>>): InsertQuery<QC, AvailableScope, EmptyRow>;
|
|
540
577
|
update(set: ResolvedUpdateValues<C, NsId, NamespaceTable<C, NsId, Name>, Name, QC['codecTypes']>): UpdateQuery<QC, AvailableScope, EmptyRow>;
|
|
@@ -578,5 +615,5 @@ type Namespace<C extends TableProxyContract, NsId extends string & keyof C['stor
|
|
|
578
615
|
*/
|
|
579
616
|
type Db<C extends TableProxyContract> = { readonly [Ns in keyof C['storage']['namespaces'] & string]: Namespace<C, Ns>; };
|
|
580
617
|
//#endregion
|
|
581
|
-
export {
|
|
582
|
-
//# sourceMappingURL=db-
|
|
618
|
+
export { TableProxy as C, WhereFilter as D, UpdateQuery as E, TableNamesAcrossNamespaces as S, UnboundTables as T, ResolveRow as _, DeleteQuery as a, Subquery as b, GatedMethod as c, IndexReferences as d, InsertQuery as f, RawTagFor as g, RawLane as h, Db as i, GroupedQuery as l, QueryContext as m, BooleanCodecType as n, FieldProxy as o, Namespace as p, ContractRawTag as r, Functions as s, AggregateFunctions as t, IndexReference as u, Scope as v, TableProxyContract as w, TableInAnyNamespace as x, SelectQuery as y };
|
|
619
|
+
//# sourceMappingURL=db-DB1FVK1P-DbwoL7vg.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-DB1FVK1P-DbwoL7v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,GAAG;KACzH,sBAAsB,UAAU,oBAAoB,mBAAmB,oCAAoC,kBAAkB,2BAA2B;KACxJ,2BAA2B,UAAU,yBAAyB,cAAc,mCAAmC,kBAAkB,2BAA2B,yBAAyB;KACrL,oBAAoB,UAAU,oBAAoB,0BAA0B,cAAc,6BAA6B,mBAAmB,kBAAkB,2BAA2B,SAAS,kBAAkB,2BAA2B,OAAO,uBAAuB;KAC3Q,eAAe,UAAU,oBAAoB,qBAAqB,uBAAuB,kBAAkB,2BAA2B,OAAO;KAC7I,UAAU,UAAU,oBAAoB,4BAA4B,0CAA0C,cAAc,kBAAkB,2BAA2B,kBAAkB,WAAW,GAAG,MAAM;;;;;;;;;KAS/M,GAAG,UAAU,kCAAkC,YAAY,sCAAsC,UAAU,GAAG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as ReferentialAction } from "./foreign-key-qkDFfG8t-Fyrzd0VI.mjs";
|
|
2
|
-
import "./types-
|
|
3
|
-
import { E as CodecRef$1, m as AnyParamRef } from "./types-Sh5HuaZE-
|
|
2
|
+
import "./types-Uv3oTMAb.mjs";
|
|
3
|
+
import { E as CodecRef$1, m as AnyParamRef } from "./types-Sh5HuaZE-CqThc46M.mjs";
|
|
4
4
|
import { ColumnDefaultLiteralInputValue } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
//#region ../../../2-sql/4-lanes/relational-core/dist/ddl-types-DtKZjNtN.d.mts
|
|
6
6
|
//#region src/ast/opaque-sql.d.ts
|
|
@@ -140,4 +140,4 @@ declare class CheckExpressionConstraint {
|
|
|
140
140
|
type DdlTableConstraint = PrimaryKeyConstraint | ForeignKeyConstraint | UniqueConstraint | CheckExpressionConstraint;
|
|
141
141
|
//#endregion
|
|
142
142
|
export { DdlNode as a, FunctionColumnDefault as c, PrimaryKeyConstraint as d, UniqueConstraint as f, renderOpaqueSql as h, DdlColumnDefault as i, LiteralColumnDefault as l, opaqueSql as m, CheckExpressionConstraint as n, DdlTableConstraint as o, isDdlNode as p, DdlColumn as r, ForeignKeyConstraint as s, AnyDdlColumnDefault as t, OpaqueSql as u };
|
|
143
|
-
//# sourceMappingURL=ddl-types-DtKZjNtN-
|
|
143
|
+
//# sourceMappingURL=ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map
|
package/dist/{ddl-types-DtKZjNtN-CByECwns.d.mts.map → ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl-types-DtKZjNtN-
|
|
1
|
+
{"version":3,"file":"ddl-types-DtKZjNtN-CwtcEWLd.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/ddl-types-DtKZjNtN.d.mts"],"mappings":";;;;;;;;;cAOc;WACH;EACT,YAAY;;iBAEG,UAAU,eAAe;;;;iBAIzB,gBAAgB,KAAK;;;uBAGf;oBACH;YACR;;cAEE,6BAA6B;WAChC;WACA,OAAO;EAChB,YAAY,OAAO;;cAEP,8BAA8B;WACjC;WACA,YAAY;EACrB,YAAY,YAAY;;KAErB,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,YAAY;EACrB,YAAY;aACD;aACA,YAAY;;;KAGpB,qBAAqB,uBAAuB,uBAAuB,mBAAmB"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { r as
|
|
3
|
-
import {
|
|
1
|
+
import { i as indexTypeRegistryOf } from "./index-types-pC_5vADQ-TTUXAfmL.mjs";
|
|
2
|
+
import { i as computeCheckContentHash, r as composeCheckWirePrefix, s as derivedCheckPrefixes } from "./naming-CT8tRisJ-DLHKo0Hm.mjs";
|
|
3
|
+
import { r as lowerAuthoredIndex } from "./index-naming-BOcJT1B3-CeEoP8t3.mjs";
|
|
4
|
+
import { t as lowerAuthoredCheck } from "./authored-check-naming-CO3GA46Y.mjs";
|
|
4
5
|
import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
|
|
5
|
-
import { f as validateSqlTypeParams, l as sqlDataTypeOfCodec, t as dataTypeParams } from "./data-type-
|
|
6
|
-
import { c as StorageTable, i as Index, t as CheckConstraint } from "./storage-table-B7OSPl3G-
|
|
7
|
-
import { n as checkConstraintInputFromSerialized } from "./serialized-index-C26m_DWu-
|
|
8
|
-
import { m as valueSetEntityKind, p as tableEntityKind } from "./entity-kinds-
|
|
9
|
-
import { a as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-
|
|
10
|
-
import { t as validateIndexTypes } from "./index-type-validation-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { p as validateStorageSemantics } from "./validators-oyDG5mVX.mjs";
|
|
6
|
+
import { f as validateSqlTypeParams, l as sqlDataTypeOfCodec, t as dataTypeParams } from "./data-type-C_PI_Jsa.mjs";
|
|
7
|
+
import { c as StorageTable, i as Index, t as CheckConstraint } from "./storage-table-B7OSPl3G-p1j6AjMS.mjs";
|
|
8
|
+
import { n as checkConstraintInputFromSerialized } from "./serialized-index-C26m_DWu-BjU519sW.mjs";
|
|
9
|
+
import { m as valueSetEntityKind, p as tableEntityKind } from "./entity-kinds-DDTkNIr9-DJ2EIO94.mjs";
|
|
10
|
+
import { a as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-DyoakLGY.mjs";
|
|
11
|
+
import { t as validateIndexTypes } from "./index-type-validation-Bcme_Ust.mjs";
|
|
12
|
+
import { c as isMaterializedSqlNamespace, d as resolvedTypeParams, f as toStorageTypeInstance, o as SqlStorage, s as applyFkDefaults } from "./types-DXrO0fxT.mjs";
|
|
13
|
+
import { p as validateStorageSemantics } from "./validators-CIfn8ezs.mjs";
|
|
14
14
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
15
15
|
import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
16
|
+
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
16
17
|
import { flushAuthoringWarnings, isAuthoringEntityTypeDescriptor } from "@prisma/orm-framework/components/authoring";
|
|
17
18
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
18
19
|
import { codecForRef, enumRefusalOf } from "@prisma/orm-framework/components/codec";
|
|
19
20
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
20
|
-
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
21
21
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
22
22
|
import { asNamespaceId, coreHash, crossRef, effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
23
23
|
import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
|
|
@@ -26,7 +26,7 @@ import { resolveToOneRelationNullable } from "@prisma/orm-framework/contract-aut
|
|
|
26
26
|
import { buildExecutionSection, computeProfileHash, computeStorageHash } from "@prisma/orm-framework/contract/hashing";
|
|
27
27
|
import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
28
28
|
import { applySpecifierDefaultControlPolicy } from "@prisma/orm-framework/contract/apply-specifier-default-control-policy";
|
|
29
|
-
//#region ../../../2-sql/2-authoring/contract-ts/dist/derived-checks-
|
|
29
|
+
//#region ../../../2-sql/2-authoring/contract-ts/dist/derived-checks-CfXjGvNH.mjs
|
|
30
30
|
function contractError(code, message, options) {
|
|
31
31
|
return structuredError(code, message, options);
|
|
32
32
|
}
|
|
@@ -140,22 +140,10 @@ function encodeColumnDefault(defaultInput, codecLookup, resolveCodec, site, many
|
|
|
140
140
|
value: encodeDefaultValue(defaultInput.value, codecForDefault(codecLookup, resolveCodec, site), site)
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
function assertStorageSemantics(
|
|
143
|
+
function assertStorageSemantics(contract, indexTypeRegistry, codecLookup) {
|
|
144
144
|
const semanticErrors = validateStorageSemantics(contract.storage);
|
|
145
145
|
if (semanticErrors.length > 0) throw contractError("CONTRACT.VALIDATION_FAILED", `Contract semantic validation failed: ${semanticErrors.join("; ")}`, { meta: { errors: semanticErrors } });
|
|
146
|
-
|
|
147
|
-
const packsToRegister = [definition.target, ...Object.values(definition.extensions ?? {})];
|
|
148
|
-
for (const pack of packsToRegister) {
|
|
149
|
-
const registration = pack.indexTypes;
|
|
150
|
-
if (registration === void 0) continue;
|
|
151
|
-
if (typeof registration !== "object" || registration === null || !("entries" in registration) || !Array.isArray(registration.entries)) throw contractError("CONTRACT.PACK_CONTRIBUTION_INVALID", `Pack "${pack.id ?? "<unknown>"}" declares "indexTypes" but its value is not an IndexTypeRegistration (expected an object with an "entries" array; got ${typeof registration}).`, { meta: {
|
|
152
|
-
packId: pack.id,
|
|
153
|
-
contribution: "indexTypes",
|
|
154
|
-
reason: "invalid-shape"
|
|
155
|
-
} });
|
|
156
|
-
for (const entry of blindCast(registration).entries) indexTypeRegistry.register(entry);
|
|
157
|
-
}
|
|
158
|
-
validateIndexTypes(contract, indexTypeRegistry);
|
|
146
|
+
validateIndexTypes(contract, indexTypeRegistry, (codecId) => codecLookup.descriptorFor(codecId)?.traits);
|
|
159
147
|
}
|
|
160
148
|
function assertKnownTargetModel(modelsByName, modelsByCoordinate, sourceModelName, targetModelName, targetNamespaceId, context) {
|
|
161
149
|
const targetModel = targetNamespaceId !== void 0 && targetNamespaceId.length > 0 ? modelsByCoordinate.get(`${targetNamespaceId}:${targetModelName}`) : modelsByName.get(targetModelName);
|
|
@@ -722,6 +710,7 @@ function buildSqlContractFromDefinition(definition, codecLookup, dataTypeLookup)
|
|
|
722
710
|
};
|
|
723
711
|
const target = definition.target.targetId;
|
|
724
712
|
const defaultNamespaceId = definition.target.defaultNamespaceId;
|
|
713
|
+
const indexTypeRegistry = indexTypeRegistryOf(definition.target, Object.values(definition.extensions ?? {}));
|
|
725
714
|
const qualifyColumnType = resolveColumnTypeQualifier(definition.target);
|
|
726
715
|
const renderCheckExpressions = resolveCheckExpressionRenderer(definition.target);
|
|
727
716
|
const targetFamily = "sql";
|
|
@@ -885,7 +874,7 @@ function buildSqlContractFromDefinition(definition, codecLookup, dataTypeLookup)
|
|
|
885
874
|
name: i.name,
|
|
886
875
|
type: i.type,
|
|
887
876
|
options: i.options
|
|
888
|
-
}), authoringWarnings)
|
|
877
|
+
}), authoringWarnings, indexTypeRegistry)
|
|
889
878
|
}));
|
|
890
879
|
if (semanticModel.checks !== void 0 && semanticModel.checks.length > 0) {
|
|
891
880
|
const tableColumnNames = Object.keys(columns);
|
|
@@ -914,7 +903,8 @@ function buildSqlContractFromDefinition(definition, codecLookup, dataTypeLookup)
|
|
|
914
903
|
declaredIndexes,
|
|
915
904
|
uniques,
|
|
916
905
|
primaryKey,
|
|
917
|
-
warnings: authoringWarnings
|
|
906
|
+
warnings: authoringWarnings,
|
|
907
|
+
indexTypes: indexTypeRegistry
|
|
918
908
|
});
|
|
919
909
|
const tableInput = {
|
|
920
910
|
columns,
|
|
@@ -1121,7 +1111,7 @@ function buildSqlContractFromDefinition(definition, codecLookup, dataTypeLookup)
|
|
|
1121
1111
|
profileHash,
|
|
1122
1112
|
meta: {}
|
|
1123
1113
|
};
|
|
1124
|
-
assertStorageSemantics(
|
|
1114
|
+
assertStorageSemantics(contract, indexTypeRegistry, codecLookup);
|
|
1125
1115
|
flushAuthoringWarnings(authoringWarnings);
|
|
1126
1116
|
return contract;
|
|
1127
1117
|
}
|
|
@@ -1260,4 +1250,4 @@ function withoutDerivedChecks(tableName, table, contractDefault) {
|
|
|
1260
1250
|
//#endregion
|
|
1261
1251
|
export { storedAsListColumn as a, isValueObjectMember as i, buildSqlContractFromDefinition as n, toOneNullabilityContradictionMessage as o, contractError as r, applySqlSpecifierControlPolicy as t };
|
|
1262
1252
|
|
|
1263
|
-
//# sourceMappingURL=derived-checks-
|
|
1253
|
+
//# sourceMappingURL=derived-checks-CfXjGvNH-CrXoMrPU.mjs.map
|