@prisma/orm-target-postgres 8.0.0-rc.14-dev.28 → 8.0.0-rc.14-dev.30
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/{adapter-DzNbNJ24.d.mts → adapter-BOi8Qpb_.d.mts} +6 -4
- package/dist/adapter-BOi8Qpb_.d.mts.map +1 -0
- package/dist/{adapter-BNrSLsxC-CXrTrSvP.mjs → adapter-DwUKamWE-9wPlFOdx.mjs} +23 -12
- package/dist/adapter-DwUKamWE-9wPlFOdx.mjs.map +1 -0
- package/dist/adapter.d.mts +7 -7
- package/dist/adapter.mjs +7 -7
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.d.mts +2 -2
- package/dist/adapter__control.mjs +10 -16
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +9 -6
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.d.mts +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/adapter__types.d.mts +3 -3
- package/dist/{authoring-C5Ch8RNG-Qgq9GiOY.mjs → authoring-BarDKx1G-BKhOsXKo.mjs} +20 -65
- package/dist/authoring-BarDKx1G-BKhOsXKo.mjs.map +1 -0
- package/dist/{check-expressions-DJNIFTHB-C86_fR5c.mjs → check-expressions-BRuSxJ5d-CC5OFfR1.mjs} +3 -3
- package/dist/{check-expressions-DJNIFTHB-C86_fR5c.mjs.map → check-expressions-BRuSxJ5d-CC5OFfR1.mjs.map} +1 -1
- package/dist/{codec-descriptor-B61d-k4C-BdWVU6Fu.mjs → codec-descriptor-CZAGhM_O-DK9auM7J.mjs} +5 -18
- package/dist/codec-descriptor-CZAGhM_O-DK9auM7J.mjs.map +1 -0
- package/dist/codec-descriptor-DAQDOwCJ.d.mts +1 -0
- package/dist/{codec-descriptor-HYqjI24K-CTO3gTEs.d.mts → codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts} +9 -10
- package/dist/codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts.map +1 -0
- package/dist/{codec-helpers-BmUrP6U9-DuO9gpqZ.mjs → codec-helpers-BKrVHgYc-DFnb5u9l.mjs} +4 -6
- package/dist/codec-helpers-BKrVHgYc-DFnb5u9l.mjs.map +1 -0
- package/dist/{codecs-CWXNVl1P.mjs → codec-registry-CCCOytGc-BFC0dvlt.mjs} +28 -12
- package/dist/codec-registry-CCCOytGc-BFC0dvlt.mjs.map +1 -0
- package/dist/{codec-type-map-Br7wS7DK-DmphGfZE.d.mts → codec-type-map-B9MLL97E-RMa5Y4R4.d.mts} +4 -4
- package/dist/{codec-type-map-Br7wS7DK-DmphGfZE.d.mts.map → codec-type-map-B9MLL97E-RMa5Y4R4.d.mts.map} +1 -1
- package/dist/{codec-types-DBeKvpNs-D9JlxBzY.d.mts → codec-types-Du6N0o5U-DMAI6jag.d.mts} +4 -4
- package/dist/{codec-types-DBeKvpNs-D9JlxBzY.d.mts.map → codec-types-Du6N0o5U-DMAI6jag.d.mts.map} +1 -1
- package/dist/codec-types-uq3Il6e3.d.mts +2 -0
- package/dist/{codecs-CnbVrlil--FxLKWM5.mjs → codecs-BzCRfsit-BbLlbudt.mjs} +35 -228
- package/dist/codecs-BzCRfsit-BbLlbudt.mjs.map +1 -0
- package/dist/{codecs-DxqbAhl0.d.mts → codecs-C0zx-UlM.d.mts} +10 -14
- package/dist/codecs-C0zx-UlM.d.mts.map +1 -0
- package/dist/{codecs-BU-eLMQi-BB2afWsO.d.mts → codecs-Ckpsj4IT-C7kgMiKv.d.mts} +16 -90
- package/dist/codecs-Ckpsj4IT-C7kgMiKv.d.mts.map +1 -0
- package/dist/{contract-free-DeK6m1dy.mjs → contract-free-DAGgx1J-.mjs} +8 -5
- package/dist/contract-free-DAGgx1J-.mjs.map +1 -0
- package/dist/{control-CyiVFspE.mjs → control-C0mAPRzk.mjs} +75 -117
- package/dist/control-C0mAPRzk.mjs.map +1 -0
- package/dist/{control-xWtRBAPw.d.mts → control-aDBKB9hQ.d.mts} +5 -10
- package/dist/control-aDBKB9hQ.d.mts.map +1 -0
- package/dist/{control-adapter-Du0EcG5G-CT4qBFrG.mjs → control-adapter-cjnLE0mN-BmNP2taw.mjs} +14 -18
- package/dist/control-adapter-cjnLE0mN-BmNP2taw.mjs.map +1 -0
- package/dist/control-fp7Azf3F.d.mts +733 -0
- package/dist/control-fp7Azf3F.d.mts.map +1 -0
- package/dist/{control-policy-BW5Cgq3Z-Dn2ZVBCP.mjs → control-policy-CuJvncMq-C5yshGZP.mjs} +52 -52
- package/dist/control-policy-CuJvncMq-C5yshGZP.mjs.map +1 -0
- package/dist/{data-type-entries-cjspFU7A-BBOIqLij.mjs → data-type-entries-DYgNhsVx-BWJJHCQR.mjs} +5 -4
- package/dist/data-type-entries-DYgNhsVx-BWJJHCQR.mjs.map +1 -0
- package/dist/data-types-DzUVlWeo-CBMHoFoH.mjs +366 -0
- package/dist/data-types-DzUVlWeo-CBMHoFoH.mjs.map +1 -0
- package/dist/data-types-E1wms1_i.d.mts +96 -0
- package/dist/data-types-E1wms1_i.d.mts.map +1 -0
- package/dist/{ddl-BQFDVert-CcDdETee.mjs → ddl-BzsT_-qY-Cdzm0YIK.mjs} +3 -3
- package/dist/{ddl-BQFDVert-CcDdETee.mjs.map → ddl-BzsT_-qY-Cdzm0YIK.mjs.map} +1 -1
- package/dist/{default-normalizer-ByDD_gRm-CKeWEb0x.mjs → default-normalizer-C68YhUBS-BjOeKRhS.mjs} +3 -3
- package/dist/{default-normalizer-ByDD_gRm-CKeWEb0x.mjs.map → default-normalizer-C68YhUBS-BjOeKRhS.mjs.map} +1 -1
- package/dist/{descriptor-meta-Bvq6_NJ8-Cn_M79Lf.mjs → descriptor-meta-CUmf1G9P-GAdC3zfT.mjs} +9 -7
- package/dist/descriptor-meta-CUmf1G9P-GAdC3zfT.mjs.map +1 -0
- package/dist/{descriptor-meta-BEigA5Gj-eY7nV4N_.mjs → descriptor-meta-gq4MiUXl-DqqHHHSj.mjs} +4 -90
- package/dist/descriptor-meta-gq4MiUXl-DqqHHHSj.mjs.map +1 -0
- package/dist/{descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs → descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs} +5 -3
- package/dist/descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs.map +1 -0
- package/dist/{diff-database-schema-D-eMVqv1.d.mts → diff-database-schema-BGcRo8FM.d.mts} +2 -2
- package/dist/{diff-database-schema-D-eMVqv1.d.mts.map → diff-database-schema-BGcRo8FM.d.mts.map} +1 -1
- package/dist/{diff-database-schema-_bbfF4oI-D_VmL4Ma.mjs → diff-database-schema-BYHT4ZZp-DHQM3yoO.mjs} +18 -26
- package/dist/diff-database-schema-BYHT4ZZp-DHQM3yoO.mjs.map +1 -0
- package/dist/{errors-1AjGQf6h.d.mts → errors-DZ3zQdpT.d.mts} +2 -2
- package/dist/{errors-1AjGQf6h.d.mts.map → errors-DZ3zQdpT.d.mts.map} +1 -1
- package/dist/{full-text-DZ_SB64Q.d.mts → full-text-DjD0tAqd.d.mts} +2 -2
- package/dist/{full-text-DZ_SB64Q.d.mts.map → full-text-DjD0tAqd.d.mts.map} +1 -1
- package/dist/{full-text-index-expression-525ZZWf0-HIGVQbjL.mjs → full-text-index-expression-DKwm2Z9W-CboCsz4N.mjs} +4 -4
- package/dist/{full-text-index-expression-525ZZWf0-HIGVQbjL.mjs.map → full-text-index-expression-DKwm2Z9W-CboCsz4N.mjs.map} +1 -1
- package/dist/{full-text-parsers-Cg9SDrnx-DA1eBg1b.d.mts → full-text-parsers-DinPC_86-B2P_FyTG.d.mts} +3 -3
- package/dist/{full-text-parsers-Cg9SDrnx-DA1eBg1b.d.mts.map → full-text-parsers-DinPC_86-B2P_FyTG.d.mts.map} +1 -1
- package/dist/{infer-psl-contract-Burb6YAz-DbKU4cXm.mjs → infer-psl-contract-DBWXA-jx-CmKQgKZJ.mjs} +11 -11
- package/dist/infer-psl-contract-DBWXA-jx-CmKQgKZJ.mjs.map +1 -0
- package/dist/{issue-planner-BdnqkLvV.d.mts → issue-planner-pmBrIrEN.d.mts} +7 -2
- package/dist/issue-planner-pmBrIrEN.d.mts.map +1 -0
- package/dist/{migration-D7F66l-1.d.mts → migration-D189kh3f.d.mts} +3 -3
- package/dist/{migration-D7F66l-1.d.mts.map → migration-D189kh3f.d.mts.map} +1 -1
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs → native-type-normalizer-CwyVR7xB.mjs} +3 -9
- package/dist/native-type-normalizer-CwyVR7xB.mjs.map +1 -0
- package/dist/{op-factory-call-DkzlLBzN-Bc6l0sYN.mjs → op-factory-call-4IafSIKD-D2wO2iyZ.mjs} +11 -11
- package/dist/op-factory-call-4IafSIKD-D2wO2iyZ.mjs.map +1 -0
- package/dist/{op-factory-call-CaEALaar-Nh0fSxQY.d.mts → op-factory-call-CqKUB1XP-CsEGx4Jd.d.mts} +6 -5
- package/dist/op-factory-call-CqKUB1XP-CsEGx4Jd.d.mts.map +1 -0
- package/dist/op-factory-call-D5UJ7cDi.d.mts +1 -0
- package/dist/{operation-types-sVW52HpK.d.mts → operation-types-DfPl4yzR.d.mts} +2 -2
- package/dist/{operation-types-sVW52HpK.d.mts.map → operation-types-DfPl4yzR.d.mts.map} +1 -1
- package/dist/{pack-AqcQpXNv.d.mts → pack-Cx7B1N8w.d.mts} +6 -33
- package/dist/pack-Cx7B1N8w.d.mts.map +1 -0
- package/dist/{planner-D7lEhXHR-8Wz1p_6j.mjs → planner-BWKFZaOu--28k5rC4.mjs} +12 -10
- package/dist/planner-BWKFZaOu--28k5rC4.mjs.map +1 -0
- package/dist/{planner-DECxo-qa.d.mts → planner-CvUO8Zpn.d.mts} +2 -2
- package/dist/{planner-DECxo-qa.d.mts.map → planner-CvUO8Zpn.d.mts.map} +1 -1
- package/dist/{planner-ddl-builders-DYLyFXrj.d.mts → planner-ddl-builders-Ckcr8Ov1.d.mts} +10 -8
- package/dist/planner-ddl-builders-Ckcr8Ov1.d.mts.map +1 -0
- package/dist/planner-ddl-builders-O0JqJIBZ-x7JEHEpU.mjs +93 -0
- package/dist/planner-ddl-builders-O0JqJIBZ-x7JEHEpU.mjs.map +1 -0
- package/dist/planner-identity-values-BTYw1D7D-CzpXx1yD.mjs +72 -0
- package/dist/planner-identity-values-BTYw1D7D-CzpXx1yD.mjs.map +1 -0
- package/dist/{planner-identity-values-TfEhnoWa.d.mts → planner-identity-values-DvlFit8A.d.mts} +7 -6
- package/dist/planner-identity-values-DvlFit8A.d.mts.map +1 -0
- package/dist/{planner-produced-postgres-migration-GZTusMRD-DPb6XqDu.mjs → planner-produced-postgres-migration-B-gWwByI-Cy8tx4pu.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-GZTusMRD-DPb6XqDu.mjs.map → planner-produced-postgres-migration-B-gWwByI-Cy8tx4pu.mjs.map} +1 -1
- package/dist/planner-produced-postgres-migration-BI_aepPp.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts → planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.d.mts.map +1 -0
- package/dist/planner-sql-checks-Cr06nK1--B3gPnC1a.mjs +47 -0
- package/dist/planner-sql-checks-Cr06nK1--B3gPnC1a.mjs.map +1 -0
- package/dist/{planner-sql-checks-CFgbRTJw.d.mts → planner-sql-checks-iNLJS1dW.d.mts} +8 -3
- package/dist/{planner-sql-checks-CFgbRTJw.d.mts.map → planner-sql-checks-iNLJS1dW.d.mts.map} +1 -1
- package/dist/{postgres-contract-view-Da0ymIZE-CBV3OE-k.mjs → postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs} +12 -10
- package/dist/postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs.map +1 -0
- package/dist/{postgres-migration-Dq60Mixq-DYNJokZW.mjs → postgres-migration-PLXsv15e-BruyXuKH.mjs} +21 -20
- package/dist/postgres-migration-PLXsv15e-BruyXuKH.mjs.map +1 -0
- package/dist/{postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts → postgres-migration-e8UybR1y-C_m4i1jp.d.mts} +3 -3
- package/dist/{postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts.map → postgres-migration-e8UybR1y-C_m4i1jp.d.mts.map} +1 -1
- package/dist/{postgres-schema-C8slJGZo-CFGUyJPt.mjs → postgres-schema-DXd0mebY-CExd_GcQ.mjs} +3 -3
- package/dist/{postgres-schema-C8slJGZo-CFGUyJPt.mjs.map → postgres-schema-DXd0mebY-CExd_GcQ.mjs.map} +1 -1
- package/dist/{prisma7-binding-Dm24YoM6.mjs → prisma7-binding-BgMvnMgz.mjs} +30 -30
- package/dist/prisma7-binding-BgMvnMgz.mjs.map +1 -0
- package/dist/{prisma7-binding-C0GpQxEQ.d.mts → prisma7-binding-D2guML1e.d.mts} +8 -35
- package/dist/prisma7-binding-D2guML1e.d.mts.map +1 -0
- package/dist/{resolve-ddl-schema-Bq4m2dD9-DrlUipYU.mjs → resolve-ddl-schema-CadTChyu-C7F31wpN.mjs} +3 -3
- package/dist/{resolve-ddl-schema-Bq4m2dD9-DrlUipYU.mjs.map → resolve-ddl-schema-CadTChyu-C7F31wpN.mjs.map} +1 -1
- package/dist/{runtime-4QFzvcCp.d.mts → runtime-aejvKbMy.d.mts} +2 -2
- package/dist/{runtime-4QFzvcCp.d.mts.map → runtime-aejvKbMy.d.mts.map} +1 -1
- package/dist/{sql-renderer-CgUgFbU4-BY3PCrmG.mjs → sql-renderer-BjJ3MLnI-DQvfiMO6.mjs} +45 -43
- package/dist/sql-renderer-BjJ3MLnI-DQvfiMO6.mjs.map +1 -0
- package/dist/{sql-renderer-Bd07vbru.d.mts → sql-renderer-D6UgvbqG.d.mts} +6 -5
- package/dist/sql-renderer-D6UgvbqG.d.mts.map +1 -0
- package/dist/{sql-utils-Bh-mnsSY-D6hnFPrP.mjs → sql-utils-BMXJi06b-CAQOplfq.mjs} +178 -3
- package/dist/sql-utils-BMXJi06b-CAQOplfq.mjs.map +1 -0
- package/dist/target.d.mts +27 -27
- package/dist/target.mjs +28 -28
- package/dist/target__codec-descriptor.d.mts +2 -2
- package/dist/target__codec-descriptor.mjs +1 -1
- package/dist/target__codec-types.d.mts +3 -3
- package/dist/target__codecs.d.mts +3 -3
- package/dist/target__codecs.mjs +3 -3
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +4 -4
- package/dist/target__data-types.d.mts +2 -2
- package/dist/target__data-types.mjs +3 -3
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__diff-database-schema.d.mts +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__errors.d.mts +1 -1
- package/dist/target__full-text.d.mts +2 -2
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__native-type-normalizer.mjs +1 -1
- package/dist/target__op-factory-call.d.mts +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__operation-types.d.mts +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.d.mts +2 -2
- package/dist/target__planner-ddl-builders.mjs +1 -1
- package/dist/target__planner-identity-values.d.mts +1 -1
- package/dist/target__planner-identity-values.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.d.mts +1 -1
- package/dist/target__planner-sql-checks.mjs +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.mjs +2 -2
- package/dist/{types-BPubHbiE-BzhJ05fG.d.mts → types-D6lgKhE5-Cu48rrw9.d.mts} +7 -4
- package/dist/types-D6lgKhE5-Cu48rrw9.d.mts.map +1 -0
- package/dist/types-LTOC-zv8.d.mts +2 -0
- package/package.json +9 -9
- package/dist/adapter-BNrSLsxC-CXrTrSvP.mjs.map +0 -1
- package/dist/adapter-DzNbNJ24.d.mts.map +0 -1
- package/dist/authoring-C5Ch8RNG-Qgq9GiOY.mjs.map +0 -1
- package/dist/codec-descriptor-B61d-k4C-BdWVU6Fu.mjs.map +0 -1
- package/dist/codec-descriptor-D8_e5hpo.d.mts +0 -1
- package/dist/codec-descriptor-HYqjI24K-CTO3gTEs.d.mts.map +0 -1
- package/dist/codec-helpers-BmUrP6U9-DuO9gpqZ.mjs.map +0 -1
- package/dist/codec-types-Diyz6muR.d.mts +0 -2
- package/dist/codecs-BU-eLMQi-BB2afWsO.d.mts.map +0 -1
- package/dist/codecs-CWXNVl1P.mjs.map +0 -1
- package/dist/codecs-CnbVrlil--FxLKWM5.mjs.map +0 -1
- package/dist/codecs-DxqbAhl0.d.mts.map +0 -1
- package/dist/contract-free-DeK6m1dy.mjs.map +0 -1
- package/dist/control-CyiVFspE.mjs.map +0 -1
- package/dist/control-D7_yfEfH.d.mts +0 -402
- package/dist/control-D7_yfEfH.d.mts.map +0 -1
- package/dist/control-adapter-Du0EcG5G-CT4qBFrG.mjs.map +0 -1
- package/dist/control-policy-BW5Cgq3Z-Dn2ZVBCP.mjs.map +0 -1
- package/dist/control-xWtRBAPw.d.mts.map +0 -1
- package/dist/data-type-entries-cjspFU7A-BBOIqLij.mjs.map +0 -1
- package/dist/data-types-BGsYeBpf-B_5bvuEe.mjs +0 -200
- package/dist/data-types-BGsYeBpf-B_5bvuEe.mjs.map +0 -1
- package/dist/data-types-DZGKP-qZ.d.mts +0 -47
- package/dist/data-types-DZGKP-qZ.d.mts.map +0 -1
- package/dist/descriptor-meta-BEigA5Gj-eY7nV4N_.mjs.map +0 -1
- package/dist/descriptor-meta-Bvq6_NJ8-Cn_M79Lf.mjs.map +0 -1
- package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs.map +0 -1
- package/dist/diff-database-schema-_bbfF4oI-D_VmL4Ma.mjs.map +0 -1
- package/dist/infer-psl-contract-Burb6YAz-DbKU4cXm.mjs.map +0 -1
- package/dist/issue-planner-BdnqkLvV.d.mts.map +0 -1
- package/dist/native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs.map +0 -1
- package/dist/op-factory-call-CaEALaar-Nh0fSxQY.d.mts.map +0 -1
- package/dist/op-factory-call-DVz_g8zS.d.mts +0 -1
- package/dist/op-factory-call-DkzlLBzN-Bc6l0sYN.mjs.map +0 -1
- package/dist/pack-AqcQpXNv.d.mts.map +0 -1
- package/dist/planner-D7lEhXHR-8Wz1p_6j.mjs.map +0 -1
- package/dist/planner-ddl-builders-BZLzBmuq-BrpA53eH.mjs +0 -128
- package/dist/planner-ddl-builders-BZLzBmuq-BrpA53eH.mjs.map +0 -1
- package/dist/planner-ddl-builders-DYLyFXrj.d.mts.map +0 -1
- package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs +0 -90
- package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs.map +0 -1
- package/dist/planner-identity-values-TfEhnoWa.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-BMfo2BlI.d.mts +0 -1
- package/dist/planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts.map +0 -1
- package/dist/planner-sql-checks-Bxz8yvg8-Bj6jGClB.mjs +0 -192
- package/dist/planner-sql-checks-Bxz8yvg8-Bj6jGClB.mjs.map +0 -1
- package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs +0 -15
- package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs.map +0 -1
- package/dist/postgres-contract-view-Da0ymIZE-CBV3OE-k.mjs.map +0 -1
- package/dist/postgres-migration-Dq60Mixq-DYNJokZW.mjs.map +0 -1
- package/dist/prisma7-binding-C0GpQxEQ.d.mts.map +0 -1
- package/dist/prisma7-binding-Dm24YoM6.mjs.map +0 -1
- package/dist/sql-renderer-Bd07vbru.d.mts.map +0 -1
- package/dist/sql-renderer-CgUgFbU4-BY3PCrmG.mjs.map +0 -1
- package/dist/sql-utils-Bh-mnsSY-D6hnFPrP.mjs.map +0 -1
- package/dist/types-BPubHbiE-BzhJ05fG.d.mts.map +0 -1
- package/dist/types-DQ5Lh5JL.d.mts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl-BQFDVert-CcDdETee.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/ddl-BQFDVert.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-C8slJGZo.mjs\";\nimport { a as PostgresAlterTable, c as PostgresCreateSchema, f as PostgresDisableRowLevelSecurity, h as PostgresDropType, i as PostgresAlterPolicyRename, l as PostgresCreateTable, m as PostgresDropPolicy, n as DropDefaultAction, o as PostgresCreateIndex, p as PostgresDropIndex, r as PostgresAlterIndexRename, s as PostgresCreatePolicy, t as AddColumnAction, u as PostgresCreateType } from \"./nodes-Bm2a7z6e.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction} / {@link dropDefaultAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n//#endregion\nexport { toRegclass as A, nativeEnumValueExistsAst as C, tableExistsAst as D, rlsPolicyExistsAst as E, tableIsEmptyAst as O, nativeEnumTypeExistsAst as S, rlsEnabledAst as T, columnNullabilityAst as _, createIndex as a, extensionExistsAst as b, createTable as c, dropDefaultAction as d, dropIndex as f, columnExistsAst as g, columnDefaultAst as h, alterTable as i, tablePrimaryKeyAst as k, createType as l, dropType as m, alterIndexRename as n, createPolicy as o, dropPolicy as p, alterPolicyRename as r, createSchema as s, addColumnAction as t, disableRowLevelSecurity as u, columnTypeAst as v, noNullValuesAst as w, indexExistsAst as x, constraintExistsAst as y };\n\n//# sourceMappingURL=ddl-BQFDVert.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,WAAW,eAAe;CAClC,OAAO,OAAO,GAAG;EAChB,QAAQ;EACR,UAAU;EACV,MAAM,OAAO,MAAM,eAAe,gBAAgB;EAClD,SAAS;GACR,SAAS;GACT,UAAU;EACX;CACD,CAAC;AACF;;;;;;;;;;AAUA,SAAS,eAAe,QAAQ,OAAO;CACtC,MAAM,WAAW,WAAW,wBAAwB;EACnD,IAAI;EACJ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC;CACtB,OAAO;EACN,mBAAm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AAS;CAC5B,OAAO,IAAI,mBAAmB,OAAO;AACtC;;;;;;;;AAQA,SAAS,aAAa,SAAS;CAC9B,MAAM,EAAE,OAAO,WAAW,GAAG,SAAS;CACtC,OAAO,IAAI,qBAAqB;EAC/B,GAAG;EACH,GAAG,UAAU,SAAS,UAAU,KAAK,IAAI,KAAK,IAAI,UAAU,KAAK,CAAC;EAClE,GAAG,UAAU,aAAa,cAAc,KAAK,IAAI,KAAK,IAAI,UAAU,SAAS,CAAC;CAC/E,CAAC;AACF;;;;;AAKA,SAAS,WAAW,SAAS;CAC5B,OAAO,IAAI,mBAAmB,OAAO;AACtC;;;;;AAKA,SAAS,kBAAkB,SAAS;CACnC,OAAO,IAAI,0BAA0B,OAAO;AAC7C;;;;;;;;AAQA,SAAS,YAAY,SAAS;CAC7B,MAAM,EAAE,UAAU,OAAO,GAAG,SAAS;CACrC,OAAO,IAAI,oBAAoB;EAC9B,GAAG;EACH,UAAU,aAAa,WAAW,EAAE,SAAS,SAAS,QAAQ,IAAI,EAAE,YAAY,UAAU,SAAS,UAAU,EAAE;EAC/G,OAAO,UAAU,KAAK,IAAI,KAAK,IAAI,UAAU,KAAK;CACnD,CAAC;AACF;;;;;AAKA,SAAS,UAAU,SAAS;CAC3B,OAAO,IAAI,kBAAkB,OAAO;AACrC;;;;;AAKA,SAAS,iBAAiB,SAAS;CAClC,OAAO,IAAI,yBAAyB,OAAO;AAC5C;;;;;AAKA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,gCAAgC,OAAO;AACnD"}
|
|
1
|
+
{"version":3,"file":"ddl-BzsT_-qY-Cdzm0YIK.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/ddl-BzsT_-qY.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { a as PostgresAlterTable, c as PostgresCreateSchema, f as PostgresDisableRowLevelSecurity, h as PostgresDropType, i as PostgresAlterPolicyRename, l as PostgresCreateTable, m as PostgresDropPolicy, n as DropDefaultAction, o as PostgresCreateIndex, p as PostgresDropIndex, r as PostgresAlterIndexRename, s as PostgresCreatePolicy, t as AddColumnAction, u as PostgresCreateType } from \"./nodes-Bm2a7z6e.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction} / {@link dropDefaultAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n//#endregion\nexport { toRegclass as A, nativeEnumValueExistsAst as C, tableExistsAst as D, rlsPolicyExistsAst as E, tableIsEmptyAst as O, nativeEnumTypeExistsAst as S, rlsEnabledAst as T, columnNullabilityAst as _, createIndex as a, extensionExistsAst as b, createTable as c, dropDefaultAction as d, dropIndex as f, columnExistsAst as g, columnDefaultAst as h, alterTable as i, tablePrimaryKeyAst as k, createType as l, dropType as m, alterIndexRename as n, createPolicy as o, dropPolicy as p, alterPolicyRename as r, createSchema as s, addColumnAction as t, disableRowLevelSecurity as u, columnT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3B,OAAO,IAAI,kBAAkB,OAAO;AACrC;;;;;AAKA,SAAS,iBAAiB,SAAS;CAClC,OAAO,IAAI,yBAAyB,OAAO;AAC5C;;;;;AAKA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,gCAAgC,OAAO;AACnD"}
|
package/dist/{default-normalizer-ByDD_gRm-CKeWEb0x.mjs → default-normalizer-C68YhUBS-BjOeKRhS.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as canonicalUuid } from "./codec-helpers-
|
|
1
|
+
import { r as canonicalUuid } from "./codec-helpers-BKrVHgYc-DFnb5u9l.mjs";
|
|
2
2
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
|
-
//#region ../../../3-targets/3-targets/postgres/dist/default-normalizer-
|
|
3
|
+
//#region ../../../3-targets/3-targets/postgres/dist/default-normalizer-C68YhUBS.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Pre-compiled regex patterns for performance.
|
|
6
6
|
* These are compiled once at module load time rather than on each function call.
|
|
@@ -502,4 +502,4 @@ function postgresResolveDefault(def, resolvedNativeType) {
|
|
|
502
502
|
//#endregion
|
|
503
503
|
export { postgresResolveDefault as n, parsePostgresDefault as t };
|
|
504
504
|
|
|
505
|
-
//# sourceMappingURL=default-normalizer-
|
|
505
|
+
//# sourceMappingURL=default-normalizer-C68YhUBS-BjOeKRhS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-normalizer-ByDD_gRm-CKeWEb0x.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-normalizer-ByDD_gRm.mjs"],"sourcesContent":["import { r as canonicalUuid } from \"./codec-helpers-BmUrP6U9.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/core/default-normalizer.ts\n/**\n* Pre-compiled regex patterns for performance.\n* These are compiled once at module load time rather than on each function call.\n*/\nconst NEXTVAL_PATTERN = /^nextval\\s*\\(/i;\nconst NOW_FUNCTION_PATTERN = /^(now\\s*\\(\\s*\\)|CURRENT_TIMESTAMP)$/i;\nconst CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\\s*\\(\\s*\\)$/i;\nconst TIMESTAMP_CAST_SUFFIX = /::timestamp(?:tz|\\s+(?:with|without)\\s+time\\s+zone)?$/i;\nconst TEXT_CAST_SUFFIX = /::text$/i;\nconst NOW_LITERAL_PATTERN = /^'now'$/i;\nconst UUID_PATTERN = /^gen_random_uuid\\s*\\(\\s*\\)$/i;\nconst UUID_OSSP_PATTERN = /^uuid_generate_v4\\s*\\(\\s*\\)$/i;\nconst NULL_PATTERN = /^NULL(?:::.+)?$/i;\nconst TRUE_PATTERN = /^true$/i;\nconst FALSE_PATTERN = /^false$/i;\n/**\n* A decimal numeral with an optional sign and an optional exponent. Postgres prints a `real` or\n* `double precision` default in exponent notation once its magnitude is large or small enough:\n* `'1e+20'::real`, `'1e-320'::double precision`.\n*/\nconst NUMERAL = String.raw`[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?`;\nconst NUMERIC_PATTERN = new RegExp(`^${NUMERAL}$`);\n/**\n* A type modifier: `(3)`, `(65,30)`, or a numeric type's negative scale, `(5,-2)`, which PostgreSQL\n* 15 and later accept.\n*/\nconst TYPE_MODIFIER = String.raw`\\(\\d+(?:,\\s*-?\\d+)?\\)`;\n/**\n* A cast target type: a builtin of one or more words, where any word may carry a modifier\n* (`timestamp(3) without time zone`, `numeric(65,30)`), or a quoted identifier (`\"AuditAction\"`);\n* either may be qualified by a possibly quoted schema (`audit.\"AuditAction\"`, `\"my schema\".t`).\n*/\nconst TYPE_NAME = String.raw`(?:(?:\"(?:[^\"]|\"\")+\"|\\w+)\\.)?(?:\"(?:[^\"]|\"\")+\"|\\w+(?:${TYPE_MODIFIER})?(?:\\s+\\w+(?:${TYPE_MODIFIER})?)*)`;\nconst QUOTED_LITERAL_PATTERN = new RegExp(`^'((?:[^']|'')*)'(?:::(${TYPE_NAME}))?$`);\nconst NUMBER_LITERAL_PATTERN = new RegExp(`^(${NUMERAL})(?:::(${TYPE_NAME}))?$`);\nconst PARENTHESISED_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::(${TYPE_NAME})$`, \"s\");\nconst INTEGER_PATTERN = /^-?\\d+$/;\nconst INTEGER_TYPE_PATTERN = /^(?:smallint|integer|bigint|int2|int4|int8)$/i;\nconst NUMBER_TYPE_PATTERN = new RegExp(`^(?:smallint|integer|bigint|int2|int4|int8|real|double precision|float4|float8|numeric|decimal)(?:${TYPE_MODIFIER})?$`, \"i\");\nconst DECIMAL_TEXT_TYPE_PATTERN = new RegExp(`^(?:bigint|int8|numeric|decimal)(?:${TYPE_MODIFIER})?$`, \"i\");\n/**\n* Matches a Postgres array literal default of the form `'{...}'::elemtype[]`.\n* The literal body is captured in group 1; the cast (including `[]`) is optional.\n* Examples: `'{}'::text[]`, `'{1,2}'::integer[]`, `'{}'`\n*/\nconst ARRAY_LITERAL_PATTERN = /^'(\\{.*\\})'(?:::.+\\[\\])?$/;\n/** `box` is the one core type whose array elements are delimited by `;`, not `,`. */\nconst SEMICOLON_DELIMITED_ELEMENT_TYPE_PATTERN = /^box$/i;\n/**\n* Matches the constructor spelling Postgres reports for a default written as\n* `ARRAY[...]`: `ARRAY['a'::text, 'b'::text]`, `ARRAY[1, 2]`, `ARRAY[]::text[]`.\n* The element list is captured in group 1; the outer cast is optional.\n*/\nconst ARRAY_CONSTRUCTOR_PATTERN = new RegExp(String.raw`^ARRAY\\[(.*?)\\](?:::${TYPE_NAME}\\[\\])?$`, \"is\");\nconst OUTER_ARRAY_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::${TYPE_NAME}\\[\\]$`, \"s\");\n/**\n* Returns the canonical expression for a timestamp default function, or undefined\n* if the expression is not a recognized timestamp default.\n*\n* Keeps now()/CURRENT_TIMESTAMP and clock_timestamp() distinct:\n* - now(), CURRENT_TIMESTAMP, ('now'::text)::timestamp... → 'now()'\n* - clock_timestamp(), clock_timestamp()::timestamptz → 'clock_timestamp()'\n*\n* These are semantically different in Postgres: now() returns the transaction\n* start time (constant within a transaction), while clock_timestamp() returns\n* the actual wall-clock time (can differ across rows in a single INSERT).\n*/\nfunction canonicalizeTimestampDefault(expr) {\n\tif (NOW_FUNCTION_PATTERN.test(expr)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(expr)) return \"clock_timestamp()\";\n\tif (!TIMESTAMP_CAST_SUFFIX.test(expr)) return void 0;\n\tlet inner = expr.replace(TIMESTAMP_CAST_SUFFIX, \"\").trim();\n\tif (inner.startsWith(\"(\") && inner.endsWith(\")\")) inner = inner.slice(1, -1).trim();\n\tif (NOW_FUNCTION_PATTERN.test(inner)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(inner)) return \"clock_timestamp()\";\n\tinner = inner.replace(TEXT_CAST_SUFFIX, \"\").trim();\n\tif (NOW_LITERAL_PATTERN.test(inner)) return \"now()\";\n}\n/**\n* A numeral cast to a number type. A cast to an integer type rounds a fraction, so that numeral is\n* not the value.\n*/\nfunction castNumber(numeral, castType) {\n\tif (castType === void 0) return {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n\tif (!NUMBER_TYPE_PATTERN.test(castType)) return void 0;\n\tif (INTEGER_TYPE_PATTERN.test(castType) && !INTEGER_PATTERN.test(numeral)) return void 0;\n\treturn {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n}\n/**\n* Reads a literal by its cast type: `'-1'::integer` and `(1)::bigint` are numbers, `'a'::text` is a\n* string. A parenthesised cast is read only from number to number: `('now'::text)::date` is\n* evaluated on insert. Anything else, such as an operator or a function call, is not a literal.\n*/\nfunction readLiteralToken(expression) {\n\tconst quoted = QUOTED_LITERAL_PATTERN.exec(expression);\n\tif (quoted?.[1] !== void 0) {\n\t\tconst text = quoted[1].replace(/''/g, \"'\");\n\t\tconst castType = quoted[2];\n\t\treturn castType !== void 0 && NUMBER_TYPE_PATTERN.test(castType) && NUMERIC_PATTERN.test(text) ? castNumber(text, castType) : {\n\t\t\tkind: \"string\",\n\t\t\ttext\n\t\t};\n\t}\n\tconst number = NUMBER_LITERAL_PATTERN.exec(expression);\n\tif (number?.[1] !== void 0) return castNumber(number[1], number[2]);\n\tconst parenthesised = PARENTHESISED_CAST_PATTERN.exec(expression);\n\tif (parenthesised?.[1] === void 0 || parenthesised[2] === void 0) return void 0;\n\tconst inner = readLiteralToken(parenthesised[1].trim());\n\treturn inner?.kind === \"number\" ? castNumber(inner.numeral, parenthesised[2]) : void 0;\n}\n/**\n* `int8` and `numeric` defaults are decimal text, the JSON form of their codecs, so no digit is\n* lost to a JavaScript number. A column that is not a number type stores the numeral as text.\n*/\nfunction numberValue(numeral, nativeType) {\n\tif (nativeType !== void 0 && DECIMAL_TEXT_TYPE_PATTERN.test(nativeType)) return numeral;\n\tif (nativeType !== void 0 && !NUMBER_TYPE_PATTERN.test(nativeType)) return numeral;\n\tconst parsed = Number(numeral);\n\treturn Number.isFinite(parsed) ? parsed : void 0;\n}\n/**\n* Splits a Postgres array literal body (without the enclosing braces) into its\n* element tokens, honouring quoting. A comma only separates elements when it is\n* outside double quotes; inside a quoted element a doubled quote (`\"\"`) or a\n* backslash-escaped quote (`\\\"`) is a literal quote, and a backslash escapes the\n* next character. Returns undefined if the body is malformed (e.g. an unbalanced\n* quote), nests an array, which puts a brace outside quotes, or escapes a character outside\n* quotes with a backslash, which Postgres never prints.\n*/\nfunction splitArrayElements(inner) {\n\tconst tokens = [];\n\tlet current = \"\";\n\tlet inQuotes = false;\n\tlet quoted = false;\n\tfor (let i = 0; i < inner.length; i++) {\n\t\tconst char = inner[i];\n\t\tif (inQuotes) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\tconst next = inner[i + 1];\n\t\t\t\tif (next === void 0) return void 0;\n\t\t\t\tcurrent += next;\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === \"\\\"\") {\n\t\t\t\tif (inner[i + 1] === \"\\\"\") {\n\t\t\t\t\tcurrent += \"\\\"\";\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tinQuotes = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcurrent += char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\") {\n\t\t\tinQuotes = true;\n\t\t\tquoted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"{\" || char === \"}\" || char === \"\\\\\") return void 0;\n\t\tif (char === \",\") {\n\t\t\ttokens.push({\n\t\t\t\tvalue: current,\n\t\t\t\tquoted\n\t\t\t});\n\t\t\tcurrent = \"\";\n\t\t\tquoted = false;\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\tif (inQuotes) return void 0;\n\ttokens.push({\n\t\tvalue: current,\n\t\tquoted\n\t});\n\treturn tokens;\n}\nconst BOOLEAN_TYPE_PATTERN = /^(?:bool|boolean)$/i;\nconst BOOLEAN_TRUE_TOKEN_PATTERN = /^(?:t|true)$/i;\nconst BOOLEAN_FALSE_TOKEN_PATTERN = /^(?:f|false)$/i;\nconst BYTEA_HEX_INPUT = /^\\\\x((?:[ \\t\\n\\r]*[0-9A-Fa-f]{2})*)[ \\t\\n\\r]*$/;\nconst BYTEA_ESCAPE_TOKEN = /\\\\\\\\|\\\\[0-3][0-7]{2}|[^\\\\]+|\\\\/g;\nfunction byteaEscapeTokenBytes(token) {\n\tif (token === \"\\\\\\\\\") return Buffer.from(\"\\\\\");\n\tif (token === \"\\\\\") return void 0;\n\tif (token.startsWith(\"\\\\\")) return Buffer.from([Number.parseInt(token.slice(1), 8)]);\n\treturn Buffer.from(token, \"utf8\");\n}\n/**\n* The bytes of `bytea` input text, as the base64 the codec stores, or `undefined` for text\n* PostgreSQL refuses. Text starting `\\x` is hex, two digits for each byte. Any other text is the\n* escape format: `\\\\` is a backslash, `\\` and three octal digits is that byte, and any other\n* character is its UTF-8 bytes.\n*/\nfunction byteaInputBase64(text) {\n\tconst hex = BYTEA_HEX_INPUT.exec(text)?.[1];\n\tif (hex !== void 0) return Buffer.from(hex.replace(/\\s/g, \"\"), \"hex\").toString(\"base64\");\n\tif (text.startsWith(\"\\\\x\")) return void 0;\n\tconst chunks = [];\n\tfor (const [token] of text.matchAll(BYTEA_ESCAPE_TOKEN)) {\n\t\tconst bytes = byteaEscapeTokenBytes(token);\n\t\tif (bytes === void 0) return void 0;\n\t\tchunks.push(bytes);\n\t}\n\treturn Buffer.concat(chunks).toString(\"base64\");\n}\n/**\n* A text default as the column stores it: a uuid in the form PostgreSQL writes, which its codec\n* reads, and a bytea as the base64 of its bytes. `undefined` for bytea text PostgreSQL refuses.\n*/\nfunction storedText(text, nativeType) {\n\tif (nativeType === \"bytea\") return byteaInputBase64(text);\n\treturn nativeType === \"uuid\" ? canonicalUuid(text) ?? text : text;\n}\n/**\n* Reads an unquoted, non-NULL array element by the column's element type. Only text Postgres itself\n* would print is read; anything else keeps the raw expression.\n*/\nfunction unquotedElementValue(token, elementType) {\n\tif (token === \"\") return void 0;\n\tif (BOOLEAN_TYPE_PATTERN.test(elementType)) {\n\t\tif (BOOLEAN_TRUE_TOKEN_PATTERN.test(token)) return true;\n\t\tif (BOOLEAN_FALSE_TOKEN_PATTERN.test(token)) return false;\n\t\treturn;\n\t}\n\tif (NUMBER_TYPE_PATTERN.test(elementType)) return NUMERIC_PATTERN.test(token) ? numberValue(token, elementType) : void 0;\n\tif (isJsonElementType(elementType)) {\n\t\tconst document = readJsonDocument(token);\n\t\treturn document.kind === \"json\" ? document.value : void 0;\n\t}\n\treturn storedText(token, elementType);\n}\n/**\n* Parses a Postgres array literal body (`{...}`) into a JS array of primitives.\n* Returns undefined if the body cannot be reliably parsed.\n*\n* Handles:\n* - `{}` → `[]`\n* - `{elem1,elem2,...}` → `[elem1, elem2, ...]`, each unquoted element read by the element type\n* - quoted elements that contain commas, doubled/escaped quotes, and the literal\n* strings `NULL`/`true`/`false` (a quoted token is always a string)\n*/\nfunction parseArrayLiteralBody(body, elementType) {\n\tconst inner = body.slice(1, -1).trim();\n\tif (inner === \"\") return [];\n\tconst tokens = splitArrayElements(inner);\n\tif (tokens === void 0) return void 0;\n\tconst result = [];\n\tfor (const token of tokens) {\n\t\tif (token.quoted) {\n\t\t\tconst value = textElementValue(token.value, elementType);\n\t\t\tif (value === void 0) return void 0;\n\t\t\tresult.push(value);\n\t\t\tcontinue;\n\t\t}\n\t\tconst el = token.value.trim();\n\t\tif (el.toUpperCase() === \"NULL\") {\n\t\t\tif (isJsonElementType(elementType)) return void 0;\n\t\t\tresult.push(null);\n\t\t\tcontinue;\n\t\t}\n\t\tconst value = unquotedElementValue(el, elementType);\n\t\tif (value === void 0) return void 0;\n\t\tresult.push(value);\n\t}\n\treturn result;\n}\n/**\n* Splits an `ARRAY[...]` element list on the commas outside quotes and parentheses, so\n* `numeric(65,30)` and `'a,b'` stay inside one element. A doubled quote inside an element is a\n* literal quote, so it never closes one.\n*/\nfunction splitConstructorElements(body) {\n\tconst elements = [];\n\tlet current = \"\";\n\tlet quote;\n\tlet depth = 0;\n\tfor (const char of body) {\n\t\tif (quote !== void 0) {\n\t\t\tif (char === quote) quote = void 0;\n\t\t} else if (char === \"'\" || char === \"\\\"\") quote = char;\n\t\telse if (char === \"(\") depth++;\n\t\telse if (char === \")\") depth--;\n\t\telse if (char === \",\" && depth === 0) {\n\t\t\telements.push(current);\n\t\t\tcurrent = \"\";\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\telements.push(current);\n\treturn elements.map((element) => element.trim());\n}\n/**\n* Reads one `ARRAY[...]` element: NULL, a boolean, or a literal read by its cast type. Anything\n* else, such as a function call, means the constructor is not a literal and the caller keeps the\n* raw expression.\n*/\nfunction parseConstructorElement(element, elementType) {\n\tif (NULL_PATTERN.test(element)) return isJsonElementType(elementType) ? void 0 : null;\n\tif (TRUE_PATTERN.test(element)) return true;\n\tif (FALSE_PATTERN.test(element)) return false;\n\tconst token = readLiteralToken(element);\n\tif (token === void 0) return void 0;\n\treturn token.kind === \"number\" ? numberValue(token.numeral, elementType) : textElementValue(token.text, elementType);\n}\nfunction isJsonElementType(elementType) {\n\treturn elementType === \"json\" || elementType === \"jsonb\";\n}\n/**\n* A `json`/`jsonb` element's text is a JSON document, as it is on a scalar column of the same type.\n* Undefined keeps the raw expression: the document holds a number a JavaScript number would change.\n*/\nfunction textElementValue(text, elementType) {\n\tif (!isJsonElementType(elementType)) return storedText(text, elementType);\n\tconst document = readJsonDocument(text);\n\tif (document.kind === \"inexact\") return void 0;\n\treturn document.kind === \"json\" ? document.value : text;\n}\n/**\n* Parses JSON text. Postgres keeps every digit of a json number, so a document holding a number that\n* would not print back as the same value once read into a JavaScript number, such as\n* `12345678901234567890` or `1e400`, is `inexact`. `1.0` prints back as `1`, the same value.\n*/\nfunction readJsonDocument(text) {\n\tlet exact = true;\n\tconst reviver = (_key, value, context) => {\n\t\tif (typeof value === \"number\" && !keepsJsonNumber(value, context?.source)) exact = false;\n\t\treturn value;\n\t};\n\tlet value;\n\ttry {\n\t\tvalue = blindCast(JSON.parse(text, reviver));\n\t} catch {\n\t\treturn { kind: \"invalid\" };\n\t}\n\treturn exact ? {\n\t\tkind: \"json\",\n\t\tvalue\n\t} : { kind: \"inexact\" };\n}\nfunction keepsJsonNumber(value, source) {\n\tif (!Number.isFinite(value) || source === void 0) return false;\n\tconst written = decimalValue(source);\n\treturn written !== void 0 && written === decimalValue(String(value));\n}\nconst DECIMAL_PARTS_PATTERN = /^(-?)(\\d+)(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/;\n/** A numeral's value as `<sign><digits>e<exponent>`, with no leading or trailing zero digits. */\nfunction decimalValue(numeral) {\n\tconst parts = DECIMAL_PARTS_PATTERN.exec(numeral);\n\tif (parts === null) return void 0;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\", exponent = \"0\"] = parts;\n\tconst digits = `${whole}${fraction}`.replace(/^0+/, \"\");\n\tif (digits === \"\") return \"0\";\n\tconst significant = digits.replace(/0+$/, \"\");\n\treturn `${sign}${significant}e${Number(exponent) - fraction.length + digits.length - significant.length}`;\n}\nfunction parseArrayConstructor(body, elementType) {\n\tif (body.trim() === \"\") return [];\n\tconst values = [];\n\tfor (const element of splitConstructorElements(body)) {\n\t\tconst value = parseConstructorElement(element, elementType);\n\t\tif (value === void 0) return void 0;\n\t\tvalues.push(value);\n\t}\n\treturn values;\n}\nfunction unwrapOuterArrayCasts(expression) {\n\tconst match = OUTER_ARRAY_CAST_PATTERN.exec(expression);\n\treturn match?.[1] === void 0 ? expression : unwrapOuterArrayCasts(match[1].trim());\n}\n/**\n* Parses a raw Postgres column default expression into a normalized ColumnDefault.\n* This enables semantic comparison between contract defaults and introspected schema defaults.\n*\n* Used by the migration diff layer to normalize raw database defaults during comparison,\n* keeping the introspection layer focused on faithful data capture.\n*\n* @param rawDefault - Raw default expression from information_schema.columns.column_default\n* @param nativeType - Native column type, used for type-aware parsing (array, int8, numeric, JSON)\n* @returns Normalized ColumnDefault or undefined if the expression cannot be parsed\n*/\nfunction parsePostgresDefault(rawDefault, nativeType) {\n\tconst trimmed = rawDefault.trim();\n\tconst normalizedType = nativeType?.toLowerCase();\n\tif (NEXTVAL_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"autoincrement()\"\n\t};\n\tif (normalizedType?.endsWith(\"[]\")) {\n\t\tconst elementType = normalizedType.slice(0, -2);\n\t\tconst arrayMatch = trimmed.match(ARRAY_LITERAL_PATTERN);\n\t\tif (arrayMatch?.[1] !== void 0 && !SEMICOLON_DELIMITED_ELEMENT_TYPE_PATTERN.test(elementType)) {\n\t\t\tconst parsed = parseArrayLiteralBody(arrayMatch[1].replace(/''/g, \"'\"), elementType);\n\t\t\tif (parsed !== void 0) return {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: parsed\n\t\t\t};\n\t\t}\n\t\tconst constructorMatch = unwrapOuterArrayCasts(trimmed).match(ARRAY_CONSTRUCTOR_PATTERN);\n\t\tif (constructorMatch?.[1] !== void 0) {\n\t\t\tconst parsed = parseArrayConstructor(constructorMatch[1], elementType);\n\t\t\tif (parsed !== void 0) return {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: parsed\n\t\t\t};\n\t\t}\n\t\tif (NULL_PATTERN.test(trimmed)) return {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: null\n\t\t};\n\t\treturn {\n\t\t\tkind: \"function\",\n\t\t\texpression: trimmed\n\t\t};\n\t}\n\tconst canonicalTimestamp = canonicalizeTimestampDefault(trimmed);\n\tif (canonicalTimestamp) return {\n\t\tkind: \"function\",\n\t\texpression: canonicalTimestamp\n\t};\n\tif (UUID_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"gen_random_uuid()\"\n\t};\n\tif (UUID_OSSP_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"gen_random_uuid()\"\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: null\n\t};\n\tif (TRUE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: true\n\t};\n\tif (FALSE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: false\n\t};\n\tconst token = readLiteralToken(trimmed);\n\tif (token === void 0) return {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n\tif (token.kind === \"number\") {\n\t\tconst value = numberValue(token.numeral, normalizedType);\n\t\treturn value === void 0 ? void 0 : {\n\t\t\tkind: \"literal\",\n\t\t\tvalue\n\t\t};\n\t}\n\tif (normalizedType !== void 0 && isJsonElementType(normalizedType)) {\n\t\tconst document = readJsonDocument(token.text);\n\t\tif (document.kind === \"inexact\") return {\n\t\t\tkind: \"function\",\n\t\t\texpression: trimmed\n\t\t};\n\t\tif (document.kind === \"json\") return {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: document.value\n\t\t};\n\t}\n\tconst text = storedText(token.text, normalizedType);\n\treturn text === void 0 ? {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t} : {\n\t\tkind: \"literal\",\n\t\tvalue: text\n\t};\n}\n/**\n* Normalizes a contract-declared default through {@link parsePostgresDefault}\n* — the same parser introspection uses — so a function-shaped default the\n* parser recognizes as a literal (e.g. sql`'{}'::jsonb`)\n* resolves to the same `resolvedDefault` shape a live introspected column\n* would produce. Compensates once, at `SchemaIR` construction of the\n* expected (contract-derived) side (`contractToSchemaIR`'s `resolveDefault`\n* hook), instead of at every site that later compares the two sides. A\n* literal default, or a function form the parser doesn't recognize, passes\n* through unchanged; `nextval(...)` normalizes to `autoincrement()` on both\n* sides, matching a `serial`/identity column's introspected counterpart.\n*/\nfunction postgresResolveDefault(def, resolvedNativeType) {\n\tif (def.kind !== \"function\") return def;\n\treturn parsePostgresDefault(def.expression, resolvedNativeType) ?? def;\n}\n//#endregion\nexport { postgresResolveDefault as n, parsePostgresDefault as t };\n\n//# sourceMappingURL=default-normalizer-ByDD_gRm.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,kBAAkB;AACxB,MAAM,uBAAuB;AAC7B,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,gBAAgB;;;;;;AAMtB,MAAM,UAAU,OAAO,GAAG;AAC1B,MAAM,kBAAkB,IAAI,OAAO,IAAI,QAAQ,EAAE;;;;;AAKjD,MAAM,gBAAgB,OAAO,GAAG;;;;;;AAMhC,MAAM,YAAY,OAAO,GAAG,wDAAwD,cAAc,gBAAgB,cAAc;AAChI,MAAM,yBAAyB,IAAI,OAAO,0BAA0B,UAAU,KAAK;AACnF,MAAM,yBAAyB,IAAI,OAAO,KAAK,QAAQ,SAAS,UAAU,KAAK;AAC/E,MAAM,6BAA6B,IAAI,OAAO,OAAO,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AAG,OAAO;EACtC,MAAM;EACN,YAAY;CACb;CACA,IAAI,kBAAkB,KAAK,OAAO,GAAG,OAAO;EAC3C,MAAM;EACN,YAAY;CACb;CACA,IAAI,aAAa,KAAK,OAAO,GAAG,OAAO;EACtC,MAAM;EACN,OAAO;CACR;CACA,IAAI,aAAa,KAAK,OAAO,GAAG,OAAO;EACtC,MAAM;EACN,OAAO;CACR;CACA,IAAI,cAAc,KAAK,OAAO,GAAG,OAAO;EACvC,MAAM;EACN,OAAO;CACR;CACA,MAAM,QAAQ,iBAAiB,OAAO;CACtC,IAAI,UAAU,KAAK,GAAG,OAAO;EAC5B,MAAM;EACN,YAAY;CACb;CACA,IAAI,MAAM,SAAS,UAAU;EAC5B,MAAM,QAAQ,YAAY,MAAM,SAAS,cAAc;EACvD,OAAO,UAAU,KAAK,IAAI,KAAK,IAAI;GAClC,MAAM;GACN;EACD;CACD;CACA,IAAI,mBAAmB,KAAK,KAAK,kBAAkB,cAAc,GAAG;EACnE,MAAM,WAAW,iBAAiB,MAAM,IAAI;EAC5C,IAAI,SAAS,SAAS,WAAW,OAAO;GACvC,MAAM;GACN,YAAY;EACb;EACA,IAAI,SAAS,SAAS,QAAQ,OAAO;GACpC,MAAM;GACN,OAAO,SAAS;EACjB;CACD;CACA,MAAM,OAAO,WAAW,MAAM,MAAM,cAAc;CAClD,OAAO,SAAS,KAAK,IAAI;EACxB,MAAM;EACN,YAAY;CACb,IAAI;EACH,MAAM;EACN,OAAO;CACR;AACD;;;;;;;;;;;;;AAaA,SAAS,uBAAuB,KAAK,oBAAoB;CACxD,IAAI,IAAI,SAAS,YAAY,OAAO;CACpC,OAAO,qBAAqB,IAAI,YAAY,kBAAkB,KAAK;AACpE"}
|
|
1
|
+
{"version":3,"file":"default-normalizer-C68YhUBS-BjOeKRhS.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-normalizer-C68YhUBS.mjs"],"sourcesContent":["import { r as canonicalUuid } from \"./codec-helpers-BKrVHgYc.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/core/default-normalizer.ts\n/**\n* Pre-compiled regex patterns for performance.\n* These are compiled once at module load time rather than on each function call.\n*/\nconst NEXTVAL_PATTERN = /^nextval\\s*\\(/i;\nconst NOW_FUNCTION_PATTERN = /^(now\\s*\\(\\s*\\)|CURRENT_TIMESTAMP)$/i;\nconst CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\\s*\\(\\s*\\)$/i;\nconst TIMESTAMP_CAST_SUFFIX = /::timestamp(?:tz|\\s+(?:with|without)\\s+time\\s+zone)?$/i;\nconst TEXT_CAST_SUFFIX = /::text$/i;\nconst NOW_LITERAL_PATTERN = /^'now'$/i;\nconst UUID_PATTERN = /^gen_random_uuid\\s*\\(\\s*\\)$/i;\nconst UUID_OSSP_PATTERN = /^uuid_generate_v4\\s*\\(\\s*\\)$/i;\nconst NULL_PATTERN = /^NULL(?:::.+)?$/i;\nconst TRUE_PATTERN = /^true$/i;\nconst FALSE_PATTERN = /^false$/i;\n/**\n* A decimal numeral with an optional sign and an optional exponent. Postgres prints a `real` or\n* `double precision` default in exponent notation once its magnitude is large or small enough:\n* `'1e+20'::real`, `'1e-320'::double precision`.\n*/\nconst NUMERAL = String.raw`[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?`;\nconst NUMERIC_PATTERN = new RegExp(`^${NUMERAL}$`);\n/**\n* A type modifier: `(3)`, `(65,30)`, or a numeric type's negative scale, `(5,-2)`, which PostgreSQL\n* 15 and later accept.\n*/\nconst TYPE_MODIFIER = String.raw`\\(\\d+(?:,\\s*-?\\d+)?\\)`;\n/**\n* A cast target type: a builtin of one or more words, where any word may carry a modifier\n* (`timestamp(3) without time zone`, `numeric(65,30)`), or a quoted identifier (`\"AuditAction\"`);\n* either may be qualified by a possibly quoted schema (`audit.\"AuditAction\"`, `\"my schema\".t`).\n*/\nconst TYPE_NAME = String.raw`(?:(?:\"(?:[^\"]|\"\")+\"|\\w+)\\.)?(?:\"(?:[^\"]|\"\")+\"|\\w+(?:${TYPE_MODIFIER})?(?:\\s+\\w+(?:${TYPE_MODIFIER})?)*)`;\nconst QUOTED_LITERAL_PATTERN = new RegExp(`^'((?:[^']|'')*)'(?:::(${TYPE_NAME}))?$`);\nconst NUMBER_LITERAL_PATTERN = new RegExp(`^(${NUMERAL})(?:::(${TYPE_NAME}))?$`);\nconst PARENTHESISED_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::(${TYPE_NAME})$`, \"s\");\nconst INTEGER_PATTERN = /^-?\\d+$/;\nconst INTEGER_TYPE_PATTERN = /^(?:smallint|integer|bigint|int2|int4|int8)$/i;\nconst NUMBER_TYPE_PATTERN = new RegExp(`^(?:smallint|integer|bigint|int2|int4|int8|real|double precision|float4|float8|numeric|decimal)(?:${TYPE_MODIFIER})?$`, \"i\");\nconst DECIMAL_TEXT_TYPE_PATTERN = new RegExp(`^(?:bigint|int8|numeric|decimal)(?:${TYPE_MODIFIER})?$`, \"i\");\n/**\n* Matches a Postgres array literal default of the form `'{...}'::elemtype[]`.\n* The literal body is captured in group 1; the cast (including `[]`) is optional.\n* Examples: `'{}'::text[]`, `'{1,2}'::integer[]`, `'{}'`\n*/\nconst ARRAY_LITERAL_PATTERN = /^'(\\{.*\\})'(?:::.+\\[\\])?$/;\n/** `box` is the one core type whose array elements are delimited by `;`, not `,`. */\nconst SEMICOLON_DELIMITED_ELEMENT_TYPE_PATTERN = /^box$/i;\n/**\n* Matches the constructor spelling Postgres reports for a default written as\n* `ARRAY[...]`: `ARRAY['a'::text, 'b'::text]`, `ARRAY[1, 2]`, `ARRAY[]::text[]`.\n* The element list is captured in group 1; the outer cast is optional.\n*/\nconst ARRAY_CONSTRUCTOR_PATTERN = new RegExp(String.raw`^ARRAY\\[(.*?)\\](?:::${TYPE_NAME}\\[\\])?$`, \"is\");\nconst OUTER_ARRAY_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::${TYPE_NAME}\\[\\]$`, \"s\");\n/**\n* Returns the canonical expression for a timestamp default function, or undefined\n* if the expression is not a recognized timestamp default.\n*\n* Keeps now()/CURRENT_TIMESTAMP and clock_timestamp() distinct:\n* - now(), CURRENT_TIMESTAMP, ('now'::text)::timestamp... → 'now()'\n* - clock_timestamp(), clock_timestamp()::timestamptz → 'clock_timestamp()'\n*\n* These are semantically different in Postgres: now() returns the transaction\n* start time (constant within a transaction), while clock_timestamp() returns\n* the actual wall-clock time (can differ across rows in a single INSERT).\n*/\nfunction canonicalizeTimestampDefault(expr) {\n\tif (NOW_FUNCTION_PATTERN.test(expr)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(expr)) return \"clock_timestamp()\";\n\tif (!TIMESTAMP_CAST_SUFFIX.test(expr)) return void 0;\n\tlet inner = expr.replace(TIMESTAMP_CAST_SUFFIX, \"\").trim();\n\tif (inner.startsWith(\"(\") && inner.endsWith(\")\")) inner = inner.slice(1, -1).trim();\n\tif (NOW_FUNCTION_PATTERN.test(inner)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(inner)) return \"clock_timestamp()\";\n\tinner = inner.replace(TEXT_CAST_SUFFIX, \"\").trim();\n\tif (NOW_LITERAL_PATTERN.test(inner)) return \"now()\";\n}\n/**\n* A numeral cast to a number type. A cast to an integer type rounds a fraction, so that numeral is\n* not the value.\n*/\nfunction castNumber(numeral, castType) {\n\tif (castType === void 0) return {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n\tif (!NUMBER_TYPE_PATTERN.test(castType)) return void 0;\n\tif (INTEGER_TYPE_PATTERN.test(castType) && !INTEGER_PATTERN.test(numeral)) return void 0;\n\treturn {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n}\n/**\n* Reads a literal by its cast type: `'-1'::integer` and `(1)::bigint` are numbers, `'a'::text` is a\n* string. A parenthesised cast is read only from number to number: `('now'::text)::date` is\n* evaluated on insert. Anything else, such as an operator or a function call, is not a literal.\n*/\nfunction readLiteralToken(expression) {\n\tconst quoted = QUOTED_LITERAL_PATTERN.exec(expression);\n\tif (quoted?.[1] !== void 0) {\n\t\tconst text = quoted[1].replace(/''/g, \"'\");\n\t\tconst castType = quoted[2];\n\t\treturn castType !== void 0 && NUMBER_TYPE_PATTERN.test(castType) && NUMERIC_PATTERN.test(text) ? castNumber(text, castType) : {\n\t\t\tkind: \"string\",\n\t\t\ttext\n\t\t};\n\t}\n\tconst number = NUMBER_LITERAL_PATTERN.exec(expression);\n\tif (number?.[1] !== void 0) return castNumber(number[1], number[2]);\n\tconst parenthesised = PARENTHESISED_CAST_PATTERN.exec(expression);\n\tif (parenthesised?.[1] === void 0 || parenthesised[2] === void 0) return void 0;\n\tconst inner = readLiteralToken(parenthesised[1].trim());\n\treturn inner?.kind === \"number\" ? castNumber(inner.numeral, parenthesised[2]) : void 0;\n}\n/**\n* `int8` and `numeric` defaults are decimal text, the JSON form of their codecs, so no digit is\n* lost to a JavaScript number. A column that is not a number type stores the numeral as text.\n*/\nfunction numberValue(numeral, nativeType) {\n\tif (nativeType !== void 0 && DECIMAL_TEXT_TYPE_PATTERN.test(nativeType)) return numeral;\n\tif (nativeType !== void 0 && !NUMBER_TYPE_PATTERN.test(nativeType)) return numeral;\n\tconst parsed = Number(numeral);\n\treturn Number.isFinite(parsed) ? parsed : void 0;\n}\n/**\n* Splits a Postgres array literal body (without the enclosing braces) into its\n* element tokens, honouring quoting. A comma only separates elements when it is\n* outside double quotes; inside a quoted element a doubled quote (`\"\"`) or a\n* backslash-escaped quote (`\\\"`) is a literal quote, and a backslash escapes the\n* next character. Returns undefined if the body is malformed (e.g. an unbalanced\n* quote), nests an array, which puts a brace outside quotes, or escapes a character outside\n* quotes with a backslash, which Postgres never prints.\n*/\nfunction splitArrayElements(inner) {\n\tconst tokens = [];\n\tlet current = \"\";\n\tlet inQuotes = false;\n\tlet quoted = false;\n\tfor (let i = 0; i < inner.length; i++) {\n\t\tconst char = inner[i];\n\t\tif (inQuotes) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\tconst next = inner[i + 1];\n\t\t\t\tif (next === void 0) return void 0;\n\t\t\t\tcurrent += next;\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === \"\\\"\") {\n\t\t\t\tif (inner[i + 1] === \"\\\"\") {\n\t\t\t\t\tcurrent += \"\\\"\";\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tinQuotes = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcurrent += char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\") {\n\t\t\tinQuotes = true;\n\t\t\tquoted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"{\" || char === \"}\" || char === \"\\\\\") return void 0;\n\t\tif (char === \",\") {\n\t\t\ttokens.push({\n\t\t\t\tvalue: current,\n\t\t\t\tquoted\n\t\t\t});\n\t\t\tcurrent = \"\";\n\t\t\tquoted = false;\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\tif (inQuotes) return void 0;\n\ttokens.push({\n\t\tvalue: current,\n\t\tquoted\n\t});\n\treturn tokens;\n}\nconst BOOLEAN_TYPE_PATTERN = /^(?:bool|boolean)$/i;\nconst BOOLEAN_TRUE_TOKEN_PATTERN = /^(?:t|true)$/i;\nconst BOOLEAN_FALSE_TOKEN_PATTERN = /^(?:f|false)$/i;\nconst BYTEA_HEX_INPUT = /^\\\\x((?:[ \\t\\n\\r]*[0-9A-Fa-f]{2})*)[ \\t\\n\\r]*$/;\nconst BYTEA_ESCAPE_TOKEN = /\\\\\\\\|\\\\[0-3][0-7]{2}|[^\\\\]+|\\\\/g;\nfunction byteaEscapeTokenBytes(token) {\n\tif (token === \"\\\\\\\\\") return Buffer.from(\"\\\\\");\n\tif (token === \"\\\\\") return void 0;\n\tif (token.startsWith(\"\\\\\")) return Buffer.from([Number.parseInt(token.slice(1), 8)]);\n\treturn Buffer.from(token, \"utf8\");\n}\n/**\n* The bytes of `bytea` input text, as the base64 the codec stores, or `undefined` for text\n* PostgreSQL refuses. Text starting `\\x` is hex, two digits for each byte. Any other text is the\n* escape format: `\\\\` is a backslash, `\\` and three octal digits is that byte, and any other\n* character is its UTF-8 bytes.\n*/\nfunction byteaInputBase64(text) {\n\tconst hex = BYTEA_HEX_INPUT.exec(text)?.[1];\n\tif (hex !== void 0) return Buffer.from(hex.replace(/\\s/g, \"\"), \"hex\").toString(\"base64\");\n\tif (text.startsWith(\"\\\\x\")) return void 0;\n\tconst chunks = [];\n\tfor (const [token] of text.matchAll(BYTEA_ESCAPE_TOKEN)) {\n\t\tconst bytes = byteaEscapeTokenBytes(token);\n\t\tif (bytes === void 0) return void 0;\n\t\tchunks.push(bytes);\n\t}\n\treturn Buffer.concat(chunks).toString(\"base64\");\n}\n/**\n* A text default as the column stores it: a uuid in the form PostgreSQL writes, which its codec\n* reads, and a bytea as the base64 of its bytes. `undefined` for bytea text PostgreSQL refuses.\n*/\nfunction storedText(text, nativeType) {\n\tif (nativeType === \"bytea\") return byteaInputBase64(text);\n\treturn nativeType === \"uuid\" ? canonicalUuid(text) ?? text : text;\n}\n/**\n* Reads an unquoted, non-NULL array element by the column's element type. Only text Postgres itself\n* would print is read; anything else keeps the raw expression.\n*/\nfunction unquotedElementValue(token, elementType) {\n\tif (token === \"\") return void 0;\n\tif (BOOLEAN_TYPE_PATTERN.test(elementType)) {\n\t\tif (BOOLEAN_TRUE_TOKEN_PATTERN.test(token)) return true;\n\t\tif (BOOLEAN_FALSE_TOKEN_PATTERN.test(token)) return false;\n\t\treturn;\n\t}\n\tif (NUMBER_TYPE_PATTERN.test(elementType)) return NUMERIC_PATTERN.test(token) ? numberValue(token, elementType) : void 0;\n\tif (isJsonElementType(elementType)) {\n\t\tconst document = readJsonDocument(token);\n\t\treturn document.kind === \"json\" ? document.value : void 0;\n\t}\n\treturn storedText(token, elementType);\n}\n/**\n* Parses a Postgres array literal body (`{...}`) into a JS array of primitives.\n* Returns undefined if the body cannot be reliably parsed.\n*\n* Handles:\n* - `{}` → `[]`\n* - `{elem1,elem2,...}` → `[elem1, elem2, ...]`, each unquoted element read by the element type\n* - quoted elements that contain commas, doubled/escaped quotes, and the literal\n* strings `NULL`/`true`/`false` (a quoted token is always a string)\n*/\nfunction parseArrayLiteralBody(body, elementType) {\n\tconst inner = body.slice(1, -1).trim();\n\tif (inner === \"\") return [];\n\tconst tokens = splitArrayElements(inner);\n\tif (tokens === void 0) return void 0;\n\tconst result = [];\n\tfor (const token of tokens) {\n\t\tif (token.quoted) {\n\t\t\tconst value = textElementValue(token.value, elementType);\n\t\t\tif (value === void 0) return void 0;\n\t\t\tresult.push(value);\n\t\t\tcontinue;\n\t\t}\n\t\tconst el = token.value.trim();\n\t\tif (el.toUpperCase() === \"NULL\") {\n\t\t\tif (isJsonElementType(elementType)) return void 0;\n\t\t\tresult.push(null);\n\t\t\tcontinue;\n\t\t}\n\t\tconst value = unquotedElementValue(el, elementType);\n\t\tif (value === void 0) return void 0;\n\t\tresult.push(value);\n\t}\n\treturn result;\n}\n/**\n* Splits an `ARRAY[...]` element list on the commas outside quotes and parentheses, so\n* `numeric(65,30)` and `'a,b'` stay inside one element. A doubled quote inside an element is a\n* literal quote, so it never closes one.\n*/\nfunction splitConstructorElements(body) {\n\tconst elements = [];\n\tlet current = \"\";\n\tlet quote;\n\tlet depth = 0;\n\tfor (const char of body) {\n\t\tif (quote !== void 0) {\n\t\t\tif (char === quote) quote = void 0;\n\t\t} else if (char === \"'\" || char === \"\\\"\") quote = char;\n\t\telse if (char === \"(\") depth++;\n\t\telse if (char === \")\") depth--;\n\t\telse if (char === \",\" && depth === 0) {\n\t\t\telements.push(current);\n\t\t\tcurrent = \"\";\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\telements.push(current);\n\treturn elements.map((element) => element.trim());\n}\n/**\n* Reads one `ARRAY[...]` element: NULL, a boolean, or a literal read by its cast type. Anything\n* else, such as a function call, means the constructor is not a literal and the caller keeps the\n* raw expression.\n*/\nfunction parseConstructorElement(element, elementType) {\n\tif (NULL_PATTERN.test(element)) return isJsonElementType(elementType) ? void 0 : null;\n\tif (TRUE_PATTERN.test(element)) return true;\n\tif (FALSE_PATTERN.test(element)) return false;\n\tconst token = readLiteralToken(element);\n\tif (token === void 0) return void 0;\n\treturn token.kind === \"number\" ? numberValue(token.numeral, elementType) : textElementValue(token.text, elementType);\n}\nfunction isJsonElementType(elementType) {\n\treturn elementType === \"json\" || elementType === \"jsonb\";\n}\n/**\n* A `json`/`jsonb` element's text is a JSON document, as it is on a scalar column of the same type.\n* Undefined keeps the raw expression: the document holds a number a JavaScript number would change.\n*/\nfunction textElementValue(text, elementType) {\n\tif (!isJsonElementType(elementType)) return storedText(text, elementType);\n\tconst document = readJsonDocument(text);\n\tif (document.kind === \"inexact\") return void 0;\n\treturn document.kind === \"json\" ? document.value : text;\n}\n/**\n* Parses JSON text. Postgres keeps every digit of a json number, so a document holding a number that\n* would not print back as the same value once read into a JavaScript number, such as\n* `12345678901234567890` or `1e400`, is `inexact`. `1.0` prints back as `1`, the same value.\n*/\nfunction readJsonDocument(text) {\n\tlet exact = true;\n\tconst reviver = (_key, value, context) => {\n\t\tif (typeof value === \"number\" && !keepsJsonNumber(value, context?.source)) exact = false;\n\t\treturn value;\n\t};\n\tlet value;\n\ttry {\n\t\tvalue = blindCast(JSON.parse(text, reviver));\n\t} catch {\n\t\treturn { kind: \"invalid\" };\n\t}\n\treturn exact ? {\n\t\tkind: \"json\",\n\t\tvalue\n\t} : { kind: \"inexact\" };\n}\nfunction keepsJsonNumber(value, source) {\n\tif (!Number.isFinite(value) || source === void 0) return false;\n\tconst written = decimalValue(source);\n\treturn written !== void 0 && written === decimalValue(String(value));\n}\nconst DECIMAL_PARTS_PATTERN = /^(-?)(\\d+)(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/;\n/** A numeral's value as `<sign><digits>e<exponent>`, with no leading or trailing zero digits. */\nfunction decimalValue(numeral) {\n\tconst parts = DECIMAL_PARTS_PATTERN.exec(numeral);\n\tif (parts === null) return void 0;\n\tconst [, sign = \"\", whole = \"\", fraction = \"\", exponent = \"0\"] = parts;\n\tconst digits = `${whole}${fraction}`.replace(/^0+/, \"\");\n\tif (digits === \"\") return \"0\";\n\tconst significant = digits.replace(/0+$/, \"\");\n\treturn `${sign}${significant}e${Number(exponent) - fraction.length + digits.length - significant.length}`;\n}\nfunction parseArrayConstructor(body, elementType) {\n\tif (body.trim() === \"\") return [];\n\tconst values = [];\n\tfor (const element of splitConstructorElements(body)) {\n\t\tconst value = parseConstructorElement(element, elementType);\n\t\tif (value === void 0) return void 0;\n\t\tvalues.push(value);\n\t}\n\treturn values;\n}\nfunction unwrapOuterArrayCasts(expression) {\n\tconst match = OUTER_ARRAY_CAST_PATTERN.exec(expression);\n\treturn match?.[1] === void 0 ? expression : unwrapOuterArrayCasts(match[1].trim());\n}\n/**\n* Parses a raw Postgres column default expression into a normalized ColumnDefault.\n* This enables semantic comparison between contract defaults and introspected schema defaults.\n*\n* Used by the migration diff layer to normalize raw database defaults during comparison,\n* keeping the introspection layer focused on faithful data capture.\n*\n* @param rawDefault - Raw default expression from information_schema.columns.column_default\n* @param nativeType - Native column type, used for type-aware parsing (array, int8, numeric, JSON)\n* @returns Normalized ColumnDefault or undefined if the expression cannot be parsed\n*/\nfunction parsePostgresDefault(rawDefault, nativeType) {\n\tconst trimmed = rawDefault.trim();\n\tconst normalizedType = nativeType?.toLowerCase();\n\tif (NEXTVAL_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"autoincrement()\"\n\t};\n\tif (normalizedType?.endsWith(\"[]\")) {\n\t\tconst elementType = normalizedType.slice(0, -2);\n\t\tconst arrayMatch = trimmed.match(ARRAY_LITERAL_PATTERN);\n\t\tif (arrayMatch?.[1] !== void 0 && !SEMICOLON_DELIMITED_ELEMENT_TYPE_PATTERN.test(elementType)) {\n\t\t\tconst parsed = parseArrayLiteralBody(arrayMatch[1].replace(/''/g, \"'\"), elementType);\n\t\t\tif (parsed !== void 0) return {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: parsed\n\t\t\t};\n\t\t}\n\t\tconst constructorMatch = unwrapOuterArrayCasts(trimmed).match(ARRAY_CONSTRUCTOR_PATTERN);\n\t\tif (constructorMatch?.[1] !== void 0) {\n\t\t\tconst parsed = parseArrayConstructor(constructorMatch[1], elementType);\n\t\t\tif (parsed !== void 0) return {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: parsed\n\t\t\t};\n\t\t}\n\t\tif (NULL_PATTERN.test(trimmed)) return {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: null\n\t\t};\n\t\treturn {\n\t\t\tkind: \"function\",\n\t\t\texpression: trimmed\n\t\t};\n\t}\n\tconst canonicalTimestamp = canonicalizeTimestampDefault(trimmed);\n\tif (canonicalTimestamp) return {\n\t\tkind: \"function\",\n\t\texpression: canonicalTimestamp\n\t};\n\tif (UUID_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"gen_random_uuid()\"\n\t};\n\tif (UUID_OSSP_PATTERN.test(trimmed)) return {\n\t\tkind: \"function\",\n\t\texpression: \"gen_random_uuid()\"\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: null\n\t};\n\tif (TRUE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: true\n\t};\n\tif (FALSE_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tvalue: false\n\t};\n\tconst token = readLiteralToken(trimmed);\n\tif (token === void 0) return {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n\tif (token.kind === \"number\") {\n\t\tconst value = numberValue(token.numeral, normalizedType);\n\t\treturn value === void 0 ? void 0 : {\n\t\t\tkind: \"literal\",\n\t\t\tvalue\n\t\t};\n\t}\n\tif (normalizedType !== void 0 && isJsonElementType(normalizedType)) {\n\t\tconst document = readJsonDocument(token.text);\n\t\tif (document.kind === \"inexact\") return {\n\t\t\tkind: \"function\",\n\t\t\texpression: trimmed\n\t\t};\n\t\tif (document.kind === \"json\") return {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: document.value\n\t\t};\n\t}\n\tconst text = storedText(token.text, normalizedType);\n\treturn text === void 0 ? {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t} : {\n\t\tkind: \"literal\",\n\t\tvalue: text\n\t};\n}\n/**\n* Normalizes a contract-declared default through {@link parsePostgresDefault}\n* — the same parser introspection uses — so a function-shaped default the\n* parser recognizes as a literal (e.g. sql`'{}'::jsonb`)\n* resolves to the same `resolvedDefault` shape a live introspected column\n* would produce. Compensates once, at `SchemaIR` construction of the\n* expected (contract-derived) side (`contractToSchemaIR`'s `resolveDefault`\n* hook), instead of at every site that later compares the two sides. A\n* literal default, or a function form the parser doesn't recognize, passes\n* through unchanged; `nextval(...)` normalizes to `autoincrement()` on both\n* sides, matching a `serial`/identity column's introspected counterpart.\n*/\nfunction postgresResolveDefault(def, resolvedNativeType) {\n\tif (def.kind !== \"function\") return def;\n\treturn parsePostgresDefault(def.expression, resolvedNativeType) ?? def;\n}\n//#endregion\nexport { postgresResolveDefault as n, parsePostgresDefault as t };\n\n//# sourceMappingURL=default-normalizer-C68YhUBS.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,kBAAkB;AACxB,MAAM,uBAAuB;AAC7B,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,gBAAgB;;;;;;AAMtB,MAAM,UAAU,OAAO,GAAG;AAC1B,MAAM,kBAAkB,IAAI,OAAO,IAAI,QAAQ,EAAE;;;;;AAKjD,MAAM,gBAAgB,OAAO,GAAG;;;;;;AAMhC,MAAM,YAAY,OAAO,GAAG,wDAAwD,cAAc,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}
|
package/dist/{descriptor-meta-Bvq6_NJ8-Cn_M79Lf.mjs → descriptor-meta-CUmf1G9P-GAdC3zfT.mjs}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cpp8PTxD.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { h as postgresCreateNamespace } from "./postgres-schema-
|
|
4
|
-
import { c as postgresAuthoringEntityTypes, d as postgresAuthoringPslBlockDescriptors, f as postgresAuthoringTypes, l as postgresAuthoringFieldPresets, p as postgresLowerEntityHandles, u as postgresAuthoringModelAttributes } from "./authoring-
|
|
5
|
-
import { t as postgresRenderCheckExpressions } from "./check-expressions-
|
|
6
|
-
import { t as
|
|
2
|
+
import { A as postgresQualifyColumnType } from "./codecs-BzCRfsit-BbLlbudt.mjs";
|
|
3
|
+
import { h as postgresCreateNamespace } from "./postgres-schema-DXd0mebY-CExd_GcQ.mjs";
|
|
4
|
+
import { c as postgresAuthoringEntityTypes, d as postgresAuthoringPslBlockDescriptors, f as postgresAuthoringTypes, l as postgresAuthoringFieldPresets, p as postgresLowerEntityHandles, u as postgresAuthoringModelAttributes } from "./authoring-BarDKx1G-BKhOsXKo.mjs";
|
|
5
|
+
import { t as postgresRenderCheckExpressions } from "./check-expressions-BRuSxJ5d-CC5OFfR1.mjs";
|
|
6
|
+
import { t as postgresDataTypeEntries } from "./data-type-entries-DYgNhsVx-BWJJHCQR.mjs";
|
|
7
|
+
import { t as postgresTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs";
|
|
7
8
|
import { type } from "arktype";
|
|
8
9
|
import { defineIndexTypes } from "@prisma/orm-family-sql/contract/index-types";
|
|
9
|
-
//#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-
|
|
10
|
+
//#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-CUmf1G9P.mjs
|
|
10
11
|
const postgresIndexTypes = defineIndexTypes().add("btree", { options: type("object") }).add("hash", { options: type("object") }).add("gin", { options: type("object") }).add("gist", { options: type("object") }).add("spgist", { options: type("object") }).add("brin", { options: type("object") });
|
|
11
12
|
const postgresTargetDescriptorMeta = {
|
|
12
13
|
...postgresTargetDescriptorMetaRuntime,
|
|
@@ -16,6 +17,7 @@ const postgresTargetDescriptorMeta = {
|
|
|
16
17
|
authoring: {
|
|
17
18
|
type: postgresAuthoringTypes,
|
|
18
19
|
field: postgresAuthoringFieldPresets,
|
|
20
|
+
dataTypes: postgresDataTypeEntries(),
|
|
19
21
|
entityTypes: postgresAuthoringEntityTypes,
|
|
20
22
|
pslBlockDescriptors: postgresAuthoringPslBlockDescriptors,
|
|
21
23
|
modelAttributes: postgresAuthoringModelAttributes,
|
|
@@ -33,4 +35,4 @@ const postgresTargetDescriptorMeta = {
|
|
|
33
35
|
//#endregion
|
|
34
36
|
export { postgresTargetDescriptorMeta as t };
|
|
35
37
|
|
|
36
|
-
//# sourceMappingURL=descriptor-meta-
|
|
38
|
+
//# sourceMappingURL=descriptor-meta-CUmf1G9P-GAdC3zfT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-CUmf1G9P-GAdC3zfT.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-CUmf1G9P.mjs"],"sourcesContent":["import { t as postgresDataTypeEntries } from \"./data-type-entries-DYgNhsVx.mjs\";\nimport { E as postgresQualifyColumnType } from \"./codecs-BzCRfsit.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { a as postgresAuthoringPslBlockDescriptors, i as postgresAuthoringModelAttributes, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from \"./authoring-BarDKx1G.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { t as postgresRenderCheckExpressions } from \"./check-expressions-BRuSxJ5d.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-D-ZCTI0a.mjs\";\nimport { type } from \"arktype\";\nimport { defineIndexTypes } from \"@internal/sql-contract/index-types\";\n//#region src/core/index-types.ts\nconst postgresIndexTypes = defineIndexTypes().add(\"btree\", { options: type(\"object\") }).add(\"hash\", { options: type(\"object\") }).add(\"gin\", { options: type(\"object\") }).add(\"gist\", { options: type(\"object\") }).add(\"spgist\", { options: type(\"object\") }).add(\"brin\", { options: type(\"object\") });\nconst postgresTargetDescriptorMeta = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: DEFAULT_NAMESPACE_ID,\n\tsupportsNamespaces: true,\n\tindexTypes: postgresIndexTypes,\n\tauthoring: {\n\t\ttype: postgresAuthoringTypes,\n\t\tfield: postgresAuthoringFieldPresets,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\tentityTypes: postgresAuthoringEntityTypes,\n\t\tpslBlockDescriptors: postgresAuthoringPslBlockDescriptors,\n\t\tmodelAttributes: postgresAuthoringModelAttributes,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tqualifyColumnType: postgresQualifyColumnType,\n\t\trenderCheckExpressions: postgresRenderCheckExpressions,\n\t\tlowerEntityHandles: postgresLowerEntityHandles\n\t},\n\ttypes: { queryOperationTypes: { import: {\n\t\tpackage: \"@internal/target-postgres/operation-types\",\n\t\tnamed: \"QueryOperationTypes\",\n\t\talias: \"PgTargetQueryOps\"\n\t} } }\n};\n//#endregion\nexport { postgresTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CUmf1G9P.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,qBAAqB,iBAAiB,CAAC,CAAC,IAAI,SAAS,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AACpS,MAAM,+BAA+B;CACpC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,YAAY;CACZ,WAAW;EACV,MAAM;EACN,OAAO;EACP,WAAW,wBAAwB;EACnC,aAAa;EACb,qBAAqB;EACrB,iBAAiB;EACjB,iBAAiB;EACjB,mBAAmB;EACnB,wBAAwB;EACxB,oBAAoB;CACrB;CACA,OAAO,EAAE,qBAAqB,EAAE,QAAQ;EACvC,SAAS;EACT,OAAO;EACP,OAAO;CACR,EAAE,EAAE;AACL"}
|
package/dist/{descriptor-meta-BEigA5Gj-eY7nV4N_.mjs → descriptor-meta-gq4MiUXl-DqqHHHSj.mjs}
RENAMED
|
@@ -1,75 +1,13 @@
|
|
|
1
1
|
import { A as PG_TIME_TEMPORAL_CODEC_ID, B as SQL_VARCHAR_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, I as SQL_CHAR_CODEC_ID, L as SQL_FLOAT_CODEC_ID, N as PG_UUID_CODEC_ID, O as PG_TIMETZ_CODEC_ID, P as PG_VARBIT_CODEC_ID, R as SQL_INT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, i as PG_CHAR_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_FLOAT_CODEC_ID, v as PG_JSONB_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, y as PG_JSON_CODEC_ID, z as SQL_TEXT_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
|
|
2
2
|
import { t as postgresAggregateDescriptors } from "./aggregates-B6ZQFHFE.mjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { o as postgresCodecRegistry } from "./codecs-CWXNVl1P.mjs";
|
|
6
|
-
import { t as adapterError } from "./sql-renderer-CgUgFbU4-BY3PCrmG.mjs";
|
|
7
|
-
import { isIntegerIn } from "@prisma/orm-framework/components/codec";
|
|
8
|
-
//#region ../../../3-targets/6-adapters/postgres/dist/descriptor-meta-BEigA5Gj.mjs
|
|
3
|
+
import { o as postgresCodecRegistry } from "./codec-registry-CCCOytGc-BFC0dvlt.mjs";
|
|
4
|
+
//#region ../../../3-targets/6-adapters/postgres/dist/descriptor-meta-gq4MiUXl.mjs
|
|
9
5
|
/** Creates a type import spec for codec types */
|
|
10
6
|
const codecTypeImport = (named) => ({
|
|
11
7
|
package: "@internal/target-postgres/codec-types",
|
|
12
8
|
named,
|
|
13
9
|
alias: named
|
|
14
10
|
});
|
|
15
|
-
function isPositiveInteger(value) {
|
|
16
|
-
return typeof value === "number" && Number.isFinite(value) && Number.isInteger(value) && value > 0;
|
|
17
|
-
}
|
|
18
|
-
function isNonNegativeInteger(value) {
|
|
19
|
-
return typeof value === "number" && Number.isFinite(value) && Number.isInteger(value) && value >= 0;
|
|
20
|
-
}
|
|
21
|
-
function expandLength({ nativeType, typeParams }) {
|
|
22
|
-
if (!typeParams || !("length" in typeParams)) return nativeType;
|
|
23
|
-
const length = typeParams["length"];
|
|
24
|
-
if (!isPositiveInteger(length)) throw adapterError("RUNTIME.TYPE_PARAMS_INVALID", `Invalid "length" type parameter for "${nativeType}": expected a positive integer, got ${JSON.stringify(length)}`, { meta: {
|
|
25
|
-
nativeType,
|
|
26
|
-
param: "length",
|
|
27
|
-
received: length
|
|
28
|
-
} });
|
|
29
|
-
return `${nativeType}(${length})`;
|
|
30
|
-
}
|
|
31
|
-
function expandPrecision({ nativeType, typeParams }) {
|
|
32
|
-
if (!typeParams || !("precision" in typeParams)) return nativeType;
|
|
33
|
-
const precision = typeParams["precision"];
|
|
34
|
-
if (!isNonNegativeInteger(precision)) throw adapterError("RUNTIME.TYPE_PARAMS_INVALID", `Invalid "precision" type parameter for "${nativeType}": expected a non-negative integer, got ${JSON.stringify(precision)}`, { meta: {
|
|
35
|
-
nativeType,
|
|
36
|
-
param: "precision",
|
|
37
|
-
received: precision
|
|
38
|
-
} });
|
|
39
|
-
return `${nativeType}(${precision})`;
|
|
40
|
-
}
|
|
41
|
-
function expandNumeric({ nativeType, typeParams }) {
|
|
42
|
-
const hasPrecision = typeParams && "precision" in typeParams;
|
|
43
|
-
const hasScale = typeParams && "scale" in typeParams;
|
|
44
|
-
if (!hasPrecision && !hasScale) return nativeType;
|
|
45
|
-
if (!hasPrecision && hasScale) throw adapterError("RUNTIME.TYPE_PARAMS_INVALID", `Invalid type parameters for "${nativeType}": "scale" requires "precision" to be specified`, { meta: {
|
|
46
|
-
nativeType,
|
|
47
|
-
param: "scale"
|
|
48
|
-
} });
|
|
49
|
-
if (hasPrecision) {
|
|
50
|
-
const precision = typeParams["precision"];
|
|
51
|
-
if (!isIntegerIn(precision, NUMERIC_PRECISION_RANGE)) throw adapterError("RUNTIME.TYPE_PARAMS_INVALID", `Invalid "precision" type parameter for "${nativeType}": expected an integer from ${NUMERIC_PRECISION_RANGE.min} to ${NUMERIC_PRECISION_RANGE.max}, got ${JSON.stringify(precision)}`, { meta: {
|
|
52
|
-
nativeType,
|
|
53
|
-
param: "precision",
|
|
54
|
-
received: precision
|
|
55
|
-
} });
|
|
56
|
-
if (hasScale) {
|
|
57
|
-
const scale = typeParams["scale"];
|
|
58
|
-
if (!isIntegerIn(scale, NUMERIC_SCALE_RANGE)) throw adapterError("RUNTIME.TYPE_PARAMS_INVALID", `Invalid "scale" type parameter for "${nativeType}": expected an integer from ${NUMERIC_SCALE_RANGE.min} to ${NUMERIC_SCALE_RANGE.max}, got ${JSON.stringify(scale)}`, { meta: {
|
|
59
|
-
nativeType,
|
|
60
|
-
param: "scale",
|
|
61
|
-
received: scale
|
|
62
|
-
} });
|
|
63
|
-
return `${nativeType}(${precision},${scale})`;
|
|
64
|
-
}
|
|
65
|
-
return `${nativeType}(${precision})`;
|
|
66
|
-
}
|
|
67
|
-
return nativeType;
|
|
68
|
-
}
|
|
69
|
-
const lengthHooks = { expandNativeType: expandLength };
|
|
70
|
-
const precisionHooks = { expandNativeType: expandPrecision };
|
|
71
|
-
const numericHooks = { expandNativeType: expandNumeric };
|
|
72
|
-
const identityHooks = { expandNativeType: ({ nativeType }) => nativeType };
|
|
73
11
|
const postgresAdapterDescriptorMeta = {
|
|
74
12
|
kind: "adapter",
|
|
75
13
|
familyId: "sql",
|
|
@@ -96,7 +34,6 @@ const postgresAdapterDescriptorMeta = {
|
|
|
96
34
|
insertOnConflictWithoutTarget: true
|
|
97
35
|
}
|
|
98
36
|
},
|
|
99
|
-
dataTypes: postgresDataTypes,
|
|
100
37
|
types: {
|
|
101
38
|
aggregateDescriptors: postgresAggregateDescriptors,
|
|
102
39
|
codecTypes: {
|
|
@@ -125,30 +62,7 @@ const postgresAdapterDescriptorMeta = {
|
|
|
125
62
|
codecTypeImport("TimestampString"),
|
|
126
63
|
codecTypeImport("TimestamptzString"),
|
|
127
64
|
codecTypeImport("TimeString")
|
|
128
|
-
]
|
|
129
|
-
controlPlaneHooks: {
|
|
130
|
-
[SQL_CHAR_CODEC_ID]: lengthHooks,
|
|
131
|
-
[SQL_VARCHAR_CODEC_ID]: lengthHooks,
|
|
132
|
-
[PG_CHAR_CODEC_ID]: lengthHooks,
|
|
133
|
-
[PG_VARCHAR_CODEC_ID]: lengthHooks,
|
|
134
|
-
[PG_NUMERIC_CODEC_ID]: numericHooks,
|
|
135
|
-
[PG_BIT_CODEC_ID]: lengthHooks,
|
|
136
|
-
[PG_VARBIT_CODEC_ID]: lengthHooks,
|
|
137
|
-
[PG_TIMESTAMP_TEMPORAL_CODEC_ID]: precisionHooks,
|
|
138
|
-
[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]: precisionHooks,
|
|
139
|
-
[PG_TIME_TEMPORAL_CODEC_ID]: precisionHooks,
|
|
140
|
-
[PG_TIMESTAMP_STRING_CODEC_ID]: precisionHooks,
|
|
141
|
-
[PG_TIMESTAMPTZ_STRING_CODEC_ID]: precisionHooks,
|
|
142
|
-
[PG_TIMESTAMPTZ_DATE_CODEC_ID]: precisionHooks,
|
|
143
|
-
[PG_TIME_STRING_CODEC_ID]: precisionHooks,
|
|
144
|
-
[PG_TIMETZ_CODEC_ID]: precisionHooks,
|
|
145
|
-
[PG_INTERVAL_CODEC_ID]: precisionHooks,
|
|
146
|
-
[PG_JSON_CODEC_ID]: identityHooks,
|
|
147
|
-
[PG_JSONB_CODEC_ID]: identityHooks,
|
|
148
|
-
[PG_BYTEA_CODEC_ID]: identityHooks,
|
|
149
|
-
[PG_UUID_CODEC_ID]: identityHooks,
|
|
150
|
-
[PG_INET_CODEC_ID]: identityHooks
|
|
151
|
-
}
|
|
65
|
+
]
|
|
152
66
|
},
|
|
153
67
|
storage: [
|
|
154
68
|
{
|
|
@@ -367,4 +281,4 @@ const postgresAdapterDescriptorMeta = {
|
|
|
367
281
|
//#endregion
|
|
368
282
|
export { postgresAdapterDescriptorMeta as t };
|
|
369
283
|
|
|
370
|
-
//# sourceMappingURL=descriptor-meta-
|
|
284
|
+
//# sourceMappingURL=descriptor-meta-gq4MiUXl-DqqHHHSj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-gq4MiUXl-DqqHHHSj.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/descriptor-meta-gq4MiUXl.mjs"],"sourcesContent":["import { postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/target-postgres/codec-ids\";\nimport { postgresAggregateDescriptors } from \"@internal/target-postgres/aggregates\";\n//#region src/core/descriptor-meta.ts\n/** Creates a type import spec for codec types */\nconst codecTypeImport = (named) => ({\n\tpackage: \"@internal/target-postgres/codec-types\",\n\tnamed,\n\talias: named\n});\nconst postgresAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: {\n\t\tpostgres: {\n\t\t\torderBy: true,\n\t\t\tlimit: true,\n\t\t\tlateral: true,\n\t\t\tjsonAgg: true,\n\t\t\treturning: true,\n\t\t\tdistinctOn: true\n\t\t},\n\t\tsql: {\n\t\t\tenums: true,\n\t\t\treturning: true,\n\t\t\tdefaultInInsert: true,\n\t\t\tlateral: true,\n\t\t\tscalarList: true,\n\t\t\tcheckConstraint: true,\n\t\t\tinsertOnConflictSkip: true,\n\t\t\tinsertOnConflictWithoutTarget: true\n\t\t}\n\t},\n\ttypes: {\n\t\taggregateDescriptors: postgresAggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(postgresCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"PgTypes\"\n\t\t\t},\n\t\t\ttypeImports: [\n\t\t\t\t{\n\t\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\t\tnamed: \"JsonValue\",\n\t\t\t\t\talias: \"JsonValue\"\n\t\t\t\t},\n\t\t\t\tcodecTypeImport(\"Char\"),\n\t\t\t\tcodecTypeImport(\"Varchar\"),\n\t\t\t\tcodecTypeImport(\"Numeric\"),\n\t\t\t\tcodecTypeImport(\"Bit\"),\n\t\t\t\tcodecTypeImport(\"VarBit\"),\n\t\t\t\tcodecTypeImport(\"Timestamp\"),\n\t\t\t\tcodecTypeImport(\"Timestamptz\"),\n\t\t\t\tcodecTypeImport(\"Time\"),\n\t\t\t\tcodecTypeImport(\"Timetz\"),\n\t\t\t\tcodecTypeImport(\"Interval\"),\n\t\t\t\tcodecTypeImport(\"TimestampString\"),\n\t\t\t\tcodecTypeImport(\"TimestamptzString\"),\n\t\t\t\tcodecTypeImport(\"TimeString\")\n\t\t\t]\n\t\t},\n\t\tstorage: [\n\t\t\t{\n\t\t\t\ttypeId: PG_TEXT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"text\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: SQL_TEXT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"text\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: SQL_CHAR_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"character\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: SQL_VARCHAR_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"character varying\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: SQL_INT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"int4\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: SQL_FLOAT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"float8\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_CHAR_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"character\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_VARCHAR_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"character varying\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_INT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"int4\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_FLOAT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"float8\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_INT4_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"int4\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_INT2_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"int2\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_INT8_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"int8\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_FLOAT4_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"float4\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_FLOAT8_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"float8\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_NUMERIC_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"numeric\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_DATE_TEMPORAL_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"date\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"timestamp\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"timestamptz\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIME_TEMPORAL_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"time\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_DATE_STRING_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"date\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIMESTAMP_STRING_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"timestamp\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"timestamptz\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIMESTAMPTZ_STRING_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"timestamptz\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIME_STRING_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"time\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_TIMETZ_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"timetz\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_BOOL_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"bool\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_BIT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"bit\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_VARBIT_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"bit varying\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_INTERVAL_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"interval\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_JSON_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"json\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_JSONB_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"jsonb\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_BYTEA_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"bytea\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_UUID_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"uuid\"\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypeId: PG_INET_CODEC_ID,\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tnativeType: \"inet\"\n\t\t\t}\n\t\t]\n\t}\n};\n//#endregion\nexport { postgresAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-gq4MiUXl.mjs.map"],"mappings":";;;;;AAKA,MAAM,mBAAmB,WAAW;CACnC,SAAS;CACT;CACA,OAAO;AACR;AACA,MAAM,gCAAgC;CACrC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc;EACb,UAAU;GACT,SAAS;GACT,OAAO;GACP,SAAS;GACT,SAAS;GACT,WAAW;GACX,YAAY;EACb;EACA,KAAK;GACJ,OAAO;GACP,WAAW;GACX,iBAAiB;GACjB,SAAS;GACT,YAAY;GACZ,iBAAiB;GACjB,sBAAsB;GACtB,+BAA+B;EAChC;CACD;CACA,OAAO;EACN,sBAAsB;EACtB,YAAY;GACX,kBAAkB,MAAM,KAAK,sBAAsB,OAAO,CAAC;GAC3D,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;GACA,aAAa;IACZ;KACC,SAAS;KACT,OAAO;KACP,OAAO;IACR;IACA,gBAAgB,MAAM;IACtB,gBAAgB,SAAS;IACzB,gBAAgB,SAAS;IACzB,gBAAgB,KAAK;IACrB,gBAAgB,QAAQ;IACxB,gBAAgB,WAAW;IAC3B,gBAAgB,aAAa;IAC7B,gBAAgB,MAAM;IACtB,gBAAgB,QAAQ;IACxB,gBAAgB,UAAU;IAC1B,gBAAgB,iBAAiB;IACjC,gBAAgB,mBAAmB;IACnC,gBAAgB,YAAY;GAC7B;EACD;EACA,SAAS;GACR;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;GACA;IACC,QAAQ;IACR,UAAU;IACV,UAAU;IACV,YAAY;GACb;EACD;CACD;AACD"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { R as postgresDataTypes } from "./data-types-DzUVlWeo-CBMHoFoH.mjs";
|
|
2
|
+
//#region ../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-D-ZCTI0a.mjs
|
|
2
3
|
const postgresTargetDescriptorMetaRuntime = {
|
|
3
4
|
kind: "target",
|
|
4
5
|
familyId: "sql",
|
|
5
6
|
targetId: "postgres",
|
|
6
7
|
id: "postgres",
|
|
7
8
|
version: "0.0.1",
|
|
8
|
-
capabilities: {}
|
|
9
|
+
capabilities: {},
|
|
10
|
+
dataTypes: postgresDataTypes
|
|
9
11
|
};
|
|
10
12
|
//#endregion
|
|
11
13
|
export { postgresTargetDescriptorMetaRuntime as t };
|
|
12
14
|
|
|
13
|
-
//# sourceMappingURL=descriptor-meta-runtime-
|
|
15
|
+
//# sourceMappingURL=descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-D-ZCTI0a.mjs"],"sourcesContent":["import { R as postgresDataTypes } from \"./data-types-DzUVlWeo.mjs\";\nconst postgresTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: postgresDataTypes\n};\n//#endregion\nexport { postgresTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-D-ZCTI0a.mjs.map"],"mappings":";;AACA,MAAM,sCAAsC;CAC3C,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;AACZ"}
|
|
@@ -18,7 +18,7 @@ interface PostgresPlanDiff {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* The Postgres planner's diff input: the SAME tree-building
|
|
21
|
-
* `diffPostgresSchema` uses (
|
|
21
|
+
* `diffPostgresSchema` uses (FK schemas resolved,
|
|
22
22
|
* table-less namespaces pruned, cluster-scope-aware ownership filter) plus
|
|
23
23
|
* actual namespace padding (so a missing
|
|
24
24
|
* schema's tables surface as `not-found` instead of a swallowed namespace
|
|
@@ -35,4 +35,4 @@ declare function buildPostgresPlanDiff(input: {
|
|
|
35
35
|
}): PostgresPlanDiff;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { buildPostgresPlanDiff as t };
|
|
38
|
-
//# sourceMappingURL=diff-database-schema-
|
|
38
|
+
//# sourceMappingURL=diff-database-schema-BGcRo8FM.d.mts.map
|
package/dist/{diff-database-schema-D-eMVqv1.d.mts.map → diff-database-schema-BGcRo8FM.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-database-schema-
|
|
1
|
+
{"version":3,"file":"diff-database-schema-BGcRo8FM.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/diff-database-schema.d.mts"],"mappings":";;;;;;;;;;UASU;;WAEC,UAAU;;WAEV,QAAQ;;WAER,iBAAiB,gBAAgB;;;;;;;;;;;;;;iBAc3B,sBAAsB;WAC5B,UAAU,SAAS;WACnB,cAAc;WACd,qBAAqB,cAAc;IAC1C"}
|