@prisma/orm-family-sql 8.0.0-rc.21-dev.5 → 8.0.0-rc.21-dev.7
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-DcphKbq9.d.mts → ast-1JRQY-dP.d.mts} +10 -4
- package/dist/ast-1JRQY-dP.d.mts.map +1 -0
- package/dist/{ast-e_02t9Nt.mjs → ast-C3itulLi.mjs} +7 -1
- package/dist/ast-C3itulLi.mjs.map +1 -0
- package/dist/{attribute-specs-Dcd2ZUrY.d.mts → attribute-specs-DDpSUaG9.d.mts} +3 -3
- package/dist/{attribute-specs-Dcd2ZUrY.d.mts.map → attribute-specs-DDpSUaG9.d.mts.map} +1 -1
- package/dist/{authored-check-naming-D-o196ry.d.mts → authored-check-naming-BiSwtSFu.d.mts} +2 -2
- package/dist/{authored-check-naming-D-o196ry.d.mts.map → authored-check-naming-BiSwtSFu.d.mts.map} +1 -1
- package/dist/{authored-check-naming-BHGJhjqn.mjs → authored-check-naming-DTKcH2_d.mjs} +3 -3
- package/dist/{authored-check-naming-BHGJhjqn.mjs.map → authored-check-naming-DTKcH2_d.mjs.map} +1 -1
- package/dist/{authoring-entity-types-CgKIgWq5-CZK1F9a_.d.mts → authoring-entity-types-CgKIgWq5-BqRjoPFF.d.mts} +2 -2
- package/dist/{authoring-entity-types-CgKIgWq5-CZK1F9a_.d.mts.map → authoring-entity-types-CgKIgWq5-BqRjoPFF.d.mts.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +10 -10
- package/dist/builder__runtime.mjs +4 -4
- package/dist/builder__types.d.mts +5 -5
- package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts → check-constraint-B7qGu6rc-D5kVe9je.d.mts} +2 -2
- package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts.map → check-constraint-B7qGu6rc-D5kVe9je.d.mts.map} +1 -1
- package/dist/check-expressions-BDsLvzqN.mjs +108 -0
- package/dist/check-expressions-BDsLvzqN.mjs.map +1 -0
- package/dist/check-expressions-DuWjvG4h.d.mts +82 -0
- package/dist/check-expressions-DuWjvG4h.d.mts.map +1 -0
- package/dist/{codec-descriptor-registry-CiiFzMtb.mjs → codec-descriptor-registry-UiFDvDj4.mjs} +2 -2
- package/dist/{codec-descriptor-registry-CiiFzMtb.mjs.map → codec-descriptor-registry-UiFDvDj4.mjs.map} +1 -1
- package/dist/codec-json-type-BdWPJ6T5-BhmIyNyb.d.mts +13 -0
- package/dist/codec-json-type-BdWPJ6T5-BhmIyNyb.d.mts.map +1 -0
- package/dist/codec-json-type-DUWyBtJk-BVTavkH0.mjs +21 -0
- package/dist/codec-json-type-DUWyBtJk-BVTavkH0.mjs.map +1 -0
- package/dist/{collection-methods-D9CYfePl-DsDjYS6t.d.mts → collection-methods-D9CYfePl-BGvD1h9Z.d.mts} +4 -4
- package/dist/{collection-methods-D9CYfePl-DsDjYS6t.d.mts.map → collection-methods-D9CYfePl-BGvD1h9Z.d.mts.map} +1 -1
- package/dist/collection-methods-mo-2RjdX.d.mts +1 -0
- package/dist/{config-types-DkEeq_qq.mjs → config-types-BCXwEBZH.mjs} +2 -2
- package/dist/{config-types-DkEeq_qq.mjs.map → config-types-BCXwEBZH.mjs.map} +1 -1
- package/dist/{config-types-C-1mIiJO.d.mts → config-types-Ce1tAJ0B.d.mts} +4 -4
- package/dist/{config-types-C-1mIiJO.d.mts.map → config-types-Ce1tAJ0B.d.mts.map} +1 -1
- package/dist/{contract-builder-DMNe_jX9.mjs → contract-builder-D50r41BU.mjs} +114 -49
- package/dist/contract-builder-D50r41BU.mjs.map +1 -0
- package/dist/{contract-builder-B-Q9T1CO.d.mts → contract-builder-D6JuOGA6.d.mts} +58 -13
- package/dist/contract-builder-D6JuOGA6.d.mts.map +1 -0
- package/dist/contract-emitter.d.mts +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +5 -3
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +62 -26
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +4 -4
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__diagnostics.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +3 -3
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +4 -4
- 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 +3 -3
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{contract-view-DqpzeYeE.mjs → contract-view-CcD3axo0.mjs} +6 -2
- package/dist/contract-view-CcD3axo0.mjs.map +1 -0
- package/dist/{contract-view-DuB35or0.d.mts → contract-view-DkIZrHyj.d.mts} +3 -3
- package/dist/{contract-view-DuB35or0.d.mts.map → contract-view-DkIZrHyj.d.mts.map} +1 -1
- package/dist/contract.d.mts +21 -19
- package/dist/contract.mjs +18 -14
- package/dist/contract__authored-check-naming.d.mts +1 -1
- package/dist/contract__authored-check-naming.mjs +1 -1
- package/dist/contract__check-expressions.d.mts +2 -0
- package/dist/contract__check-expressions.mjs +2 -0
- package/dist/contract__codec-json-type.d.mts +2 -0
- package/dist/contract__codec-json-type.mjs +2 -0
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__contract-view.mjs +1 -1
- package/dist/contract__data-type.d.mts +2 -2
- package/dist/contract__data-type.mjs +2 -2
- package/dist/contract__entity-kinds.d.mts +2 -2
- package/dist/contract__entity-kinds.mjs +2 -2
- 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 +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__sql-expression.d.mts +1 -1
- package/dist/contract__types.d.mts +8 -8
- package/dist/contract__types.mjs +6 -4
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-B6W_VEZ9.d.mts → control-BE7gXqZF.d.mts} +18 -18
- package/dist/{control-B6W_VEZ9.d.mts.map → control-BE7gXqZF.d.mts.map} +1 -1
- package/dist/{control-D6wIw5Fi.mjs → control-DPCrkpMS.mjs} +16 -17
- package/dist/control-DPCrkpMS.mjs.map +1 -0
- package/dist/{control-adapter-SlQkTEwT.mjs → control-adapter-BetaUm2y.mjs} +2 -2
- package/dist/{control-adapter-SlQkTEwT.mjs.map → control-adapter-BetaUm2y.mjs.map} +1 -1
- package/dist/{control-adapter-BfyLe7rh-C_rrUuhb.d.mts → control-adapter-BfyLe7rh-CiGzw3dq.d.mts} +8 -8
- package/dist/{control-adapter-BfyLe7rh-C_rrUuhb.d.mts.map → control-adapter-BfyLe7rh-CiGzw3dq.d.mts.map} +1 -1
- package/dist/{control-adapter-CZ84jQ_z.d.mts → control-adapter-BlBhW0pc.d.mts} +4 -4
- package/dist/{control-adapter-CZ84jQ_z.d.mts.map → control-adapter-BlBhW0pc.d.mts.map} +1 -1
- package/dist/{data-type-DJIvKQHf.d.mts → data-type-B-Do6RMA.d.mts} +15 -7
- package/dist/data-type-B-Do6RMA.d.mts.map +1 -0
- package/dist/{data-type-BFSpaotu.mjs → data-type-BfA5F0Qf.mjs} +2 -2
- package/dist/{data-type-BFSpaotu.mjs.map → data-type-BfA5F0Qf.mjs.map} +1 -1
- package/dist/{db-D1d75IvM-D5CqruQz.d.mts → db-D1d75IvM-C1lqD6a2.d.mts} +13 -13
- package/dist/{db-D1d75IvM-D5CqruQz.d.mts.map → db-D1d75IvM-C1lqD6a2.d.mts.map} +1 -1
- package/dist/{ddl-types-BeA1kjV1-C4d5owxE.d.mts → ddl-types-BeA1kjV1-BUcW52Dx.d.mts} +3 -3
- package/dist/{ddl-types-BeA1kjV1-C4d5owxE.d.mts.map → ddl-types-BeA1kjV1-BUcW52Dx.d.mts.map} +1 -1
- package/dist/{default-mapping-CAOONlKQ-4m07nb-O.d.mts → default-mapping-CEISdj2g-B50Ag_F_.d.mts} +5 -11
- package/dist/default-mapping-CEISdj2g-B50Ag_F_.d.mts.map +1 -0
- package/dist/{derived-checks-D5HVRvqN-BJx1gwPA.mjs → derived-checks-D__agoFB-Boa1MHcA.mjs} +156 -40
- package/dist/derived-checks-D__agoFB-Boa1MHcA.mjs.map +1 -0
- package/dist/{derived-checks-DpPkO6Dt-9U9UJZOo.d.mts → derived-checks-DpPkO6Dt-CQIM17j5.d.mts} +3 -3
- package/dist/{derived-checks-DpPkO6Dt-9U9UJZOo.d.mts.map → derived-checks-DpPkO6Dt-CQIM17j5.d.mts.map} +1 -1
- package/dist/{diagnostics-C7jR1Jyf.mjs → diagnostics-CoM0OFuR.mjs} +40 -30
- package/dist/diagnostics-CoM0OFuR.mjs.map +1 -0
- package/dist/{diff-FNTO8gbI.d.mts → diff-BlX_rfVG.d.mts} +7 -7
- package/dist/{diff-FNTO8gbI.d.mts.map → diff-BlX_rfVG.d.mts.map} +1 -1
- package/dist/{dist-C8Y-PPuE.mjs → dist-BJjqJT_M.mjs} +5 -3
- package/dist/dist-BJjqJT_M.mjs.map +1 -0
- package/dist/{entity-kinds-JR5SAm5h-DOH6VUtL.mjs → entity-kinds-CgEwK0hH-D1NKoKE5.mjs} +25 -7
- package/dist/entity-kinds-CgEwK0hH-D1NKoKE5.mjs.map +1 -0
- package/dist/{entity-kinds-BPG2xCZV.d.mts → entity-kinds-oN1yn4vw.d.mts} +8 -7
- package/dist/{entity-kinds-BPG2xCZV.d.mts.map → entity-kinds-oN1yn4vw.d.mts.map} +1 -1
- package/dist/{exports-CGzFaakG-Dddm8emA.mjs → exports-CGzFaakG-4Aw50nT1.mjs} +3 -3
- package/dist/{exports-CGzFaakG-Dddm8emA.mjs.map → exports-CGzFaakG-4Aw50nT1.mjs.map} +1 -1
- package/dist/{expression-BWRsWR6O-BrUVz0V2.d.mts → expression-BWRsWR6O-HbWL9x9D.d.mts} +3 -3
- package/dist/{expression-BWRsWR6O-BrUVz0V2.d.mts.map → expression-BWRsWR6O-HbWL9x9D.d.mts.map} +1 -1
- package/dist/{expression-C3F6gxZH-DrYNeDbh.d.mts → expression-C3F6gxZH-EOb5cRCY.d.mts} +7 -7
- package/dist/{expression-C3F6gxZH-DrYNeDbh.d.mts.map → expression-C3F6gxZH-EOb5cRCY.d.mts.map} +1 -1
- package/dist/expression-OVCWlXHm.d.mts +2 -0
- package/dist/{expression-impl-DtbmFnnz-CUKzBisY.mjs → expression-impl-DtbmFnnz-Dal0IYDE.mjs} +2 -2
- package/dist/{expression-impl-DtbmFnnz-CUKzBisY.mjs.map → expression-impl-DtbmFnnz-Dal0IYDE.mjs.map} +1 -1
- package/dist/{factories-Crobuxwn.mjs → factories-B2hKDIzy.mjs} +3 -3
- package/dist/{factories-Crobuxwn.mjs.map → factories-B2hKDIzy.mjs.map} +1 -1
- package/dist/{factories-DbNP9qfs.d.mts → factories-DVgCG7DR.d.mts} +4 -4
- package/dist/{factories-DbNP9qfs.d.mts.map → factories-DVgCG7DR.d.mts.map} +1 -1
- package/dist/family.d.mts +16 -16
- package/dist/family.mjs +10 -10
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control-adapter.mjs +1 -1
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +3 -3
- package/dist/family__diff.d.mts +1 -1
- 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 +3 -3
- package/dist/family__psl-build.mjs +2 -2
- 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/family__runtime.mjs +1 -1
- package/dist/{foreign-key-materialization-48P2V8on.d.mts → foreign-key-materialization-C53nVQuD.d.mts} +4 -4
- package/dist/{foreign-key-materialization-48P2V8on.d.mts.map → foreign-key-materialization-C53nVQuD.d.mts.map} +1 -1
- package/dist/{foreign-key-materialization-BM59w_Xg.mjs → foreign-key-materialization-CCHAR789.mjs} +5 -5
- package/dist/{foreign-key-materialization-BM59w_Xg.mjs.map → foreign-key-materialization-CCHAR789.mjs.map} +1 -1
- package/dist/{functions-D7lN5-JU.mjs → functions-DO1k8KLB.mjs} +2 -2
- package/dist/{functions-D7lN5-JU.mjs.map → functions-DO1k8KLB.mjs.map} +1 -1
- package/dist/{functions-CQrsCHCj.d.mts → functions-PBSwFhni.d.mts} +6 -6
- package/dist/{functions-CQrsCHCj.d.mts.map → functions-PBSwFhni.d.mts.map} +1 -1
- package/dist/{generator-functions-Hy4pDDr9-AUCNpeg5.mjs → generator-functions-Hy4pDDr9-CMfJOBtv.mjs} +3 -3
- package/dist/{generator-functions-Hy4pDDr9-AUCNpeg5.mjs.map → generator-functions-Hy4pDDr9-CMfJOBtv.mjs.map} +1 -1
- package/dist/{index-0qfR8_db.d.mts → index-BAI1gH-I.d.mts} +21 -21
- package/dist/{index-0qfR8_db.d.mts.map → index-BAI1gH-I.d.mts.map} +1 -1
- package/dist/{index-Nqc3OHR_.d.mts → index-BWWwt5hB.d.mts} +3 -3
- package/dist/{index-Nqc3OHR_.d.mts.map → index-BWWwt5hB.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-CGsyPP9B.mjs → index-equivalence-DswCiq5l-9GNm8oG9.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-CGsyPP9B.mjs.map → index-equivalence-DswCiq5l-9GNm8oG9.mjs.map} +1 -1
- package/dist/{index-naming-BOcJT1B3-mG8Fd6KN.mjs → index-naming-BOcJT1B3-D-49owHA.mjs} +2 -2
- package/dist/{index-naming-BOcJT1B3-mG8Fd6KN.mjs.map → index-naming-BOcJT1B3-D-49owHA.mjs.map} +1 -1
- package/dist/{index-naming-Cs6wwia3.d.mts → index-naming-DqjO4p5R.d.mts} +2 -2
- package/dist/{index-naming-Cs6wwia3.d.mts.map → index-naming-DqjO4p5R.d.mts.map} +1 -1
- package/dist/index-reference-D3p5ziNG.d.mts +1 -0
- package/dist/{index-reference-YHvh6wAL-BAhOS7RC.d.mts → index-reference-YHvh6wAL-BupQRpkE.d.mts} +4 -4
- package/dist/{index-reference-YHvh6wAL-BAhOS7RC.d.mts.map → index-reference-YHvh6wAL-BupQRpkE.d.mts.map} +1 -1
- package/dist/{index-type-validation-fGGwAHWc.d.mts → index-type-validation-BFJlwjWi.d.mts} +3 -3
- package/dist/{index-type-validation-fGGwAHWc.d.mts.map → index-type-validation-BFJlwjWi.d.mts.map} +1 -1
- package/dist/{interpreter-CS21wD1i-G0u1x8t_.mjs → interpreter-ChvVEijY-FeJngsog.mjs} +92 -45
- package/dist/interpreter-ChvVEijY-FeJngsog.mjs.map +1 -0
- package/dist/{ir-BvptQsFW.d.mts → ir-CZ5Ks7EA.d.mts} +4 -4
- package/dist/{ir-BvptQsFW.d.mts.map → ir-CZ5Ks7EA.d.mts.map} +1 -1
- package/dist/middleware-Dp3CD7yZ.d.mts +1 -0
- package/dist/{middleware-JfHt_Ax8-DKXbos9y.d.mts → middleware-JfHt_Ax8-rWWdDxnq.d.mts} +2 -2
- package/dist/{middleware-JfHt_Ax8-DKXbos9y.d.mts.map → middleware-JfHt_Ax8-rWWdDxnq.d.mts.map} +1 -1
- package/dist/{migration-qalbcIUs.d.mts → migration-B35kGD-7.d.mts} +4 -4
- package/dist/{migration-qalbcIUs.d.mts.map → migration-B35kGD-7.d.mts.map} +1 -1
- package/dist/{naming-BcD36g9T-Mfe_xGGL.d.mts → naming-CLfASFf7-HRjmKe43.d.mts} +9 -4
- package/dist/naming-CLfASFf7-HRjmKe43.d.mts.map +1 -0
- package/dist/{naming-bM5qm5PY-jOg3JFMb.mjs → naming-DEpT6Zad-C9PFkWt6.mjs} +5 -4
- package/dist/naming-DEpT6Zad-C9PFkWt6.mjs.map +1 -0
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +22 -22
- package/dist/orm-client.mjs +7 -7
- package/dist/{pack-Cap3oVPy.d.mts → pack-DKM1hv1E.d.mts} +4 -4
- package/dist/{pack-Cap3oVPy.d.mts.map → pack-DKM1hv1E.d.mts.map} +1 -1
- package/dist/{plan-CMqVpPq6-Bllx5Zpk.d.mts → plan-CMqVpPq6-Aoza6Dp2.d.mts} +4 -4
- package/dist/{plan-CMqVpPq6-Bllx5Zpk.d.mts.map → plan-CMqVpPq6-Aoza6Dp2.d.mts.map} +1 -1
- package/dist/plan-DINEcqC1.d.mts +2 -0
- package/dist/psl-build-BA0Ndi1v.mjs +268 -0
- package/dist/psl-build-BA0Ndi1v.mjs.map +1 -0
- package/dist/{psl-build-RelubU2E.d.mts → psl-build-DCZaF5g4.d.mts} +47 -18
- package/dist/psl-build-DCZaF5g4.d.mts.map +1 -0
- package/dist/{psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts → psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts} +3 -3
- package/dist/{psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts.map → psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-Bvhx79fP-CQqHf_L4.mjs → psl-field-resolution-BW2_FOb9-DxqR43fo.mjs} +68 -38
- package/dist/psl-field-resolution-BW2_FOb9-DxqR43fo.mjs.map +1 -0
- package/dist/{psl-infer--g4i84Go.mjs → psl-infer-C9kVS9ma.mjs} +2 -2
- package/dist/{psl-infer--g4i84Go.mjs.map → psl-infer-C9kVS9ma.mjs.map} +1 -1
- package/dist/{psl-infer-DzoxPZGd.d.mts → psl-infer-Cr9AeccU.d.mts} +4 -4
- package/dist/{psl-infer-DzoxPZGd.d.mts.map → psl-infer-Cr9AeccU.d.mts.map} +1 -1
- package/dist/query-lane-context-DL6bwl6k.d.mts +1 -0
- package/dist/{query-lane-context-DLSXDsDK-pEiQmuYy.d.mts → query-lane-context-DLSXDsDK-CGSahS15.d.mts} +8 -8
- package/dist/{query-lane-context-DLSXDsDK-pEiQmuYy.d.mts.map → query-lane-context-DLSXDsDK-CGSahS15.d.mts.map} +1 -1
- 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 +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__collection-methods.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +4 -4
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__functions.mjs +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__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-DCqtmnSU.d.mts → resolve-storage-table-D1rXCcCk.d.mts} +3 -3
- package/dist/{resolve-storage-table-DCqtmnSU.d.mts.map → resolve-storage-table-D1rXCcCk.d.mts.map} +1 -1
- package/dist/{runtime-JKWb27L5.d.mts → runtime-CSDcwOEG.d.mts} +5 -4
- package/dist/{runtime-JKWb27L5.d.mts.map → runtime-CSDcwOEG.d.mts.map} +1 -1
- package/dist/{runtime-CCzfa1mY.mjs → runtime-DkUiQi00.mjs} +12 -4
- package/dist/runtime-DkUiQi00.mjs.map +1 -0
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DmP74bB8-tqHKiJ88.d.mts → schema-differ-DmP74bB8-BXkhxcPs.d.mts} +5 -5
- package/dist/{schema-differ-DmP74bB8-tqHKiJ88.d.mts.map → schema-differ-DmP74bB8-BXkhxcPs.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 +2 -2
- package/dist/schema-ir__naming.mjs +2 -2
- package/dist/schema-ir__types.d.mts +2 -2
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-C3wbdviw-DMjIubOr.mjs → schema-verify-C3wbdviw-nQ4tG9N7.mjs} +4 -4
- package/dist/{schema-verify-C3wbdviw-DMjIubOr.mjs.map → schema-verify-C3wbdviw-nQ4tG9N7.mjs.map} +1 -1
- package/dist/{serialized-index-DjCCnXB1-DMA7BtO2.mjs → serialized-index-BefvjuZ0-Bbsja7If.mjs} +14 -27
- package/dist/serialized-index-BefvjuZ0-Bbsja7If.mjs.map +1 -0
- package/dist/{serialized-index-CrgG8ct1-DKVJ7TDX.d.mts → serialized-index-CrgG8ct1-Duy5-kFV.d.mts} +3 -3
- package/dist/{serialized-index-CrgG8ct1-DKVJ7TDX.d.mts.map → serialized-index-CrgG8ct1-Duy5-kFV.d.mts.map} +1 -1
- package/dist/{sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs → sql-contract-serializer-sMY3prTx-CBHrlt9O.mjs} +4 -4
- package/dist/{sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs.map → sql-contract-serializer-sMY3prTx-CBHrlt9O.mjs.map} +1 -1
- package/dist/{sql-data-type-D7M-YTTY-D2vRqDxn.mjs → sql-data-type-LVBldu1a-Bq203xWX.mjs} +13 -7
- package/dist/sql-data-type-LVBldu1a-Bq203xWX.mjs.map +1 -0
- package/dist/{sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts → sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts} +2 -2
- package/dist/{sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts.map → sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts.map} +1 -1
- package/dist/{sql-expression-B4BrhGPi.d.mts → sql-expression-1yO8GiBc.d.mts} +2 -2
- package/dist/{sql-expression-B4BrhGPi.d.mts.map → sql-expression-1yO8GiBc.d.mts.map} +1 -1
- package/dist/{sql-index-ByAAE7K8-Dqtn_vUL.d.mts → sql-index-ByAAE7K8-4TUFKGLK.d.mts} +2 -2
- package/dist/{sql-index-ByAAE7K8-Dqtn_vUL.d.mts.map → sql-index-ByAAE7K8-4TUFKGLK.d.mts.map} +1 -1
- package/dist/sql-node-D8P0akYY-RVytYXDZ.mjs +50 -0
- package/dist/sql-node-D8P0akYY-RVytYXDZ.mjs.map +1 -0
- package/dist/{sql-storage-DeCAh5Hi-CEM-m8cs.d.mts → sql-storage-B_AM6tU1-BOPQxXo7.d.mts} +6 -5
- package/dist/{sql-storage-DeCAh5Hi-CEM-m8cs.d.mts.map → sql-storage-B_AM6tU1-BOPQxXo7.d.mts.map} +1 -1
- package/dist/{storage-table-DDvN83mw-DkbBFmK9.mjs → storage-table-B_MrLtQX-eWx6BgGT.mjs} +7 -50
- package/dist/storage-table-B_MrLtQX-eWx6BgGT.mjs.map +1 -0
- package/dist/{storage-table-Bf1ZjnxO-pUj6pyP0.d.mts → storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts} +23 -6
- package/dist/storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts.map +1 -0
- package/dist/storage-value-set-uGUEBAMJ-hX-zFqN5.mjs +38 -0
- package/dist/storage-value-set-uGUEBAMJ-hX-zFqN5.mjs.map +1 -0
- package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts → transaction-state-DR3nKTmH-C3wq6dCB.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts.map → transaction-state-DR3nKTmH-C3wq6dCB.d.mts.map} +1 -1
- package/dist/{types-DoyiTsjg-2YMhMJDA.mjs → types-1ZKE0deC-Dou4ugcz.mjs} +3 -3
- package/dist/{types-DoyiTsjg-2YMhMJDA.mjs.map → types-1ZKE0deC-Dou4ugcz.mjs.map} +1 -1
- package/dist/types-B-dwfOwQ.d.mts +1 -0
- package/dist/{types-CTdSkl0s.mjs → types-CISwoRED.mjs} +2 -2
- package/dist/types-CISwoRED.mjs.map +1 -0
- package/dist/{types-COXfSNOP-DcuULeD9.d.mts → types-COXfSNOP-D9vt9QDL.d.mts} +9 -9
- package/dist/{types-COXfSNOP-DcuULeD9.d.mts.map → types-COXfSNOP-D9vt9QDL.d.mts.map} +1 -1
- package/dist/{types-CkAd8SWm.d.mts → types-CXRxo_TK.d.mts} +7 -7
- package/dist/{types-CkAd8SWm.d.mts.map → types-CXRxo_TK.d.mts.map} +1 -1
- package/dist/types-DIoM5Ft3.d.mts +1 -0
- package/dist/{types-DfKvtJwS-CrpWTGBJ.d.mts → types-DNTLudNR-DiVulPhL.d.mts} +7 -7
- package/dist/{types-DfKvtJwS-CrpWTGBJ.d.mts.map → types-DNTLudNR-DiVulPhL.d.mts.map} +1 -1
- package/dist/{types-NgqqVAo5-Be_uYGQx.d.mts → types-NgqqVAo5-CJG02ILZ.d.mts} +10 -10
- package/dist/{types-NgqqVAo5-Be_uYGQx.d.mts.map → types-NgqqVAo5-CJG02ILZ.d.mts.map} +1 -1
- package/dist/{types-CuCxAQat-Dz8P4xyt.d.mts → types-fmtEmvj3-B0fQaVes.d.mts} +4 -4
- package/dist/{types-CuCxAQat-Dz8P4xyt.d.mts.map → types-fmtEmvj3-B0fQaVes.d.mts.map} +1 -1
- package/dist/{types-ijhejJhK-EdACW3bY.d.mts → types-ijhejJhK-BqfwP5Cc.d.mts} +2 -2
- package/dist/{types-ijhejJhK-EdACW3bY.d.mts.map → types-ijhejJhK-BqfwP5Cc.d.mts.map} +1 -1
- package/dist/{validators-FJs8HvFr.d.mts → validators-Dt-19ywK.d.mts} +4 -4
- package/dist/{validators-FJs8HvFr.d.mts.map → validators-Dt-19ywK.d.mts.map} +1 -1
- package/dist/{validators-BwA7ttZM.mjs → validators-qcQteqs2.mjs} +30 -31
- package/dist/validators-qcQteqs2.mjs.map +1 -0
- package/package.json +20 -18
- package/dist/ast-DcphKbq9.d.mts.map +0 -1
- package/dist/ast-e_02t9Nt.mjs.map +0 -1
- package/dist/collection-methods-FWiYjZ5j.d.mts +0 -1
- package/dist/contract-builder-B-Q9T1CO.d.mts.map +0 -1
- package/dist/contract-builder-DMNe_jX9.mjs.map +0 -1
- package/dist/contract-view-DqpzeYeE.mjs.map +0 -1
- package/dist/control-D6wIw5Fi.mjs.map +0 -1
- package/dist/data-type-DJIvKQHf.d.mts.map +0 -1
- package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts.map +0 -1
- package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs.map +0 -1
- package/dist/diagnostics-C7jR1Jyf.mjs.map +0 -1
- package/dist/dist-C8Y-PPuE.mjs.map +0 -1
- package/dist/entity-kinds-JR5SAm5h-DOH6VUtL.mjs.map +0 -1
- package/dist/expression-CQHy0GY7.d.mts +0 -2
- package/dist/index-reference-BVkoanQn.d.mts +0 -1
- package/dist/interpreter-CS21wD1i-G0u1x8t_.mjs.map +0 -1
- package/dist/middleware-DYiOUIpn.d.mts +0 -1
- package/dist/naming-BcD36g9T-Mfe_xGGL.d.mts.map +0 -1
- package/dist/naming-bM5qm5PY-jOg3JFMb.mjs.map +0 -1
- package/dist/plan-Cg0h96GD.d.mts +0 -2
- package/dist/psl-build-DqqYhOsa.mjs +0 -426
- package/dist/psl-build-DqqYhOsa.mjs.map +0 -1
- package/dist/psl-build-RelubU2E.d.mts.map +0 -1
- package/dist/psl-field-resolution-Bvhx79fP-CQqHf_L4.mjs.map +0 -1
- package/dist/query-lane-context-Dqs5qCXx.d.mts +0 -1
- package/dist/runtime-CCzfa1mY.mjs.map +0 -1
- package/dist/serialized-index-DjCCnXB1-DMA7BtO2.mjs.map +0 -1
- package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map +0 -1
- package/dist/storage-table-Bf1ZjnxO-pUj6pyP0.d.mts.map +0 -1
- package/dist/storage-table-DDvN83mw-DkbBFmK9.mjs.map +0 -1
- package/dist/types-CTdSkl0s.mjs.map +0 -1
- package/dist/types-CvmPNREJ.d.mts +0 -1
- package/dist/types-ljUNyiWe.d.mts +0 -1
- package/dist/validators-BwA7ttZM.mjs.map +0 -1
|
@@ -1,54 +1,11 @@
|
|
|
1
1
|
import { t as contractError } from "./contract-errors-BCN6RVI5-DoH6b_KZ.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { u as nameOf } from "./naming-DEpT6Zad-C9PFkWt6.mjs";
|
|
3
|
+
import { t as SqlNode } from "./sql-node-D8P0akYY-RVytYXDZ.mjs";
|
|
3
4
|
import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
|
|
4
|
-
import {
|
|
5
|
-
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
5
|
+
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
6
6
|
import { asNamespaceId } from "@prisma/orm-framework/contract/types";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* SQL family IR node base. Carries the family-level `kind` discriminator
|
|
10
|
-
* `'sql'` and inherits the framework's `freezeNode` affordance.
|
|
11
|
-
*
|
|
12
|
-
* Single family-level discriminator (not per-leaf) reflects the fact that
|
|
13
|
-
* SQL IR has no polymorphic dispatch today — verifiers and serializers
|
|
14
|
-
* walk by structural position (`storage.tables[name].columns[name]`),
|
|
15
|
-
* not by inspecting `kind`. The abstract bar for per-leaf discriminators
|
|
16
|
-
* isn't earned until a future polymorphic consumer arrives.
|
|
17
|
-
*
|
|
18
|
-
* `kind` is installed as a non-enumerable own property on every instance,
|
|
19
|
-
* which keeps three things clean simultaneously:
|
|
20
|
-
*
|
|
21
|
-
* - `JSON.stringify(node)` produces the canonical pre-lift JSON envelope
|
|
22
|
-
* shape (no `kind` field), so emitted contract.json files and the
|
|
23
|
-
* `validateSqlContractFully` arktype schemas stay unchanged.
|
|
24
|
-
* - Test assertions that use `toEqual({...})` against the pre-lift flat
|
|
25
|
-
* shape continue to pass — only enumerable own properties are
|
|
26
|
-
* compared.
|
|
27
|
-
* - Direct access (`node.kind`) and runtime narrowing
|
|
28
|
-
* (`if (node.kind === 'sql')`) still work, so future polymorphic
|
|
29
|
-
* dispatch can begin reading `kind` without a runtime change.
|
|
30
|
-
*
|
|
31
|
-
* Future per-leaf overrides land cleanly: a class that gains a
|
|
32
|
-
* polymorphic-dispatch consumer (e.g. an enum type instance walked
|
|
33
|
-
* alongside other types) overrides `kind` with its narrower literal
|
|
34
|
-
* at that leaf level. Per-leaf overrides will use enumerable kind
|
|
35
|
-
* (matching the Mongo per-class-discriminator precedent) because they
|
|
36
|
-
* encode dispatch-relevant information that callers need to see in
|
|
37
|
-
* JSON envelopes; the family-level `'sql'` is uniform across all SQL
|
|
38
|
-
* IR and carries no dispatch-relevant information.
|
|
39
|
-
*/
|
|
40
|
-
var SqlNode = class extends IRNodeBase {
|
|
41
|
-
kind;
|
|
42
|
-
constructor() {
|
|
43
|
-
super();
|
|
44
|
-
Object.defineProperty(this, "kind", {
|
|
45
|
-
value: "sql",
|
|
46
|
-
writable: false,
|
|
47
|
-
enumerable: false,
|
|
48
|
-
configurable: true
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
};
|
|
7
|
+
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
8
|
+
//#region ../../../2-sql-family/1-core/contract/dist/storage-table-B_MrLtQX.mjs
|
|
52
9
|
/**
|
|
53
10
|
* SQL Contract IR node for a table-level check constraint, name-identified:
|
|
54
11
|
* `name` is the full physical name; a present `prefix` marks the constraint as
|
|
@@ -303,6 +260,6 @@ var StorageTable = class StorageTable extends SqlNode {
|
|
|
303
260
|
}
|
|
304
261
|
};
|
|
305
262
|
//#endregion
|
|
306
|
-
export { PrimaryKey as a,
|
|
263
|
+
export { PrimaryKey as a, UniqueConstraint as c, Index as i, ForeignKey as n, StorageColumn as o, ForeignKeyReference as r, StorageTable as s, CheckConstraint as t };
|
|
307
264
|
|
|
308
|
-
//# sourceMappingURL=storage-table-
|
|
265
|
+
//# sourceMappingURL=storage-table-B_MrLtQX-eWx6BgGT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-table-B_MrLtQX-eWx6BgGT.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/storage-table-B_MrLtQX.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { t as SqlNode } from \"./sql-node-D8P0akYY.mjs\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { asNamespaceId } from \"@internal/contract/types\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\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[]`. `index` says what serves the\n* foreign key's lookups; it is absent when nothing backs the foreign key.\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\tif (typeof input.index === \"object\") this.index = input.index;\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.typeParams !== void 0) this.typeParams = input.typeParams;\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, UniqueConstraint as n, ForeignKeyReference as o, StorageColumn as r, Index as s, StorageTable as t };\n\n//# sourceMappingURL=storage-table-B_MrLtQX.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,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,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O,OAAO,OAAO,YAAY;EAChC,IAAI,CAAC,aAAa,GAAG,KAAK,GAAG,MAAM,IAAI,cAAc,8BAA8B,YAAY;CAChG;AACD"}
|
package/dist/{storage-table-Bf1ZjnxO-pUj6pyP0.d.mts → storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as SqlNode } from "./sql-node-kEz6YFZo-1ogT6Cxt.mjs";
|
|
2
|
-
import { n as CheckConstraintInput, t as CheckConstraint } from "./check-constraint-B7qGu6rc-
|
|
2
|
+
import { n as CheckConstraintInput, t as CheckConstraint } from "./check-constraint-B7qGu6rc-D5kVe9je.mjs";
|
|
3
3
|
import { r as ForeignKeyInput, t as ForeignKey } from "./foreign-key-qkDFfG8t-TaK_GYWR.mjs";
|
|
4
4
|
import { i as UniqueConstraintInput, n as PrimaryKeyInput, r as UniqueConstraint, t as PrimaryKey } from "./unique-constraint-M5TlQnJQ-qX-maNUV.mjs";
|
|
5
|
-
import { r as IndexInput, t as Index } from "./sql-index-ByAAE7K8-
|
|
6
|
-
import { ColumnDefault, ControlPolicy, ValueSetRef } from "@prisma/orm-framework/contract/types";
|
|
7
|
-
//#region ../../../2-sql-family/1-core/contract/dist/storage-
|
|
5
|
+
import { r as IndexInput, t as Index } from "./sql-index-ByAAE7K8-4TUFKGLK.mjs";
|
|
6
|
+
import { ColumnDefault, ContractValueObjectField, ControlPolicy, ValueSetRef } from "@prisma/orm-framework/contract/types";
|
|
7
|
+
//#region ../../../2-sql-family/1-core/contract/dist/storage-value-object-BcvIeUr8.d.mts
|
|
8
8
|
//#region src/ir/storage-column.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* Hydration / construction input shape for {@link StorageColumn}. Mirrors
|
|
@@ -94,5 +94,22 @@ declare class StorageTable extends SqlNode {
|
|
|
94
94
|
static assert(value: StorageTable | undefined, coordinate: string): asserts value is StorageTable;
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
//#region src/ir/storage-value-object.d.ts
|
|
98
|
+
/** Hydration / construction input shape for {@link StorageValueObject}; mirrors the stored JSON. */
|
|
99
|
+
interface StorageValueObjectInput {
|
|
100
|
+
readonly fields: Readonly<Record<string, ContractValueObjectField>>;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* SQL Contract IR node for a value object in a namespace's `valueObject` map (`SqlNamespace.entries.valueObject`): the keys every row holds in a column that stores it (ADR 309). A domain field refers to it by its storage coordinate.
|
|
104
|
+
*
|
|
105
|
+
* A field that leaves out `many` holds `many: false`, as the authoring builders write it, so a contract read from JSON equals the one built from its source.
|
|
106
|
+
*
|
|
107
|
+
* The entry's name is not on the class: value objects are keyed by name in the parent namespace's `valueObject` map.
|
|
108
|
+
*/
|
|
109
|
+
declare class StorageValueObject extends SqlNode {
|
|
110
|
+
readonly fields: Readonly<Record<string, ContractValueObjectField>>;
|
|
111
|
+
constructor(input: StorageValueObjectInput);
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { StorageValueObject as a, StorageTableInput as i, StorageColumnInput as n, StorageValueObjectInput as o, StorageTable as r, StorageColumn as t };
|
|
115
|
+
//# sourceMappingURL=storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/storage-value-object-BcvIeUr8.d.mts"],"mappings":";;;;;;;;;;;;;;KAaK;WACM;;KAEN;;WAEM;WACA;WACA;WACA,aAAa;WACb,UAAU;WACV,UAAU;WACV,WAAW;WACX,OAAO;;;;;;;;;;;;;;;cAeJ,sBAAsB;WACzB;WACA;WACA;WACA,MAAM;WACN,aAAa;WACb,UAAU;WACV,UAAU;WACV,WAAW;EACpB,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;;;;;UAK7E;WACC,QAAQ,SAAS,eAAe;;;;;;;;;cAS7B,2BAA2B;WAC9B,QAAQ,SAAS,eAAe;EACzC,YAAY,OAAO"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as SqlNode } from "./sql-node-D8P0akYY-RVytYXDZ.mjs";
|
|
2
|
+
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
3
|
+
//#region ../../../2-sql-family/1-core/contract/dist/storage-value-set-uGUEBAMJ.mjs
|
|
4
|
+
/**
|
|
5
|
+
* SQL Contract IR node for a value-set entry in a namespace's `valueSet`
|
|
6
|
+
* map (`SqlNamespace.entries.valueSet`).
|
|
7
|
+
*
|
|
8
|
+
* A value-set records the ordered set of permitted codec-encoded values for
|
|
9
|
+
* an enum-like column restriction. It does not carry a `codecId` — the
|
|
10
|
+
* column that references it already holds the codec; the value-set holds
|
|
11
|
+
* only the permitted values.
|
|
12
|
+
*
|
|
13
|
+
* The node's `kind` is enumerable (`'valueSet'`) so the JSON envelope
|
|
14
|
+
* carries the discriminator and the serializer hydration walker can
|
|
15
|
+
* dispatch on it. This follows the per-leaf enumerable-kind convention
|
|
16
|
+
* established in the SQL-node comment (future polymorphic dispatch on
|
|
17
|
+
* namespace entries needs the discriminator in JSON).
|
|
18
|
+
*
|
|
19
|
+
* The entry's name is not on the class — value-sets are keyed by name in
|
|
20
|
+
* the parent namespace's `valueSet: Record<string, StorageValueSet>` map.
|
|
21
|
+
*/
|
|
22
|
+
var StorageValueSet = class extends SqlNode {
|
|
23
|
+
kind = "valueSet";
|
|
24
|
+
values;
|
|
25
|
+
constructor(input) {
|
|
26
|
+
super();
|
|
27
|
+
this.values = Object.freeze([...input.values]);
|
|
28
|
+
freezeNode(this);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function isStorageValueSet(value) {
|
|
32
|
+
if (typeof value !== "object" || value === null) return false;
|
|
33
|
+
return "kind" in value && value.kind === "valueSet" && "values" in value;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { isStorageValueSet as n, StorageValueSet as t };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=storage-value-set-uGUEBAMJ-hX-zFqN5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-value-set-uGUEBAMJ-hX-zFqN5.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/storage-value-set-uGUEBAMJ.mjs"],"sourcesContent":["import { t as SqlNode } from \"./sql-node-D8P0akYY.mjs\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\n//#region src/ir/storage-value-set.ts\n/**\n* SQL Contract IR node for a value-set entry in a namespace's `valueSet`\n* map (`SqlNamespace.entries.valueSet`).\n*\n* A value-set records the ordered set of permitted codec-encoded values for\n* an enum-like column restriction. It does not carry a `codecId` — the\n* column that references it already holds the codec; the value-set holds\n* only the permitted values.\n*\n* The node's `kind` is enumerable (`'valueSet'`) so the JSON envelope\n* carries the discriminator and the serializer hydration walker can\n* dispatch on it. This follows the per-leaf enumerable-kind convention\n* established in the SQL-node comment (future polymorphic dispatch on\n* namespace entries needs the discriminator in JSON).\n*\n* The entry's name is not on the class — value-sets are keyed by name in\n* the parent namespace's `valueSet: Record<string, StorageValueSet>` map.\n*/\nvar StorageValueSet = class extends SqlNode {\n\tkind = \"valueSet\";\n\tvalues;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.values = Object.freeze([...input.values]);\n\t\tfreezeNode(this);\n\t}\n};\nfunction isStorageValueSet(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\treturn \"kind\" in value && value.kind === \"valueSet\" && \"values\" in value;\n}\n//#endregion\nexport { isStorageValueSet as n, StorageValueSet as t };\n\n//# sourceMappingURL=storage-value-set-uGUEBAMJ.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,kBAAkB,cAAc,QAAQ;CAC3C,OAAO;CACP;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,CAAC,GAAG,MAAM,MAAM,CAAC;EAC7C,WAAW,IAAI;CAChB;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,OAAO,UAAU,SAAS,MAAM,SAAS,cAAc,YAAY;AACpE"}
|
package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts → transaction-state-DR3nKTmH-C3wq6dCB.d.mts}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { h as AnyQueryAst, ht as LoweredParam } from "./types-ijhejJhK-
|
|
1
|
+
import { h as AnyQueryAst, ht as LoweredParam } from "./types-ijhejJhK-BqfwP5Cc.mjs";
|
|
2
2
|
import { l as SqlStatementStats } from "./driver-types-DRsYeq3j-BimeCnUk.mjs";
|
|
3
|
-
import { n as SqlQueryPlan } from "./plan-CMqVpPq6-
|
|
4
|
-
import { a as CodecValue, i as CodecTypesBase, o as Expression, t as AffectedCount } from "./expression-C3F6gxZH-
|
|
5
|
-
import "./expression-
|
|
6
|
-
import "./ast-
|
|
7
|
-
import "./plan-
|
|
8
|
-
import { h as RuntimeScope } from "./types-NgqqVAo5-
|
|
9
|
-
import "./types-
|
|
3
|
+
import { n as SqlQueryPlan } from "./plan-CMqVpPq6-Aoza6Dp2.mjs";
|
|
4
|
+
import { a as CodecValue, i as CodecTypesBase, o as Expression, t as AffectedCount } from "./expression-C3F6gxZH-EOb5cRCY.mjs";
|
|
5
|
+
import "./expression-OVCWlXHm.mjs";
|
|
6
|
+
import "./ast-1JRQY-dP.mjs";
|
|
7
|
+
import "./plan-DINEcqC1.mjs";
|
|
8
|
+
import { h as RuntimeScope } from "./types-NgqqVAo5-CJG02ILZ.mjs";
|
|
9
|
+
import "./types-DIoM5Ft3.mjs";
|
|
10
10
|
import { JsonValue, PlanMeta } from "@prisma/orm-framework/contract/types";
|
|
11
11
|
import { AsyncIterableResult, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
|
|
12
12
|
//#region ../../../2-sql-family/5-runtime/dist/transaction-state-DR3nKTmH.d.mts
|
|
@@ -112,4 +112,4 @@ interface TransactionStartTarget {
|
|
|
112
112
|
declare function createTransactionStart(): TransactionStart;
|
|
113
113
|
//#endregion
|
|
114
114
|
export { transactionStart as S, createTransactionStart as _, ParamSpec as a, settlementOf as b, PreparedExecution as c, PreparedStatementExecuteTarget as d, PreparedStatementQueryTarget as f, TransactionStartTarget as g, TransactionStart as h, DeclaredNullable as i, PreparedFor as l, TransactionSettlementState as m, Declaration as n, ParamsFromDeclaration as o, SettledTransactionTarget as p, DeclaredCodecId as r, PrepareCallback as s, BindSiteParams as t, PreparedStatement as u, preparedStatementExecute as v, transactionSettlement as x, preparedStatementQuery as y };
|
|
115
|
-
//# sourceMappingURL=transaction-state-DR3nKTmH-
|
|
115
|
+
//# sourceMappingURL=transaction-state-DR3nKTmH-C3wq6dCB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-state-DR3nKTmH-
|
|
1
|
+
{"version":3,"file":"transaction-state-DR3nKTmH-C3wq6dCB.d.mts","names":[],"sources":["../../../../2-sql-family/5-runtime/dist/transaction-state-DR3nKTmH.d.mts"],"mappings":";;;;;;;;;;;;;KAOK,UAAU,WAAW,iBAAiB,yBAAyB;WAC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|
1
|
+
import { p as normalizeIndexOptionValue, u as nameOf } from "./naming-DEpT6Zad-C9PFkWt6.mjs";
|
|
2
2
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
3
3
|
import { IRNodeBase, freezeNode } from "@prisma/orm-framework/components/ir";
|
|
4
4
|
import { dataTypeValuesEqual } from "@prisma/orm-framework/components/codec";
|
|
@@ -7,7 +7,7 @@ import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
|
7
7
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
8
8
|
import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
|
|
9
9
|
import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
|
|
10
|
-
//#region ../../../2-sql-family/1-core/schema-ir/dist/types-
|
|
10
|
+
//#region ../../../2-sql-family/1-core/schema-ir/dist/types-1ZKE0deC.mjs
|
|
11
11
|
/**
|
|
12
12
|
* The `nodeKind` discriminant for each relational schema-diff leaf node.
|
|
13
13
|
* Each node carries a unique value; the differ pairs siblings by `id`, and
|
|
@@ -818,4 +818,4 @@ var SqlSchemaIR = class extends SqlSchemaIRNode {
|
|
|
818
818
|
//#endregion
|
|
819
819
|
export { sqlDefaultValuesEqual as _, SqlColumnIR as a, SqlSchemaIR as c, SqlUniqueIR as d, assertNode as f, sqlColumnTypesEqual as g, relationalNodeGranularity as h, SqlColumnDefaultIR as i, SqlSchemaIRNode as l, relationalNodeEntityKind as m, RelationalSchemaNodeKind as n, SqlForeignKeyIR as o, defineNonEnumerable as p, SqlCheckConstraintIR as r, SqlIndexIR as s, PrimaryKey as t, SqlTableIR as u };
|
|
820
820
|
|
|
821
|
-
//# sourceMappingURL=types-
|
|
821
|
+
//# sourceMappingURL=types-1ZKE0deC-Dou4ugcz.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-DoyiTsjg-2YMhMJDA.mjs","names":[],"sources":["../../../../2-sql-family/1-core/schema-ir/dist/types-DoyiTsjg.mjs"],"sourcesContent":["import { f as normalizeIndexOptionValue, l as nameOf } from \"./naming-bM5qm5PY.mjs\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\nimport { dataTypeValuesEqual } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\n//#region src/ir/schema-node-kinds.ts\n/**\n* The `nodeKind` discriminant for each relational schema-diff leaf node.\n* Each node carries a unique value; the differ pairs siblings by `id`, and\n* these kinds distinguish the node types that appear as `PostgresTableSchemaNode`\n* children (columns, primary key, foreign keys, uniques, indexes, checks) from\n* each other and from the RLS policy/role kinds a target defines separately.\n*/\nconst RelationalSchemaNodeKind = {\n\tschema: \"sql-schema\",\n\ttable: \"sql-table\",\n\tcolumn: \"sql-column\",\n\tcolumnDefault: \"sql-column-default\",\n\tprimaryKey: \"sql-primary-key\",\n\tforeignKey: \"sql-foreign-key\",\n\tunique: \"sql-unique\",\n\tindex: \"sql-index\",\n\tcheck: \"sql-check-constraint\"\n};\n/**\n* The one real map from a relational `nodeKind` to the framework-neutral\n* {@link DiffSubjectGranularity} its diff issues carry — the SQL family's\n* post-diff filters (issue category, strict-mode gating) and the framework\n* aggregate's unclaimed-elements sweep key on the granularity, never on the\n* `nodeKind` spelling and never on anything stamped on the node. Resolution\n* is by `nodeKind` equality against this map, not a suffix string match.\n* Target-specific node kinds (Postgres namespace/table/policy/role) are\n* outside this family layer's vocabulary and map their own kinds directly.\n*/\nconst RELATIONAL_NODE_GRANULARITY = {\n\t[RelationalSchemaNodeKind.schema]: \"structural\",\n\t[RelationalSchemaNodeKind.table]: \"entity\",\n\t[RelationalSchemaNodeKind.column]: \"field\",\n\t[RelationalSchemaNodeKind.columnDefault]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.primaryKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.foreignKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.unique]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.index]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.check]: \"auxiliary\"\n};\nfunction isRelationalSchemaNodeKind(nodeKind) {\n\treturn Object.hasOwn(RELATIONAL_NODE_GRANULARITY, nodeKind);\n}\n/**\n* Looks up the subject granularity for a relational `nodeKind`. Throws for a\n* `nodeKind` outside this map (a target-specific kind, e.g. Postgres's\n* namespace/table/policy/role) — those map their own kinds directly rather\n* than through this family-level map.\n*/\nfunction relationalNodeGranularity(nodeKind) {\n\tif (!isRelationalSchemaNodeKind(nodeKind)) throw new InternalError(`relationalNodeGranularity: unrecognized relational node kind \"${nodeKind}\"`);\n\treturn RELATIONAL_NODE_GRANULARITY[nodeKind];\n}\n/**\n* The one real map from a relational `nodeKind` to its storage `entityKind`\n* — the same vocabulary the contract storage's `entries` dictionary keys use\n* (`elementCoordinates` walks it). Only the whole-table kind has an entity of\n* its own; every other relational node (a column, an index, …) is nested\n* under one and maps to nothing here.\n*/\nconst RELATIONAL_NODE_ENTITY_KIND = { [RelationalSchemaNodeKind.table]: \"table\" };\n/**\n* Looks up the storage `entityKind` for a relational `nodeKind` — sibling of\n* {@link relationalNodeGranularity}, resolved by `nodeKind` equality against\n* {@link RELATIONAL_NODE_ENTITY_KIND}. `undefined` for a target-specific kind\n* (targets map their own kinds directly) or a relational kind with no entity\n* of its own.\n*/\nfunction relationalNodeEntityKind(nodeKind) {\n\treturn isRelationalSchemaNodeKind(nodeKind) ? RELATIONAL_NODE_ENTITY_KIND[nodeKind] : void 0;\n}\n//#endregion\n//#region src/ir/sql-schema-ir-node.ts\n/**\n* SQL Schema IR node base. Carries the family-level\n* `kind = 'sql-schema-ir'` discriminator and inherits the framework's\n* `freezeNode` affordance.\n*\n* SQL Schema IR represents the actual database state as discovered by\n* introspection (the parallel to SQL Contract IR, which represents the\n* desired state).\n*\n* The discriminator is installed as a non-enumerable own property,\n* matching the SqlNode pattern. This keeps `JSON.stringify(node)`\n* canonical (no `kind` field), keeps `toEqual({...})` test assertions\n* against pre-lift flat shapes passing, and keeps `node.kind` readable\n* for dispatch.\n*\n* Both `kind` and `nodeKind` are required: every concrete leaf is a node\n* the generic differ can pair and compare, so every leaf must declare which\n* node it is. `nodeKind` has no default here — every direct subclass sets its\n* own literal value (the relational leaves via `RelationalSchemaNodeKind`,\n* target concretions via their own vocabulary, e.g. `PostgresSchemaNodeKind`).\n*/\nvar SqlSchemaIRNode = class extends IRNodeBase {\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql-schema-ir\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: false\n\t\t});\n\t}\n};\n/**\n* Asserts `node` matches `predicate`, narrowing its type to `T`. The one\n* shared implementation every node class's `static assert` and `isEqualTo`\n* reach for, instead of each hand-writing its own throw: the message names\n* the class the caller expected.\n*/\nfunction assertNode(node, className, predicate) {\n\tif (node === void 0 || !predicate(node)) throw new InternalError(`Expected a ${className} but got nodeKind=${node?.nodeKind ?? \"undefined\"}`);\n}\n/**\n* Defines a non-enumerable own property, the same treatment `kind` gets\n* above: a derivation-time render-support field stays out of\n* `JSON.stringify`, `toEqual({...})` structural assertions, and spreads,\n* while remaining directly readable (`node.field`) for the one consumer\n* that resolves it at plan time. A no-op when `value` is `undefined` — the\n* property is simply absent, matching every other optional field on these\n* nodes.\n*/\nfunction defineNonEnumerable(target, key, value) {\n\tif (value === void 0) return;\n\tObject.defineProperty(target, key, {\n\t\tvalue,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tconfigurable: false\n\t});\n}\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`\n* shape (same `columns` + optional `name`) so verification can compare\n* intent and actual structurally. Defined here independently to avoid\n* a sql-schema-ir -> sql-contract dependency.\n*\n* Implements `DiffableNode` so a primary key is directly a table's diff-tree\n* child. `id` is a fixed sentinel — a table has at most one primary key, so\n* there is never a sibling to disambiguate against. `isEqualTo` compares the\n* column tuple; the PK's own `name` is a database-assigned label with no\n* semantic weight, so it is not compared (mirrors the policy node's\n* name-insensitivity to non-identifying detail).\n*/\nvar PrimaryKey = class PrimaryKey extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.primaryKey;\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\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"primary-key\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.primaryKey;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"PrimaryKey\", PrimaryKey.is);\n\t\treturn this.columns.length === node.columns.length && this.columns.every((c, i) => c === node.columns[i]);\n\t}\n};\n//#endregion\n//#region src/ir/sql-check-constraint-ir.ts\n/**\n* Schema IR node for a table-level check constraint, carried as an opaque\n* predicate. The expression is never parsed — a database reprints predicates\n* in its own normalized form, so any structured reading of it would drift.\n*\n* Implements `DiffableNode` so a check is directly a table's diff-tree child;\n* `id` is `check:<name>`. `isEqualTo` is mode-selected by the receiver's\n* `prefix` (the differ always calls `expected.isEqualTo(actual)`): a\n* wire-named receiver compares ids only — the wire name's hash already\n* commits to the predicate — while an exact-named receiver byte-compares the\n* expression, which is reliable precisely when both sides came from the same\n* reprint.\n*/\nvar SqlCheckConstraintIR = class SqlCheckConstraintIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.check;\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = nameOf(input.naming);\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `check:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlCheckConstraintIR ? value : new SqlCheckConstraintIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.check;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlCheckConstraintIR\", SqlCheckConstraintIR.is);\n\t\tif (this.prefix !== void 0) return this.id === node.id;\n\t\treturn this.expression === node.expression;\n\t}\n};\n//#endregion\n//#region src/ir/sql-default-value.ts\nfunction isList(value) {\n\treturn Array.isArray(value);\n}\n/** Whether two defaults are one value: the same type, parameters and value, element by element for a list. */\nfunction sqlDefaultValuesEqual(a, b) {\n\tif (!isList(a) || !isList(b)) return !isList(a) && !isList(b) && dataTypeValuesEqual(a, b);\n\treturn a.length === b.length && a.every((element, index) => {\n\t\tconst other = b[index];\n\t\tif (element === null || other === null || other === void 0) return element === other;\n\t\treturn dataTypeValuesEqual(element, other);\n\t});\n}\n//#endregion\n//#region src/ir/sql-column-default-ir.ts\n/**\n* Schema-diff node for a column's default value. The default is the one\n* column attribute with an extra/missing/drift lifecycle of its own, so it\n* is a child node of the column rather than a compared attribute: an\n* undeclared live default surfaces as `not-expected`, a declared default the\n* database lacks as `not-found`, and a divergent value as `not-equal` — the\n* three reasons cover the legacy `extra_default` / `default_missing` /\n* `default_mismatch` vocabulary with no attribute inspection.\n*\n* `id` is a fixed sentinel — a column has at most one default. Built\n* transiently by `SqlColumnIR.children()` from the column's own fields;\n* never constructed by derivation or introspection directly.\n*/\nvar SqlColumnDefaultIR = class SqlColumnDefaultIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.columnDefault;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (input.resolved !== void 0) this.resolved = input.resolved;\n\t\tif (input.raw !== void 0) this.raw = input.raw;\n\t\tdefineNonEnumerable(this, \"authored\", input.authored);\n\t\tdefineNonEnumerable(this, \"value\", input.value);\n\t\tdefineNonEnumerable(this, \"unreadable\", input.unreadable);\n\t\tdefineNonEnumerable(this, \"expressionValue\", input.expressionValue);\n\t\tdefineNonEnumerable(this, \"many\", input.many);\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"sqlExpressionLiteralFor\", input.sqlExpressionLiteralFor);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"default\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.columnDefault;\n\t}\n\t/**\n\t* Compares with `this` as the expected side. Two literals compare as values of the column's type\n\t* when both sides hold one, and as canonical JSON otherwise; a `Date` the column's codec could not\n\t* read into a value equals nothing. Two expressions compare as text, with\n\t* case and whitespace ignored outside quotes. An expected expression that writes a literal, read by\n\t* the column's codec during introspection, matches a reported literal when the two values are\n\t* equal; when the codec could not read one of them, it compares with the reported text. A resolved\n\t* side against a raw-only side is a mismatch; two raw-only nodes compare their text.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnDefaultIR\", SqlColumnDefaultIR.is);\n\t\tconst expected = this.resolved;\n\t\tconst actual = node.resolved;\n\t\tif (expected?.kind === \"function\" && actual === void 0) return node.raw !== void 0 && sameExpression(expected.expression, node.raw);\n\t\tif (expected === void 0 || actual === void 0) return expected === actual && this.raw === node.raw;\n\t\tif (expected.kind === \"function\") {\n\t\t\tif (actual.kind === \"function\") return sameExpression(expected.expression, actual.expression);\n\t\t\tif (node.value !== void 0 && node.expressionValue !== void 0) return sqlDefaultValuesEqual(node.expressionValue, node.value);\n\t\t\treturn node.raw !== void 0 && sameExpression(expected.expression, node.raw);\n\t\t}\n\t\tif (actual.kind !== \"literal\") return false;\n\t\tif (this.value !== void 0 && node.value !== void 0) return sqlDefaultValuesEqual(this.value, node.value);\n\t\tif (expected.value instanceof Date || actual.value instanceof Date) return false;\n\t\treturn canonicalStringify(expected.value) === canonicalStringify(actual.value);\n\t}\n\t/**\n\t* For two default expressions, the text the database reads back, since it may store an expression\n\t* in a form of its own. Otherwise why the column's codec could not read the database's default, or\n\t* the value each side holds.\n\t*/\n\texplainMismatch(actual) {\n\t\tif (!(actual instanceof SqlColumnDefaultIR)) return void 0;\n\t\tif (actual.unreadable !== void 0) return {\n\t\t\ttext: actual.unreadable,\n\t\t\tcause: \"differs\"\n\t\t};\n\t\treturn this.storedExpressionForm(actual) ?? {\n\t\t\ttext: `The contract holds ${describeDefault(this)}, and the database holds ${describeDefault(actual)}.`,\n\t\t\tcause: \"differs\"\n\t\t};\n\t}\n\tstoredExpressionForm(actual) {\n\t\tif (this.resolved?.kind !== \"function\" || actual.resolved?.kind !== \"function\") return void 0;\n\t\tconst literalFor = this.sqlExpressionLiteralFor;\n\t\tconst shown = (text) => literalFor?.(text) ?? JSON.stringify(text);\n\t\tconst stored = actual.raw ?? actual.resolved.expression;\n\t\tconst written = literalFor === void 0 ? stored : [stored, actual.resolved.expression].find((text) => literalFor(text) !== void 0);\n\t\tconst advice = written === void 0 ? \"No `sql` literal writes that text unchanged, so change the default's SQL in the contract until the database stores it as written.\" : `If they do, write the default as ${shown(written)}.`;\n\t\treturn {\n\t\t\ttext: `The database reads this default back as ${shown(written ?? stored)}; the contract declares ${shown(this.resolved.expression)}. The database may store a default expression in its own form, so the two can mean the same. ${advice}`,\n\t\t\tcause: \"possibly-equivalent\"\n\t\t};\n\t}\n};\n/** A default as a person reads it: a literal as JSON, the value its type read when there is one, an expression as its text, and the text the database reports beside a value read from it. */\nfunction describeDefault(node) {\n\tconst resolved = node.resolved;\n\tif (resolved === void 0) return node.raw ?? \"no default\";\n\tif (resolved.kind === \"function\") return resolved.expression;\n\tconst shown = JSON.stringify(node.value === void 0 ? resolved.value : jsonOfDefaultValue(node.value));\n\treturn node.raw === void 0 || node.raw === shown ? shown : `${shown} (${node.raw})`;\n}\nfunction isDefaultList(value) {\n\treturn Array.isArray(value);\n}\nfunction jsonOfDefaultValue(value) {\n\treturn isDefaultList(value) ? value.map((element) => element === null ? null : element.value) : value.value;\n}\nfunction sameExpression(a, b) {\n\treturn comparableExpression(a) === comparableExpression(b);\n}\n/** The expression with case and whitespace dropped outside quotes; a quoted literal or identifier keeps both, since they change what it means. */\nfunction comparableExpression(expression) {\n\tlet result = \"\";\n\tlet quote;\n\tfor (const char of expression) if (quote !== void 0) {\n\t\tresult += char;\n\t\tif (char === quote) quote = void 0;\n\t} else if (char === \"'\" || char === \"\\\"\") {\n\t\tquote = char;\n\t\tresult += char;\n\t} else if (!/\\s/.test(char)) result += char.toLowerCase();\n\treturn result;\n}\n//#endregion\n//#region src/ir/sql-column-ir.ts\n/**\n* Schema IR node for a single column on a table, as observed by\n* introspection. Unlike the Contract IR `StorageColumn`, this carries\n* the column's `name` (Schema IR columns are returned as arrays from\n* introspection queries; the parent table re-keys them into a record\n* for downstream consumers).\n*\n* Implements `DiffableNode` so a column is directly a table's diff-tree\n* child: `id` is the column name (unique among a table's columns); `isEqualTo`\n* compares this column's own attributes only, never its default, which is a\n* child node: the type by {@link sqlColumnTypesEqual}, and nullability.\n*/\nvar SqlColumnIR = class SqlColumnIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.column;\n\tname;\n\t/** See {@link SqlColumnIRInput.typeText}. */\n\ttypeText;\n\tnullable;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.typeText = input.typeText;\n\t\tthis.nullable = input.nullable;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.many !== void 0) this.many = input.many;\n\t\tif (input.resolvedDefault !== void 0) this.resolvedDefault = input.resolvedDefault;\n\t\tdefineNonEnumerable(this, \"authoredDefault\", input.authoredDefault);\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"storedType\", input.storedType);\n\t\tdefineNonEnumerable(this, \"storedTypeParams\", input.storedTypeParams);\n\t\tdefineNonEnumerable(this, \"defaultValue\", input.defaultValue);\n\t\tdefineNonEnumerable(this, \"defaultUnreadable\", input.defaultUnreadable);\n\t\tdefineNonEnumerable(this, \"defaultExpressionValue\", input.defaultExpressionValue);\n\t\tdefineNonEnumerable(this, \"sqlExpressionLiteralFor\", input.sqlExpressionLiteralFor);\n\t\tdefineNonEnumerable(this, \"reportedType\", input.reportedType);\n\t\tdefineNonEnumerable(this, \"catalogText\", input.catalogText);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `column:${this.name}`;\n\t}\n\t/**\n\t* The column's default, when declared/present, is the column's one child\n\t* node — it has an extra/missing/drift lifecycle of its own, so the differ\n\t* recurses to it rather than `isEqualTo` comparing it. Built transiently\n\t* from this column's own fields.\n\t*/\n\tchildren() {\n\t\tif (this.resolvedDefault === void 0 && this.default === void 0) return [];\n\t\treturn [new SqlColumnDefaultIR({\n\t\t\t...ifDefined(\"resolved\", this.resolvedDefault),\n\t\t\t...ifDefined(\"raw\", this.default),\n\t\t\t...ifDefined(\"authored\", this.authoredDefault),\n\t\t\t...ifDefined(\"value\", this.defaultValue),\n\t\t\t...ifDefined(\"unreadable\", this.defaultUnreadable),\n\t\t\t...ifDefined(\"expressionValue\", this.defaultExpressionValue),\n\t\t\t...ifDefined(\"many\", this.many ?? this.codecRef?.many),\n\t\t\t...ifDefined(\"codecRef\", this.codecRef),\n\t\t\t...ifDefined(\"sqlExpressionLiteralFor\", this.sqlExpressionLiteralFor)\n\t\t})];\n\t}\n\t/** This column under another name, with every other field as it is. */\n\twithName(name) {\n\t\tconst fields = Object.fromEntries(Object.getOwnPropertyNames(this).map((key) => [key, Reflect.get(this, key)]));\n\t\treturn new SqlColumnIR({\n\t\t\t...blindCast(fields),\n\t\t\tname\n\t\t});\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.column;\n\t}\n\t/**\n\t* Compares the column's own attributes only — the default lives on the child node: the type, by {@link sqlColumnTypesEqual}, and nullability.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnIR\", SqlColumnIR.is);\n\t\treturn sqlColumnTypesEqual(this, node) && this.nullable === node.nullable;\n\t}\n\t/** Why `actual` is not this column: the two types as written and reported, or the nullability of each. The two sides always hold different values. */\n\texplainMismatch(actual) {\n\t\tif (actual === void 0) return void 0;\n\t\tconst node = blindCast(actual);\n\t\tassertNode(node, \"SqlColumnIR\", SqlColumnIR.is);\n\t\tconst texts = catalogTexts(this, node);\n\t\tif (texts !== void 0 && texts.expected !== texts.actual) return differs(`The column type is \"${texts.expected}\", but the database reports \"${texts.actual}\". A type named by its catalog text is compared with the text the database reports, exactly.`);\n\t\tif (node.storedType === void 0 && node.reportedType !== void 0) return differs(node.typeText === \"\" ? \"The database column has no declared type.\" : `The database column is ${shownTypeOf(node)}, which no data type in the configured stack declares.`);\n\t\tif (!sqlColumnTypesEqual(this, node)) return differs(`The contract column is ${shownTypeOf(this)} and the database column is ${shownTypeOf(node)}.`);\n\t\tif (this.nullable !== node.nullable) return differs(`The contract column is ${nullability(this)} and the database column is ${nullability(node)}.`);\n\t}\n};\n/**\n* Whether two columns have the same type: both have a stored type, the two are one data type, their parameters are equal as canonical JSON, and both or neither are lists. A column no data type claims has no stored type and never has the same type as another. ADR 254.\n*\n* When either column carries a {@link SqlColumnIR.catalogText}, the two compare by text instead, exactly, with `[]` for a list: that text against the other column's catalog text or reported text. ADR 273.\n*/\nfunction sqlColumnTypesEqual(a, b) {\n\tconst texts = catalogTexts(a, b);\n\tif (texts !== void 0) return texts.expected === texts.actual;\n\treturn a.storedType !== void 0 && b.storedType !== void 0 && a.storedType.id === b.storedType.id && canonicalizeJson(a.storedTypeParams ?? {}) === canonicalizeJson(b.storedTypeParams ?? {}) && Boolean(a.many) === Boolean(b.many);\n}\n/** The text a column's type compares by, with `[]` for a list, when it has one: its catalog text, or the text the database reports. */\nfunction comparedText(column) {\n\tconst text = column.catalogText ?? column.reportedType?.text;\n\treturn text === void 0 ? void 0 : `${text}${column.many === true ? \"[]\" : \"\"}`;\n}\n/** The two texts a pair of columns compares by, when either carries a catalog text. A side with no text to compare gives the empty text, which no catalog text equals. */\nfunction catalogTexts(expected, actual) {\n\tif (expected.catalogText === void 0 && actual.catalogText === void 0) return void 0;\n\treturn {\n\t\texpected: comparedText(expected) ?? \"\",\n\t\tactual: comparedText(actual) ?? \"\"\n\t};\n}\n/** The column's type as the contract writes it, or as introspection gives it, with `[]` for a list, in double quotes unless the text has double quotes of its own, as `\"char\"` does. */\nfunction shownTypeOf(column) {\n\tconst text = `${column.typeText}${column.many === true ? \"[]\" : \"\"}`;\n\treturn text.includes(\"\\\"\") ? text : `\"${text}\"`;\n}\nfunction differs(text) {\n\treturn {\n\t\ttext,\n\t\tcause: \"differs\"\n\t};\n}\nfunction nullability(column) {\n\treturn column.nullable ? \"nullable\" : \"not nullable\";\n}\n//#endregion\n//#region src/ir/sql-foreign-key-ir.ts\n/**\n* Schema IR node for a foreign-key constraint as observed by\n* introspection. The `referencedTable` / `referencedColumns` field\n* names match the introspection vocabulary (`pg_constraint.confkey`,\n* etc.) and intentionally differ from the Contract IR's nested\n* `references: { table, columns }` shape so that the verifier's\n* structural comparison stays explicit about which side it's reading.\n*\n* Implements `DiffableNode` so a foreign key is directly a table's diff-tree\n* child. Foreign keys are frequently unnamed (introspection may not carry a\n* constraint name, and the contract side never invents one), so `id` is\n* derived from the referencing/referenced coordinates rather than `name` —\n* the same tuple that makes two FK constraints the same constraint. This\n* also serves as the comparison key: two FKs with the same coordinates are\n* paired by the differ, and `isEqualTo` then compares the remaining\n* attribute — the referential actions.\n*/\nvar SqlForeignKeyIR = class SqlForeignKeyIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.foreignKey;\n\tcolumns;\n\treferencedTable;\n\treferencedColumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tthis.referencedTable = input.referencedTable;\n\t\tthis.referencedColumns = input.referencedColumns;\n\t\tif (input.referencedSchema !== void 0) this.referencedSchema = input.referencedSchema;\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\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tconst resolvedReferencedNamespace = input.resolvedReferencedNamespace ?? input.referencedSchema;\n\t\tif (resolvedReferencedNamespace !== void 0) this.resolvedReferencedNamespace = resolvedReferencedNamespace;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\tconst referencedNamespace = this.resolvedReferencedNamespace ?? \"\";\n\t\treturn `foreign-key:${this.columns.join(\",\")}->${referencedNamespace}.${this.referencedTable}(${this.referencedColumns.join(\",\")})`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.foreignKey;\n\t}\n\t/**\n\t* Referential-action comparison with `this` as the expected side, matching\n\t* the relational walk's `getReferentialActionMismatches`: `noAction` is the\n\t* database default and equivalent to an undeclared action, and drift is\n\t* flagged only when the expected side declares a (normalized) action.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlForeignKeyIR\", SqlForeignKeyIR.is);\n\t\treturn referentialActionMatches(this.onDelete, node.onDelete) && referentialActionMatches(this.onUpdate, node.onUpdate);\n\t}\n};\nfunction referentialActionMatches(expected, actual) {\n\tconst normalizedExpected = expected === \"noAction\" ? void 0 : expected;\n\tif (normalizedExpected === void 0) return true;\n\treturn normalizedExpected === (actual === \"noAction\" ? void 0 : actual);\n}\n//#endregion\n//#region src/ir/sql-index-ir.ts\n/**\n* Schema IR node for a secondary index as observed by introspection.\n* Unlike the Contract IR `Index`, the Schema IR carries an explicit\n* `unique` field — introspection sees the underlying index regardless\n* of whether the user expressed it as `@@index` or `@@unique`, and the\n* verifier needs to distinguish them when comparing to the Contract.\n*\n* Implements `DiffableNode` so an index is directly a table's diff-tree\n* child. Indexes are name-identified: every index — contract-derived or\n* introspected — carries its full physical name, and `id` is that name.\n* Names are catalog-unique per schema, so two indexes legitimately sharing\n* one column tuple (a unique index beside a redundant plain index) are two\n* distinct siblings, and expression indexes need no column tuple at all.\n*\n* `isEqualTo` is selected by the receiver (the differ always calls\n* `expected.isEqualTo(actual)`) and delegates to {@link contentEquals} —\n* the single node-owned content relation: both modes compare `unique`\n* strict, `type` and option values through the named normalization seams,\n* and `columns` ordered-strict when both sides carry them; an exact-named\n* receiver (`prefix === undefined`) additionally byte-compares\n* `expression`/`where` (both sides are reprints in the supported flow —\n* normalizing would only mask real drift); a wire-named receiver never\n* compares bodies (the wire-name hash already commits to them).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL that any SQL target may\n* introspect, so the family node must represent them; a target declining\n* to author them is a capability decision, not target-specificity.\n*/\nvar SqlIndexIR = class SqlIndexIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.index;\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new InternalError(`SqlIndexIR \"${name}\": exactly one of columns or expression must be set.`);\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\tconst normalizedType = normalizeIndexType(input.type);\n\t\tif (normalizedType !== void 0) this.type = normalizedType;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tdefineNonEnumerable(this, \"partial\", input.partial);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `index:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlIndexIR ? value : new SqlIndexIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.index;\n\t}\n\t/**\n\t* Mode-selected structural equality — see the class doc. Delegates to the\n\t* single node-owned relation: `columns` compare ordered-strict when both\n\t* sides carry them; an exact receiver (`prefix === undefined`)\n\t* byte-compares `expression ?? ''` and `where ?? ''`; a wire-named receiver\n\t* never compares bodies (the wire-name hash already commits to them).\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlIndexIR\", SqlIndexIR.is);\n\t\treturn this.contentEquals(node, {\n\t\t\tcolumnPresence: \"when-both-defined\",\n\t\t\tbodies: this.prefix !== void 0 ? \"ignored\" : \"verbatim\"\n\t\t});\n\t}\n\t/**\n\t* The single index content-equality relation — every comparer (the differ\n\t* via {@link isEqualTo}, the planner's rename content-pairing) calls this\n\t* with its mode-appropriate strictness rather than growing a parallel\n\t* relation:\n\t*\n\t* - `columnPresence: 'when-both-defined'` (the differ's rule) compares\n\t* the tuples ordered-strict only when both sides carry them — a paired\n\t* node's identity already agreed, so a column node meeting an\n\t* expression node skips the tuple.\n\t* - `columnPresence: 'matching'` (the rename-pairing rule) additionally\n\t* requires presence to agree: a column index never pairs an expression\n\t* index.\n\t* - `bodies: 'verbatim'` byte-compares `expression ?? ''` / `where ?? ''`\n\t* (absent ≡ empty, no normalization — both sides are reprints in the\n\t* supported flow); `bodies: 'ignored'` skips them (wire identity —\n\t* the wire-name hash commits to the content).\n\t*\n\t* `unique` compares strictly; `type` and option VALUES compare through\n\t* the named normalization seams below.\n\t*/\n\tcontentEquals(other, strictness) {\n\t\tconst columnsEqual = strictness.columnPresence === \"matching\" ? this.columns === void 0 === (other.columns === void 0) && (this.columns === void 0 || isArrayEqual(this.columns, other.columns ?? [])) : this.columns === void 0 || other.columns === void 0 || isArrayEqual(this.columns, other.columns);\n\t\tif (!(this.unique === other.unique && normalizeIndexType(this.type) === normalizeIndexType(other.type) && indexOptionsEqual(this.options, other.options) && columnsEqual)) return false;\n\t\tif (strictness.bodies === \"ignored\") return true;\n\t\treturn (this.expression ?? \"\") === (other.expression ?? \"\") && (this.where ?? \"\") === (other.where ?? \"\");\n\t}\n};\n/**\n* The btree-default normalization seam: the default access method (`btree`\n* in every supported SQL target) normalizes to absent. Applied at\n* construction — every derivation path (contract tree, introspection, flat\n* family tree) builds through the class, so both compare sides are\n* symmetric by definition — and again inside\n* {@link SqlIndexIR.contentEquals} so the relation holds for any input.\n* The contract JSON and the wire-name content hash keep the authored\n* spelling: `@@index([a], type: \"btree\")` and `@@index([a])` are distinct\n* wire names — but content-equal after normalization, so a spelling change\n* between them converges as a rename via the planner's content\n* pairing (the hashes differ, so hash pairing never pairs them).\n*/\nfunction normalizeIndexType(type) {\n\treturn type === \"btree\" ? void 0 : type;\n}\n/**\n* Option-bag equality: same key set, values compared through\n* {@link normalizeIndexOptionValue} — Postgres introspection returns\n* reloptions values as catalog-reprint strings (`'70'`, `'on'`) while\n* contract option leaves are typed (number, boolean, string).\n*/\nfunction indexOptionsEqual(a, b) {\n\tconst aKeys = a ? Object.keys(a).sort() : [];\n\tconst bKeys = b ? Object.keys(b).sort() : [];\n\tif (aKeys.length !== bKeys.length) return false;\n\tfor (let i = 0; i < aKeys.length; i += 1) if (aKeys[i] !== bKeys[i]) return false;\n\tif (aKeys.length === 0) return true;\n\tfor (const key of aKeys) if (normalizeIndexOptionValue(a?.[key]) !== normalizeIndexOptionValue(b?.[key])) return false;\n\treturn true;\n}\n//#endregion\n//#region src/ir/sql-unique-ir.ts\n/**\n* Schema IR node for a table-level unique constraint as observed by\n* introspection.\n*\n* Implements `DiffableNode` so a unique constraint is directly a table's\n* diff-tree child. Unique constraints are frequently unnamed, so `id` is\n* derived from the column tuple rather than `name` — the column tuple is\n* also what makes two unique constraints the same constraint, so it doubles\n* as the pairing key. There are no further attributes to compare once\n* columns are equal (the differ pairs on `id`), so `isEqualTo` is identity.\n*/\nvar SqlUniqueIR = class SqlUniqueIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.unique;\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\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `unique:${this.columns.join(\",\")}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.unique;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlUniqueIR\", SqlUniqueIR.is);\n\t\treturn this.id === node.id;\n\t}\n};\n//#endregion\n//#region src/ir/sql-table-ir.ts\n/**\n* Schema IR node for a single table as observed by introspection.\n*\n* Unlike the Contract IR `StorageTable`, this carries the table's\n* `name` — introspection queries return tables as arrays and the\n* verifier keys them into `SqlSchemaIR.tables` afterwards, so the name\n* stays on the table object for downstream call sites that walk\n* `Object.values(schema.tables)`.\n*\n* The constructor normalises nested IR-class fields so downstream\n* walks see a uniform AST regardless of whether the input was a\n* plain-data literal (from introspection) or already-constructed\n* class instances.\n*\n* Implements `DiffableNode` so a flat (single-schema) tree is directly\n* diffable: `id` is the table name; `isEqualTo` is identity (the table's\n* structural drift is entirely expressed by its children); `children()`\n* yields every column, the primary key (when present), every foreign key,\n* unique, index, and check constraint — the same composition and order as\n* the Postgres table node, minus policies.\n*/\nvar SqlTableIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.table;\n\tname;\n\tcolumns;\n\tforeignKeys;\n\tuniques;\n\tindexes;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([key, col]) => [key, col instanceof SqlColumnIR ? col : new SqlColumnIR(col)])));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk)));\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map(SqlIndexIR.from));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(SqlCheckConstraintIR.from));\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [\n\t\t\t...Object.values(this.columns),\n\t\t\t...this.primaryKey ? [this.primaryKey] : [],\n\t\t\t...this.foreignKeys,\n\t\t\t...this.uniques,\n\t\t\t...this.indexes,\n\t\t\t...this.checks ?? []\n\t\t];\n\t}\n};\n//#endregion\n//#region src/ir/sql-schema-ir.ts\n/**\n* Root Schema IR node representing the complete database schema as\n* observed by introspection. Target-agnostic; used by both verifiers\n* (compare against intended Contract storage) and migration planners\n* (derive operations needed to reconcile).\n*\n* The constructor normalises nested `SqlTableIR` instances so\n* downstream walks see a uniform AST regardless of whether the input\n* was a plain-data literal or already-constructed class instances.\n*\n* Implements `DiffableNode` as the root of a flat (single-schema) diff\n* tree: `id` is the fixed sentinel `'database'` (roots have no siblings),\n* `isEqualTo` is identity (a container has no own attributes), and\n* `children()` yields the table nodes.\n*/\nvar SqlSchemaIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.schema;\n\ttables;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.tables = Object.freeze(Object.fromEntries(Object.entries(input.tables).map(([key, t]) => [key, t instanceof SqlTableIR ? t : new SqlTableIR(t)])));\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"database\";\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn Object.values(this.tables);\n\t}\n};\n//#endregion\nexport { relationalNodeGranularity as _, SqlForeignKeyIR as a, SqlColumnDefaultIR as c, PrimaryKey as d, SqlSchemaIRNode as f, relationalNodeEntityKind as g, RelationalSchemaNodeKind as h, SqlIndexIR as i, sqlDefaultValuesEqual as l, defineNonEnumerable as m, SqlTableIR as n, SqlColumnIR as o, assertNode as p, SqlUniqueIR as r, sqlColumnTypesEqual as s, SqlSchemaIR as t, SqlCheckConstraintIR as u };\n\n//# sourceMappingURL=types-DoyiTsjg.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,2BAA2B;CAChC,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,OAAO;CACP,OAAO;AACR;;;;;;;;;;;AAWA,MAAM,8BAA8B;EAClC,yBAAyB,SAAS;EAClC,yBAAyB,QAAQ;EACjC,yBAAyB,SAAS;EAClC,yBAAyB,gBAAgB;EACzC,yBAAyB,aAAa;EACtC,yBAAyB,aAAa;EACtC,yBAAyB,SAA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M;CAC1B;CACA,WAAW;EACV,OAAO;GACN,GAAG,OAAO,OAAO,KAAK,OAAO;GAC7B,GAAG,KAAK,aAAa,CAAC,KAAK,UAAU,IAAI,CAAC;GAC1C,GAAG,KAAK;GACR,GAAG,KAAK;GACR,GAAG,KAAK;GACR,GAAG,KAAK,UAAU,CAAC;EACpB;CACD;AACD;;;;;;;;;;;;;;;;AAkBA,IAAI,cAAc,cAAc,gBAAgB;CAC/C,WAAW,yBAAyB;CACpC;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,SAAS,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,KAAK,aAAa,aAAa,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;EACtJ,IAAI,MAAM,gBAAgB,KAAK,GAAG,KAAK,cAAc,MAAM;EAC3D,WAAW,IAAI;CAChB;CACA,IAAI,KAAK;EACR,OAAO;CACR;CACA,UAAU,OAAO;EAChB,OAAO,KAAK,OAAO,MAAM;CAC1B;CACA,WAAW;EACV,OAAO,OAAO,OAAO,KAAK,MAAM;CACjC;AACD"}
|
|
1
|
+
{"version":3,"file":"types-1ZKE0deC-Dou4ugcz.mjs","names":[],"sources":["../../../../2-sql-family/1-core/schema-ir/dist/types-1ZKE0deC.mjs"],"sourcesContent":["import { p as normalizeIndexOptionValue, u as nameOf } from \"./naming-DEpT6Zad.mjs\";\nimport { IRNodeBase, freezeNode } from \"@internal/framework-components/ir\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\nimport { dataTypeValuesEqual } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\n//#region src/ir/schema-node-kinds.ts\n/**\n* The `nodeKind` discriminant for each relational schema-diff leaf node.\n* Each node carries a unique value; the differ pairs siblings by `id`, and\n* these kinds distinguish the node types that appear as `PostgresTableSchemaNode`\n* children (columns, primary key, foreign keys, uniques, indexes, checks) from\n* each other and from the RLS policy/role kinds a target defines separately.\n*/\nconst RelationalSchemaNodeKind = {\n\tschema: \"sql-schema\",\n\ttable: \"sql-table\",\n\tcolumn: \"sql-column\",\n\tcolumnDefault: \"sql-column-default\",\n\tprimaryKey: \"sql-primary-key\",\n\tforeignKey: \"sql-foreign-key\",\n\tunique: \"sql-unique\",\n\tindex: \"sql-index\",\n\tcheck: \"sql-check-constraint\"\n};\n/**\n* The one real map from a relational `nodeKind` to the framework-neutral\n* {@link DiffSubjectGranularity} its diff issues carry — the SQL family's\n* post-diff filters (issue category, strict-mode gating) and the framework\n* aggregate's unclaimed-elements sweep key on the granularity, never on the\n* `nodeKind` spelling and never on anything stamped on the node. Resolution\n* is by `nodeKind` equality against this map, not a suffix string match.\n* Target-specific node kinds (Postgres namespace/table/policy/role) are\n* outside this family layer's vocabulary and map their own kinds directly.\n*/\nconst RELATIONAL_NODE_GRANULARITY = {\n\t[RelationalSchemaNodeKind.schema]: \"structural\",\n\t[RelationalSchemaNodeKind.table]: \"entity\",\n\t[RelationalSchemaNodeKind.column]: \"field\",\n\t[RelationalSchemaNodeKind.columnDefault]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.primaryKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.foreignKey]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.unique]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.index]: \"auxiliary\",\n\t[RelationalSchemaNodeKind.check]: \"auxiliary\"\n};\nfunction isRelationalSchemaNodeKind(nodeKind) {\n\treturn Object.hasOwn(RELATIONAL_NODE_GRANULARITY, nodeKind);\n}\n/**\n* Looks up the subject granularity for a relational `nodeKind`. Throws for a\n* `nodeKind` outside this map (a target-specific kind, e.g. Postgres's\n* namespace/table/policy/role) — those map their own kinds directly rather\n* than through this family-level map.\n*/\nfunction relationalNodeGranularity(nodeKind) {\n\tif (!isRelationalSchemaNodeKind(nodeKind)) throw new InternalError(`relationalNodeGranularity: unrecognized relational node kind \"${nodeKind}\"`);\n\treturn RELATIONAL_NODE_GRANULARITY[nodeKind];\n}\n/**\n* The one real map from a relational `nodeKind` to its storage `entityKind`\n* — the same vocabulary the contract storage's `entries` dictionary keys use\n* (`elementCoordinates` walks it). Only the whole-table kind has an entity of\n* its own; every other relational node (a column, an index, …) is nested\n* under one and maps to nothing here.\n*/\nconst RELATIONAL_NODE_ENTITY_KIND = { [RelationalSchemaNodeKind.table]: \"table\" };\n/**\n* Looks up the storage `entityKind` for a relational `nodeKind` — sibling of\n* {@link relationalNodeGranularity}, resolved by `nodeKind` equality against\n* {@link RELATIONAL_NODE_ENTITY_KIND}. `undefined` for a target-specific kind\n* (targets map their own kinds directly) or a relational kind with no entity\n* of its own.\n*/\nfunction relationalNodeEntityKind(nodeKind) {\n\treturn isRelationalSchemaNodeKind(nodeKind) ? RELATIONAL_NODE_ENTITY_KIND[nodeKind] : void 0;\n}\n//#endregion\n//#region src/ir/sql-schema-ir-node.ts\n/**\n* SQL Schema IR node base. Carries the family-level\n* `kind = 'sql-schema-ir'` discriminator and inherits the framework's\n* `freezeNode` affordance.\n*\n* SQL Schema IR represents the actual database state as discovered by\n* introspection (the parallel to SQL Contract IR, which represents the\n* desired state).\n*\n* The discriminator is installed as a non-enumerable own property,\n* matching the SqlNode pattern. This keeps `JSON.stringify(node)`\n* canonical (no `kind` field), keeps `toEqual({...})` test assertions\n* against pre-lift flat shapes passing, and keeps `node.kind` readable\n* for dispatch.\n*\n* Both `kind` and `nodeKind` are required: every concrete leaf is a node\n* the generic differ can pair and compare, so every leaf must declare which\n* node it is. `nodeKind` has no default here — every direct subclass sets its\n* own literal value (the relational leaves via `RelationalSchemaNodeKind`,\n* target concretions via their own vocabulary, e.g. `PostgresSchemaNodeKind`).\n*/\nvar SqlSchemaIRNode = class extends IRNodeBase {\n\tconstructor() {\n\t\tsuper();\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"sql-schema-ir\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: false\n\t\t});\n\t}\n};\n/**\n* Asserts `node` matches `predicate`, narrowing its type to `T`. The one\n* shared implementation every node class's `static assert` and `isEqualTo`\n* reach for, instead of each hand-writing its own throw: the message names\n* the class the caller expected.\n*/\nfunction assertNode(node, className, predicate) {\n\tif (node === void 0 || !predicate(node)) throw new InternalError(`Expected a ${className} but got nodeKind=${node?.nodeKind ?? \"undefined\"}`);\n}\n/**\n* Defines a non-enumerable own property, the same treatment `kind` gets\n* above: a derivation-time render-support field stays out of\n* `JSON.stringify`, `toEqual({...})` structural assertions, and spreads,\n* while remaining directly readable (`node.field`) for the one consumer\n* that resolves it at plan time. A no-op when `value` is `undefined` — the\n* property is simply absent, matching every other optional field on these\n* nodes.\n*/\nfunction defineNonEnumerable(target, key, value) {\n\tif (value === void 0) return;\n\tObject.defineProperty(target, key, {\n\t\tvalue,\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tconfigurable: false\n\t});\n}\n//#endregion\n//#region src/ir/primary-key.ts\n/**\n* Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`\n* shape (same `columns` + optional `name`) so verification can compare\n* intent and actual structurally. Defined here independently to avoid\n* a sql-schema-ir -> sql-contract dependency.\n*\n* Implements `DiffableNode` so a primary key is directly a table's diff-tree\n* child. `id` is a fixed sentinel — a table has at most one primary key, so\n* there is never a sibling to disambiguate against. `isEqualTo` compares the\n* column tuple; the PK's own `name` is a database-assigned label with no\n* semantic weight, so it is not compared (mirrors the policy node's\n* name-insensitivity to non-identifying detail).\n*/\nvar PrimaryKey = class PrimaryKey extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.primaryKey;\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\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"primary-key\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof PrimaryKey ? value : new PrimaryKey(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.primaryKey;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"PrimaryKey\", PrimaryKey.is);\n\t\treturn this.columns.length === node.columns.length && this.columns.every((c, i) => c === node.columns[i]);\n\t}\n};\n//#endregion\n//#region src/ir/sql-check-constraint-ir.ts\n/**\n* Schema IR node for a table-level check constraint, carried as an opaque\n* predicate. The expression is never parsed — a database reprints predicates\n* in its own normalized form, so any structured reading of it would drift.\n*\n* Implements `DiffableNode` so a check is directly a table's diff-tree child;\n* `id` is `check:<name>`. `isEqualTo` is mode-selected by the receiver's\n* `prefix` (the differ always calls `expected.isEqualTo(actual)`): a\n* wire-named receiver compares ids only — the wire name's hash already\n* commits to the predicate — while an exact-named receiver byte-compares the\n* expression, which is reliable precisely when both sides came from the same\n* reprint.\n*/\nvar SqlCheckConstraintIR = class SqlCheckConstraintIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.check;\n\tname;\n\texpression;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = nameOf(input.naming);\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.expression = input.expression;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `check:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlCheckConstraintIR ? value : new SqlCheckConstraintIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.check;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlCheckConstraintIR\", SqlCheckConstraintIR.is);\n\t\tif (this.prefix !== void 0) return this.id === node.id;\n\t\treturn this.expression === node.expression;\n\t}\n};\n//#endregion\n//#region src/ir/sql-default-value.ts\nfunction isList(value) {\n\treturn Array.isArray(value);\n}\n/** Whether two defaults are one value: the same type, parameters and value, element by element for a list. */\nfunction sqlDefaultValuesEqual(a, b) {\n\tif (!isList(a) || !isList(b)) return !isList(a) && !isList(b) && dataTypeValuesEqual(a, b);\n\treturn a.length === b.length && a.every((element, index) => {\n\t\tconst other = b[index];\n\t\tif (element === null || other === null || other === void 0) return element === other;\n\t\treturn dataTypeValuesEqual(element, other);\n\t});\n}\n//#endregion\n//#region src/ir/sql-column-default-ir.ts\n/**\n* Schema-diff node for a column's default value. The default is the one\n* column attribute with an extra/missing/drift lifecycle of its own, so it\n* is a child node of the column rather than a compared attribute: an\n* undeclared live default surfaces as `not-expected`, a declared default the\n* database lacks as `not-found`, and a divergent value as `not-equal` — the\n* three reasons cover the legacy `extra_default` / `default_missing` /\n* `default_mismatch` vocabulary with no attribute inspection.\n*\n* `id` is a fixed sentinel — a column has at most one default. Built\n* transiently by `SqlColumnIR.children()` from the column's own fields;\n* never constructed by derivation or introspection directly.\n*/\nvar SqlColumnDefaultIR = class SqlColumnDefaultIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.columnDefault;\n\tconstructor(input) {\n\t\tsuper();\n\t\tif (input.resolved !== void 0) this.resolved = input.resolved;\n\t\tif (input.raw !== void 0) this.raw = input.raw;\n\t\tdefineNonEnumerable(this, \"authored\", input.authored);\n\t\tdefineNonEnumerable(this, \"value\", input.value);\n\t\tdefineNonEnumerable(this, \"unreadable\", input.unreadable);\n\t\tdefineNonEnumerable(this, \"expressionValue\", input.expressionValue);\n\t\tdefineNonEnumerable(this, \"many\", input.many);\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"sqlExpressionLiteralFor\", input.sqlExpressionLiteralFor);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"default\";\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.columnDefault;\n\t}\n\t/**\n\t* Compares with `this` as the expected side. Two literals compare as values of the column's type\n\t* when both sides hold one, and as canonical JSON otherwise; a `Date` the column's codec could not\n\t* read into a value equals nothing. Two expressions compare as text, with\n\t* case and whitespace ignored outside quotes. An expected expression that writes a literal, read by\n\t* the column's codec during introspection, matches a reported literal when the two values are\n\t* equal; when the codec could not read one of them, it compares with the reported text. A resolved\n\t* side against a raw-only side is a mismatch; two raw-only nodes compare their text.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnDefaultIR\", SqlColumnDefaultIR.is);\n\t\tconst expected = this.resolved;\n\t\tconst actual = node.resolved;\n\t\tif (expected?.kind === \"function\" && actual === void 0) return node.raw !== void 0 && sameExpression(expected.expression, node.raw);\n\t\tif (expected === void 0 || actual === void 0) return expected === actual && this.raw === node.raw;\n\t\tif (expected.kind === \"function\") {\n\t\t\tif (actual.kind === \"function\") return sameExpression(expected.expression, actual.expression);\n\t\t\tif (node.value !== void 0 && node.expressionValue !== void 0) return sqlDefaultValuesEqual(node.expressionValue, node.value);\n\t\t\treturn node.raw !== void 0 && sameExpression(expected.expression, node.raw);\n\t\t}\n\t\tif (actual.kind !== \"literal\") return false;\n\t\tif (this.value !== void 0 && node.value !== void 0) return sqlDefaultValuesEqual(this.value, node.value);\n\t\tif (expected.value instanceof Date || actual.value instanceof Date) return false;\n\t\treturn canonicalStringify(expected.value) === canonicalStringify(actual.value);\n\t}\n\t/**\n\t* For two default expressions, the text the database reads back, since it may store an expression\n\t* in a form of its own. Otherwise why the column's codec could not read the database's default, or\n\t* the value each side holds.\n\t*/\n\texplainMismatch(actual) {\n\t\tif (!(actual instanceof SqlColumnDefaultIR)) return void 0;\n\t\tif (actual.unreadable !== void 0) return {\n\t\t\ttext: actual.unreadable,\n\t\t\tcause: \"differs\"\n\t\t};\n\t\treturn this.storedExpressionForm(actual) ?? {\n\t\t\ttext: `The contract holds ${describeDefault(this)}, and the database holds ${describeDefault(actual)}.`,\n\t\t\tcause: \"differs\"\n\t\t};\n\t}\n\tstoredExpressionForm(actual) {\n\t\tif (this.resolved?.kind !== \"function\" || actual.resolved?.kind !== \"function\") return void 0;\n\t\tconst literalFor = this.sqlExpressionLiteralFor;\n\t\tconst shown = (text) => literalFor?.(text) ?? JSON.stringify(text);\n\t\tconst stored = actual.raw ?? actual.resolved.expression;\n\t\tconst written = literalFor === void 0 ? stored : [stored, actual.resolved.expression].find((text) => literalFor(text) !== void 0);\n\t\tconst advice = written === void 0 ? \"No `sql` literal writes that text unchanged, so change the default's SQL in the contract until the database stores it as written.\" : `If they do, write the default as ${shown(written)}.`;\n\t\treturn {\n\t\t\ttext: `The database reads this default back as ${shown(written ?? stored)}; the contract declares ${shown(this.resolved.expression)}. The database may store a default expression in its own form, so the two can mean the same. ${advice}`,\n\t\t\tcause: \"possibly-equivalent\"\n\t\t};\n\t}\n};\n/** A default as a person reads it: a literal as JSON, the value its type read when there is one, an expression as its text, and the text the database reports beside a value read from it. */\nfunction describeDefault(node) {\n\tconst resolved = node.resolved;\n\tif (resolved === void 0) return node.raw ?? \"no default\";\n\tif (resolved.kind === \"function\") return resolved.expression;\n\tconst shown = JSON.stringify(node.value === void 0 ? resolved.value : jsonOfDefaultValue(node.value));\n\treturn node.raw === void 0 || node.raw === shown ? shown : `${shown} (${node.raw})`;\n}\nfunction isDefaultList(value) {\n\treturn Array.isArray(value);\n}\nfunction jsonOfDefaultValue(value) {\n\treturn isDefaultList(value) ? value.map((element) => element === null ? null : element.value) : value.value;\n}\nfunction sameExpression(a, b) {\n\treturn comparableExpression(a) === comparableExpression(b);\n}\n/** The expression with case and whitespace dropped outside quotes; a quoted literal or identifier keeps both, since they change what it means. */\nfunction comparableExpression(expression) {\n\tlet result = \"\";\n\tlet quote;\n\tfor (const char of expression) if (quote !== void 0) {\n\t\tresult += char;\n\t\tif (char === quote) quote = void 0;\n\t} else if (char === \"'\" || char === \"\\\"\") {\n\t\tquote = char;\n\t\tresult += char;\n\t} else if (!/\\s/.test(char)) result += char.toLowerCase();\n\treturn result;\n}\n//#endregion\n//#region src/ir/sql-column-ir.ts\n/**\n* Schema IR node for a single column on a table, as observed by\n* introspection. Unlike the Contract IR `StorageColumn`, this carries\n* the column's `name` (Schema IR columns are returned as arrays from\n* introspection queries; the parent table re-keys them into a record\n* for downstream consumers).\n*\n* Implements `DiffableNode` so a column is directly a table's diff-tree\n* child: `id` is the column name (unique among a table's columns); `isEqualTo`\n* compares this column's own attributes only, never its default, which is a\n* child node: the type by {@link sqlColumnTypesEqual}, and nullability.\n*/\nvar SqlColumnIR = class SqlColumnIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.column;\n\tname;\n\t/** See {@link SqlColumnIRInput.typeText}. */\n\ttypeText;\n\tnullable;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.typeText = input.typeText;\n\t\tthis.nullable = input.nullable;\n\t\tif (input.default !== void 0) this.default = input.default;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.many !== void 0) this.many = input.many;\n\t\tif (input.resolvedDefault !== void 0) this.resolvedDefault = input.resolvedDefault;\n\t\tdefineNonEnumerable(this, \"authoredDefault\", input.authoredDefault);\n\t\tdefineNonEnumerable(this, \"codecRef\", input.codecRef);\n\t\tdefineNonEnumerable(this, \"storedType\", input.storedType);\n\t\tdefineNonEnumerable(this, \"storedTypeParams\", input.storedTypeParams);\n\t\tdefineNonEnumerable(this, \"defaultValue\", input.defaultValue);\n\t\tdefineNonEnumerable(this, \"defaultUnreadable\", input.defaultUnreadable);\n\t\tdefineNonEnumerable(this, \"defaultExpressionValue\", input.defaultExpressionValue);\n\t\tdefineNonEnumerable(this, \"sqlExpressionLiteralFor\", input.sqlExpressionLiteralFor);\n\t\tdefineNonEnumerable(this, \"reportedType\", input.reportedType);\n\t\tdefineNonEnumerable(this, \"catalogText\", input.catalogText);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `column:${this.name}`;\n\t}\n\t/**\n\t* The column's default, when declared/present, is the column's one child\n\t* node — it has an extra/missing/drift lifecycle of its own, so the differ\n\t* recurses to it rather than `isEqualTo` comparing it. Built transiently\n\t* from this column's own fields.\n\t*/\n\tchildren() {\n\t\tif (this.resolvedDefault === void 0 && this.default === void 0) return [];\n\t\treturn [new SqlColumnDefaultIR({\n\t\t\t...ifDefined(\"resolved\", this.resolvedDefault),\n\t\t\t...ifDefined(\"raw\", this.default),\n\t\t\t...ifDefined(\"authored\", this.authoredDefault),\n\t\t\t...ifDefined(\"value\", this.defaultValue),\n\t\t\t...ifDefined(\"unreadable\", this.defaultUnreadable),\n\t\t\t...ifDefined(\"expressionValue\", this.defaultExpressionValue),\n\t\t\t...ifDefined(\"many\", this.many ?? this.codecRef?.many),\n\t\t\t...ifDefined(\"codecRef\", this.codecRef),\n\t\t\t...ifDefined(\"sqlExpressionLiteralFor\", this.sqlExpressionLiteralFor)\n\t\t})];\n\t}\n\t/** This column under another name, with every other field as it is. */\n\twithName(name) {\n\t\tconst fields = Object.fromEntries(Object.getOwnPropertyNames(this).map((key) => [key, Reflect.get(this, key)]));\n\t\treturn new SqlColumnIR({\n\t\t\t...blindCast(fields),\n\t\t\tname\n\t\t});\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.column;\n\t}\n\t/**\n\t* Compares the column's own attributes only — the default lives on the child node: the type, by {@link sqlColumnTypesEqual}, and nullability.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlColumnIR\", SqlColumnIR.is);\n\t\treturn sqlColumnTypesEqual(this, node) && this.nullable === node.nullable;\n\t}\n\t/** Why `actual` is not this column: the two types as written and reported, or the nullability of each. The two sides always hold different values. */\n\texplainMismatch(actual) {\n\t\tif (actual === void 0) return void 0;\n\t\tconst node = blindCast(actual);\n\t\tassertNode(node, \"SqlColumnIR\", SqlColumnIR.is);\n\t\tconst texts = catalogTexts(this, node);\n\t\tif (texts !== void 0 && texts.expected !== texts.actual) return differs(`The column type is \"${texts.expected}\", but the database reports \"${texts.actual}\". A type named by its catalog text is compared with the text the database reports, exactly.`);\n\t\tif (node.storedType === void 0 && node.reportedType !== void 0) return differs(node.typeText === \"\" ? \"The database column has no declared type.\" : `The database column is ${shownTypeOf(node)}, which no data type in the configured stack declares.`);\n\t\tif (!sqlColumnTypesEqual(this, node)) return differs(`The contract column is ${shownTypeOf(this)} and the database column is ${shownTypeOf(node)}.`);\n\t\tif (this.nullable !== node.nullable) return differs(`The contract column is ${nullability(this)} and the database column is ${nullability(node)}.`);\n\t}\n};\n/**\n* Whether two columns have the same type: both have a stored type, the two are one data type, their parameters are equal as canonical JSON, and both or neither are lists. A column no data type claims has no stored type and never has the same type as another. ADR 254.\n*\n* When either column carries a {@link SqlColumnIR.catalogText}, the two compare by text instead, exactly, with `[]` for a list: that text against the other column's catalog text or reported text. ADR 273.\n*/\nfunction sqlColumnTypesEqual(a, b) {\n\tconst texts = catalogTexts(a, b);\n\tif (texts !== void 0) return texts.expected === texts.actual;\n\treturn a.storedType !== void 0 && b.storedType !== void 0 && a.storedType.id === b.storedType.id && canonicalizeJson(a.storedTypeParams ?? {}) === canonicalizeJson(b.storedTypeParams ?? {}) && Boolean(a.many) === Boolean(b.many);\n}\n/** The text a column's type compares by, with `[]` for a list, when it has one: its catalog text, or the text the database reports. */\nfunction comparedText(column) {\n\tconst text = column.catalogText ?? column.reportedType?.text;\n\treturn text === void 0 ? void 0 : `${text}${column.many === true ? \"[]\" : \"\"}`;\n}\n/** The two texts a pair of columns compares by, when either carries a catalog text. A side with no text to compare gives the empty text, which no catalog text equals. */\nfunction catalogTexts(expected, actual) {\n\tif (expected.catalogText === void 0 && actual.catalogText === void 0) return void 0;\n\treturn {\n\t\texpected: comparedText(expected) ?? \"\",\n\t\tactual: comparedText(actual) ?? \"\"\n\t};\n}\n/** The column's type as the contract writes it, or as introspection gives it, with `[]` for a list, in double quotes unless the text has double quotes of its own, as `\"char\"` does. */\nfunction shownTypeOf(column) {\n\tconst text = `${column.typeText}${column.many === true ? \"[]\" : \"\"}`;\n\treturn text.includes(\"\\\"\") ? text : `\"${text}\"`;\n}\nfunction differs(text) {\n\treturn {\n\t\ttext,\n\t\tcause: \"differs\"\n\t};\n}\nfunction nullability(column) {\n\treturn column.nullable ? \"nullable\" : \"not nullable\";\n}\n//#endregion\n//#region src/ir/sql-foreign-key-ir.ts\n/**\n* Schema IR node for a foreign-key constraint as observed by\n* introspection. The `referencedTable` / `referencedColumns` field\n* names match the introspection vocabulary (`pg_constraint.confkey`,\n* etc.) and intentionally differ from the Contract IR's nested\n* `references: { table, columns }` shape so that the verifier's\n* structural comparison stays explicit about which side it's reading.\n*\n* Implements `DiffableNode` so a foreign key is directly a table's diff-tree\n* child. Foreign keys are frequently unnamed (introspection may not carry a\n* constraint name, and the contract side never invents one), so `id` is\n* derived from the referencing/referenced coordinates rather than `name` —\n* the same tuple that makes two FK constraints the same constraint. This\n* also serves as the comparison key: two FKs with the same coordinates are\n* paired by the differ, and `isEqualTo` then compares the remaining\n* attribute — the referential actions.\n*/\nvar SqlForeignKeyIR = class SqlForeignKeyIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.foreignKey;\n\tcolumns;\n\treferencedTable;\n\treferencedColumns;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.columns = input.columns;\n\t\tthis.referencedTable = input.referencedTable;\n\t\tthis.referencedColumns = input.referencedColumns;\n\t\tif (input.referencedSchema !== void 0) this.referencedSchema = input.referencedSchema;\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\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tconst resolvedReferencedNamespace = input.resolvedReferencedNamespace ?? input.referencedSchema;\n\t\tif (resolvedReferencedNamespace !== void 0) this.resolvedReferencedNamespace = resolvedReferencedNamespace;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\tconst referencedNamespace = this.resolvedReferencedNamespace ?? \"\";\n\t\treturn `foreign-key:${this.columns.join(\",\")}->${referencedNamespace}.${this.referencedTable}(${this.referencedColumns.join(\",\")})`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.foreignKey;\n\t}\n\t/**\n\t* Referential-action comparison with `this` as the expected side, matching\n\t* the relational walk's `getReferentialActionMismatches`: `noAction` is the\n\t* database default and equivalent to an undeclared action, and drift is\n\t* flagged only when the expected side declares a (normalized) action.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlForeignKeyIR\", SqlForeignKeyIR.is);\n\t\treturn referentialActionMatches(this.onDelete, node.onDelete) && referentialActionMatches(this.onUpdate, node.onUpdate);\n\t}\n};\nfunction referentialActionMatches(expected, actual) {\n\tconst normalizedExpected = expected === \"noAction\" ? void 0 : expected;\n\tif (normalizedExpected === void 0) return true;\n\treturn normalizedExpected === (actual === \"noAction\" ? void 0 : actual);\n}\n//#endregion\n//#region src/ir/sql-index-ir.ts\n/**\n* Schema IR node for a secondary index as observed by introspection.\n* Unlike the Contract IR `Index`, the Schema IR carries an explicit\n* `unique` field — introspection sees the underlying index regardless\n* of whether the user expressed it as `@@index` or `@@unique`, and the\n* verifier needs to distinguish them when comparing to the Contract.\n*\n* Implements `DiffableNode` so an index is directly a table's diff-tree\n* child. Indexes are name-identified: every index — contract-derived or\n* introspected — carries its full physical name, and `id` is that name.\n* Names are catalog-unique per schema, so two indexes legitimately sharing\n* one column tuple (a unique index beside a redundant plain index) are two\n* distinct siblings, and expression indexes need no column tuple at all.\n*\n* `isEqualTo` is selected by the receiver (the differ always calls\n* `expected.isEqualTo(actual)`) and delegates to {@link contentEquals} —\n* the single node-owned content relation: both modes compare `unique`\n* strict, `type` and option values through the named normalization seams,\n* and `columns` ordered-strict when both sides carry them; an exact-named\n* receiver (`prefix === undefined`) additionally byte-compares\n* `expression`/`where` (both sides are reprints in the supported flow —\n* normalizing would only mask real drift); a wire-named receiver never\n* compares bodies (the wire-name hash already commits to them).\n*\n* `expression`, `where`, and `unique` are genuine SQL-family attributes —\n* functional and partial indexes are standard SQL that any SQL target may\n* introspect, so the family node must represent them; a target declining\n* to author them is a capability decision, not target-specificity.\n*/\nvar SqlIndexIR = class SqlIndexIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.index;\n\tname;\n\tunique;\n\tconstructor(input) {\n\t\tsuper();\n\t\tconst name = nameOf(input.naming);\n\t\tif (input.columns === void 0 === (input.expression === void 0)) throw new InternalError(`SqlIndexIR \"${name}\": exactly one of columns or expression must be set.`);\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\tconst normalizedType = normalizeIndexType(input.type);\n\t\tif (normalizedType !== void 0) this.type = normalizedType;\n\t\tif (input.options !== void 0) this.options = input.options;\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tdefineNonEnumerable(this, \"partial\", input.partial);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `index:${this.name}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic from(value) {\n\t\treturn value instanceof SqlIndexIR ? value : new SqlIndexIR(value);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.index;\n\t}\n\t/**\n\t* Mode-selected structural equality — see the class doc. Delegates to the\n\t* single node-owned relation: `columns` compare ordered-strict when both\n\t* sides carry them; an exact receiver (`prefix === undefined`)\n\t* byte-compares `expression ?? ''` and `where ?? ''`; a wire-named receiver\n\t* never compares bodies (the wire-name hash already commits to them).\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlIndexIR\", SqlIndexIR.is);\n\t\treturn this.contentEquals(node, {\n\t\t\tcolumnPresence: \"when-both-defined\",\n\t\t\tbodies: this.prefix !== void 0 ? \"ignored\" : \"verbatim\"\n\t\t});\n\t}\n\t/**\n\t* The single index content-equality relation — every comparer (the differ\n\t* via {@link isEqualTo}, the planner's rename content-pairing) calls this\n\t* with its mode-appropriate strictness rather than growing a parallel\n\t* relation:\n\t*\n\t* - `columnPresence: 'when-both-defined'` (the differ's rule) compares\n\t* the tuples ordered-strict only when both sides carry them — a paired\n\t* node's identity already agreed, so a column node meeting an\n\t* expression node skips the tuple.\n\t* - `columnPresence: 'matching'` (the rename-pairing rule) additionally\n\t* requires presence to agree: a column index never pairs an expression\n\t* index.\n\t* - `bodies: 'verbatim'` byte-compares `expression ?? ''` / `where ?? ''`\n\t* (absent ≡ empty, no normalization — both sides are reprints in the\n\t* supported flow); `bodies: 'ignored'` skips them (wire identity —\n\t* the wire-name hash commits to the content).\n\t*\n\t* `unique` compares strictly; `type` and option VALUES compare through\n\t* the named normalization seams below.\n\t*/\n\tcontentEquals(other, strictness) {\n\t\tconst columnsEqual = strictness.columnPresence === \"matching\" ? this.columns === void 0 === (other.columns === void 0) && (this.columns === void 0 || isArrayEqual(this.columns, other.columns ?? [])) : this.columns === void 0 || other.columns === void 0 || isArrayEqual(this.columns, other.columns);\n\t\tif (!(this.unique === other.unique && normalizeIndexType(this.type) === normalizeIndexType(other.type) && indexOptionsEqual(this.options, other.options) && columnsEqual)) return false;\n\t\tif (strictness.bodies === \"ignored\") return true;\n\t\treturn (this.expression ?? \"\") === (other.expression ?? \"\") && (this.where ?? \"\") === (other.where ?? \"\");\n\t}\n};\n/**\n* The btree-default normalization seam: the default access method (`btree`\n* in every supported SQL target) normalizes to absent. Applied at\n* construction — every derivation path (contract tree, introspection, flat\n* family tree) builds through the class, so both compare sides are\n* symmetric by definition — and again inside\n* {@link SqlIndexIR.contentEquals} so the relation holds for any input.\n* The contract JSON and the wire-name content hash keep the authored\n* spelling: `@@index([a], type: \"btree\")` and `@@index([a])` are distinct\n* wire names — but content-equal after normalization, so a spelling change\n* between them converges as a rename via the planner's content\n* pairing (the hashes differ, so hash pairing never pairs them).\n*/\nfunction normalizeIndexType(type) {\n\treturn type === \"btree\" ? void 0 : type;\n}\n/**\n* Option-bag equality: same key set, values compared through\n* {@link normalizeIndexOptionValue} — Postgres introspection returns\n* reloptions values as catalog-reprint strings (`'70'`, `'on'`) while\n* contract option leaves are typed (number, boolean, string).\n*/\nfunction indexOptionsEqual(a, b) {\n\tconst aKeys = a ? Object.keys(a).sort() : [];\n\tconst bKeys = b ? Object.keys(b).sort() : [];\n\tif (aKeys.length !== bKeys.length) return false;\n\tfor (let i = 0; i < aKeys.length; i += 1) if (aKeys[i] !== bKeys[i]) return false;\n\tif (aKeys.length === 0) return true;\n\tfor (const key of aKeys) if (normalizeIndexOptionValue(a?.[key]) !== normalizeIndexOptionValue(b?.[key])) return false;\n\treturn true;\n}\n//#endregion\n//#region src/ir/sql-unique-ir.ts\n/**\n* Schema IR node for a table-level unique constraint as observed by\n* introspection.\n*\n* Implements `DiffableNode` so a unique constraint is directly a table's\n* diff-tree child. Unique constraints are frequently unnamed, so `id` is\n* derived from the column tuple rather than `name` — the column tuple is\n* also what makes two unique constraints the same constraint, so it doubles\n* as the pairing key. There are no further attributes to compare once\n* columns are equal (the differ pairs on `id`), so `isEqualTo` is identity.\n*/\nvar SqlUniqueIR = class SqlUniqueIR extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.unique;\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\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `unique:${this.columns.join(\",\")}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === RelationalSchemaNodeKind.unique;\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tassertNode(node, \"SqlUniqueIR\", SqlUniqueIR.is);\n\t\treturn this.id === node.id;\n\t}\n};\n//#endregion\n//#region src/ir/sql-table-ir.ts\n/**\n* Schema IR node for a single table as observed by introspection.\n*\n* Unlike the Contract IR `StorageTable`, this carries the table's\n* `name` — introspection queries return tables as arrays and the\n* verifier keys them into `SqlSchemaIR.tables` afterwards, so the name\n* stays on the table object for downstream call sites that walk\n* `Object.values(schema.tables)`.\n*\n* The constructor normalises nested IR-class fields so downstream\n* walks see a uniform AST regardless of whether the input was a\n* plain-data literal (from introspection) or already-constructed\n* class instances.\n*\n* Implements `DiffableNode` so a flat (single-schema) tree is directly\n* diffable: `id` is the table name; `isEqualTo` is identity (the table's\n* structural drift is entirely expressed by its children); `children()`\n* yields every column, the primary key (when present), every foreign key,\n* unique, index, and check constraint — the same composition and order as\n* the Postgres table node, minus policies.\n*/\nvar SqlTableIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.table;\n\tname;\n\tcolumns;\n\tforeignKeys;\n\tuniques;\n\tindexes;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([key, col]) => [key, col instanceof SqlColumnIR ? col : new SqlColumnIR(col)])));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk)));\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map(SqlIndexIR.from));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = PrimaryKey.from(input.primaryKey);\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map(SqlCheckConstraintIR.from));\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [\n\t\t\t...Object.values(this.columns),\n\t\t\t...this.primaryKey ? [this.primaryKey] : [],\n\t\t\t...this.foreignKeys,\n\t\t\t...this.uniques,\n\t\t\t...this.indexes,\n\t\t\t...this.checks ?? []\n\t\t];\n\t}\n};\n//#endregion\n//#region src/ir/sql-schema-ir.ts\n/**\n* Root Schema IR node representing the complete database schema as\n* observed by introspection. Target-agnostic; used by both verifiers\n* (compare against intended Contract storage) and migration planners\n* (derive operations needed to reconcile).\n*\n* The constructor normalises nested `SqlTableIR` instances so\n* downstream walks see a uniform AST regardless of whether the input\n* was a plain-data literal or already-constructed class instances.\n*\n* Implements `DiffableNode` as the root of a flat (single-schema) diff\n* tree: `id` is the fixed sentinel `'database'` (roots have no siblings),\n* `isEqualTo` is identity (a container has no own attributes), and\n* `children()` yields the table nodes.\n*/\nvar SqlSchemaIR = class extends SqlSchemaIRNode {\n\tnodeKind = RelationalSchemaNodeKind.schema;\n\ttables;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.tables = Object.freeze(Object.fromEntries(Object.entries(input.tables).map(([key, t]) => [key, t instanceof SqlTableIR ? t : new SqlTableIR(t)])));\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"database\";\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn Object.values(this.tables);\n\t}\n};\n//#endregion\nexport { relationalNodeGranularity as _, SqlForeignKeyIR as a, SqlColumnDefaultIR as c, PrimaryKey as d, SqlSchemaIRNode as f, relationalNodeEntityKind as g, RelationalSchemaNodeKind as h, SqlIndexIR as i, sqlDefaultValuesEqual as l, defineNonEnumerable as m, SqlTableIR as n, SqlColumnIR as o, assertNode as p, SqlUniqueIR as r, sqlColumnTypesEqual as s, SqlSchemaIR as t, SqlCheckConstraintIR as u };\n\n//# sourceMappingURL=types-1ZKE0deC.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,2BAA2B;CAChC,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,OAAO;CACP,OAAO;AACR;;;;;;;;;;;AAWA,MAAM,8BAA8B;EAClC,yBAAyB,SAAS;EAClC,yBAAyB,QAAQ;EACjC,yBAAyB,SAAS;EAClC,yBAAyB,gBAAgB;EACzC,yBAAyB,aAAa;EACtC,yBAAyB,aAAa;EACtC,yBAAyB,SAAS;EAClC,yBAAyB,QAAQ;EACjC,yBAAyB,QAAQ;AACnC;AACA,SAAS,2BAA2B,UAAU;CAC7C,OAAO,OAAO,OAAO,6BAA6B,QAAQ;AAC3D;;;;;;;AAOA,SAAS,0BAA0B,UAAU;CAC5C,IAAI,CAAC,2BAA2B,QAAQ,GAAG,MAAM,IAAI,cAAc,iEAAiE,SAAS,EAAE;CAC/I,OAAO,4BAA4B;AACpC;;;;;;;;AAQA,MAAM,8BAA8B,GAAG,yBAAyB,QAAQ,QAAQ;;;;;;;;AAQhF,SAAS,yBAAyB,UAAU;CAC3C,OAAO,2BAA2B,QAAQ,IAAI,4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AC,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,KAAK,aAAa,aAAa,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;EACtJ,IAAI,MAAM,gBAAgB,KAAK,GAAG,KAAK,cAAc,MAAM;EAC3D,WAAW,IAAI;CAChB;CACA,IAAI,KAAK;EACR,OAAO;CACR;CACA,UAAU,OAAO;EAChB,OAAO,KAAK,OAAO,MAAM;CAC1B;CACA,WAAW;EACV,OAAO,OAAO,OAAO,KAAK,MAAM;CACjC;AACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./types-fmtEmvj3-B0fQaVes.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as SqlNode } from "./sql-node-D8P0akYY-RVytYXDZ.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";
|
|
@@ -115,4 +115,4 @@ function applyFkDefaults(fk, overrideDefaults) {
|
|
|
115
115
|
//#endregion
|
|
116
116
|
export { SqlNamespaceBase as a, isMaterializedSqlNamespace as c, nonEmptyTypeParams 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 };
|
|
117
117
|
|
|
118
|
-
//# sourceMappingURL=types-
|
|
118
|
+
//# sourceMappingURL=types-CISwoRED.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CISwoRED.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/types.mjs"],"sourcesContent":["import { t as SqlNode } from \"./sql-node-D8P0akYY.mjs\";\nimport { n as isStorageValueSet, t as StorageValueSet } from \"./storage-value-set-uGUEBAMJ.mjs\";\nimport { a as ForeignKey, c as CheckConstraint, i as PrimaryKey, n as UniqueConstraint, o as ForeignKeyReference, r as StorageColumn, s as Index, t as StorageTable } from \"./storage-table-B_MrLtQX.mjs\";\nimport { n as checkConstraintInputFromSerialized, r as StorageValueObject, t as indexInputFromSerialized } from \"./serialized-index-BefvjuZ0.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* A type's parameters, with empty parameters read as none, as a codec reads them; {@link toStorageTypeInstance} stores `{}` for a codec without parameters.\n*/\nfunction nonEmptyTypeParams(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, StorageValueObject, StorageValueSet, UniqueConstraint, applyFkDefaults, checkConstraintInputFromSerialized, indexInputFromSerialized, isMaterializedSqlNamespace, isSqlAuthoringContributions, isStorageTypeInstance, isStorageValueSet, nonEmptyTypeParams, toStorageTypeInstance };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;AAeA,MAAM,sBAAsB;;;;;;AAM5B,SAAS,sBAAsB,OAAO;CACrC,OAAO;EACN,MAAM;EACN,SAAS,MAAM;EACf,UAAU,MAAM;EACh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AK,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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as StorageTable, t as StorageColumn } from "./storage-
|
|
2
|
-
import { f as StorageTypeInstance, l as SqlStorage } from "./sql-storage-
|
|
3
|
-
import { j as SqlControlDriverInstance } from "./types-
|
|
4
|
-
import "./types-
|
|
5
|
-
import { r as SqlOperationDescriptors } from "./index-
|
|
6
|
-
import { S as SqlSchemaIRNode } from "./types-
|
|
7
|
-
import "./types-
|
|
8
|
-
import { r as SqlControlAdapter } from "./control-adapter-BfyLe7rh-
|
|
1
|
+
import { r as StorageTable, t as StorageColumn } from "./storage-value-object-BcvIeUr8-DiiZNIrZ.mjs";
|
|
2
|
+
import { f as StorageTypeInstance, l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
|
|
3
|
+
import { j as SqlControlDriverInstance } from "./types-DNTLudNR-DiVulPhL.mjs";
|
|
4
|
+
import "./types-CXRxo_TK.mjs";
|
|
5
|
+
import { r as SqlOperationDescriptors } from "./index-BWWwt5hB.mjs";
|
|
6
|
+
import { S as SqlSchemaIRNode } from "./types-fmtEmvj3-B0fQaVes.mjs";
|
|
7
|
+
import "./types-B-dwfOwQ.mjs";
|
|
8
|
+
import { r as SqlControlAdapter } from "./control-adapter-BfyLe7rh-CiGzw3dq.mjs";
|
|
9
9
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
10
10
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
11
11
|
import { Result } from "@prisma/orm-framework/utils/result";
|
|
@@ -409,4 +409,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
|
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
411
|
export { SqlPlannerConflict as C, SqlPlannerResult as D, SqlPlannerFailureResult as E, SqlPlannerSuccessResult as O, SqlPlanTargetDetails as S, SqlPlannerConflictLocation as T, SqlMigrationRunnerExecuteCallbacks as _, ResolveIdentityValueInput as a, SqlMigrationRunnerResult as b, SqlMigrationPlan as c, SqlMigrationPlanOperationStep as d, SqlMigrationPlanOperationTarget as f, SqlMigrationRunnerErrorCode as g, SqlMigrationRunner as h, FieldEventContext as i, StorageTypePlanResult as k, SqlMigrationPlanContractInfo as l, SqlMigrationPlannerPlanOptions as m, CreateSqlMigrationPlanOptions as n, SqlControlAdapterDescriptor as o, SqlMigrationPlanner as p, FieldEvent as r, SqlControlExtensionDescriptor as s, CodecControlHooks as t, SqlMigrationPlanOperation as u, SqlMigrationRunnerExecuteOptions as v, SqlPlannerConflictKind as w, SqlMigrationRunnerSuccessValue as x, SqlMigrationRunnerFailure as y };
|
|
412
|
-
//# sourceMappingURL=types-COXfSNOP-
|
|
412
|
+
//# sourceMappingURL=types-COXfSNOP-D9vt9QDL.d.mts.map
|