@prisma/orm-family-sql 8.0.0-rc.14-dev.35 → 8.0.0-rc.14-dev.36
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-CQZn-6Wd.mjs → ast-B2W9tHy1.mjs} +6 -6
- package/dist/ast-B2W9tHy1.mjs.map +1 -0
- package/dist/{ast-BUbHXpzG.d.mts → ast-Foar49zl.d.mts} +3 -3
- package/dist/{ast-BUbHXpzG.d.mts.map → ast-Foar49zl.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-C25VGQVB.d.mts → authoring-entity-types-CZ-vdwYS-BDKo-VHB.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-C25VGQVB.d.mts.map → authoring-entity-types-CZ-vdwYS-BDKo-VHB.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-dihiQslc-hldmqa1r.mjs → authoring-type-constructors-dihiQslc-BcIPoPEn.mjs} +2 -2
- package/dist/{authoring-type-constructors-dihiQslc-hldmqa1r.mjs.map → authoring-type-constructors-dihiQslc-BcIPoPEn.mjs.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +9 -9
- package/dist/builder__runtime.mjs +1 -1
- package/dist/builder__types.d.mts +2 -2
- package/dist/{codec-descriptor-registry-BW0REwkz.mjs → codec-descriptor-registry-DoGFktu5.mjs} +2 -2
- package/dist/{codec-descriptor-registry-BW0REwkz.mjs.map → codec-descriptor-registry-DoGFktu5.mjs.map} +1 -1
- package/dist/{config-types-ump1oN82.mjs → config-types-BvoqAKkw.mjs} +2 -2
- package/dist/{config-types-ump1oN82.mjs.map → config-types-BvoqAKkw.mjs.map} +1 -1
- package/dist/{config-types-Dxhmk983.d.mts → config-types-LClcQOkt.d.mts} +4 -4
- package/dist/{config-types-Dxhmk983.d.mts.map → config-types-LClcQOkt.d.mts.map} +1 -1
- package/dist/{contract-builder-CQvwPGAW.mjs → contract-builder-BRrG-DWN.mjs} +7 -8
- package/dist/contract-builder-BRrG-DWN.mjs.map +1 -0
- package/dist/{contract-builder-BXxFihYc.d.mts → contract-builder-DoT-AH8l.d.mts} +24 -27
- package/dist/{contract-builder-BXxFihYc.d.mts.map → contract-builder-DoT-AH8l.d.mts.map} +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +2 -2
- package/dist/contract-prisma7__provider.mjs +4 -4
- 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 +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +3 -3
- 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 +2 -2
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{contract-view-CH3F_tqg.d.mts → contract-view-Cd6_tdxU.d.mts} +2 -2
- package/dist/{contract-view-CH3F_tqg.d.mts.map → contract-view-Cd6_tdxU.d.mts.map} +1 -1
- package/dist/contract.d.mts +12 -13
- package/dist/contract.mjs +8 -8
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__data-type-support.d.mts +1 -1
- package/dist/contract__data-type-support.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__index-type-validation.d.mts +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__types.d.mts +5 -5
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validators.d.mts +2 -2
- package/dist/contract__validators.mjs +3 -3
- package/dist/{control-AYMohAq_.mjs → control-C4PkND9K.mjs} +151 -91
- package/dist/control-C4PkND9K.mjs.map +1 -0
- package/dist/{control-Bpk8PtSL.d.mts → control-DQImoKde.d.mts} +23 -26
- package/dist/control-DQImoKde.d.mts.map +1 -0
- package/dist/control-adapter-BQJjVR9C.d.mts +1 -0
- package/dist/{control-adapter-BVN98SzR-C-H_T7s-.d.mts → control-adapter-CkFfBVei-Bz63KBJc.d.mts} +18 -10
- package/dist/{control-adapter-BVN98SzR-C-H_T7s-.d.mts.map → control-adapter-CkFfBVei-Bz63KBJc.d.mts.map} +1 -1
- package/dist/{data-type-support-rpD1jyZd.mjs → data-type-support-DeL6iJt8.mjs} +2 -2
- package/dist/{data-type-support-rpD1jyZd.mjs.map → data-type-support-DeL6iJt8.mjs.map} +1 -1
- package/dist/{data-type-support-B_Dr1cxB.d.mts → data-type-support-DoxtCfXq.d.mts} +3 -3
- package/dist/{data-type-support-B_Dr1cxB.d.mts.map → data-type-support-DoxtCfXq.d.mts.map} +1 -1
- package/dist/{db-DLjWu9-f-T8QbxDGY.d.mts → db-DLjWu9-f-Cw18jt8N.d.mts} +9 -9
- package/dist/{db-DLjWu9-f-T8QbxDGY.d.mts.map → db-DLjWu9-f-Cw18jt8N.d.mts.map} +1 -1
- package/dist/{ddl-types-BUqZdoZK-vyWnW2PW.d.mts → ddl-types-CWIiJxsH-BixiHVIr.d.mts} +5 -24
- package/dist/ddl-types-CWIiJxsH-BixiHVIr.d.mts.map +1 -0
- package/dist/{derived-checks-CILnJKoa-D42YRW01.mjs → derived-checks-CsB3zLJ--C7ymzzbW.mjs} +14 -17
- package/dist/derived-checks-CsB3zLJ--C7ymzzbW.mjs.map +1 -0
- package/dist/{derived-checks-DPdD01O0-BSShXJmp.d.mts → derived-checks-DPdD01O0-CABDLeK0.d.mts} +3 -3
- package/dist/{derived-checks-DPdD01O0-BSShXJmp.d.mts.map → derived-checks-DPdD01O0-CABDLeK0.d.mts.map} +1 -1
- package/dist/diff-B16bL_IR.mjs.map +1 -1
- package/dist/{diff-BsHizC0z.d.mts → diff-CJy4hgyc.d.mts} +8 -8
- package/dist/{diff-BsHizC0z.d.mts.map → diff-CJy4hgyc.d.mts.map} +1 -1
- package/dist/{dist-C_HYPisk.mjs → dist-ljGeuCdK.mjs} +8 -8
- package/dist/dist-ljGeuCdK.mjs.map +1 -0
- package/dist/{entity-kinds-DRPMASi3.d.mts → entity-kinds-DCwkg9t7.d.mts} +2 -2
- package/dist/{entity-kinds-DRPMASi3.d.mts.map → entity-kinds-DCwkg9t7.d.mts.map} +1 -1
- package/dist/{entity-kinds-BNQFeECV-BOJmOArY.mjs → entity-kinds-JlqzyFoo-BR7NtlZL.mjs} +6 -5
- package/dist/entity-kinds-JlqzyFoo-BR7NtlZL.mjs.map +1 -0
- package/dist/{expression-Bf_MkeQS.d.mts → expression-DTVL16zb.d.mts} +7 -7
- package/dist/{expression-Bf_MkeQS.d.mts.map → expression-DTVL16zb.d.mts.map} +1 -1
- package/dist/{factories-Di9PoiQh.d.mts → factories-CgVRbL8l.d.mts} +4 -4
- package/dist/{factories-Di9PoiQh.d.mts.map → factories-CgVRbL8l.d.mts.map} +1 -1
- package/dist/{factories-D6haP7by.mjs → factories-WPleYaty.mjs} +4 -4
- package/dist/factories-WPleYaty.mjs.map +1 -0
- package/dist/family.d.mts +15 -15
- package/dist/family.mjs +5 -5
- 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.d.mts +2 -2
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{index-D2ho4por.d.mts → index-B_m7BMWx.d.mts} +11 -11
- package/dist/{index-D2ho4por.d.mts.map → index-B_m7BMWx.d.mts.map} +1 -1
- package/dist/{index-DZbfFGBA.d.mts → index-qOLTnfYz.d.mts} +3 -3
- package/dist/{index-DZbfFGBA.d.mts.map → index-qOLTnfYz.d.mts.map} +1 -1
- package/dist/{index-type-validation-9yBRmaQK.d.mts → index-type-validation-BHppm9U-.d.mts} +3 -3
- package/dist/{index-type-validation-9yBRmaQK.d.mts.map → index-type-validation-BHppm9U-.d.mts.map} +1 -1
- package/dist/{interpreter-Cn_CHpKv-V5WRLkBQ.mjs → interpreter-D50jf6Dd-DQMtcGPt.mjs} +24 -16
- package/dist/interpreter-D50jf6Dd-DQMtcGPt.mjs.map +1 -0
- package/dist/{ir-D7wRE9X4.d.mts → ir-BYHqe2mj.d.mts} +3 -3
- package/dist/{ir-D7wRE9X4.d.mts.map → ir-BYHqe2mj.d.mts.map} +1 -1
- package/dist/ir-I-xciGUH.mjs.map +1 -1
- package/dist/middleware-Bn2R6ocx.d.mts +1 -0
- package/dist/{middleware-BtMX6nSF-DUnzMyGl.d.mts → middleware-BtMX6nSF-DM55ZeCo.d.mts} +2 -2
- package/dist/{middleware-BtMX6nSF-DUnzMyGl.d.mts.map → middleware-BtMX6nSF-DM55ZeCo.d.mts.map} +1 -1
- package/dist/{migration-oet2BBxc.d.mts → migration-_T2FvKPk.d.mts} +4 -4
- package/dist/{migration-oet2BBxc.d.mts.map → migration-_T2FvKPk.d.mts.map} +1 -1
- package/dist/{opaque-sql-CwvHZSr8-Ch9goXqx.mjs → opaque-sql-BWxbqe5a-GGKfyakq.mjs} +2 -8
- package/dist/opaque-sql-BWxbqe5a-GGKfyakq.mjs.map +1 -0
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +15 -15
- package/dist/orm-client.mjs +2 -2
- package/dist/{pack-C-JTs3HQ.d.mts → pack-B-_m58dV.d.mts} +2 -2
- package/dist/{pack-C-JTs3HQ.d.mts.map → pack-B-_m58dV.d.mts.map} +1 -1
- package/dist/{plan-BlQITcbP-DvbDlHXA.d.mts → plan-BlQITcbP-B2q80evU.d.mts} +4 -4
- package/dist/{plan-BlQITcbP-DvbDlHXA.d.mts.map → plan-BlQITcbP-B2q80evU.d.mts.map} +1 -1
- package/dist/plan-D11FmUVM.d.mts +2 -0
- package/dist/{prepared-statement-Cv54gpY_-dg9Qr8sK.d.mts → prepared-statement-Cv54gpY_-CT1ZL-2j.d.mts} +16 -16
- package/dist/{prepared-statement-Cv54gpY_-dg9Qr8sK.d.mts.map → prepared-statement-Cv54gpY_-CT1ZL-2j.d.mts.map} +1 -1
- package/dist/{psl-build-B6nw6MAM.mjs → psl-build-C1P-sV0c.mjs} +12 -10
- package/dist/psl-build-C1P-sV0c.mjs.map +1 -0
- package/dist/{psl-build-BrW7lQMO.d.mts → psl-build-ClK2AyY1.d.mts} +2 -2
- package/dist/psl-build-ClK2AyY1.d.mts.map +1 -0
- package/dist/{psl-column-resolution-BegCa1-t-BJJ9WB1c.d.mts → psl-column-resolution-BegCa1-t-o2A6uWWC.d.mts} +2 -2
- package/dist/{psl-column-resolution-BegCa1-t-BJJ9WB1c.d.mts.map → psl-column-resolution-BegCa1-t-o2A6uWWC.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-Bf8vUaoK-CanSt2s1.mjs → psl-field-resolution-Bi-CSeoQ-BjACY_53.mjs} +105 -22
- package/dist/psl-field-resolution-Bi-CSeoQ-BjACY_53.mjs.map +1 -0
- package/dist/{psl-infer-DzH2Khty.d.mts → psl-infer-B91bSSdN.d.mts} +4 -4
- package/dist/{psl-infer-DzH2Khty.d.mts.map → psl-infer-B91bSSdN.d.mts.map} +1 -1
- package/dist/{query-lane-context-OSV9X636-CcPv1TZj.d.mts → query-lane-context-OSV9X636-DFRkNeXq.d.mts} +5 -5
- package/dist/{query-lane-context-OSV9X636-CcPv1TZj.d.mts.map → query-lane-context-OSV9X636-DFRkNeXq.d.mts.map} +1 -1
- package/dist/query-lane-context-SRmvD9-J.d.mts +1 -0
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +2 -2
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__ast.mjs +2 -2
- 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__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +1 -1
- package/dist/relational-core__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-GpIWDdpo.d.mts → resolve-storage-table-Ba33K41A.d.mts} +3 -3
- package/dist/{resolve-storage-table-GpIWDdpo.d.mts.map → resolve-storage-table-Ba33K41A.d.mts.map} +1 -1
- package/dist/{runtime-BbhrIR5H.d.mts → runtime-BUemUdMk.d.mts} +2 -2
- package/dist/{runtime-BbhrIR5H.d.mts.map → runtime-BUemUdMk.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-DpG_gnur-if2KDxZC.d.mts → schema-differ-CqWOkoW9--uxNOini.d.mts} +6 -6
- package/dist/{schema-differ-DpG_gnur-if2KDxZC.d.mts.map → schema-differ-CqWOkoW9--uxNOini.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/{schema-verify-lPfqY_aE-CZCO8my1.mjs → schema-verify-DIfHSB4I-BK55V2WO.mjs} +3 -3
- package/dist/{schema-verify-lPfqY_aE-CZCO8my1.mjs.map → schema-verify-DIfHSB4I-BK55V2WO.mjs.map} +1 -1
- package/dist/{serialized-index-BeGqqsrC-PymnV1h-.mjs → serialized-index-QAYy0fjm-BW4shnLC.mjs} +3 -3
- package/dist/{serialized-index-BeGqqsrC-PymnV1h-.mjs.map → serialized-index-QAYy0fjm-BW4shnLC.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-C90xg7_q-4UVEMTWO.mjs → sql-contract-serializer-DDaAVCQr-h_U10PEJ.mjs} +6 -6
- package/dist/sql-contract-serializer-DDaAVCQr-h_U10PEJ.mjs.map +1 -0
- package/dist/{sql-execution-plan-CV6K4o9N-DAIvJbkb.d.mts → sql-execution-plan-CV6K4o9N-B3EzlMwJ.d.mts} +2 -2
- package/dist/{sql-execution-plan-CV6K4o9N-DAIvJbkb.d.mts.map → sql-execution-plan-CV6K4o9N-B3EzlMwJ.d.mts.map} +1 -1
- package/dist/{sql-storage-jJySr7bL-C_xAiyzH.d.mts → sql-storage-DSnnRQAf-DaHPnley.d.mts} +13 -20
- package/dist/sql-storage-DSnnRQAf-DaHPnley.d.mts.map +1 -0
- package/dist/{storage-table-DLFvP77v-DLfqYsHX.d.mts → storage-table-BBcKoAuF-CssyCQhM.d.mts} +5 -4
- package/dist/storage-table-BBcKoAuF-CssyCQhM.d.mts.map +1 -0
- package/dist/{storage-table-BwwDKQkD-BN9cZrGX.mjs → storage-table-CyL4CNMi-zOQ-vTUd.mjs} +4 -4
- package/dist/{storage-table-BwwDKQkD-BN9cZrGX.mjs.map → storage-table-CyL4CNMi-zOQ-vTUd.mjs.map} +1 -1
- package/dist/{type-map-DmIbL4o--BfPMblbZ.d.mts → type-map-dnvRKl9o-avUb9OLv.d.mts} +5 -5
- package/dist/type-map-dnvRKl9o-avUb9OLv.d.mts.map +1 -0
- package/dist/{types-Cn4JEguu.mjs → types-BlcZJEoC.mjs} +4 -4
- package/dist/types-BlcZJEoC.mjs.map +1 -0
- package/dist/{types-Da1Y_OI7-BPyFwdFU.d.mts → types-CLsPsUiw-Db1BsN9R.d.mts} +25 -19
- package/dist/types-CLsPsUiw-Db1BsN9R.d.mts.map +1 -0
- package/dist/{types-CcGO_LSh-BKHiJvvA.d.mts → types-CvuS68sy-CK5U4IEM.d.mts} +10 -11
- package/dist/{types-CcGO_LSh-BKHiJvvA.d.mts.map → types-CvuS68sy-CK5U4IEM.d.mts.map} +1 -1
- package/dist/types-CxLmS9mV.d.mts +1 -0
- package/dist/types-D6XuABFQ.d.mts +1 -0
- package/dist/{types-Bl6ohp1g-CL4_GDuc.d.mts → types-DV040Uuq-Bu8CnbMa.d.mts} +4 -4
- package/dist/{types-Bl6ohp1g-CL4_GDuc.d.mts.map → types-DV040Uuq-Bu8CnbMa.d.mts.map} +1 -1
- package/dist/{types-CyPuXMTn-pumFirZ6.mjs → types-D_7dH1ie-CN5Dgmgh.mjs} +17 -16
- package/dist/types-D_7dH1ie-CN5Dgmgh.mjs.map +1 -0
- package/dist/{types-B11MGgKr.d.mts → types-DkOYK86-.d.mts} +4 -4
- package/dist/{types-B11MGgKr.d.mts.map → types-DkOYK86-.d.mts.map} +1 -1
- package/dist/{types-DpwLgzPO-Cb9nQ-Wt.d.mts → types-DpwLgzPO-6RCR0XpS.d.mts} +10 -10
- package/dist/{types-DpwLgzPO-Cb9nQ-Wt.d.mts.map → types-DpwLgzPO-6RCR0XpS.d.mts.map} +1 -1
- package/dist/{types-Dskga3R1-BtXuRmbf.d.mts → types-Dskga3R1-DeSwpS4A.d.mts} +2 -2
- package/dist/{types-Dskga3R1-BtXuRmbf.d.mts.map → types-Dskga3R1-DeSwpS4A.d.mts.map} +1 -1
- package/dist/{validators-IGdAEEIM.mjs → validators-BF_JSK38.mjs} +50 -27
- package/dist/validators-BF_JSK38.mjs.map +1 -0
- package/dist/{validators-B-4g3vwP.d.mts → validators-BLkHaNpd.d.mts} +10 -8
- package/dist/{validators-B-4g3vwP.d.mts.map → validators-BLkHaNpd.d.mts.map} +1 -1
- package/package.json +18 -19
- package/dist/ast-CQZn-6Wd.mjs.map +0 -1
- package/dist/contract-builder-CQvwPGAW.mjs.map +0 -1
- package/dist/contract__pack-types.d.mts +0 -2
- package/dist/contract__pack-types.mjs +0 -1
- package/dist/control-AYMohAq_.mjs.map +0 -1
- package/dist/control-Bpk8PtSL.d.mts.map +0 -1
- package/dist/control-adapter-DSGwSagr.d.mts +0 -1
- package/dist/ddl-types-BUqZdoZK-vyWnW2PW.d.mts.map +0 -1
- package/dist/derived-checks-CILnJKoa-D42YRW01.mjs.map +0 -1
- package/dist/dist-C_HYPisk.mjs.map +0 -1
- package/dist/entity-kinds-BNQFeECV-BOJmOArY.mjs.map +0 -1
- package/dist/factories-D6haP7by.mjs.map +0 -1
- package/dist/interpreter-Cn_CHpKv-V5WRLkBQ.mjs.map +0 -1
- package/dist/middleware-pBMsszaq.d.mts +0 -1
- package/dist/opaque-sql-CwvHZSr8-Ch9goXqx.mjs.map +0 -1
- package/dist/pack-types-BcLTpwbv.d.mts +0 -14
- package/dist/pack-types-BcLTpwbv.d.mts.map +0 -1
- package/dist/plan-BbkBYyGR.d.mts +0 -2
- package/dist/psl-build-B6nw6MAM.mjs.map +0 -1
- package/dist/psl-build-BrW7lQMO.d.mts.map +0 -1
- package/dist/psl-field-resolution-Bf8vUaoK-CanSt2s1.mjs.map +0 -1
- package/dist/query-lane-context-CLtywrTY.d.mts +0 -1
- package/dist/sql-contract-serializer-C90xg7_q-4UVEMTWO.mjs.map +0 -1
- package/dist/sql-storage-jJySr7bL-C_xAiyzH.d.mts.map +0 -1
- package/dist/storage-table-DLFvP77v-DLfqYsHX.d.mts.map +0 -1
- package/dist/type-map-DmIbL4o--BfPMblbZ.d.mts.map +0 -1
- package/dist/types-Cn4JEguu.mjs.map +0 -1
- package/dist/types-CyPuXMTn-pumFirZ6.mjs.map +0 -1
- package/dist/types-DZA5xxDT.d.mts +0 -1
- package/dist/types-Da1Y_OI7-BPyFwdFU.d.mts.map +0 -1
- package/dist/types-QvcS13Qc.d.mts +0 -1
- package/dist/validators-IGdAEEIM.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
|
|
2
|
-
import { r as StorageTable } from "./storage-table-
|
|
2
|
+
import { r as StorageTable } from "./storage-table-BBcKoAuF-CssyCQhM.mjs";
|
|
3
3
|
import { t as StorageValueSet } from "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
|
|
4
4
|
import { AuthoringContributions } from "@prisma/orm-framework/components/authoring";
|
|
5
5
|
import { Namespace, NamespaceBase, Storage, StorageType } from "@prisma/orm-framework/components/ir";
|
|
6
6
|
import { StorageHashBase } from "@prisma/orm-framework/contract/types";
|
|
7
|
-
//#region ../../../2-sql/1-core/contract/dist/sql-storage-
|
|
7
|
+
//#region ../../../2-sql/1-core/contract/dist/sql-storage-DSnnRQAf.d.mts
|
|
8
8
|
//#region src/ir/storage-type-instance.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* Sentinel kind for the legacy codec-triple shape persisted under
|
|
@@ -15,31 +15,24 @@ import { StorageHashBase } from "@prisma/orm-framework/contract/types";
|
|
|
15
15
|
*/
|
|
16
16
|
declare const CODEC_INSTANCE_KIND: "codec-instance";
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* in `SqlStorage.types`. These are plain object literals — there is no
|
|
20
|
-
* runtime IR class, the JSON envelope round-trips through the slot
|
|
21
|
-
* unchanged. The `kind: 'codec-instance'` discriminator is the dispatch
|
|
22
|
-
* key that distinguishes codec-typed entries from any class-instance
|
|
23
|
-
* kinds a target pack contributes to the polymorphic slot.
|
|
18
|
+
* A codec-typed entry in `SqlStorage.types`, as `contract.json` stores it and the contract IR holds it. These are plain object literals with no runtime IR class; the JSON envelope round-trips through the slot unchanged. The `kind: 'codec-instance'` discriminator distinguishes them from any class-instance kinds a target pack contributes to the slot.
|
|
24
19
|
*/
|
|
25
20
|
interface StorageTypeInstance extends StorageType {
|
|
26
21
|
readonly kind: typeof CODEC_INSTANCE_KIND;
|
|
27
22
|
readonly codecId: string;
|
|
28
|
-
readonly
|
|
23
|
+
readonly dataType: string;
|
|
29
24
|
readonly typeParams: Record<string, unknown>;
|
|
30
25
|
}
|
|
31
26
|
/**
|
|
32
|
-
*
|
|
33
|
-
* structural runtime shape minus the `kind` discriminator — callers may
|
|
34
|
-
* omit `kind`; the helper {@link toStorageTypeInstance} stamps it on.
|
|
35
|
-
* `typeParams` may be omitted on input; the constructor normalises a
|
|
36
|
-
* missing value to `{}` so the in-memory shape is always present.
|
|
27
|
+
* A `storage.types` entry as authored, by a `type.*` helper or a PSL `types {}` alias: a {@link StorageTypeInstance} before the contract build adds the id of the data type its codec represents.
|
|
37
28
|
*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
type AuthoredStorageTypeInstance = Omit<StorageTypeInstance, 'dataType'>;
|
|
30
|
+
/**
|
|
31
|
+
* A `storage.types` entry as `SqlStorage` and {@link toStorageTypeInstance} take it: a {@link StorageTypeInstance} whose `kind` and `typeParams` may be left out. {@link toStorageTypeInstance} stamps the `kind` and normalises a missing `typeParams` to `{}`.
|
|
32
|
+
*/
|
|
33
|
+
type StorageTypeInstanceInput = Omit<StorageTypeInstance, 'kind' | 'typeParams'> & {
|
|
41
34
|
readonly typeParams?: Record<string, unknown>;
|
|
42
|
-
}
|
|
35
|
+
};
|
|
43
36
|
/**
|
|
44
37
|
* Stamp the codec-instance `kind` discriminator on a caller-supplied
|
|
45
38
|
* codec triple. Idempotent: input that already carries the discriminator
|
|
@@ -174,5 +167,5 @@ declare class SqlStorage<THash extends string = string> extends SqlNode implemen
|
|
|
174
167
|
constructor(input: SqlStorageInput<THash>);
|
|
175
168
|
}
|
|
176
169
|
//#endregion
|
|
177
|
-
export {
|
|
178
|
-
//# sourceMappingURL=sql-storage-
|
|
170
|
+
export { resolvedTypeParams as _, SqlNamespaceBase as a, SqlNamespaceInput as c, SqlStorageTypeEntry as d, StorageTypeInstance as f, isStorageTypeInstance as g, isSqlAuthoringContributions as h, SqlNamespace as i, SqlStorage as l, isMaterializedSqlNamespace as m, CODEC_INSTANCE_KIND as n, SqlNamespaceEntries as o, StorageTypeInstanceInput as p, SqlAuthoringContributions as r, SqlNamespaceFactory as s, AuthoredStorageTypeInstance as t, SqlStorageInput as u, toStorageTypeInstance as v };
|
|
171
|
+
//# sourceMappingURL=sql-storage-DSnnRQAf-DaHPnley.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-storage-DSnnRQAf-DaHPnley.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/sql-storage-DSnnRQAf.d.mts"],"mappings":";;;;;;;;;;;;;;;cAcc;;;;UAIJ,4BAA4B;WAC3B,aAAa;WACb;WACA;WACA,YAAY;;;;;KAKlB,8BAA8B,KAAK;;;;KAInC,2BAA2B,KAAK;WAC1B,aAAa;;;;;;;iBAOP,sBAAsB,OAAO,2BAA2B;;;;iBAIxD,mBAAmB;WACzB,aAAa;WACb;GACR,YAAY,SAAS,eAAe,KAAK,wDAAwD;;;;;;iBAMnF,sBAAsB,iBAAiB,SAAS;;;;;;;;;;KAU5D,sBAAsB,sBAAsB;UACvC;WACC;WACA,SAAS,SAAS,eAAe,SAAS;;;;;;KAMhD,uBAAuB,OAAO,sBAAsB;;;;;;;;UAQ/C,kCAAkC;WACjC,kBAAkB;;;;;;iBAMZ,4BAA4B,WAAW,qCAAqC,aAAa;UAChG,gBAAgB;WACf,aAAa,gBAAgB;WAC7B,QAAQ,eAAe;WACvB,YAAY,SAAS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6B1C,sBAAsB,SAAS,eAAe,SAAS;WACjD,QAAQ,SAAS,eAAe;WAChC,WAAW,SAAS,eAAe;;;;;;;;;;;UAWpC;WACC;WACA;WACA,SAAS;WACT;EACT,cAAc;;;;;;;;uBAQO,yBAAyB,yBAAyB;oBACrD;oBACA,SAAS;WAClB,aAAa;;;;;;;;;;;;iBAYP,2BAA2B,aAAa,KAAK;cAChD,WAAW,uCAAuC,mBAAmB;WACxE,aAAa,gBAAgB;WAC7B,YAAY,SAAS,eAAe;WACpC,QAAQ,SAAS,eAAe;EACzC,YAAY,OAAO,gBAAgB"}
|
package/dist/{storage-table-DLFvP77v-DLfqYsHX.d.mts → storage-table-BBcKoAuF-CssyCQhM.d.mts}
RENAMED
|
@@ -5,7 +5,7 @@ import { n as ForeignKeyInput, t as ForeignKey } from "./foreign-key-C-iTPuRT-C9
|
|
|
5
5
|
import { i as UniqueConstraintInput, n as PrimaryKeyInput, r as UniqueConstraint, t as PrimaryKey } from "./unique-constraint-M5TlQnJQ-BiIHJ85k.mjs";
|
|
6
6
|
import { r as IndexInput, t as Index } from "./sql-index-ByAAE7K8-DPkZtr7t.mjs";
|
|
7
7
|
import { ColumnDefault, ControlPolicy, ValueSetRef } from "@prisma/orm-framework/contract/types";
|
|
8
|
-
//#region ../../../2-sql/1-core/contract/dist/storage-table-
|
|
8
|
+
//#region ../../../2-sql/1-core/contract/dist/storage-table-BBcKoAuF.d.mts
|
|
9
9
|
//#region src/ir/storage-column.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* Hydration / construction input shape for {@link StorageColumn}. Mirrors
|
|
@@ -21,7 +21,8 @@ type StorageColumnMultiplicity = false | {
|
|
|
21
21
|
readonly elementNullable: boolean;
|
|
22
22
|
};
|
|
23
23
|
type StorageColumnInput = {
|
|
24
|
-
|
|
24
|
+
/** The id of the data type the column stores, which its codec represents. */
|
|
25
|
+
readonly dataType: string;
|
|
25
26
|
readonly codecId: string;
|
|
26
27
|
readonly nullable: boolean;
|
|
27
28
|
readonly typeParams?: Record<string, unknown>;
|
|
@@ -47,7 +48,7 @@ type StorageColumnInput = {
|
|
|
47
48
|
* map, so a `name` field would be redundant with the key.
|
|
48
49
|
*/
|
|
49
50
|
declare class StorageColumn extends SqlNode {
|
|
50
|
-
readonly
|
|
51
|
+
readonly dataType: string;
|
|
51
52
|
readonly codecId: string;
|
|
52
53
|
readonly nullable: boolean;
|
|
53
54
|
readonly many: StorageColumnMultiplicity;
|
|
@@ -105,4 +106,4 @@ declare class StorageTable extends SqlNode {
|
|
|
105
106
|
}
|
|
106
107
|
//#endregion
|
|
107
108
|
export { StorageTableInput as i, StorageColumnInput as n, StorageTable as r, StorageColumn as t };
|
|
108
|
-
//# sourceMappingURL=storage-table-
|
|
109
|
+
//# sourceMappingURL=storage-table-BBcKoAuF-CssyCQhM.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-table-BBcKoAuF-CssyCQhM.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-BBcKoAuF.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;KAkBK;WACM;;KAEN;;WAEM;WACA;WACA;WACA,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;WACnB,OAAO;;;;;;;;;;;;;;;cAeJ,sBAAsB;WACzB;WACA;WACA;WACA,MAAM;WACN,aAAa;WACb;WACA,UAAU;WACV,UAAU;WACV,WAAW;;WAEX,mBAAmB;EAC5B,YAAY,OAAO;SACZ,KAAK,OAAO,gBAAgB,qBAAqB;;;;UAIhD;WACC,SAAS,eAAe,gBAAgB;WACxC,aAAa,aAAa;WAC1B,SAAS,cAAc,mBAAmB;WAC1C,SAAS,cAAc,QAAQ;WAC/B,aAAa,cAAc,aAAa;WACxC,UAAU;WACV,SAAS,cAAc,kBAAkB;;;;;;;;;;;;;;cActC,qBAAqB;WACxB,SAAS,SAAS,eAAe;WACjC,SAAS,cAAc;WACvB,SAAS,cAAc;WACvB,aAAa,cAAc;WAC3B,aAAa;WACb,UAAU;WACV,SAAS,cAAc;EAChC,YAAY,OAAO;;;;;;;;SAQZ,GAAG,OAAO,2BAA2B,SAAS;SAC9C,OAAO,OAAO,0BAA0B,6BAA6B,SAAS"}
|
|
@@ -4,7 +4,7 @@ import { ContractValidationError } from "@prisma/orm-framework/contract/contract
|
|
|
4
4
|
import { IRNodeBase, freezeNode } from "@prisma/orm-framework/components/ir";
|
|
5
5
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
6
6
|
import { asNamespaceId } from "@prisma/orm-framework/contract/types";
|
|
7
|
-
//#region ../../../2-sql/1-core/contract/dist/storage-table-
|
|
7
|
+
//#region ../../../2-sql/1-core/contract/dist/storage-table-CyL4CNMi.mjs
|
|
8
8
|
/**
|
|
9
9
|
* SQL family IR node base. Carries the family-level `kind` discriminator
|
|
10
10
|
* `'sql'` and inherits the framework's `freezeNode` affordance.
|
|
@@ -221,14 +221,14 @@ var PrimaryKey = class PrimaryKey extends SqlNode {
|
|
|
221
221
|
* map, so a `name` field would be redundant with the key.
|
|
222
222
|
*/
|
|
223
223
|
var StorageColumn = class StorageColumn extends SqlNode {
|
|
224
|
-
|
|
224
|
+
dataType;
|
|
225
225
|
codecId;
|
|
226
226
|
nullable;
|
|
227
227
|
many;
|
|
228
228
|
constructor(input) {
|
|
229
229
|
super();
|
|
230
230
|
if (Object.hasOwn(input, "elementNullable")) throw contractError("CONTRACT.ARGUMENT_INVALID", "StorageColumn elementNullable must be nested under many.", { meta: { reason: "sibling-elementNullable" } });
|
|
231
|
-
this.
|
|
231
|
+
this.dataType = input.dataType;
|
|
232
232
|
this.codecId = input.codecId;
|
|
233
233
|
this.nullable = input.nullable;
|
|
234
234
|
this.many = input.many ?? false;
|
|
@@ -305,4 +305,4 @@ var StorageTable = class StorageTable extends SqlNode {
|
|
|
305
305
|
//#endregion
|
|
306
306
|
export { PrimaryKey as a, StorageTable as c, Index as i, UniqueConstraint as l, ForeignKey as n, SqlNode as o, ForeignKeyReference as r, StorageColumn as s, CheckConstraint as t };
|
|
307
307
|
|
|
308
|
-
//# sourceMappingURL=storage-table-
|
|
308
|
+
//# sourceMappingURL=storage-table-CyL4CNMi-zOQ-vTUd.mjs.map
|
package/dist/{storage-table-BwwDKQkD-BN9cZrGX.mjs.map → storage-table-CyL4CNMi-zOQ-vTUd.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-table-BwwDKQkD-BN9cZrGX.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-BwwDKQkD.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { asNamespaceId } from \"@internal/contract/types\";\n//#region src/ir/sql-node.ts\n/**\n* SQL family IR node base. Carries the family-level `kind` discriminator\n* `'sql'` and inherits the framework's `freezeNode` affordance.\n*\n* Single family-level discriminator (not per-leaf) reflects the fact that\n* SQL IR has no polymorphic dispatch today — verifiers and serializers\n* walk by structural position (`storage.tables[name].columns[name]`),\n* not by inspecting `kind`. The abstract bar for per-leaf discriminators\n* isn't earned until a future polymorphic consumer arrives.\n*\n* `kind` is installed as a non-enumerable own property on every instance,\n* which keeps three things clean simultaneously:\n*\n* - `JSON.stringify(node)` produces the canonical pre-lift JSON envelope\n* shape (no `kind` field), so emitted contract.json files and the\n* `validateSqlContractFully` arktype schemas stay unchanged.\n* - Test assertions that use `toEqual({...})` against the pre-lift flat\n* shape continue to pass — only enumerable own properties are\n* compared.\n* - Direct access (`node.kind`) and runtime narrowing\n* (`if (node.kind === 'sql')`) still work, so future polymorphic\n* dispatch can begin reading `kind` without a runtime change.\n*\n* Future per-leaf overrides land cleanly: a class that gains a\n* polymorphic-dispatch consumer (e.g. an enum type instance walked\n* alongside other types) overrides `kind` with its narrower literal\n* at that leaf level. Per-leaf overrides will use enumerable kind\n* (matching the Mongo per-class-discriminator precedent) because they\n* encode dispatch-relevant information that callers need to see in\n* JSON envelopes; the family-level `'sql'` is uniform across all SQL\n* IR and carries no dispatch-relevant information.\n*/\nvar SqlNode = class extends IRNodeBase {\n\tkind;\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n};\n//#endregion\n//#region src/ir/check-constraint.ts\n/**\n* SQL Contract IR node for a table-level check constraint, name-identified:\n* `name` is the full physical name; a present `prefix` marks the constraint as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)` over the expression's\n* content hash), an absent `prefix` marks it exact (the name is adopted\n* verbatim). This is the convention indexes and RLS policies already use — see\n* ADR 234, \"Content-addressed wire names for Postgres-normalized objects\".\n*\n* The predicate is opaque: one SQL string, never parsed and never rendered\n* from structured parts. A database reprints predicates in its own normalized\n* form, so a wire-named check is compared by name — the hash already commits\n* to the expression the contract declared.\n*/\nvar CheckConstraint = class CheckConstraint extends SqlNode {\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"CheckConstraint: every check constraint carries a full physical name.\", \"storage\");\n\t\tthis.name = name;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Normalizes either shape into an instance: an existing `CheckConstraint`\n\t* passes through, canonical input is constructed. Callers that accept\n\t* \"instance or input\" go through this, so the constructor keeps one\n\t* canonical shape instead of widening to a union.\n\t*/\n\tstatic from(value) {\n\t\treturn value instanceof CheckConstraint ? value : new CheckConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/sql-index.ts\n/**\n* SQL Contract IR node for a table-level secondary index, name-identified:\n* `name` is the full physical name; a present `prefix` marks the index as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)`), an absent `prefix`\n* marks it exact (the name is adopted verbatim).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL supported natively by\n* Postgres and SQLite alike, and the family IR must be able to represent\n* anything any SQL target can introspect. A target declining to AUTHOR them\n* (SQLite's rejection at namespace construction) is a capability decision,\n* not evidence of target-specificity.\n*\n* Note that this class shadows the global TypeScript `Index` lib type\n* at the family-shared name; consumer files that need both should\n* alias one (e.g.\n* `import { Index as SqlIndexNode } from '@internal/sql-contract/types'`).\n*/\nvar Index = class Index extends SqlNode {\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new ContractValidationError(`Index \"${name}\": exactly one of columns or expression must be set.`, \"storage\");\n\t\tthis.name = name;\n\t\tthis.unique = input.unique;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tif (input.columns !== void 0) this.columns = input.columns;\n\t\tif (input.expression !== void 0) this.expression = input.expression;\n\t\tif (input.where !== void 0) this.where = input.where;\n\t\tif (input.type !== void 0) this.type = input.type;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof Index ? value : new Index(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key-reference.ts\n/**\n* SQL Contract IR node for one side (source or target) of a foreign-key\n* declaration. Carries the full coordinate: namespace, table, and columns.\n*\n* Cross-space discrimination is based on `spaceId` presence: absent means\n* local (same contract-space); present means cross-space (the referenced\n* table lives in the contract-space identified by `spaceId`).\n*\n* For local references `spaceId` is absent from JSON, keeping the serialized\n* shape byte-identical to contracts authored before cross-space support was\n* added. For cross-space references `spaceId` appears in JSON so round-trips\n* are lossless.\n*\n* Use `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`\n* as the sentinel `namespaceId` for single-namespace (unbound) references.\n*/\nvar ForeignKeyReference = class ForeignKeyReference extends SqlNode {\n\tnamespaceId;\n\ttableName;\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.namespaceId = asNamespaceId(input.namespaceId);\n\t\tthis.tableName = input.tableName;\n\t\tthis.columns = input.columns;\n\t\tif (input.spaceId !== void 0) this.spaceId = input.spaceId;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKeyReference ? value : new ForeignKeyReference(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key.ts\n/**\n* SQL Contract IR node for a table-level foreign-key declaration — the\n* referential constraint only (source, target, `onDelete`/`onUpdate`).\n*\n* A persisted `foreignKeys[]` entry always denotes a real constraint: whether\n* to emit the constraint at all, and whether to back it with an index, are\n* authoring-time decisions (PSL `@relation(index:)`, TS `fk({ constraint,\n* index })`) resolved once at `contract emit` — a `constraint: false` FK\n* simply has no entry here, and a backing index (if any) is its own discrete,\n* named entry in the table's `indexes[]`.\n*\n* Each FK carries explicit `source` and `target` {@link ForeignKeyReference}\n* coordinates (namespace, table, columns). For single-namespace contracts the\n* sentinel `UNBOUND_NAMESPACE_ID` appears on both sides.\n*\n* The nested references are normalised to {@link ForeignKeyReference}\n* instances inside the constructor so downstream walks see a uniform AST\n* regardless of whether the input was a JSON literal or an already-constructed\n* class instance.\n*/\nvar ForeignKey = class ForeignKey extends SqlNode {\n\tsource;\n\ttarget;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.source = ForeignKeyReference.from(input.source);\n\t\tthis.target = ForeignKeyReference.from(input.target);\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.onDelete !== void 0) this.onDelete = input.onDelete;\n\t\tif (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKey ? value : new ForeignKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* SQL Contract IR node for a table's primary-key constraint.\n*/\nvar PrimaryKey = class PrimaryKey extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-column.ts\n/**\n* SQL Contract IR node for a single column entry in `StorageTable.columns`.\n*\n* Single concrete family-shared class — every SQL target reads the\n* same column shape today, so there is no per-target subclass. The\n* class type accepts any caller that constructs via\n* `new StorageColumn(input)`; literal construction sites must pass\n* through the constructor or the family-base hydration walker.\n*\n* The column's `name` is not on the class — columns are keyed by name\n* in the parent `StorageTable.columns: Record<string, StorageColumn>`\n* map, so a `name` field would be redundant with the key.\n*/\nvar StorageColumn = class StorageColumn extends SqlNode {\n\tnativeType;\n\tcodecId;\n\tnullable;\n\tmany;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (Object.hasOwn(input, \"elementNullable\")) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"StorageColumn elementNullable must be nested under many.\", { meta: { reason: \"sibling-elementNullable\" } });\n\t\tthis.nativeType = input.nativeType;\n\t\tthis.codecId = input.codecId;\n\t\tthis.nullable = input.nullable;\n\t\tthis.many = input.many ?? false;\n\t\tif (input.noCheck !== void 0) this.noCheck = input.noCheck;\n\t\tif (input.typeParams !== void 0) this.typeParams = input.typeParams;\n\t\tif (input.typeRef !== void 0) this.typeRef = input.typeRef;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.valueSet !== void 0) this.valueSet = input.valueSet;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof StorageColumn ? value : new StorageColumn(value);\n\t}\n};\n//#endregion\n//#region src/ir/unique-constraint.ts\n/**\n* SQL Contract IR node for a table-level unique constraint.\n*/\nvar UniqueConstraint = class UniqueConstraint extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof UniqueConstraint ? value : new UniqueConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-table.ts\n/**\n* SQL Contract IR node for a single table entry in a namespace's\n* `tables` map.\n*\n* The constructor normalises nested IR-class fields (columns, primary\n* key, uniques, indexes, foreign keys) into the appropriate class\n* instances so downstream walks see a uniform AST regardless of whether\n* the input was a JSON literal or an already-constructed class.\n*\n* The table's `name` is not on the class — tables are keyed by name in\n* the parent namespace's `tables: Record<string, StorageTable>` map.\n*/\nvar StorageTable = class StorageTable extends SqlNode {\n\tcolumns;\n\tuniques;\n\tindexes;\n\tforeignKeys;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([name, col]) => [name, StorageColumn.from(col)])));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tthis.uniques = Object.freeze(input.uniques.map(UniqueConstraint.from));\n\t\tthis.indexes = Object.freeze(input.indexes.map(Index.from));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map(ForeignKey.from));\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(CheckConstraint.from));\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Runtime guard that a namespace `table` entry is really a `StorageTable`.\n\t* The compiler already types the entry as `StorageTable`, but a\n\t* freshly-deserialized contract may carry plain JSON at that slot until\n\t* hydration; this duck-types the structural shape. Accepts `undefined` so\n\t* optional-chained entry lookups pass straight through.\n\t*/\n\tstatic is(value) {\n\t\tif (typeof value !== \"object\" || value === null) return false;\n\t\treturn \"columns\" in value && \"uniques\" in value && \"indexes\" in value && \"foreignKeys\" in value;\n\t}\n\tstatic assert(value, coordinate) {\n\t\tif (!StorageTable.is(value)) throw new InternalError(`Expected a StorageTable at ${coordinate}`);\n\t}\n};\n//#endregion\nexport { ForeignKey as a, CheckConstraint as c, PrimaryKey as i, SqlNode as l, UniqueConstraint as n, ForeignKeyReference as o, StorageColumn as r, Index as s, StorageTable as t };\n\n//# sourceMappingURL=storage-table-BwwDKQkD.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAI,UAAU,cAAc,WAAW;CACtC;CACA,cAAc;EACb,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;CACF;AACD;;;;;;;;;;;;;;AAgBA,IAAI,kBAAkB,MAAM,wBAAwB,QAAQ;CAC3D;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,yEAAyE,SAAS;EAC3I,KAAK,OAAO;EACZ,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK,SAAS,MAAM,OAAO;EAC7D,KAAK,aAAa,MAAM;EACxB,WAAW,IAAI;CAChB;;;;;;;CAOA,OAAO,KAAK,OAAO;EAClB,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI,gBAAgB,KAAK;CAC5E;AACD;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,QAAQ,MAAM,cAAc,QAAQ;CACvC;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,MAAM,OAAO,OAAO,MAAM,MAAM;EAChC,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,wBAAwB,wJAAwJ,SAAS;EAC1N,IAAI,MAAM,YAAY,KAAK,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,IAAI,wBAAwB,UAAU,KAAK,uDAAuD,SAAS;EACjL,KAAK,OAAO;EACZ,KAAK,SAAS,MAAM;EACpB,IAAI,MAAM,OAAO,SAAS,QAAQ,KAAK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OAAO;EAClB,OAAO,iBAAiB,mBAAmB,QAAQ,IAAI,iBAAiB,KAAK;CAC9E;AACD;;;;;;;;;;;;;AAeA,IAAI,eAAe,MAAM,qBAAqB,QAAQ;CACrD;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,UAAU,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,MAAM,cAAc,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;EACpI,IAAI,MAAM,eAAe,KAAK,GAAG,KAAK,aAAa,WAAW,KAAK,MAAM,UAAU;EACnF,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,iBAAiB,IAAI,CAAC;EACrE,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,MAAM,IAAI,CAAC;EAC1D,KAAK,cAAc,OAAO,OAAO,MAAM,YAAY,IAAI,WAAW,IAAI,CAAC;EACvE,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,IAAI,MAAM,WAAW,KAAK,KAAK,MAAM,OAAO,SAAS,GAAG,KAAK,SAAS,OAAO,OAAO,MAAM,OAAO,IAAI,gBAAgB,IAAI,CAAC;EAC1H,WAAW,IAAI;CAChB;;;;;;;;CAQA,OAAO,GAAG,OAAO;EAChB,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,OAAO,aAAa,SAAS,aAAa,SAAS,aAAa,SAAS,iBAAiB;CAC3F;CACA,OAAO,OAAO,OAAO,YAAY;EAChC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,MAAM,IAAI,cAAc,8BAA8B,YAAY;CAChG;AACD"}
|
|
1
|
+
{"version":3,"file":"storage-table-CyL4CNMi-zOQ-vTUd.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/storage-table-CyL4CNMi.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { asNamespaceId } from \"@internal/contract/types\";\n//#region src/ir/sql-node.ts\n/**\n* SQL family IR node base. Carries the family-level `kind` discriminator\n* `'sql'` and inherits the framework's `freezeNode` affordance.\n*\n* Single family-level discriminator (not per-leaf) reflects the fact that\n* SQL IR has no polymorphic dispatch today — verifiers and serializers\n* walk by structural position (`storage.tables[name].columns[name]`),\n* not by inspecting `kind`. The abstract bar for per-leaf discriminators\n* isn't earned until a future polymorphic consumer arrives.\n*\n* `kind` is installed as a non-enumerable own property on every instance,\n* which keeps three things clean simultaneously:\n*\n* - `JSON.stringify(node)` produces the canonical pre-lift JSON envelope\n* shape (no `kind` field), so emitted contract.json files and the\n* `validateSqlContractFully` arktype schemas stay unchanged.\n* - Test assertions that use `toEqual({...})` against the pre-lift flat\n* shape continue to pass — only enumerable own properties are\n* compared.\n* - Direct access (`node.kind`) and runtime narrowing\n* (`if (node.kind === 'sql')`) still work, so future polymorphic\n* dispatch can begin reading `kind` without a runtime change.\n*\n* Future per-leaf overrides land cleanly: a class that gains a\n* polymorphic-dispatch consumer (e.g. an enum type instance walked\n* alongside other types) overrides `kind` with its narrower literal\n* at that leaf level. Per-leaf overrides will use enumerable kind\n* (matching the Mongo per-class-discriminator precedent) because they\n* encode dispatch-relevant information that callers need to see in\n* JSON envelopes; the family-level `'sql'` is uniform across all SQL\n* IR and carries no dispatch-relevant information.\n*/\nvar SqlNode = class extends IRNodeBase {\n\tkind;\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n};\n//#endregion\n//#region src/ir/check-constraint.ts\n/**\n* SQL Contract IR node for a table-level check constraint, name-identified:\n* `name` is the full physical name; a present `prefix` marks the constraint as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)` over the expression's\n* content hash), an absent `prefix` marks it exact (the name is adopted\n* verbatim). This is the convention indexes and RLS policies already use — see\n* ADR 234, \"Content-addressed wire names for Postgres-normalized objects\".\n*\n* The predicate is opaque: one SQL string, never parsed and never rendered\n* from structured parts. A database reprints predicates in its own normalized\n* form, so a wire-named check is compared by name — the hash already commits\n* to the expression the contract declared.\n*/\nvar CheckConstraint = class CheckConstraint extends SqlNode {\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"CheckConstraint: every check constraint carries a full physical name.\", \"storage\");\n\t\tthis.name = name;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Normalizes either shape into an instance: an existing `CheckConstraint`\n\t* passes through, canonical input is constructed. Callers that accept\n\t* \"instance or input\" go through this, so the constructor keeps one\n\t* canonical shape instead of widening to a union.\n\t*/\n\tstatic from(value) {\n\t\treturn value instanceof CheckConstraint ? value : new CheckConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/sql-index.ts\n/**\n* SQL Contract IR node for a table-level secondary index, name-identified:\n* `name` is the full physical name; a present `prefix` marks the index as\n* wire-named (`name` is `formatWireName(prefix, <8hex>)`), an absent `prefix`\n* marks it exact (the name is adopted verbatim).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL supported natively by\n* Postgres and SQLite alike, and the family IR must be able to represent\n* anything any SQL target can introspect. A target declining to AUTHOR them\n* (SQLite's rejection at namespace construction) is a capability decision,\n* not evidence of target-specificity.\n*\n* Note that this class shadows the global TypeScript `Index` lib type\n* at the family-shared name; consumer files that need both should\n* alias one (e.g.\n* `import { Index as SqlIndexNode } from '@internal/sql-contract/types'`).\n*/\nvar Index = class Index extends SqlNode {\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (name.length === 0) throw new ContractValidationError(\"Index: every index carries a full physical name; an expression index must be explicitly named (a default name cannot be derived from an expression).\", \"storage\");\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new ContractValidationError(`Index \"${name}\": exactly one of columns or expression must be set.`, \"storage\");\n\t\tthis.name = name;\n\t\tthis.unique = input.unique;\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tif (input.columns !== void 0) this.columns = input.columns;\n\t\tif (input.expression !== void 0) this.expression = input.expression;\n\t\tif (input.where !== void 0) this.where = input.where;\n\t\tif (input.type !== void 0) this.type = input.type;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof Index ? value : new Index(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key-reference.ts\n/**\n* SQL Contract IR node for one side (source or target) of a foreign-key\n* declaration. Carries the full coordinate: namespace, table, and columns.\n*\n* Cross-space discrimination is based on `spaceId` presence: absent means\n* local (same contract-space); present means cross-space (the referenced\n* table lives in the contract-space identified by `spaceId`).\n*\n* For local references `spaceId` is absent from JSON, keeping the serialized\n* shape byte-identical to contracts authored before cross-space support was\n* added. For cross-space references `spaceId` appears in JSON so round-trips\n* are lossless.\n*\n* Use `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`\n* as the sentinel `namespaceId` for single-namespace (unbound) references.\n*/\nvar ForeignKeyReference = class ForeignKeyReference extends SqlNode {\n\tnamespaceId;\n\ttableName;\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.namespaceId = asNamespaceId(input.namespaceId);\n\t\tthis.tableName = input.tableName;\n\t\tthis.columns = input.columns;\n\t\tif (input.spaceId !== void 0) this.spaceId = input.spaceId;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKeyReference ? value : new ForeignKeyReference(value);\n\t}\n};\n//#endregion\n//#region src/ir/foreign-key.ts\n/**\n* SQL Contract IR node for a table-level foreign-key declaration — the\n* referential constraint only (source, target, `onDelete`/`onUpdate`).\n*\n* A persisted `foreignKeys[]` entry always denotes a real constraint: whether\n* to emit the constraint at all, and whether to back it with an index, are\n* authoring-time decisions (PSL `@relation(index:)`, TS `fk({ constraint,\n* index })`) resolved once at `contract emit` — a `constraint: false` FK\n* simply has no entry here, and a backing index (if any) is its own discrete,\n* named entry in the table's `indexes[]`.\n*\n* Each FK carries explicit `source` and `target` {@link ForeignKeyReference}\n* coordinates (namespace, table, columns). For single-namespace contracts the\n* sentinel `UNBOUND_NAMESPACE_ID` appears on both sides.\n*\n* The nested references are normalised to {@link ForeignKeyReference}\n* instances inside the constructor so downstream walks see a uniform AST\n* regardless of whether the input was a JSON literal or an already-constructed\n* class instance.\n*/\nvar ForeignKey = class ForeignKey extends SqlNode {\n\tsource;\n\ttarget;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.source = ForeignKeyReference.from(input.source);\n\t\tthis.target = ForeignKeyReference.from(input.target);\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tif (input.onDelete !== void 0) this.onDelete = input.onDelete;\n\t\tif (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof ForeignKey ? value : new ForeignKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* SQL Contract IR node for a table's primary-key constraint.\n*/\nvar PrimaryKey = class PrimaryKey extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-column.ts\n/**\n* SQL Contract IR node for a single column entry in `StorageTable.columns`.\n*\n* Single concrete family-shared class — every SQL target reads the\n* same column shape today, so there is no per-target subclass. The\n* class type accepts any caller that constructs via\n* `new StorageColumn(input)`; literal construction sites must pass\n* through the constructor or the family-base hydration walker.\n*\n* The column's `name` is not on the class — columns are keyed by name\n* in the parent `StorageTable.columns: Record<string, StorageColumn>`\n* map, so a `name` field would be redundant with the key.\n*/\nvar StorageColumn = class StorageColumn extends SqlNode {\n\tdataType;\n\tcodecId;\n\tnullable;\n\tmany;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (Object.hasOwn(input, \"elementNullable\")) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"StorageColumn elementNullable must be nested under many.\", { meta: { reason: \"sibling-elementNullable\" } });\n\t\tthis.dataType = input.dataType;\n\t\tthis.codecId = input.codecId;\n\t\tthis.nullable = input.nullable;\n\t\tthis.many = input.many ?? false;\n\t\tif (input.noCheck !== void 0) this.noCheck = input.noCheck;\n\t\tif (input.typeParams !== void 0) this.typeParams = input.typeParams;\n\t\tif (input.typeRef !== void 0) this.typeRef = input.typeRef;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.valueSet !== void 0) this.valueSet = input.valueSet;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof StorageColumn ? value : new StorageColumn(value);\n\t}\n};\n//#endregion\n//#region src/ir/unique-constraint.ts\n/**\n* SQL Contract IR node for a table-level unique constraint.\n*/\nvar UniqueConstraint = class UniqueConstraint extends SqlNode {\n\tcolumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tif (input.name !== void 0) this.name = input.name;\n\t\tfreezeNode(this);\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof UniqueConstraint ? value : new UniqueConstraint(value);\n\t}\n};\n//#endregion\n//#region src/ir/storage-table.ts\n/**\n* SQL Contract IR node for a single table entry in a namespace's\n* `tables` map.\n*\n* The constructor normalises nested IR-class fields (columns, primary\n* key, uniques, indexes, foreign keys) into the appropriate class\n* instances so downstream walks see a uniform AST regardless of whether\n* the input was a JSON literal or an already-constructed class.\n*\n* The table's `name` is not on the class — tables are keyed by name in\n* the parent namespace's `tables: Record<string, StorageTable>` map.\n*/\nvar StorageTable = class StorageTable extends SqlNode {\n\tcolumns;\n\tuniques;\n\tindexes;\n\tforeignKeys;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([name, col]) => [name, StorageColumn.from(col)])));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tthis.uniques = Object.freeze(input.uniques.map(UniqueConstraint.from));\n\t\tthis.indexes = Object.freeze(input.indexes.map(Index.from));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map(ForeignKey.from));\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(CheckConstraint.from));\n\t\tfreezeNode(this);\n\t}\n\t/**\n\t* Runtime guard that a namespace `table` entry is really a `StorageTable`.\n\t* The compiler already types the entry as `StorageTable`, but a\n\t* freshly-deserialized contract may carry plain JSON at that slot until\n\t* hydration; this duck-types the structural shape. Accepts `undefined` so\n\t* optional-chained entry lookups pass straight through.\n\t*/\n\tstatic is(value) {\n\t\tif (typeof value !== \"object\" || value === null) return false;\n\t\treturn \"columns\" in value && \"uniques\" in value && \"indexes\" in value && \"foreignKeys\" in value;\n\t}\n\tstatic assert(value, coordinate) {\n\t\tif (!StorageTable.is(value)) throw new InternalError(`Expected a StorageTable at ${coordinate}`);\n\t}\n};\n//#endregion\nexport { ForeignKey as a, CheckConstraint as c, PrimaryKey as i, SqlNode as l, UniqueConstraint as n, ForeignKeyReference as o, StorageColumn as r, Index as s, StorageTable as t };\n\n//# sourceMappingURL=storage-table-CyL4C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K,UAAU,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,MAAM,cAAc,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;EACpI,IAAI,MAAM,eAAe,KAAK,GAAG,KAAK,aAAa,WAAW,KAAK,MAAM,UAAU;EACnF,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,iBAAiB,IAAI,CAAC;EACrE,KAAK,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,MAAM,IAAI,CAAC;EAC1D,KAAK,cAAc,OAAO,OAAO,MAAM,YAAY,IAAI,WAAW,IAAI,CAAC;EACvE,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,IAAI,MAAM,WAAW,KAAK,KAAK,MAAM,OAAO,SAAS,GAAG,KAAK,SAAS,OAAO,OAAO,MAAM,OAAO,IAAI,gBAAgB,IAAI,CAAC;EAC1H,WAAW,IAAI;CAChB;;;;;;;;CAQA,OAAO,GAAG,OAAO;EAChB,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;EACxD,OAAO,aAAa,SAAS,aAAa,SAAS,aAAa,SAAS,iBAAiB;CAC3F;CACA,OAAO,OAAO,OAAO,YAAY;EAChC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,MAAM,IAAI,cAAc,8BAA8B,YAAY;CAChG;AACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTypeAuthoringEntry } from "@prisma/orm-framework/components/authoring";
|
|
2
|
-
import {
|
|
2
|
+
import { CodecDescriptor, DataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
3
3
|
import { ColumnDefault } from "@prisma/orm-framework/contract/types";
|
|
4
|
-
//#region ../../../2-sql/9-family/dist/type-map-
|
|
4
|
+
//#region ../../../2-sql/9-family/dist/type-map-dnvRKl9o.d.mts
|
|
5
5
|
//#region src/core/psl-build/default-mapping.d.ts
|
|
6
6
|
interface DefaultMappingOptions {
|
|
7
7
|
readonly functionAttributes?: Readonly<Record<string, string>>;
|
|
@@ -9,8 +9,8 @@ interface DefaultMappingOptions {
|
|
|
9
9
|
readonly dataTypeEntries?: Readonly<Record<string, DataTypeAuthoringEntry>> | undefined;
|
|
10
10
|
/** The stack's data types, whose casts say which other types' values each one takes. */
|
|
11
11
|
readonly dataTypeLookup?: DataTypeLookup | undefined;
|
|
12
|
-
/** The data type
|
|
13
|
-
readonly
|
|
12
|
+
/** The column's codec: the data type a default is written in, and the canonical form of its values. */
|
|
13
|
+
readonly columnCodec?: Pick<CodecDescriptor, 'dataType' | 'toCanonicalForm'> | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* Whether the column is a list, whose elements each carry the column's own data type. A written
|
|
16
16
|
* list on a scalar column goes through that type's list cast instead.
|
|
@@ -46,4 +46,4 @@ interface PslTypeMap {
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
export { PslTypeResolution as a, PslTypeReference as i, DefaultMappingResult as n, mapDefault as o, PslTypeMap as r, DefaultMappingOptions as t };
|
|
49
|
-
//# sourceMappingURL=type-map-
|
|
49
|
+
//# sourceMappingURL=type-map-dnvRKl9o-avUb9OLv.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-map-dnvRKl9o-avUb9OLv.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/type-map-dnvRKl9o.d.mts"],"mappings":";;;;;UAIU;WACC,qBAAqB,SAAS;;WAE9B,kBAAkB,SAAS,eAAe;;WAE1C,iBAAiB;;WAEjB,cAAc,KAAK;;;;;WAKnB;;KAEN;WACM;;;;;;iBAMM,WAAW,eAAe,eAAe,UAAU,wBAAwB;;;;KAIvF;WACM;WACA;;KAEN;WACM,SAAS;WACT;WACA,aAAa;;WAEb;WACA;;;UAGD;EACR,QAAQ,oBAAoB,cAAc,0BAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as SqlNode } from "./storage-table-
|
|
1
|
+
import { o as SqlNode } from "./storage-table-CyL4CNMi-zOQ-vTUd.mjs";
|
|
2
2
|
import { NamespaceBase, freezeNode, isPlainRecord } from "@prisma/orm-framework/components/ir";
|
|
3
3
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
4
4
|
import { RelationKeys } from "@prisma/orm-framework/components/runtime";
|
|
@@ -20,7 +20,7 @@ function toStorageTypeInstance(input) {
|
|
|
20
20
|
return {
|
|
21
21
|
kind: CODEC_INSTANCE_KIND,
|
|
22
22
|
codecId: input.codecId,
|
|
23
|
-
|
|
23
|
+
dataType: input.dataType,
|
|
24
24
|
typeParams: input.typeParams ?? {}
|
|
25
25
|
};
|
|
26
26
|
}
|
|
@@ -101,7 +101,7 @@ function normaliseTypeEntry(name, entry) {
|
|
|
101
101
|
if ("typeParams" in entry) return entry;
|
|
102
102
|
return toStorageTypeInstance(entry);
|
|
103
103
|
}
|
|
104
|
-
const rawKind = isPlainRecord(entry)
|
|
104
|
+
const rawKind = isPlainRecord(entry) && "kind" in entry ? entry.kind : void 0;
|
|
105
105
|
const kindDescription = rawKind === void 0 ? "missing `kind` discriminator" : `unrecognised \`kind\` discriminator ${JSON.stringify(rawKind)}`;
|
|
106
106
|
throw new InternalError(`storage.types[${JSON.stringify(name)}] has ${kindDescription}; expected ${JSON.stringify("codec-instance")}. Untagged codec triples should be wrapped with toStorageTypeInstance(...) before construction.`);
|
|
107
107
|
}
|
|
@@ -116,4 +116,4 @@ function applyFkDefaults(fk, overrideDefaults) {
|
|
|
116
116
|
//#endregion
|
|
117
117
|
export { SqlNamespaceBase as a, isMaterializedSqlNamespace as c, resolvedTypeParams as d, toStorageTypeInstance as f, RelationKeys as i, isSqlAuthoringContributions as l, DEFAULT_FK_CONSTRAINT as n, SqlStorage as o, DEFAULT_FK_INDEX as r, applyFkDefaults as s, CODEC_INSTANCE_KIND as t, isStorageTypeInstance as u };
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=types-
|
|
119
|
+
//# sourceMappingURL=types-BlcZJEoC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BlcZJEoC.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/types.mjs"],"sourcesContent":["import { a as ForeignKey, c as CheckConstraint, i as PrimaryKey, l as SqlNode, n as UniqueConstraint, o as ForeignKeyReference, r as StorageColumn, s as Index, t as StorageTable } from \"./storage-table-CyL4CNMi.mjs\";\nimport { i as isStorageValueSet, n as checkConstraintInputFromSerialized, r as StorageValueSet, t as indexInputFromSerialized } from \"./serialized-index-QAYy0fjm.mjs\";\nimport { NamespaceBase, freezeNode, isPlainRecord } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { RelationKeys } from \"@internal/framework-components/runtime\";\n//#region src/ir/storage-type-instance.ts\n/**\n* Sentinel kind for the legacy codec-triple shape persisted under\n* `SqlStorage.types`. Plain JSON-clean object literals carry this\n* discriminator so the polymorphic slot dispatch can route them down\n* the codec path while target-specific IR class instances (e.g. the\n* Postgres enum class) keep their own narrower `kind` literal.\n*/\nconst CODEC_INSTANCE_KIND = \"codec-instance\";\n/**\n* Stamp the codec-instance `kind` discriminator on a caller-supplied\n* codec triple. Idempotent: input that already carries the discriminator\n* passes through unchanged. Missing `typeParams` is normalised to `{}`.\n*/\nfunction toStorageTypeInstance(input) {\n\treturn {\n\t\tkind: CODEC_INSTANCE_KIND,\n\t\tcodecId: input.codecId,\n\t\tdataType: input.dataType,\n\t\ttypeParams: input.typeParams ?? {}\n\t};\n}\n/**\n* The type parameters of a type written with its own parameters or by the name of a named type: its own, or else the named type's. Empty parameters read as none, as a codec reads them; {@link toStorageTypeInstance} stores `{}` for a codec without parameters.\n*/\nfunction resolvedTypeParams(type, namedTypes) {\n\tconst typeParams = type.typeParams ?? (type.typeRef === void 0 ? void 0 : namedTypes?.[type.typeRef]?.typeParams);\n\treturn typeParams !== void 0 && Object.keys(typeParams).length > 0 ? typeParams : void 0;\n}\n/**\n* Type-guard for codec-typed entries on the polymorphic\n* `SqlStorage.types` slot. Distinguishes `StorageTypeInstance` from\n* any class-instance kinds a target pack contributes.\n*/\nfunction isStorageTypeInstance(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn value.kind === CODEC_INSTANCE_KIND;\n}\n//#endregion\n//#region src/ir/sql-storage.ts\n/**\n* Narrows framework `AuthoringContributions` to the SQL-family shape by testing\n* for the SQL-specific `createNamespace` capability.\n*/\nfunction isSqlAuthoringContributions(authoring) {\n\tif (authoring === void 0 || !Object.hasOwn(authoring, \"createNamespace\")) return false;\n\treturn typeof Reflect.get(authoring, \"createNamespace\") === \"function\";\n}\n/**\n* Abstract SQL family namespace base class. Target concretions (`PostgresSchema`,\n* `SqliteDatabase`, …) extend this — it is never instantiated directly.\n* `entries` is the open ADR 224 dictionary: `entries[entityKind][entityName]`\n* addresses any entity.\n*/\nvar SqlNamespaceBase = class extends NamespaceBase {};\n/**\n* Realm-safe guard for hydrated `SqlNamespaceBase` concretions. Checks\n* `qualifyTable` structurally instead of `instanceof NamespaceBase`, so it\n* survives duplicate-module boundaries (e.g. dist e2e where the target and\n* the family carry separate copies of `@internal/framework-components`).\n*\n* Every concrete `SqlNamespaceBase` subclass (`PostgresSchema`, `SqliteDatabase`,\n* `TestSqlNamespace`, …) implements `qualifyTable`. Raw `SqlNamespaceInput`\n* objects (`{ id, entries }`) do not.\n*/\nfunction isMaterializedSqlNamespace(x) {\n\tif (typeof x !== \"object\" || x === null || !(\"qualifyTable\" in x)) return false;\n\treturn typeof x.qualifyTable === \"function\";\n}\nvar SqlStorage = class extends SqlNode {\n\tstorageHash;\n\tnamespaces;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.storageHash = input.storageHash;\n\t\tthis.namespaces = Object.freeze(input.namespaces);\n\t\tif (input.types !== void 0) this.types = Object.freeze(Object.fromEntries(Object.entries(input.types).map(([name, ti]) => [name, normaliseTypeEntry(name, ti)])));\n\t\tfreezeNode(this);\n\t}\n};\n/**\n* Strict polymorphic-slot dispatch for `SqlStorage.types` entries.\n* Every entry must carry a `kind: 'codec-instance'` discriminator or\n* be an already-constructed `StorageTypeInstance`. Untagged or\n* unrecognised inputs throw a diagnostic naming the entry and its\n* `kind`, so format drift surfaces loudly at the deserializer\n* boundary instead of slipping past the seam and corrupting\n* downstream IR walks.\n*\n* Codec-triple authors that have an untagged shape on hand can call\n* `toStorageTypeInstance(...)` (which stamps the `'codec-instance'`\n* discriminator) before constructing `SqlStorage`. On-disk reads\n* cross `familyInstance.deserializeContract` first; the structural\n* arktype schema rejects untagged entries earlier, so this throw\n* only fires for in-memory authoring bugs.\n*/\nfunction normaliseTypeEntry(name, entry) {\n\tif (isStorageTypeInstance(entry)) {\n\t\tif (\"typeParams\" in entry) return entry;\n\t\treturn toStorageTypeInstance(entry);\n\t}\n\tconst rawKind = isPlainRecord(entry) && \"kind\" in entry ? entry.kind : void 0;\n\tconst kindDescription = rawKind === void 0 ? \"missing `kind` discriminator\" : `unrecognised \\`kind\\` discriminator ${JSON.stringify(rawKind)}`;\n\tthrow new InternalError(`storage.types[${JSON.stringify(name)}] has ${kindDescription}; expected ${JSON.stringify(\"codec-instance\")}. Untagged codec triples should be wrapped with toStorageTypeInstance(...) before construction.`);\n}\n//#endregion\n//#region src/types.ts\nconst DEFAULT_FK_CONSTRAINT = true;\nconst DEFAULT_FK_INDEX = true;\nfunction applyFkDefaults(fk, overrideDefaults) {\n\treturn {\n\t\tconstraint: fk.constraint ?? overrideDefaults?.constraint ?? true,\n\t\tindex: fk.index ?? overrideDefaults?.index ?? true\n\t};\n}\n//#endregion\nexport { CODEC_INSTANCE_KIND, CheckConstraint, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, ForeignKey, ForeignKeyReference, Index, PrimaryKey, RelationKeys, SqlNamespaceBase, SqlNode, SqlStorage, StorageColumn, StorageTable, StorageValueSet, UniqueConstraint, applyFkDefaults, checkConstraintInputFromSerialized, indexInputFromSerialized, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, resolvedTypeParams, toStorageTypeInstance };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;AAaA,MAAM,sBAAsB;;;;;;AAM5B,SAAS,sBAAsB,OAAO;CACrC,OAAO;EACN,MAAM;EACN,SAAS,MAAM;EACf,UAAU,MAAM;EAChB,YAAY,MAAM,cAAc,CAAC;CAClC;AACD;;;;AAIA,SAAS,mBAAmB,MAAM,YAAY;CAC7C,MAAM,aAAa,KAAK,eAAe,KAAK,YAAY,KAAK,IAAI,KAAK,IAAI,aAAa,KAAK,QAAQ,EAAE;CACtG,OAAO,eAAe,KAAK,KAAK,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,IAAI,aAAa,KAAK;AACxF;;;;;;AAMA,SAAS,sBAAsB,OAAO;CACrC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,OAAO,MAAM,SAAS;AACvB;;;;;AAOA,SAAS,4BAA4B,WAAW;CAC/C,IAAI,cAAc,KAAK,KAAK,CAAC,OAAO,OAAO,WAAW,iBAAiB,GAAG,OAAO;CACjF,OAAO,OAAO,QAAQ,IAAI,WAAW,iBAAiB,MAAM;AAC7D;;;;;;;AAOA,IAAI,mBAAmB,cAAc,cAAc,CAAC;;;;;;;;;;;AAWpD,SAAS,2BAA2B,GAAG;CACtC,IAAI,OAAO,MAAM,YAAY,MAAM,QAAQ,EAAE,kBAAkB,IAAI,OAAO;CAC1E,OAAO,OAAO,EAAE,iBAAiB;AAClC;AACA,IAAI,aAAa,cAAc,QAAQ;CACtC;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,cAAc,MAAM;EACzB,KAAK,aAAa,OAAO,OAAO,MAAM,UAAU;EAChD,IAAI,MAAM,UAAU,KAAK,GAAG,KAAK,QAAQ,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,MAAM,mBAAmB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;EAChK,WAAW,IAAI;CAChB;AACD;;;;;;;;;;;;;;;;;AAiBA,SAAS,mBAAmB,MAAM,OAAO;CACxC,IAAI,sBAAsB,KAAK,GAAG;EACjC,IAAI,gBAAgB,OAAO,OAAO;EAClC,OAAO,sBAAsB,KAAK;CACnC;CACA,MAAM,UAAU,cAAc,KAAK,KAAK,UAAU,QAAQ,MAAM,OAAO,KAAK;CAC5E,MAAM,kBAAkB,YAAY,KAAK,IAAI,iCAAiC,uCAAuC,KAAK,UAAU,OAAO;CAC3I,MAAM,IAAI,cAAc,iBAAiB,KAAK,UAAU,IAAI,EAAE,QAAQ,gBAAgB,aAAa,KAAK,UAAU,gBAAgB,EAAE,gGAAgG;AACrO;AAGA,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AACzB,SAAS,gBAAgB,IAAI,kBAAkB;CAC9C,OAAO;EACN,YAAY,GAAG,cAAc,kBAAkB,cAAc;EAC7D,OAAO,GAAG,SAAS,kBAAkB,SAAS;CAC/C;AACD"}
|
|
@@ -3,22 +3,22 @@ import { IRNodeBase } from "@prisma/orm-framework/components/ir";
|
|
|
3
3
|
import { CodecRef, DataType, ToCanonicalForm } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { ColumnDefault, ColumnDefaultLiteralInputValue } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { DiffSubjectGranularity, DiffableNode, SchemaNodeRef } from "@prisma/orm-framework/components/control";
|
|
6
|
-
//#region ../../../2-sql/1-core/schema-ir/dist/types-
|
|
6
|
+
//#region ../../../2-sql/1-core/schema-ir/dist/types-CLsPsUiw.d.mts
|
|
7
7
|
//#region src/ir/default-in-canonical-form.d.ts
|
|
8
8
|
interface DefaultInCanonicalForm {
|
|
9
9
|
readonly value: ColumnDefaultLiteralInputValue;
|
|
10
|
-
/** The
|
|
10
|
+
/** The canonical form's message for the value, or the first list element, it refuses. */
|
|
11
11
|
readonly refusal: string | undefined;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* A literal default in the canonical form of the column's
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* A literal default in the canonical form of the column's values (ADR 254), element by element for
|
|
15
|
+
* a list column. A `Date` is read as its ISO text first. A value the form refuses is kept as it is,
|
|
16
|
+
* with the form's message.
|
|
17
17
|
*/
|
|
18
18
|
declare function defaultInCanonicalForm(value: ColumnDefaultLiteralInputValue, toCanonicalForm: ToCanonicalForm | undefined, list: boolean): DefaultInCanonicalForm;
|
|
19
19
|
/**
|
|
20
|
-
* The refusal of a contract's literal default that its column's
|
|
21
|
-
* contract emitted by an earlier version can carry, with what to do about it.
|
|
20
|
+
* The refusal of a contract's literal default that the canonical form of its column's values does
|
|
21
|
+
* not take, which a contract emitted by an earlier version can carry, with what to do about it.
|
|
22
22
|
*/
|
|
23
23
|
declare function contractDefaultRefusal(columnDefault: ColumnDefault | undefined, toCanonicalForm: ToCanonicalForm | undefined, list: boolean): string | undefined;
|
|
24
24
|
//#endregion
|
|
@@ -221,8 +221,8 @@ interface SqlColumnDefaultIRInput {
|
|
|
221
221
|
readonly codecRef?: CodecRef;
|
|
222
222
|
/** See {@link import('./sql-column-ir').SqlColumnIRInput.codecBaseNativeType}. */
|
|
223
223
|
readonly codecBaseNativeType?: string;
|
|
224
|
-
/** See {@link import('./sql-column-ir').SqlColumnIRInput.
|
|
225
|
-
readonly
|
|
224
|
+
/** See {@link import('./sql-column-ir').SqlColumnIRInput.toCanonicalForm}. */
|
|
225
|
+
readonly toCanonicalForm?: ToCanonicalForm;
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Schema-diff node for a column's default value. The default is the one
|
|
@@ -250,8 +250,8 @@ declare class SqlColumnDefaultIR extends SqlSchemaIRNode implements DiffableNode
|
|
|
250
250
|
readonly codecRef?: CodecRef;
|
|
251
251
|
/** See {@link SqlColumnDefaultIRInput.codecBaseNativeType}. Non-enumerable, same reason as {@link many}. */
|
|
252
252
|
readonly codecBaseNativeType?: string;
|
|
253
|
-
/** See {@link SqlColumnDefaultIRInput.
|
|
254
|
-
readonly
|
|
253
|
+
/** See {@link SqlColumnDefaultIRInput.toCanonicalForm}. Non-enumerable, same reason as {@link many}. */
|
|
254
|
+
readonly toCanonicalForm?: ToCanonicalForm;
|
|
255
255
|
constructor(input: SqlColumnDefaultIRInput);
|
|
256
256
|
get id(): string;
|
|
257
257
|
children(): readonly DiffableNode[];
|
|
@@ -259,15 +259,15 @@ declare class SqlColumnDefaultIR extends SqlSchemaIRNode implements DiffableNode
|
|
|
259
259
|
/**
|
|
260
260
|
* Structured comparison with `this` as the expected side: both sides
|
|
261
261
|
* resolved compare per the relational walk's `columnDefaultsEqual`
|
|
262
|
-
* semantics, a literal through the canonical form of the column's
|
|
262
|
+
* semantics, a literal through the canonical form of the column's values when the
|
|
263
263
|
* contract-derived side carries one; a declared expected default against an unparseable actual
|
|
264
264
|
* (raw present, no resolved parse) is a mismatch; two raw-only nodes fall
|
|
265
265
|
* back to raw string equality.
|
|
266
266
|
*/
|
|
267
267
|
isEqualTo(other: DiffableNode): boolean;
|
|
268
268
|
/**
|
|
269
|
-
* The refusal of an expected literal its
|
|
270
|
-
* earlier version can carry, so the mismatch names its cause.
|
|
269
|
+
* The refusal of an expected literal its canonical form does not take, which a contract emitted
|
|
270
|
+
* by an earlier version can carry, so the mismatch names its cause.
|
|
271
271
|
*/
|
|
272
272
|
explainMismatch(): string | undefined;
|
|
273
273
|
}
|
|
@@ -336,12 +336,16 @@ interface SqlColumnIRInput {
|
|
|
336
336
|
*/
|
|
337
337
|
readonly codecBaseNativeType?: string;
|
|
338
338
|
/**
|
|
339
|
-
* The data type the column's codec represents, from the assembled stack (ADR 254).
|
|
340
|
-
*
|
|
341
|
-
* writes the canonical form. Stamped on the contract-derived column; absent on introspected
|
|
342
|
-
* nodes.
|
|
339
|
+
* The data type the column's codec represents, from the assembled stack (ADR 254). Stamped on the
|
|
340
|
+
* contract-derived column; absent on introspected nodes.
|
|
343
341
|
*/
|
|
344
342
|
readonly dataType?: DataType;
|
|
343
|
+
/**
|
|
344
|
+
* The canonical form of the column's values, from `canonicalFormOf` (ADR 254). A literal default
|
|
345
|
+
* compares through it, so two forms of one value are equal, and DDL writes the canonical form.
|
|
346
|
+
* Stamped on the contract-derived column; absent on introspected nodes.
|
|
347
|
+
*/
|
|
348
|
+
readonly toCanonicalForm?: ToCanonicalForm;
|
|
345
349
|
}
|
|
346
350
|
/**
|
|
347
351
|
* Schema IR node for a single column on a table, as observed by
|
|
@@ -378,6 +382,8 @@ declare class SqlColumnIR extends SqlSchemaIRNode implements DiffableNode {
|
|
|
378
382
|
readonly codecBaseNativeType?: string;
|
|
379
383
|
/** See {@link SqlColumnIRInput.dataType}. Non-enumerable, same reason as {@link codecRef}. */
|
|
380
384
|
readonly dataType?: DataType;
|
|
385
|
+
/** See {@link SqlColumnIRInput.toCanonicalForm}. Non-enumerable, same reason as {@link codecRef}. */
|
|
386
|
+
readonly toCanonicalForm?: ToCanonicalForm;
|
|
381
387
|
constructor(input: SqlColumnIRInput);
|
|
382
388
|
get id(): string;
|
|
383
389
|
/**
|
|
@@ -717,4 +723,4 @@ declare class SqlSchemaIR extends SqlSchemaIRNode implements DiffableNode {
|
|
|
717
723
|
}
|
|
718
724
|
//#endregion
|
|
719
725
|
export { SqlUniqueIRInput as C, defineNonEnumerable as D, defaultInCanonicalForm as E, relationalNodeEntityKind as O, SqlUniqueIR as S, contractDefaultRefusal as T, SqlSchemaIR as _, SqlAnnotations as a, SqlTableIR as b, SqlColumnDefaultIR as c, SqlColumnIRInput as d, SqlForeignKeyIR as f, SqlReferentialAction as g, SqlIndexIRInput as h, RelationalSchemaNodeKind as i, relationalNodeGranularity as k, SqlColumnDefaultIRInput as l, SqlIndexIR as m, PrimaryKey as n, SqlCheckConstraintIR as o, SqlForeignKeyIRInput as p, PrimaryKeyInput as r, SqlCheckConstraintIRInput as s, DefaultInCanonicalForm as t, SqlColumnIR as u, SqlSchemaIRInput as v, assertNode as w, SqlTableIRInput as x, SqlSchemaIRNode as y };
|
|
720
|
-
//# sourceMappingURL=types-
|
|
726
|
+
//# sourceMappingURL=types-CLsPsUiw-Db1BsN9R.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CLsPsUiw-Db1BsN9R.d.mts","names":[],"sources":["../../../../2-sql/1-core/schema-ir/dist/types-CLsPsUiw.d.mts"],"mappings":";;;;;;;UAMU;WACC,OAAO;;WAEP;;;;;;;iBAOM,uBAAuB,OAAO,gCAAgC,iBAAiB,6BAA6B,gBAAgB;;;;;iBAK5H,uBAAuB,eAAe,2BAA2B,iBAAiB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;uBAwBzG,wBAAwB;WACpC;;;;;;;;;oBASS;EAClB;;;;;;;;iBAQe,WAAW,UAAU,iBAAiB,MAAM,6BAA6B,mBAAmB,YAAY,MAAM,oBAAoB,QAAQ,YAAY,QAAQ;;;;;;;;;;iBAU9J,oBAAoB,kBAAkB,QAAQ,GAAG,aAAa;;;UAGrE;WACC;WACA;;;;;;WAMA,qBAAqB;;;;;;;;;;;;;;;cAelB,mBAAmB,2BAA2B;WACjD;WACA;WACA;;WAEA,qBAAqB;EAC9B,YAAY,OAAO;MACf;EACJ,qBAAqB;SACd,KAAK,OAAO,aAAa,kBAAkB;SAC3C,GAAG,MAAM,kBAAkB,QAAQ;EAC1C,UAAU,OAAO;;;;;;;;;;;cAWL;WACH;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;KAEN,mCAAmC,uCAAuC;;;;;;;iBAO9D,0BAA0B,mBAAmB;;;;;;;;iBAQ7C,yBAAyB;;;UAGhC;;WAEC,QAAQ;;WAER;;;;;;;;;WASA,oBAAoB;;;;;;;;;;;;;;;cAejB,6BAA6B,2BAA2B;WAC3D;WACA;WACA;WACA;;WAEA,qBAAqB;EAC9B,YAAY,OAAO;MACf;EACJ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A2B;WAClD;WACA,QAAQ,SAAS,eAAe;WAChC,cAAc;EACvB,YAAY,OAAO;MACf;EACJ,UAAU,OAAO;EACjB,qBAAqB"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { r as StorageTable, t as StorageColumn } from "./storage-table-
|
|
2
|
-
import {
|
|
3
|
-
import { O as SqlControlDriverInstance } from "./types-
|
|
4
|
-
import "./types-
|
|
5
|
-
import { r as SqlOperationDescriptors } from "./index-
|
|
6
|
-
import { y as SqlSchemaIRNode } from "./types-
|
|
7
|
-
import "./types-
|
|
8
|
-
import { r as SqlControlAdapter } from "./control-adapter-
|
|
1
|
+
import { r as StorageTable, t as StorageColumn } from "./storage-table-BBcKoAuF-CssyCQhM.mjs";
|
|
2
|
+
import { f as StorageTypeInstance, l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
|
|
3
|
+
import { O as SqlControlDriverInstance } from "./types-DV040Uuq-Bu8CnbMa.mjs";
|
|
4
|
+
import "./types-DkOYK86-.mjs";
|
|
5
|
+
import { r as SqlOperationDescriptors } from "./index-qOLTnfYz.mjs";
|
|
6
|
+
import { y as SqlSchemaIRNode } from "./types-CLsPsUiw-Db1BsN9R.mjs";
|
|
7
|
+
import "./types-D6XuABFQ.mjs";
|
|
8
|
+
import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-Bz63KBJc.mjs";
|
|
9
9
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
10
10
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
11
11
|
import { ContractSpace, ControlAdapterDescriptor, ControlExtensionDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerPerSpaceSuccessValue, MigrationRunnerResult, OpFactoryCall, OperationContext, SchemaDiffIssue, SchemaOwnership } from "@prisma/orm-framework/components/control";
|
|
12
12
|
import { Result } from "@prisma/orm-framework/utils/result";
|
|
13
13
|
import { AggregateMigrationEdgeRef } from "@prisma/orm-toolchain/migration-tools/aggregate";
|
|
14
|
-
//#region ../../../2-sql/9-family/dist/types-
|
|
14
|
+
//#region ../../../2-sql/9-family/dist/types-CvuS68sy.d.mts
|
|
15
15
|
//#region src/core/migrations/types.d.ts
|
|
16
16
|
type AnyRecord = Readonly<Record<string, unknown>>;
|
|
17
17
|
interface StorageTypePlanResult<TTargetDetails> {
|
|
@@ -327,7 +327,6 @@ interface SqlMigrationRunnerExecuteOptions<TTargetDetails> {
|
|
|
327
327
|
* The runner validates each operation against this policy before execution.
|
|
328
328
|
*/
|
|
329
329
|
readonly policy: MigrationOperationPolicy;
|
|
330
|
-
readonly schemaName?: string;
|
|
331
330
|
readonly strictVerification?: boolean;
|
|
332
331
|
readonly callbacks?: SqlMigrationRunnerExecuteCallbacks<TTargetDetails>;
|
|
333
332
|
readonly context?: OperationContext;
|
|
@@ -405,4 +404,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
|
|
|
405
404
|
}
|
|
406
405
|
//#endregion
|
|
407
406
|
export { StorageTypePlanResult as A, SqlPlanTargetDetails as C, SqlPlannerFailureResult as D, SqlPlannerConflictLocation as E, SqlPlannerResult as O, SqlMigrationRunnerSuccessValue as S, SqlPlannerConflictKind as T, SqlMigrationRunnerErrorCode as _, FieldEventContext as a, SqlMigrationRunnerFailure as b, SqlControlExtensionDescriptor as c, SqlMigrationPlanOperation as d, SqlMigrationPlanOperationStep as f, SqlMigrationRunner as g, SqlMigrationPlannerPlanOptions as h, FieldEvent as i, SqlPlannerSuccessResult as k, SqlMigrationPlan as l, SqlMigrationPlanner as m, CodecControlHooks as n, ResolveIdentityValueInput as o, SqlMigrationPlanOperationTarget as p, CreateSqlMigrationPlanOptions as r, SqlControlAdapterDescriptor as s, AnyRecord as t, SqlMigrationPlanContractInfo as u, SqlMigrationRunnerExecuteCallbacks as v, SqlPlannerConflict as w, SqlMigrationRunnerResult as x, SqlMigrationRunnerExecuteOptions as y };
|
|
408
|
-
//# sourceMappingURL=types-
|
|
407
|
+
//# sourceMappingURL=types-CvuS68sy-CK5U4IEM.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-CvuS68sy-CK5U4IEM.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/types-CvuS68sy.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,YAAY,SAAS;UAChB,sBAAsB;WACrB,qBAAqB,0BAA0B;;;;;;;;;UAShD;;WAEC;WACA;WACA,aAAa;;;;;;;;;;;;;;;;KAgBnB;;;;;;;;;;;;;UAaK;WACC;WACA;WACA;WACA,aAAa;WACb,WAAW;WACX,aAAa;WACb,WAAW;;UAEZ,kBAAkB;;;;;;;;;EAS1B,sBAAsB;aACX;aACA,cAAc;aACd,UAAU,SAAS;aACnB,QAAQ;aACR;aACA,QAAQ;QACb,sBAAsB;EAC5B,cAAc;aACH;aACA,cAAc;aACd,QAAQ;aACR;iBACI;EACf,mBAAmB;aACR,QAAQ;aACR;QACL,QAAQ,eAAe;;;;;;;;;;EAU7B,wBAAwB,OAAO;;;;;;;;;;;;;;;EAe/B,gBAAgB,OAAO,YAAY,KAAK,+BAA+B;;UAE/D,8BAA8B,kCAAkC,kCAAkC;WACjG,wBAAwB;;;;;;;;;;;;WAYxB,gBAAgB,cAAc,SAAS;;UAExC,4BAA4B,kCAAkC,gCAAgC,WAAW,kBAAkB;WAC1H,wBAAwB;;UAEzB;WACC;WACA;;;;;;;;;WASA;WACA,OAAO;;;;;;;;;UASR;WACC;WACA;;UAED,gCAAgC;WAC/B;WACA,UAAU;;UAEX,0BAA0B,wBAAwB;WACjD;WACA,QAAQ,gCAAgC;WACxC,mBAAmB;WACnB,kBAAkB;WAClB,oBAAoB;WACpB,OAAO;;UAER;WACC;WACA;;UAED,iBAAiB,wBAAwB;;;;;;;;;;;;;;;WAexC;;;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1
|
+
import "./types-DpwLgzPO-6RCR0XpS.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types-CLsPsUiw-Db1BsN9R.mjs";
|
|
@@ -3,13 +3,13 @@ import "./check-constraint-B7qGu6rc-agxAjKLG.mjs";
|
|
|
3
3
|
import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
|
|
4
4
|
import "./unique-constraint-M5TlQnJQ-BiIHJ85k.mjs";
|
|
5
5
|
import "./sql-index-ByAAE7K8-DPkZtr7t.mjs";
|
|
6
|
-
import "./storage-table-
|
|
6
|
+
import "./storage-table-BBcKoAuF-CssyCQhM.mjs";
|
|
7
7
|
import "./storage-value-set-BGlj5Uus-CvZD--GG.mjs";
|
|
8
|
-
import "./sql-storage-
|
|
8
|
+
import "./sql-storage-DSnnRQAf-DaHPnley.mjs";
|
|
9
9
|
import "./serialized-index-CrgG8ct1-D64Figsu.mjs";
|
|
10
10
|
import { CodecTrait } from "@prisma/orm-framework/components/codec";
|
|
11
11
|
import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
12
|
-
//#region ../../../2-sql/1-core/contract/dist/types-
|
|
12
|
+
//#region ../../../2-sql/1-core/contract/dist/types-DV040Uuq.d.mts
|
|
13
13
|
//#region src/types.d.ts
|
|
14
14
|
interface SqlControlDriverInstance<T extends string = string> extends ControlDriverInstance<'sql', T> {
|
|
15
15
|
query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
|
|
@@ -158,4 +158,4 @@ type ExtractAggregateTypes<T> = AggregateTypesOf<ExtractTypeMapsFromContract<T>>
|
|
|
158
158
|
type ResolveCodecTypes<TContract, TTypeMaps> = [TTypeMaps] extends [never] ? ExtractCodecTypes<TContract> : CodecTypesOf<TTypeMaps>;
|
|
159
159
|
//#endregion
|
|
160
160
|
export { SqlModelStorage as A, QueryOperationSelfSpec as C, ResolveCodecTypes as D, QueryOperationTypesOf as E, TypeMapsPhantomKey as F, applyFkDefaults as I, StorageColumnInputTypesOf as M, StorageColumnTypesOf as N, SqlControlDriverInstance as O, TypeMaps as P, QueryOperationReturn as S, QueryOperationTypesBase as T, FieldInputTypesOf as _, CodecTypesOf as a, NamespacedFieldTypeMap as b, DEFAULT_FK_INDEX as c, ExtractFieldInputTypes as d, ExtractFieldOutputTypes as f, ExtractTypeMapsFromContract as g, ExtractStorageColumnTypes as h, AggregateTypesOf as i, SqlQueryOperationTypes as j, SqlModelFieldStorage as k, ExtractAggregateTypes as l, ExtractStorageColumnInputTypes as m, AggregateResultType as n, ContractWithTypeMaps as o, ExtractQueryOperationTypes as p, AggregateTypesBase as r, DEFAULT_FK_CONSTRAINT as s, AggregateOperationTypes as t, ExtractCodecTypes as u, FieldOutputTypesOf as v, QueryOperationTypeEntry as w, NamespacedStorageColumnTypeMap as x, ForeignKeyOptions as y };
|
|
161
|
-
//# sourceMappingURL=types-
|
|
161
|
+
//# sourceMappingURL=types-DV040Uuq-Bu8CnbMa.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-DV040Uuq-Bu8CnbMa.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/types-DV040Uuq.d.mts"],"mappings":";;;;;;;;;;;;;UAYU,yBAAyB,mCAAmC,6BAA6B;EACjG,MAAM,MAAM,yBAAyB,aAAa,8BAA8B;aACrE,MAAM;;;KAGd;WACM;WACA,WAAW;WACX,WAAW;;KAEjB;WACM;WACA;WACA;;KAEN;WACM;WACA;WACA,QAAQ,eAAe;;cAEpB;cACA;iBACG,gBAAgB;EAC/B;EACA;GACC;EACD;EACA;;EAEA;EACA;;KAEG,yBAAyB,eAAe,eAAe;KACvD,iCAAiC,eAAe,eAAe;;;;KAI/D;WACM;WACA;;;;;;;;;KASN;WACM,SAAS,eAAe;WACxB,eAAe;WACf,WAAW;;;KAGjB,qBAAqB,eAAe;KACpC,SAAS,oBAAoB;EAChC;KACG,uBAAuB,6BAA6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