@prisma/orm-target-postgres 8.0.0-rc.14-dev.29 → 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-BarDKx1G-BKhOsXKo.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/authoring-BarDKx1G.mjs"],"sourcesContent":["import { C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, s as PG_ENUM_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { j as requireTemporal } from \"./codecs-BzCRfsit.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { n as renderFullTextIndexExpression, t as isFullTextIndexableCodec } from \"./full-text-index-expression-DKwm2Z9W.mjs\";\nimport { _ as PostgresRlsPolicy, d as PostgresNativeEnumSchema, f as PostgresRlsEnablementSchema, h as PostgresRole, m as PostgresRoleSchema, p as PostgresRlsPolicySchema, v as PostgresRlsEnablement } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { n as computeContentHash } from \"./canonicalize-CrN3u_xM.mjs\";\nimport { n as POSTGRES_TEXT_SEARCH_LANGUAGES } from \"./text-search-languages-RO0HiUDm.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { temporalCodecPresetWithPrecision, temporalStringAuthoringPresets } from \"@internal/family-sql/control\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalAuthoringPresets } from \"@internal/framework-components/authoring\";\nimport { blockAttribute, bool, entityRef, fieldRef, identifier, leafDiagnostic, list, mapBlock, modelAttribute, oneOf, optional, str, structBlock } from \"@internal/psl-parser\";\nimport { exactNameBodyWarning } from \"@internal/sql-contract/index-naming\";\nimport { assertWireNamePrefixLength, normalizeSqlBody } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined, invariant } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/core/instant-now-generator.ts\nconst INSTANT_NOW_GENERATOR_ID = \"instantNow\";\nfunction instantNowControlDescriptor() {\n\treturn {\n\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: INSTANT_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: INSTANT_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\nfunction instantNow() {\n\treturn requireTemporal({ generatorId: INSTANT_NOW_GENERATOR_ID }).Now.instant();\n}\n//#endregion\n//#region src/core/plain-date-time-now-generator.ts\n/**\n* The \"now\" generator for `timestamp` (without time zone) columns: the current\n* moment as a UTC wall-clock `Temporal.PlainDateTime`, the representation\n* `pg/timestamp-temporal@1` encodes. `timestamptz` columns use `instantNow`.\n*/\nconst PLAIN_DATE_TIME_NOW_GENERATOR_ID = \"plainDateTimeNow\";\nfunction plainDateTimeNowControlDescriptor() {\n\treturn {\n\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\tbuildPhases: () => ({\n\t\t\tonCreate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID\n\t\t\t},\n\t\t\tonUpdate: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID\n\t\t\t}\n\t\t})\n\t};\n}\nfunction plainDateTimeNow() {\n\treturn requireTemporal({ generatorId: PLAIN_DATE_TIME_NOW_GENERATOR_ID }).Now.plainDateTimeISO(\"UTC\");\n}\n//#endregion\n//#region src/core/now-generators.ts\n/** The \"now\" generator for each codec that has one. The `temporal` field presets read it. */\nconst postgresNowGeneratorIds = {\n\t[PG_TIMESTAMP_TEMPORAL_CODEC_ID]: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMPTZ_DATE_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMP_STRING_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[PG_TIMESTAMPTZ_STRING_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID\n};\nconst nowGeneratorIdByCodecId = new Map(Object.entries(postgresNowGeneratorIds));\nfunction postgresNowGeneratorIdFor(codecId) {\n\treturn nowGeneratorIdByCodecId.get(codecId);\n}\n//#endregion\n//#region src/core/authoring.ts\nconst PSL_POLICY_INVALID_MAP = \"PSL_POLICY_INVALID_MAP\";\nconst PSL_FULL_TEXT_INDEX_ONE_FIELD = \"PSL_FULL_TEXT_INDEX_ONE_FIELD\";\nconst PSL_FULL_TEXT_INDEX_REQUIRES_NAME = \"PSL_FULL_TEXT_INDEX_REQUIRES_NAME\";\nconst PSL_FULL_TEXT_INDEX_NAME_XOR_MAP = \"PSL_FULL_TEXT_INDEX_NAME_XOR_MAP\";\nconst PSL_FULL_TEXT_INDEX_TEXT_FIELD = \"PSL_FULL_TEXT_INDEX_TEXT_FIELD\";\nconst PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE = \"PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE\";\nconst PSL_NATIVE_ENUM_MISSING_MEMBERS = \"PSL_NATIVE_ENUM_MISSING_MEMBERS\";\nconst PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE = \"PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE\";\n/**\n* `pg.enum(<ref>)` registers as an ordinary type constructor whose sole\n* positional argument names a `native_enum` entity instead of carrying a\n* literal value. The interpreter resolves the ref to the `native_enum`\n* entity generically (driven by `entityRefArg`); the `pg/enum@1` codec\n* descriptor's `columnFromEntity` hook (see `codecs.ts`) converts that\n* entity into the column's `typeParams`. The column's type name comes from the\n* `pg/enum` data type, which renders `typeParams.typeName`.\n*/\nconst postgresAuthoringTypes = {\n\tBigIntNumber: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A PostgreSQL 64-bit integer represented as a JavaScript number within its safe integer range.\",\n\t\toutput: { codecId: \"pg/int8number@1\" }\n\t},\n\tUnboundedInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An arbitrary-precision integer stored as PostgreSQL numeric and represented as bigint.\",\n\t\toutput: { codecId: \"pg/unboundedint@1\" }\n\t},\n\tpg: { enum: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tentityRefArg: {\n\t\t\tindex: 0,\n\t\t\tentityKind: \"native_enum\"\n\t\t},\n\t\toutput: { codecId: PG_ENUM_CODEC_ID }\n\t} }\n};\nconst policyTargetParam = {\n\ttype: entityRef({ kind: \"model\" }),\n\tdocumentation: \"The model protected by this policy; it must declare @@rls.\"\n};\nconst policyRolesParam = {\n\ttype: optional(list(oneOf(entityRef({\n\t\tkind: \"block\",\n\t\tkeyword: \"role\"\n\t}), identifier()))),\n\tdocumentation: \"The database roles to which this policy applies.\"\n};\nconst policyUsingParam = {\n\ttype: optional(str()),\n\tdocumentation: \"A SQL predicate controlling which rows this policy permits.\"\n};\nconst policyWithCheckParam = {\n\ttype: optional(str()),\n\tdocumentation: \"A SQL predicate checking rows being written by this policy.\"\n};\nconst policyPermissiveParam = {\n\ttype: optional(bool()),\n\tdocumentation: \"Whether the policy is permissive (combined with OR) rather than restrictive (combined with AND).\"\n};\nfunction policyUsingOnlySpec() {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam,\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyWithCheckOnlySpec() {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\twithCheck: policyWithCheckParam,\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction policyBothPredicatesSpec() {\n\treturn structBlock({ parameters: {\n\t\ttarget: policyTargetParam,\n\t\troles: policyRolesParam,\n\t\tusing: policyUsingParam,\n\t\twithCheck: policyWithCheckParam,\n\t\tpermissive: policyPermissiveParam\n\t} });\n}\nfunction roleSpec() {\n\treturn structBlock({ parameters: {} });\n}\nfunction nativeEnumSpec() {\n\treturn mapBlock({ value: {\n\t\ttype: str(),\n\t\tdocumentation: \"The member value stored in the database enum type.\"\n\t} });\n}\n/**\n* The block keyword that authors each row-level security operation. The keyword is the operation, so\n* a policy block has no `operation` parameter. The reader looks a block's operation up here, and\n* `contract infer` and `contract print` look up the keyword to write.\n*/\nconst POLICY_BLOCK_KEYWORDS = {\n\tselect: \"policy_select\",\n\tinsert: \"policy_insert\",\n\tupdate: \"policy_update\",\n\tdelete: \"policy_delete\",\n\tall: \"policy_all\"\n};\nfunction isRlsPolicyOperation(value) {\n\treturn Object.hasOwn(POLICY_BLOCK_KEYWORDS, value);\n}\n/** The operation a `policy_<operation>` block keyword authors, or `undefined` for another keyword. */\nfunction policyOperationOfKeyword(keyword) {\n\treturn Object.keys(POLICY_BLOCK_KEYWORDS).filter(isRlsPolicyOperation).find((operation) => POLICY_BLOCK_KEYWORDS[operation] === keyword);\n}\n/**\n* Assembles a {@link PostgresRlsPolicy} from lowered inputs: normalizes the\n* predicates, computes the content-hash wire name, and constructs the frozen\n* entity. The single hash-assembly body shared by the PSL block lowering\n* ({@link lowerRlsPolicyFromBlock}) and the TS entity-handle lowering\n* ({@link postgresLowerEntityHandles}) so the two surfaces cannot drift.\n*/\nfunction buildRlsPolicyEntity(input) {\n\tconst permissive = input.permissive ?? true;\n\tconst wireHash = computeContentHash({\n\t\t...ifDefined(\"using\", input.using !== void 0 ? normalizeSqlBody(input.using) : void 0),\n\t\t...ifDefined(\"withCheck\", input.withCheck !== void 0 ? normalizeSqlBody(input.withCheck) : void 0),\n\t\troles: input.roles,\n\t\toperation: input.operation,\n\t\tpermissive\n\t});\n\treturn new PostgresRlsPolicy({\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix: input.prefix,\n\t\t\thash: wireHash\n\t\t},\n\t\ttableName: input.tableName,\n\t\tnamespaceId: input.namespaceId,\n\t\toperation: input.operation,\n\t\troles: input.roles,\n\t\tusing: input.using,\n\t\twithCheck: input.withCheck,\n\t\tpermissive\n\t});\n}\nfunction lowerRlsPolicyFromBlock(block, ctx) {\n\tconst prefix = block.name;\n\tconst operation = policyOperationOfKeyword(block.keyword) ?? \"select\";\n\tconst target = block.resolvedModelRefs?.[\"target\"];\n\tassertDefined(target, `lowerRlsPolicyFromBlock: policy \"${block.name}\" reached the factory without a projected \\`target\\` coordinate; the interpreter projects checked model references before invoking entity factories.`);\n\tconst roles = block.values.roles === void 0 ? [] : block.values.roles.map((role) => typeof role === \"string\" ? role : role.declaration.name).sort();\n\tconst using = block.values.using;\n\tconst withCheck = block.values.withCheck;\n\tconst permissive = block.values.permissive ?? true;\n\tconst mapAttr = block.attributes[\"map\"];\n\tif (mapAttr !== void 0) {\n\t\tconst exactName = mapAttr.args[\"name\"];\n\t\tinvariant(typeof exactName === \"string\", \"@@map on a policy block parses one string argument\");\n\t\tctx.warnings?.push(exactNameBodyWarning(\"policy\", exactName));\n\t\treturn new PostgresRlsPolicy({\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: exactName\n\t\t\t},\n\t\t\ttableName: target.tableName,\n\t\t\tnamespaceId: target.namespaceId,\n\t\t\toperation,\n\t\t\troles,\n\t\t\tusing,\n\t\t\twithCheck,\n\t\t\tpermissive\n\t\t});\n\t}\n\treturn buildRlsPolicyEntity({\n\t\tprefix,\n\t\ttableName: target.tableName,\n\t\tnamespaceId: target.namespaceId,\n\t\toperation,\n\t\troles,\n\t\t...ifDefined(\"using\", using),\n\t\t...ifDefined(\"withCheck\", withCheck),\n\t\tpermissive\n\t});\n}\nconst policyEntityTypeOutput = {\n\tfactory: lowerRlsPolicyFromBlock,\n\tpslPlacement: (entity) => ({ namespaceId: entity.namespaceId })\n};\nfunction lowerNativeEnumFromBlock(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst mapAttr = block.attributes[\"map\"];\n\tlet typeName = block.name;\n\tif (mapAttr !== void 0) {\n\t\tconst mapped = mapAttr.args[\"name\"];\n\t\tinvariant(typeof mapped === \"string\", \"@@map on a native_enum block parses one string argument\");\n\t\ttypeName = mapped;\n\t}\n\tlet memberError = false;\n\tconst seenValues = /* @__PURE__ */ new Set();\n\tconst members = [];\n\tfor (const [memberName, value] of Object.entries(block.values)) {\n\t\tif (seenValues.has(value)) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\": duplicate member value \"${value}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.parameterSpans[memberName] ?? block.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tseenValues.add(value);\n\t\tmembers.push(value);\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: PSL_NATIVE_ENUM_MISSING_MEMBERS,\n\t\t\tmessage: `native_enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresNativeEnum({\n\t\ttypeName,\n\t\tmembers\n\t});\n}\n/**\n* `native_enum`'s entity-type factory output, checked separately from the assembled\n* `postgresAuthoringEntityTypes` map below: `deriveValueSet` is SQL-family surface\n* ({@link SqlValueSetDerivingEntityTypeOutput}), not part of the framework\n* `AuthoringEntityTypeFactoryOutput` shape, so folding it directly into the map's single\n* `satisfies AuthoringEntityTypeNamespace` check would trip an excess-property error. Checking it\n* here against the intersection of both shapes keeps it structurally valid against each without\n* widening the map's own check.\n*/\nconst nativeEnumEntityTypeOutput = {\n\tfactory: lowerNativeEnumFromBlock,\n\tderiveValueSet: (entity) => ({\n\t\tkind: \"valueSet\",\n\t\tvalues: [...entity.members]\n\t})\n};\n/**\n* Lowers a `role <name> {}` block into a {@link PostgresRole}. Roles are\n* cluster-scoped in Postgres, so the block must be declared inside\n* `namespace unbound { … }` — any other lexical namespace (a named schema,\n* or the default bucket top-level declarations resolve to) is a load-time\n* diagnostic. The lowered entity carries the unbound coordinate.\n*/\nfunction lowerRoleFromBlock(block, ctx) {\n\tif (block.namespaceId !== UNBOUND_NAMESPACE_ID) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE,\n\t\t\tmessage: `\\`role\\` block \"${block.name}\" must be declared inside \\`namespace unbound { }\\`, not in namespace \"${block.namespaceId}\"`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresRole({\n\t\tname: block.name,\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t});\n}\nconst postgresAuthoringEntityTypes = {\n\trole: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"role\",\n\t\tvalidatorSchema: PostgresRoleSchema,\n\t\toutput: { factory: lowerRoleFromBlock }\n\t},\n\trls: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"rls\",\n\t\tvalidatorSchema: PostgresRlsEnablementSchema,\n\t\toutput: { factory: (input) => new PostgresRlsEnablement(input) }\n\t},\n\tpolicy: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"policy\",\n\t\tvalidatorSchema: PostgresRlsPolicySchema,\n\t\toutput: policyEntityTypeOutput\n\t},\n\tnative_enum: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"native_enum\",\n\t\tvalidatorSchema: PostgresNativeEnumSchema,\n\t\toutput: nativeEnumEntityTypeOutput\n\t}\n};\n/**\n* Field presets contributed by the Postgres target pack.\n*\n* These mirror the PSL scalar-to-codec mapping used by the Postgres adapter\n* (see `createPostgresPslScalarTypeDescriptors`), so that authoring a field\n* via the TS callback surface (e.g. `field.int()`) and via the PSL scalar\n* surface (e.g. `Int`) lowers to byte-identical contracts.\n*\n* The `uuidNative` / `id.uuidv4Native` / `id.uuidv7Native` presets use the\n* native Postgres `uuid` type (codecId `pg/uuid@1`). For cross-target\n* portability use `uuidString` / `id.uuidv4String` / `id.uuidv7String` from\n* the family pack instead.\n*/\nconst policyRequiresRls = {\n\tparameter: \"target\",\n\tattribute: \"rls\"\n};\nconst policyMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this row-level security policy to its PostgreSQL policy name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The nonempty PostgreSQL policy name.\"\n\t}],\n\trefine: (parsed, ctx, attributeNode) => parsed.name === \"\" ? [leafDiagnostic(ctx, attributeNode, \"@@map policy name must be a non-empty string\", PSL_POLICY_INVALID_MAP)] : []\n});\nconst policyBlockAttributes = { map: () => policyMapAttribute };\nconst nativeEnumMapAttribute = blockAttribute(\"map\", {\n\tdocumentation: \"Maps this native enum to its PostgreSQL type name.\",\n\tpositional: [{\n\t\tkey: \"name\",\n\t\ttype: str(),\n\t\tdocumentation: \"The PostgreSQL enum type name.\"\n\t}]\n});\nconst postgresAuthoringPslBlockDescriptors = {\n\t[POLICY_BLOCK_KEYWORDS.select]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.select,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be selected.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.delete]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.delete,\n\t\tdocumentation: \"Defines a row-level security policy controlling which rows can be deleted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyUsingOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.insert]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.insert,\n\t\tdocumentation: \"Defines a row-level security policy checking rows being inserted.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyWithCheckOnlySpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.update]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.update,\n\t\tdocumentation: \"Defines a row-level security policy controlling row visibility and checks for updates.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\t[POLICY_BLOCK_KEYWORDS.all]: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: POLICY_BLOCK_KEYWORDS.all,\n\t\tdocumentation: \"Defines a row-level security policy applying to all operations.\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tspec: policyBothPredicatesSpec,\n\t\trequiresModelAttribute: policyRequiresRls,\n\t\tattributes: policyBlockAttributes\n\t},\n\tnative_enum: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"native_enum\",\n\t\tdocumentation: \"Defines a PostgreSQL enum type with named string-valued members.\",\n\t\tdiscriminator: \"native_enum\",\n\t\tname: { required: true },\n\t\tspec: nativeEnumSpec,\n\t\tattributes: { map: () => nativeEnumMapAttribute }\n\t},\n\t/**\n\t* PSL block descriptor for `role` (e.g. `role anon {}`). Name-only, no\n\t* parameters and no body content. Declared inside `namespace unbound { }`\n\t* — see {@link lowerRoleFromBlock} for the placement check and the\n\t* coordinate the lowered entity carries.\n\t*/\n\trole: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"role\",\n\t\tdocumentation: \"Declares an existing database role in namespace unbound for use in security policies.\",\n\t\tdiscriminator: \"role\",\n\t\tname: { required: true },\n\t\tspec: roleSpec\n\t}\n};\nconst postgresRlsSpec = modelAttribute(\"rls\", { documentation: \"Enables PostgreSQL row-level security on this model’s table.\" });\nconst postgresRlsSpecFactory = () => postgresRlsSpec;\nconst [firstLanguage, ...remainingLanguages] = POSTGRES_TEXT_SEARCH_LANGUAGES;\nconst postgresFullTextIndexSpec = modelAttribute(\"fullTextIndex\", {\n\tdocumentation: \"Indexes one text column for full-text search, rendering the expression `fullTextMatches`, `fullTextRank` and `fullTextHeadline` lower to.\",\n\tpositional: [{\n\t\tkey: \"fields\",\n\t\ttype: list(fieldRef(), {\n\t\t\tallowEmpty: false,\n\t\t\tunique: true\n\t\t}),\n\t\tdocumentation: \"The single field to index.\"\n\t}],\n\tnamed: {\n\t\tlanguage: {\n\t\t\ttype: optional(oneOf(str(firstLanguage), ...remainingLanguages.map((language) => str(language)))),\n\t\t\tdocumentation: \"The text-search configuration. Defaults to `english`, and must match the language the query operations are given.\"\n\t\t},\n\t\tname: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The index name. Mutually exclusive with `map`.\"\n\t\t},\n\t\tmap: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The database index name. Mutually exclusive with `name`.\"\n\t\t},\n\t\twhere: {\n\t\t\ttype: optional(str()),\n\t\t\tdocumentation: \"The SQL predicate restricting rows included in a partial index.\"\n\t\t}\n\t},\n\trefine: (value, ctx, attributeNode) => {\n\t\tconst diagnostics = [];\n\t\tif (value.fields.length !== 1) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"The full-text operations work on one column; declare one `@@fullTextIndex` per column\", PSL_FULL_TEXT_INDEX_ONE_FIELD));\n\t\tif (value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` requires a `name` or `map` argument (a default name cannot be derived from an expression)\", PSL_FULL_TEXT_INDEX_REQUIRES_NAME));\n\t\tif (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, \"`@@fullTextIndex` takes at most one of `name` and `map`\", PSL_FULL_TEXT_INDEX_NAME_XOR_MAP));\n\t\treturn diagnostics;\n\t}\n});\nconst postgresFullTextIndexSpecFactory = () => postgresFullTextIndexSpec;\n/**\n* `@@` model attributes contributed by the Postgres target pack.\n*\n* `@@rls` is argument-less: presence marks the model's table\n* RLS-controlled. It lowers to a {@link PostgresRlsEnablement} marker in\n* the namespace's `entries.rls`, keyed by the model's table name — the\n* marker (never the policy set) is what drives\n* `ENABLE`/`DISABLE ROW LEVEL SECURITY` planning.\n*/\nconst postgresAuthoringModelAttributes = {\n\trls: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"rls\",\n\t\tspec: postgresRlsSpecFactory,\n\t\tlower: (_parsed, ctx) => ({\n\t\t\tkey: ctx.storageName,\n\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\ttableName: ctx.storageName,\n\t\t\t\tnamespaceId: ctx.namespaceId\n\t\t\t})\n\t\t})\n\t},\n\tfullTextIndex: {\n\t\tkind: \"modelAttribute\",\n\t\tattribute: \"fullTextIndex\",\n\t\tspec: postgresFullTextIndexSpecFactory,\n\t\trepeatable: true,\n\t\tlower: (parsed, ctx) => {\n\t\t\tconst fieldName = parsed.fields[0];\n\t\t\tinvariant(fieldName !== void 0 && parsed.fields.length === 1, `@@fullTextIndex on \"${ctx.modelName}\" lowered with ${parsed.fields.length} fields`);\n\t\t\tconst columnName = ctx.fieldStorageName(fieldName);\n\t\t\tconst codecId = ctx.fieldCodecId(fieldName);\n\t\t\tif (columnName === void 0 || codecId === void 0 || !isFullTextIndexableCodec(codecId)) {\n\t\t\t\tctx.diagnostics?.push({\n\t\t\t\t\tcode: PSL_FULL_TEXT_INDEX_TEXT_FIELD,\n\t\t\t\t\tmessage: `\\`@@fullTextIndex\\` indexes a text column, but \"${ctx.modelName}.${fieldName}\" is ${codecId === void 0 ? \"not a stored scalar field\" : `stored as \\`${codecId}\\``}.`,\n\t\t\t\t\tsourceId: ctx.sourceId ?? \"unknown\"\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn { index: {\n\t\t\t\texpression: renderFullTextIndexExpression(parsed.language ?? \"english\", columnName),\n\t\t\t\ttype: \"gin\",\n\t\t\t\toptions: void 0,\n\t\t\t\twhere: parsed.where,\n\t\t\t\tunique: void 0,\n\t\t\t\tname: parsed.name,\n\t\t\t\tmap: parsed.map\n\t\t\t} };\n\t\t}\n\t}\n};\nconst postgresAuthoringFieldPresets = {\n\ttext: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/text@1\" }\n\t},\n\tint: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/int4@1\" }\n\t},\n\tbigint: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/int8@1\" }\n\t},\n\tfloat: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/float8@1\" }\n\t},\n\tdecimal: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/numeric@1\" }\n\t},\n\tboolean: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/bool@1\" }\n\t},\n\tjson: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/jsonb@1\" }\n\t},\n\tbytes: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/bytea@1\" }\n\t},\n\tdateTime: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/timestamptz-temporal@1\" }\n\t},\n\ttemporal: {\n\t\tcreatedAtJsDate: (/* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_DATE_CODEC_ID]\n\t\t})).createdAt,\n\t\tupdatedAtJsDate: (/* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_DATE_CODEC_ID]\n\t\t})).updatedAt,\n\t\ttimestamptzJsDate: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMPTZ_DATE_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_DATE_CODEC_ID]\n\t\t}),\n\t\t.../* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]\n\t\t}),\n\t\t.../* @__PURE__ */ temporalStringAuthoringPresets({\n\t\t\tcodecId: PG_TIMESTAMPTZ_STRING_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_STRING_CODEC_ID]\n\t\t}),\n\t\ttimestamp: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMP_TEMPORAL_CODEC_ID]\n\t\t}),\n\t\ttimestamptz: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID]\n\t\t}),\n\t\ttimestampString: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMP_STRING_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMP_STRING_CODEC_ID]\n\t\t}),\n\t\ttimestamptzString: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: PG_TIMESTAMPTZ_STRING_CODEC_ID,\n\t\t\tgeneratorId: postgresNowGeneratorIds[PG_TIMESTAMPTZ_STRING_CODEC_ID]\n\t\t})\n\t},\n\tuuidNative: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: { codecId: \"pg/uuid@1\" }\n\t},\n\tid: {\n\t\tuuidv4Native: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7Native: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n* Resolves an entity handle's `target` ref to a table coordinate of this\n* contract, or throws the load-time diagnostic naming the handle: a\n* cross-space target is rejected (you cannot CREATE POLICY on a table\n* another space owns) and an unresolved target names the model.\n*/\nfunction requireLocalTarget(refs, subject) {\n\tconst target = refs[\"target\"];\n\tif (target !== void 0 && target.kind === \"resolved\") return {\n\t\tnamespaceId: target.namespaceId,\n\t\ttableName: target.tableName\n\t};\n\tif (target !== void 0 && target.kind === \"cross-space\") throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: ${subject} targets model \"${target.modelName ?? target.tableName}\", which lives in another contract space. Policies and rlsEnabled entries must target a model declared in this contract.`, { meta: {\n\t\tmodel: target.modelName ?? target.tableName,\n\t\treason: \"cross-space-target\"\n\t} });\n\tthrow postgresError(\"CONTRACT.MODEL_UNKNOWN\", `defineContract: ${subject} targets model \"${target?.modelName ?? \"<anonymous>\"}\", which is not in the contract's models. Add the model to \\`models\\`.`, { meta: { model: target?.modelName ?? \"<anonymous>\" } });\n}\n/**\n* The SQL-family entity-handle batch lowering hook for the Postgres pack\n* (`SqlEntityHandleLoweringContribution`). Receives every `entities` handle\n* whose kind this pack registered — batch, so the cross-entity diagnostics\n* (duplicate prefix, policy without rlsEnabled, duplicate role) can see\n* sibling handles — and lowers them with the same keying and hash assembly\n* as the PSL path: `policy` keyed by prefix (wire name via\n* {@link buildRlsPolicyEntity}), `rls` keyed by table name, `role` keyed by\n* name and filed under the default namespace (roles are declared\n* contract-wide; PSL has no role block to set a precedent).\n*/\nfunction postgresLowerEntityHandles(input) {\n\tconst enablements = /* @__PURE__ */ new Map();\n\tconst roles = /* @__PURE__ */ new Map();\n\tconst policies = [];\n\tconst coordinateKey = (coordinate) => `${coordinate.namespaceId} ${coordinate.tableName}`;\n\tfor (const { handle, refs } of input.handles) switch (handle.entityKind) {\n\t\tcase \"rls\": {\n\t\t\tconst coordinate = requireLocalTarget(refs, \"an rlsEnabled entry\");\n\t\t\tconst key = coordinateKey(coordinate);\n\t\t\tif (!enablements.has(key)) enablements.set(key, {\n\t\t\t\tcoordinate,\n\t\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\t\tnamespaceId: coordinate.namespaceId\n\t\t\t\t})\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"role\": {\n\t\t\tconst roleHandle = blindCast(handle);\n\t\t\tif (roles.has(roleHandle.name)) throw postgresError(\"CONTRACT.ROLE_INVALID\", `defineContract: role \"${roleHandle.name}\" is declared more than once in the entities list.`, { meta: {\n\t\t\t\trole: roleHandle.name,\n\t\t\t\treason: \"duplicate\"\n\t\t\t} });\n\t\t\troles.set(roleHandle.name, new PostgresRole({\n\t\t\t\tname: roleHandle.name,\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t\t\t}));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"policy\": {\n\t\t\tconst policyHandle = blindCast(handle);\n\t\t\tpolicies.push({\n\t\t\t\thandle: policyHandle,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tdefault: throw postgresError(\"CONTRACT.ENTITY_KIND_INVALID\", `defineContract: the postgres pack does not lower \"${handle.entityKind}\" handles from the entities list.`, { meta: { entityKind: handle.entityKind } });\n\t}\n\tconst rows = [];\n\tconst seenPrefixes = /* @__PURE__ */ new Set();\n\tfor (const { handle: policy, refs } of policies) {\n\t\tconst prefix = policy.name;\n\t\tassertWireNamePrefixLength(prefix, \"defineContract: policy prefix\");\n\t\tconst coordinate = requireLocalTarget(refs, `policy \"${prefix}\"`);\n\t\tif (!enablements.has(coordinateKey(coordinate))) {\n\t\t\tconst target = refs[\"target\"];\n\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy \"${prefix}\" targets model \"${target?.modelName ?? coordinate.tableName}\", whose table is not RLS-enabled. Add rlsEnabled(<model>) to the entities list.`, { meta: {\n\t\t\t\tprefix,\n\t\t\t\tmodel: target?.modelName ?? coordinate.tableName,\n\t\t\t\treason: \"target-not-rls-enabled\"\n\t\t\t} });\n\t\t}\n\t\tconst prefixKey = `${coordinate.namespaceId} ${prefix}`;\n\t\tif (seenPrefixes.has(prefixKey)) throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy prefix \"${prefix}\" is declared more than once in namespace \"${coordinate.namespaceId}\". Policy prefixes must be unique per namespace.`, { meta: {\n\t\t\tprefix,\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\treason: \"duplicate-prefix\"\n\t\t} });\n\t\tseenPrefixes.add(prefixKey);\n\t\tconst roleNames = [...new Set(policy.roles.map((roleHandle) => roleHandle.name))].sort();\n\t\trows.push({\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\tentityKind: \"policy\",\n\t\t\tkey: prefix,\n\t\t\tentity: buildRlsPolicyEntity({\n\t\t\t\tprefix,\n\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\t\toperation: policy.operation,\n\t\t\t\troles: roleNames,\n\t\t\t\t...ifDefined(\"using\", policy.using),\n\t\t\t\t...ifDefined(\"withCheck\", policy.withCheck)\n\t\t\t})\n\t\t});\n\t}\n\tfor (const { coordinate, entity } of enablements.values()) rows.push({\n\t\tnamespaceId: coordinate.namespaceId,\n\t\tentityKind: \"rls\",\n\t\tkey: coordinate.tableName,\n\t\tentity\n\t});\n\tfor (const [name, entity] of roles) rows.push({\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\tentityKind: \"role\",\n\t\tkey: name,\n\t\tentity\n\t});\n\treturn rows;\n}\n//#endregion\nexport { postgresAuthoringPslBlockDescriptors as a, postgresNowGeneratorIdFor as c, plainDateTimeNowControlDescriptor as d, INSTANT_NOW_GENERATOR_ID as f, postgresAuthoringModelAttributes as i, PLAIN_DATE_TIME_NOW_GENERATOR_ID as l, instantNowControlDescriptor as m, postgresAuthoringEntityTypes as n, postgresAuthoringTypes as o, instantNow as p, postgresAuthoringFieldPresets as r, postgresLowerEntityHandles as s, POLICY_BLOCK_KEYWORDS as t, plainDateTimeNow as u };\n\n//# sourceMappingURL=authoring-BarDKx1G.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,2BAA2B;AACjC,SAAS,8BAA8B;CACtC,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;AACA,SAAS,aAAa;CACrB,OAAO,gBAAgB,EAAE,aAAa,yBAAyB,CAAC,CAAC,CAAC,IAAI,QAAQ;AAC/E;;;;;;AAQA,MAAM,mCAAmC;AACzC,SAAS,oCAAoC;CAC5C,OAAO;EACN,IAAI;EACJ,oBAAoB;GACnB,UAAU;IACT,MAAM;IACN,IAAI;GACL;GACA,UAAU;IACT,MAAM;IACN,IAAI;GACL;EACD;CACD;AACD;AACA,SAAS,mBAAmB;CAC3B,OAAO,gBAAgB,EAAE,aAAa,iCAAiC,CAAC,CAAC,CAAC,IAAI,iBAAiB,KAAK;AACrG;;AAIA,MAAM,0BAA0B;EAC9B,iCAAiC;EACjC,mCAAmC;EACnC,+BAA+B;EAC/B,+BAA+B;EAC/B,iCAAiC;AACnC;AACA,MAAM,0BAA0B,IAAI,IAAI,OAAO,QAAQ,uBAAuB,CAAC;AAC/E,SAAS,0BAA0B,SAAS;CAC3C,OAAO,wBAAwB,IAAI,OAAO;AAC3C;AAGA,MAAM,yBAAyB;AAC/B,MAAM,gCAAgC;AACtC,MAAM,oCAAoC;AAC1C,MAAM,mCAAmC;AACzC,MAAM,iCAAiC;AACvC,MAAM,yCAAyC;AAC/C,MAAM,kC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,KAAK;EACpE,aAAa,WAAW;EACxB,YAAY;EACZ,KAAK,WAAW;EAChB;CACD,CAAC;CACD,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,KAAK,KAAK;EAC7C,aAAa;EACb,YAAY;EACZ,KAAK;EACL;CACD,CAAC;CACD,OAAO;AACR"}
|
package/dist/{check-expressions-DJNIFTHB-C86_fR5c.mjs → check-expressions-BRuSxJ5d-CC5OFfR1.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-
|
|
1
|
+
import { r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-BMXJi06b-CAQOplfq.mjs";
|
|
2
2
|
import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
3
|
-
//#region ../../../3-targets/3-targets/postgres/dist/check-expressions-
|
|
3
|
+
//#region ../../../3-targets/3-targets/postgres/dist/check-expressions-BRuSxJ5d.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Renders the checks a Postgres column needs, as opaque predicate text.
|
|
6
6
|
*
|
|
@@ -43,4 +43,4 @@ function postgresRenderCheckExpressions(input) {
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { postgresRenderCheckExpressions as t };
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=check-expressions-
|
|
46
|
+
//# sourceMappingURL=check-expressions-BRuSxJ5d-CC5OFfR1.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-expressions-
|
|
1
|
+
{"version":3,"file":"check-expressions-BRuSxJ5d-CC5OFfR1.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/check-expressions-BRuSxJ5d.mjs"],"sourcesContent":["import { r as quoteIdentifier, t as escapeLiteral } from \"./sql-utils-BMXJi06b.mjs\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/core/check-expressions.ts\n/**\n* Renders the checks a Postgres column needs, as opaque predicate text.\n*\n* A domain enum has no type-level enforcement, so membership is a\n* predicate: `IN` for a scalar, and `<@` containment for an array — an array\n* column cannot use `IN` at all (`operator does not exist: text[] = text`).\n* Array membership strips NULL elements first, leaving element nullability to\n* the separate element-non-null check emitted for semantically strict lists.\n*\n* Array containment casts both operands to `numeric[]` for numeric members or\n* `text[]` for string members, so different storage types share an operator\n* without comparing numbers as text. The scalar `IN` form needs no cast.\n*/\nfunction postgresRenderCheckExpressions(input) {\n\tconst candidates = [];\n\tconst column = quoteIdentifier(input.columnName);\n\tconst isMany = input.many !== false;\n\tconst elementNullable = typeof input.many === \"object\" && input.many.elementNullable || \"elementNullable\" in input && input.elementNullable === true;\n\tif (input.memberValues !== void 0) {\n\t\tinvariant(input.memberValues.length > 0, `check for \"${input.tableName}\".\"${input.columnName}\": empty member set; both authoring surfaces reject a member-less enum before rendering`);\n\t\tconst members = input.memberValues.map((value) => {\n\t\t\tif (typeof value === \"string\") return `'${escapeLiteral(value)}'`;\n\t\t\tinvariant(Number.isFinite(value), `check for \"${input.tableName}\".\"${input.columnName}\": non-finite numeric member`);\n\t\t\treturn String(value);\n\t\t}).join(\", \");\n\t\tconst arrayType = input.memberValues.every((value) => typeof value === \"number\") ? \"numeric[]\" : \"text[]\";\n\t\tcandidates.push({\n\t\t\tkind: \"membership\",\n\t\t\tcolumnName: input.columnName,\n\t\t\texpression: isMany ? `array_remove(${column}::${arrayType}, NULL) <@ ARRAY[${members}]::${arrayType}` : `${column} IN (${members})`\n\t\t});\n\t}\n\tif (isMany && !elementNullable) candidates.push({\n\t\tkind: \"elementNotNull\",\n\t\tcolumnName: input.columnName,\n\t\texpression: `array_position(${column}, NULL) IS NULL`\n\t});\n\treturn candidates;\n}\n//#endregion\nexport { postgresRenderCheckExpressions as t };\n\n//# sourceMappingURL=check-expressions-BRuSxJ5d.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,+BAA+B,OAAO;CAC9C,MAAM,aAAa,CAAC;CACpB,MAAM,SAAS,gBAAgB,MAAM,UAAU;CAC/C,MAAM,SAAS,MAAM,SAAS;CAC9B,MAAM,kBAAkB,OAAO,MAAM,SAAS,YAAY,MAAM,KAAK,mBAAmB,qBAAqB,SAAS,MAAM,oBAAoB;CAChJ,IAAI,MAAM,iBAAiB,KAAK,GAAG;EAClC,UAAU,MAAM,aAAa,SAAS,GAAG,cAAc,MAAM,UAAU,KAAK,MAAM,WAAW,wFAAwF;EACrL,MAAM,UAAU,MAAM,aAAa,KAAK,UAAU;GACjD,IAAI,OAAO,UAAU,UAAU,OAAO,IAAI,cAAc,KAAK,EAAE;GAC/D,UAAU,OAAO,SAAS,KAAK,GAAG,cAAc,MAAM,UAAU,KAAK,MAAM,WAAW,6BAA6B;GACnH,OAAO,OAAO,KAAK;EACpB,CAAC,CAAC,CAAC,KAAK,IAAI;EACZ,MAAM,YAAY,MAAM,aAAa,OAAO,UAAU,OAAO,UAAU,QAAQ,IAAI,cAAc;EACjG,WAAW,KAAK;GACf,MAAM;GACN,YAAY,MAAM;GAClB,YAAY,SAAS,gBAAgB,OAAO,IAAI,UAAU,mBAAmB,QAAQ,KAAK,cAAc,GAAG,OAAO,OAAO,QAAQ;EAClI,CAAC;CACF;CACA,IAAI,UAAU,CAAC,iBAAiB,WAAW,KAAK;EAC/C,MAAM;EACN,YAAY,MAAM;EAClB,YAAY,kBAAkB,OAAO;CACtC,CAAC;CACD,OAAO;AACR"}
|
package/dist/{codec-descriptor-B61d-k4C-BdWVU6Fu.mjs → codec-descriptor-CZAGhM_O-DK9auM7J.mjs}
RENAMED
|
@@ -2,7 +2,7 @@ import { CaseExpr, ColumnRef, DerivedTableSource, FunctionSource, JsonArrayAggEx
|
|
|
2
2
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
3
|
import { CodecDescriptorImpl, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
|
-
//#region ../../../3-targets/3-targets/postgres/dist/codec-descriptor-
|
|
5
|
+
//#region ../../../3-targets/3-targets/postgres/dist/codec-descriptor-CZAGhM_O.mjs
|
|
6
6
|
const POSTGRES_CODEC_DESCRIPTOR_KIND = "postgres-codec";
|
|
7
7
|
const ARRAY_INPUT_ALIAS = "array_input";
|
|
8
8
|
const ARRAY_ELEMENT_ALIAS = "array_element";
|
|
@@ -30,9 +30,6 @@ var PostgresCodecDescriptor = class extends CodecDescriptorImpl {
|
|
|
30
30
|
const inputBinding = SelectAst.noFrom().withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, expression)]);
|
|
31
31
|
return SubqueryExpr.of(SelectAst.from(DerivedTableSource.as(ARRAY_INPUT_ALIAS, inputBinding)).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, arrayResult)]));
|
|
32
32
|
}
|
|
33
|
-
nativeTypeFor(ref) {
|
|
34
|
-
return this.nativeType(this.validateParams(ref));
|
|
35
|
-
}
|
|
36
33
|
projectJson(expression, ref) {
|
|
37
34
|
const params = this.validateParams(ref);
|
|
38
35
|
return ref.many === true ? this.jsonArrayProjection(expression, params) : this.jsonProjection(expression, params);
|
|
@@ -42,12 +39,10 @@ var PostgresCodecDescriptor = class extends CodecDescriptorImpl {
|
|
|
42
39
|
}
|
|
43
40
|
};
|
|
44
41
|
var PostgresCodecDescriptorAdapter = class extends PostgresCodecDescriptor {
|
|
45
|
-
descriptor;
|
|
46
42
|
options;
|
|
47
43
|
dataType;
|
|
48
44
|
codecId;
|
|
49
45
|
traits;
|
|
50
|
-
targetTypes;
|
|
51
46
|
paramsSchema;
|
|
52
47
|
renderOutputType;
|
|
53
48
|
renderInputType;
|
|
@@ -55,13 +50,11 @@ var PostgresCodecDescriptorAdapter = class extends PostgresCodecDescriptor {
|
|
|
55
50
|
factory;
|
|
56
51
|
constructor(descriptor, options) {
|
|
57
52
|
super();
|
|
58
|
-
this.descriptor = descriptor;
|
|
59
53
|
this.options = options;
|
|
60
|
-
this.dataType = options.dataType;
|
|
54
|
+
this.dataType = options.dataType.id;
|
|
61
55
|
this.codecId = descriptor.codecId;
|
|
62
56
|
this.traits = descriptor.traits;
|
|
63
|
-
this.
|
|
64
|
-
this.paramsSchema = descriptor.paramsSchema;
|
|
57
|
+
this.paramsSchema = blindCast(options.dataType.params);
|
|
65
58
|
const factory = options.factory;
|
|
66
59
|
this.factory = factory === void 0 ? (params) => descriptor.factory(params) : (params) => factory(this, params);
|
|
67
60
|
const renderOutputType = descriptor.renderOutputType;
|
|
@@ -71,12 +64,6 @@ var PostgresCodecDescriptorAdapter = class extends PostgresCodecDescriptor {
|
|
|
71
64
|
const renderValueLiteral = descriptor.renderValueLiteral;
|
|
72
65
|
if (renderValueLiteral !== void 0) this.renderValueLiteral = (value, side) => renderValueLiteral.call(descriptor, value, side);
|
|
73
66
|
}
|
|
74
|
-
get isParameterized() {
|
|
75
|
-
return this.descriptor.isParameterized;
|
|
76
|
-
}
|
|
77
|
-
nativeType(params) {
|
|
78
|
-
return this.options.nativeType(params);
|
|
79
|
-
}
|
|
80
67
|
jsonProjection(expression, params) {
|
|
81
68
|
return this.options.jsonProjection(expression, params);
|
|
82
69
|
}
|
|
@@ -91,7 +78,7 @@ function definePostgresCodecs(descriptors) {
|
|
|
91
78
|
return descriptors;
|
|
92
79
|
}
|
|
93
80
|
function isPostgresCodecDescriptor(value) {
|
|
94
|
-
return typeof value === "object" && value !== null && "descriptorKind" in value && value.descriptorKind === POSTGRES_CODEC_DESCRIPTOR_KIND && "codecId" in value && typeof value.codecId === "string" && "traits" in value && Array.isArray(value.traits) && "
|
|
81
|
+
return typeof value === "object" && value !== null && "descriptorKind" in value && value.descriptorKind === POSTGRES_CODEC_DESCRIPTOR_KIND && "codecId" in value && typeof value.codecId === "string" && "traits" in value && Array.isArray(value.traits) && "paramsSchema" in value && (value.paramsSchema === void 0 || isObjectLike(value.paramsSchema) && "~standard" in value.paramsSchema && isObjectLike(value.paramsSchema["~standard"]) && "validate" in value.paramsSchema["~standard"] && typeof value.paramsSchema["~standard"].validate === "function") && "isParameterized" in value && typeof value.isParameterized === "boolean" && "factory" in value && typeof value.factory === "function" && "projectJson" in value && typeof value.projectJson === "function";
|
|
95
82
|
}
|
|
96
83
|
function isObjectLike(value) {
|
|
97
84
|
return typeof value === "object" && value !== null || typeof value === "function";
|
|
@@ -138,4 +125,4 @@ function candidateCodecId(value) {
|
|
|
138
125
|
//#endregion
|
|
139
126
|
export { postgresCodec as a, isPostgresCodecDescriptor as i, buildPostgresCodecDescriptorRegistry as n, definePostgresCodecs as r, PostgresCodecDescriptor as t };
|
|
140
127
|
|
|
141
|
-
//# sourceMappingURL=codec-descriptor-
|
|
128
|
+
//# sourceMappingURL=codec-descriptor-CZAGhM_O-DK9auM7J.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-descriptor-CZAGhM_O-DK9auM7J.mjs","names":["#descriptors"],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-descriptor-CZAGhM_O.mjs"],"sourcesContent":["import { CaseExpr, ColumnRef, DerivedTableSource, FunctionSource, JsonArrayAggExpr, LiteralExpr, NativeJsonValueProjection, NullCheckExpr, OrderByItem, ProjectionItem, SelectAst, SubqueryExpr } from \"@internal/sql-relational-core/ast\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { CodecDescriptorImpl, validateCodecTypeParams } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/core/codec-descriptor.ts\nconst POSTGRES_CODEC_DESCRIPTOR_KIND = \"postgres-codec\";\nconst ARRAY_INPUT_ALIAS = \"array_input\";\nconst ARRAY_ELEMENT_ALIAS = \"array_element\";\nconst ARRAY_VALUE_COLUMN = \"value\";\nconst ARRAY_ORDINALITY_COLUMN = \"ordinality\";\nvar PostgresCodecDescriptor = class extends CodecDescriptorImpl {\n\tdescriptorKind = POSTGRES_CODEC_DESCRIPTOR_KIND;\n\tjsonArrayProjection(expression, params) {\n\t\tconst boundArray = ColumnRef.of(ARRAY_INPUT_ALIAS, ARRAY_VALUE_COLUMN);\n\t\tconst element = ColumnRef.of(ARRAY_ELEMENT_ALIAS, ARRAY_VALUE_COLUMN);\n\t\tconst ordinality = ColumnRef.of(ARRAY_ELEMENT_ALIAS, ARRAY_ORDINALITY_COLUMN);\n\t\tconst projectedElement = CaseExpr.of([{\n\t\t\tcondition: NullCheckExpr.isNull(element),\n\t\t\tvalue: LiteralExpr.of(null)\n\t\t}], this.jsonProjection(element, params));\n\t\tconst aggregate = JsonArrayAggExpr.of(new NativeJsonValueProjection(projectedElement), \"emptyArray\", [OrderByItem.asc(ordinality)]);\n\t\tconst aggregateQuery = SelectAst.from(FunctionSource.of(\"unnest\", [boundArray], {\n\t\t\talias: ARRAY_ELEMENT_ALIAS,\n\t\t\tcolumnAliases: [ARRAY_VALUE_COLUMN, ARRAY_ORDINALITY_COLUMN]\n\t\t}).withOrdinality()).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, aggregate)]);\n\t\tconst arrayResult = CaseExpr.of([{\n\t\t\tcondition: NullCheckExpr.isNull(boundArray),\n\t\t\tvalue: LiteralExpr.of(null)\n\t\t}], SubqueryExpr.of(aggregateQuery));\n\t\tconst inputBinding = SelectAst.noFrom().withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, expression)]);\n\t\treturn SubqueryExpr.of(SelectAst.from(DerivedTableSource.as(ARRAY_INPUT_ALIAS, inputBinding)).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, arrayResult)]));\n\t}\n\tprojectJson(expression, ref) {\n\t\tconst params = this.validateParams(ref);\n\t\treturn ref.many === true ? this.jsonArrayProjection(expression, params) : this.jsonProjection(expression, params);\n\t}\n\tvalidateParams(ref) {\n\t\treturn blindCast(validateCodecTypeParams(this, ref));\n\t}\n};\nvar PostgresCodecDescriptorAdapter = class extends PostgresCodecDescriptor {\n\toptions;\n\tdataType;\n\tcodecId;\n\ttraits;\n\tparamsSchema;\n\trenderOutputType;\n\trenderInputType;\n\trenderValueLiteral;\n\tfactory;\n\tconstructor(descriptor, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.dataType = options.dataType.id;\n\t\tthis.codecId = descriptor.codecId;\n\t\tthis.traits = descriptor.traits;\n\t\tthis.paramsSchema = blindCast(options.dataType.params);\n\t\tconst factory = options.factory;\n\t\tthis.factory = factory === void 0 ? (params) => descriptor.factory(params) : (params) => factory(this, params);\n\t\tconst renderOutputType = descriptor.renderOutputType;\n\t\tif (renderOutputType !== void 0) this.renderOutputType = (params) => renderOutputType.call(descriptor, params);\n\t\tconst renderInputType = descriptor.renderInputType;\n\t\tif (renderInputType !== void 0) this.renderInputType = (params) => renderInputType.call(descriptor, params);\n\t\tconst renderValueLiteral = descriptor.renderValueLiteral;\n\t\tif (renderValueLiteral !== void 0) this.renderValueLiteral = (value, side) => renderValueLiteral.call(descriptor, value, side);\n\t}\n\tjsonProjection(expression, params) {\n\t\treturn this.options.jsonProjection(expression, params);\n\t}\n\tjsonArrayProjection(expression, params) {\n\t\treturn this.options.jsonArrayProjection === void 0 ? super.jsonArrayProjection(expression, params) : this.options.jsonArrayProjection(expression, params);\n\t}\n};\nfunction postgresCodec(descriptor, options) {\n\treturn blindCast(new PostgresCodecDescriptorAdapter(descriptor, options));\n}\nfunction definePostgresCodecs(descriptors) {\n\treturn descriptors;\n}\nfunction isPostgresCodecDescriptor(value) {\n\treturn typeof value === \"object\" && value !== null && \"descriptorKind\" in value && value.descriptorKind === POSTGRES_CODEC_DESCRIPTOR_KIND && \"codecId\" in value && typeof value.codecId === \"string\" && \"traits\" in value && Array.isArray(value.traits) && \"paramsSchema\" in value && (value.paramsSchema === void 0 || isObjectLike(value.paramsSchema) && \"~standard\" in value.paramsSchema && isObjectLike(value.paramsSchema[\"~standard\"]) && \"validate\" in value.paramsSchema[\"~standard\"] && typeof value.paramsSchema[\"~standard\"].validate === \"function\") && \"isParameterized\" in value && typeof value.isParameterized === \"boolean\" && \"factory\" in value && typeof value.factory === \"function\" && \"projectJson\" in value && typeof value.projectJson === \"function\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null || typeof value === \"function\";\n}\nvar PostgresCodecDescriptorRegistryImpl = class {\n\t#descriptors;\n\tconstructor(descriptors) {\n\t\tthis.#descriptors = descriptors;\n\t\tObject.freeze(this);\n\t}\n\tdescriptorFor(codecId) {\n\t\treturn this.#descriptors.get(codecId);\n\t}\n\t*values() {\n\t\tyield* this.#descriptors.values();\n\t}\n};\nfunction buildPostgresCodecDescriptorRegistry(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (!isPostgresCodecDescriptor(descriptor)) {\n\t\t\tconst codecId = candidateCodecId(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.CODEC_DESCRIPTOR_INVALID\", `Codec descriptor '${codecId}' is not a valid PostgreSQL codec descriptor.`, {\n\t\t\t\twhy: \"PostgreSQL codec registries require the postgres-codec discriminant and complete target descriptor methods.\",\n\t\t\t\tfix: \"Extend PostgresCodecDescriptor or adapt a generic descriptor with postgresCodec().\",\n\t\t\t\tmeta: { codecId }\n\t\t\t});\n\t\t}\n\t\tif (byId.has(descriptor.codecId)) throw structuredError(\"RUNTIME.DUPLICATE_CODEC\", `Duplicate PostgreSQL codec descriptor id '${descriptor.codecId}'.`, {\n\t\t\twhy: \"Each codecId must resolve to exactly one PostgreSQL descriptor during registry composition.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: {\n\t\t\t\tcodecId: descriptor.codecId,\n\t\t\t\ttarget: \"postgres\"\n\t\t\t}\n\t\t});\n\t\tbyId.set(descriptor.codecId, descriptor);\n\t}\n\treturn new PostgresCodecDescriptorRegistryImpl(byId);\n}\nfunction candidateCodecId(value) {\n\treturn typeof value === \"object\" && value !== null && \"codecId\" in value && typeof value.codecId === \"string\" ? value.codecId : \"<unknown>\";\n}\n//#endregion\nexport { postgresCodec as a, isPostgresCodecDescriptor as i, buildPostgresCodecDescriptorRegistry as n, defineP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AAW,QAAQ,KAAK;GACvJ,KAAK;GACL,KAAK;GACL,MAAM;IACL,SAAS,WAAW;IACpB,QAAQ;GACT;EACD,CAAC;EACD,KAAK,IAAI,WAAW,SAAS,UAAU;CACxC;CACA,OAAO,IAAI,oCAAoC,IAAI;AACpD;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,aAAa,SAAS,OAAO,MAAM,YAAY,WAAW,MAAM,UAAU;AACjI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./codec-descriptor-DkeVTJ3N-XTfZgDGp.mjs";
|
package/dist/{codec-descriptor-HYqjI24K-CTO3gTEs.d.mts → codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts}
RENAMED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
|
|
2
|
-
import { AnyCodecDescriptor, AnyCodecDescriptorTemplate, Codec, CodecDescriptor, CodecDescriptorImpl, CodecDescriptorTemplate, CodecInstanceContext, CodecRef, CodecTrait,
|
|
3
|
-
//#region ../../../3-targets/3-targets/postgres/dist/codec-descriptor-
|
|
2
|
+
import { AnyCodecDescriptor, AnyCodecDescriptorTemplate, Codec, CodecDescriptor, CodecDescriptorImpl, CodecDescriptorTemplate, CodecInstanceContext, CodecRef, CodecTrait, DataType } from "@prisma/orm-framework/components/codec";
|
|
3
|
+
//#region ../../../3-targets/3-targets/postgres/dist/codec-descriptor-DkeVTJ3N.d.mts
|
|
4
4
|
//#region src/core/codec-descriptor.d.ts
|
|
5
5
|
declare const POSTGRES_CODEC_DESCRIPTOR_KIND: "postgres-codec";
|
|
6
6
|
interface AnyPostgresCodecDescriptor extends AnyCodecDescriptor {
|
|
7
7
|
readonly descriptorKind: typeof POSTGRES_CODEC_DESCRIPTOR_KIND;
|
|
8
|
-
nativeTypeFor(ref: CodecRef): string;
|
|
9
8
|
projectJson(expression: ProjectionExpr, ref: CodecRef): ProjectionExpr;
|
|
10
9
|
}
|
|
11
10
|
declare abstract class PostgresCodecDescriptor<P = void> extends CodecDescriptorImpl<P> implements AnyPostgresCodecDescriptor {
|
|
12
11
|
readonly descriptorKind: "postgres-codec";
|
|
13
|
-
protected abstract nativeType(params: P): string;
|
|
14
12
|
protected abstract jsonProjection(expression: ProjectionExpr, params: P): ProjectionExpr;
|
|
15
13
|
protected jsonArrayProjection(expression: ProjectionExpr, params: P): ProjectionExpr;
|
|
16
|
-
nativeTypeFor(ref: CodecRef): string;
|
|
17
14
|
projectJson(expression: ProjectionExpr, ref: CodecRef): ProjectionExpr;
|
|
18
15
|
private validateParams;
|
|
19
16
|
}
|
|
@@ -21,9 +18,11 @@ type DescriptorParams<D extends AnyCodecDescriptorTemplate> = D extends CodecDes
|
|
|
21
18
|
/** The codec the family descriptor's factory builds, which a `factory` option's codec extends. */
|
|
22
19
|
type DescriptorCodec<D extends AnyCodecDescriptorTemplate> = ReturnType<ReturnType<D['factory']>>;
|
|
23
20
|
interface PostgresCodecOptions<P, C extends Codec<string, readonly CodecTrait[], unknown, unknown> = Codec<string, readonly CodecTrait[], unknown, unknown>> {
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The data type the adapted codec represents here. A template names none; this target does. The
|
|
23
|
+
* adapted codec's parameter schema is this data type's, not the template's.
|
|
24
|
+
*/
|
|
25
|
+
readonly dataType: DataType;
|
|
27
26
|
readonly jsonProjection: (expression: ProjectionExpr, params: P) => ProjectionExpr;
|
|
28
27
|
readonly jsonArrayProjection?: (expression: ProjectionExpr, params: P) => ProjectionExpr;
|
|
29
28
|
/**
|
|
@@ -31,7 +30,7 @@ interface PostgresCodecOptions<P, C extends Codec<string, readonly CodecTrait[],
|
|
|
31
30
|
*/
|
|
32
31
|
readonly factory?: (descriptor: PostgresCodecDescriptor<P>, params: P) => (ctx: CodecInstanceContext) => C;
|
|
33
32
|
}
|
|
34
|
-
type AdaptedPostgresCodecDescriptor<D extends AnyCodecDescriptorTemplate> = Pick<D, keyof CodecDescriptorTemplate<DescriptorParams<D>>> & Pick<CodecDescriptor, 'dataType'> & Pick<AnyPostgresCodecDescriptor, 'descriptorKind' | '
|
|
33
|
+
type AdaptedPostgresCodecDescriptor<D extends AnyCodecDescriptorTemplate> = Pick<D, keyof CodecDescriptorTemplate<DescriptorParams<D>>> & Pick<CodecDescriptor, 'dataType'> & Pick<AnyPostgresCodecDescriptor, 'descriptorKind' | 'projectJson'>;
|
|
35
34
|
declare function postgresCodec<D extends AnyCodecDescriptorTemplate>(descriptor: D, options: PostgresCodecOptions<DescriptorParams<D>, DescriptorCodec<D>>): AdaptedPostgresCodecDescriptor<D>;
|
|
36
35
|
declare function definePostgresCodecs<const Descriptors extends readonly AnyPostgresCodecDescriptor[]>(descriptors: Descriptors): Descriptors;
|
|
37
36
|
declare function isPostgresCodecDescriptor(value: unknown): value is AnyPostgresCodecDescriptor;
|
|
@@ -42,4 +41,4 @@ interface PostgresCodecDescriptorRegistry {
|
|
|
42
41
|
declare function buildPostgresCodecDescriptorRegistry(descriptors: ReadonlyArray<unknown>): PostgresCodecDescriptorRegistry;
|
|
43
42
|
//#endregion
|
|
44
43
|
export { PostgresCodecOptions as a, isPostgresCodecDescriptor as c, PostgresCodecDescriptorRegistry as i, postgresCodec as l, AnyPostgresCodecDescriptor as n, buildPostgresCodecDescriptorRegistry as o, PostgresCodecDescriptor as r, definePostgresCodecs as s, AdaptedPostgresCodecDescriptor as t };
|
|
45
|
-
//# sourceMappingURL=codec-descriptor-
|
|
44
|
+
//# sourceMappingURL=codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-descriptor-DkeVTJ3N.d.mts"],"mappings":";;;;cAGc;UACJ,mCAAmC;WAClC,uBAAuB;EAChC,YAAY,YAAY,gBAAgB,KAAK,WAAW;;uBAEnC,wBAAwB,kBAAkB,oBAAoB,cAAc;WACxF;qBACU,eAAe,YAAY,gBAAgB,QAAQ,IAAI;YAChE,oBAAoB,YAAY,gBAAgB,QAAQ,IAAI;EACtE,YAAY,YAAY,gBAAgB,KAAK,WAAW;UAChD;;KAEL,iBAAiB,UAAU,8BAA8B,UAAU,8BAA8B,KAAK;;KAEtG,gBAAgB,UAAU,8BAA8B,WAAW,WAAW;UACzE,qBAAqB,GAAG,UAAU,uBAAuB,kCAAkC,uBAAuB;;;;;WAKjH,UAAU;WACV,iBAAiB,YAAY,gBAAgB,QAAQ,MAAM;WAC3D,uBAAuB,YAAY,gBAAgB,QAAQ,MAAM;;;;WAIjE,WAAW,YAAY,wBAAwB,IAAI,QAAQ,OAAO,KAAK,yBAAyB;;KAEtG,+BAA+B,UAAU,8BAA8B,KAAK,SAAS,wBAAwB,iBAAiB,OAAO,KAAK,+BAA+B,KAAK;iBAClK,cAAc,UAAU,4BAA4B,YAAY,GAAG,SAAS,qBAAqB,iBAAiB,IAAI,gBAAgB,MAAM,+BAA+B;iBAC3K,2BAA2B,6BAA6B,8BAA8B,aAAa,cAAc;iBACjH,0BAA0B,iBAAiB,SAAS;UAC3D;EACR,cAAc,kBAAkB;EAChC,UAAU,iBAAiB;;iBAEZ,qCAAqC,aAAa,yBAAyB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { s as postgresError } from "./errors-DYyzTYzE-39CV_aMo.mjs";
|
|
2
|
-
import { numeralText } from "@prisma/orm-family-sql/relational-core/ast";
|
|
3
2
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
4
3
|
import { SAFE_INTEGER_BIGINT_RANGE, decodeJsonIntegerText, decodeJsonMatching } from "@prisma/orm-framework/components/codec";
|
|
4
|
+
import { numeralText } from "@prisma/orm-family-sql/contract/data-type";
|
|
5
5
|
import { withoutTrailing } from "@prisma/orm-framework/utils/text";
|
|
6
|
-
|
|
7
|
-
//#region ../../../3-targets/3-targets/postgres/dist/codec-helpers-BmUrP6U9.mjs
|
|
6
|
+
//#region ../../../3-targets/3-targets/postgres/dist/codec-helpers-BKrVHgYc.mjs
|
|
8
7
|
/**
|
|
9
8
|
* Whether text fits `length` characters, counted as PostgreSQL counts them: code points. A `character` value is padded with spaces, and spaces past its length are dropped, so they do not count.
|
|
10
9
|
*/
|
|
@@ -31,7 +30,6 @@ function fitsFloat4(value) {
|
|
|
31
30
|
const single = Math.fround(value);
|
|
32
31
|
return Number.isFinite(single) && (value === 0 || single !== 0);
|
|
33
32
|
}
|
|
34
|
-
const precisionParamsSchema = type({ "precision?": "number.integer >= 0 & number.integer <= 6" });
|
|
35
33
|
function renderLength(typeName, typeParams) {
|
|
36
34
|
const length = typeParams.length;
|
|
37
35
|
if (length === void 0) return;
|
|
@@ -364,6 +362,6 @@ const pgJsonDecode = (wire) => typeof wire === "string" ? parseJsonWire(wire) :
|
|
|
364
362
|
const pgJsonbEncode = (value) => JSON.stringify(value);
|
|
365
363
|
const pgJsonbDecode = (wire) => typeof wire === "string" ? parseJsonWire(wire) : wire;
|
|
366
364
|
//#endregion
|
|
367
|
-
export { pgNumericRenderOutputType as A, pgIntervalEncodeJson as C, pgJsonbDecode as D, pgJsonEncode as E,
|
|
365
|
+
export { pgNumericRenderOutputType as A, pgIntervalEncodeJson as C, pgJsonbDecode as D, pgJsonEncode as E, renderLength as M, renderPrecision as N, pgJsonbEncode as O, pgIntervalDecodeJson as S, pgJsonDecode as T, pgInt8NumberDecodeJson as _, decimalTextNumberLiteral as a, pgIntervalCanonical as b, pgBigintEncode as c, pgByteaDecodeJson as d, pgByteaDecodeWire as f, pgInt8NumberDecode as g, pgInt8Decode as h, decimalTextBigintLiteral as i, pgUnboundedIntDecode as j, pgNumericDecode as k, pgBigintEncodeJson as l, pgFloatEncode as m, FLOAT4_MAX as n, fitsCharacterLength as o, pgByteaEncodeJson as p, canonicalUuid as r, fitsFloat4 as s, CANONICAL_UUID as t, pgByteaCanonical as u, pgInt8NumberEncode as v, pgIntervalToIso as w, pgIntervalDecode as x, pgInt8NumberEncodeJson as y };
|
|
368
366
|
|
|
369
|
-
//# sourceMappingURL=codec-helpers-
|
|
367
|
+
//# sourceMappingURL=codec-helpers-BKrVHgYc-DFnb5u9l.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-helpers-BKrVHgYc-DFnb5u9l.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-helpers-BKrVHgYc.mjs"],"sourcesContent":["import { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { numeralText } from \"@internal/sql-contract/data-type\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { SAFE_INTEGER_BIGINT_RANGE, decodeJsonIntegerText, decodeJsonMatching } from \"@internal/framework-components/codec\";\nimport { withoutTrailing } from \"@internal/utils/text\";\n//#region src/core/codec-helpers.ts\n/**\n* Whether text fits `length` characters, counted as PostgreSQL counts them: code points. A `character` value is padded with spaces, and spaces past its length are dropped, so they do not count.\n*/\nfunction fitsCharacterLength(text, length, blankPadded) {\n\tconst significant = blankPadded ? withoutTrailing(text, \" \") : text;\n\treturn significant.length <= length || [...significant].length <= length;\n}\n/** The uuid input PostgreSQL reads: 32 hex digits in either case, a hyphen allowed after any group of four but the last, and the whole optionally in braces. */\nconst UUID_INPUT = /^(?:\\{[0-9a-f]{4}(?:-?[0-9a-f]{4}){7}\\}|[0-9a-f]{4}(?:-?[0-9a-f]{4}){7})$/i;\n/** A UUID as PostgreSQL writes it: lower case, hyphenated 8-4-4-4-12. */\nconst CANONICAL_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;\n/**\n* Text in any form PostgreSQL reads as a UUID (either case, a hyphen after any group of four digits, optionally in braces), written the way PostgreSQL writes it; `undefined` for text it does not read as one.\n*/\nfunction canonicalUuid(text) {\n\tif (!UUID_INPUT.test(text)) return void 0;\n\tconst hex = text.replace(/[{}-]/g, \"\").toLowerCase();\n\treturn `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n/** The largest finite float4. */\nconst FLOAT4_MAX = 34028234663852886e22;\n/** Whether float4 holds a finite number: it neither overflows to an infinity nor rounds to 0, both of which PostgreSQL refuses. */\nfunction fitsFloat4(value) {\n\tconst single = Math.fround(value);\n\treturn Number.isFinite(single) && (value === 0 || single !== 0);\n}\nfunction renderLength(typeName, typeParams) {\n\tconst length = typeParams.length;\n\tif (length === void 0) return;\n\tif (typeof length !== \"number\" || !Number.isFinite(length) || !Number.isInteger(length)) throw postgresError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"length\" in typeParams for ${typeName}, got ${String(length)}`, { meta: {\n\t\tnativeType: typeName,\n\t\tparam: \"length\",\n\t\treceived: String(length)\n\t} });\n\treturn `${typeName}<${length}>`;\n}\nfunction renderPrecision(typeName, typeParams) {\n\tconst precision = typeParams.precision;\n\tif (precision === void 0) return typeName;\n\tif (typeof precision !== \"number\" || !Number.isFinite(precision) || !Number.isInteger(precision)) throw postgresError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"precision\" in typeParams for ${typeName}, got ${String(precision)}`, { meta: {\n\t\tnativeType: typeName,\n\t\tparam: \"precision\",\n\t\treceived: String(precision)\n\t} });\n\treturn `${typeName}<${precision}>`;\n}\n/**\n* A `numeric` value as its canonical decimal text. A number is written out without an exponent,\n* because `numeric` text has no exponent syntax and `encodeJson` refuses one.\n*/\nconst pgNumericDecode = (wire) => {\n\tif (typeof wire === \"number\") return numeralText(wire);\n\treturn wire;\n};\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/**\n* Requires an application value to be of the JS type the codec reads.\n*\n* A range check reads a value of the wrong type as a value out of range, and\n* reports a number plainly inside the range as outside it — so the type is\n* established first and answered for on its own terms, naming what a caller\n* has to change.\n*/\nconst requireJsType = (codecId, expected, value) => {\n\tif (typeof value === expected) return;\n\tthrow postgresError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a ${expected}, got ${typeof value} ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: typeof value\n\t} });\n};\n/** Writes a `bigint` application value as the decimal text the wire form of the exact integer codecs carries. */\nconst pgBigintEncode = (codecId, value) => {\n\trequireJsType(codecId, \"bigint\", value);\n\treturn value.toString();\n};\n/**\n* Writes an application value as the decimal text these codecs carry as their\n* canonical JSON.\n*\n* A schema-written literal default (`BigInt @default(0)`) arrives here as a\n* `number`, since a number literal is the only integer a schema language\n* writes, and one that is a safe integer names its value exactly. Past that\n* range the literal was rounded before any of this ran, so the value written is\n* not the value meant — which this refuses rather than minting an exact-looking\n* total from it. A non-integral number is refused on the same terms.\n*/\nconst pgBigintEncodeJson = (codecId, value) => {\n\tif (typeof value !== \"number\") return pgBigintEncode(codecId, value);\n\tif (!Number.isSafeInteger(value)) throw postgresError(\"RUNTIME.ENCODE_FAILED\", `${codecId} number literal must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn BigInt(value).toString();\n};\n/**\n* Reads a wire or JSON value as a `bigint`, rejecting anything `BigInt()` would\n* misread. A number-typed wire value must also be a safe integer: past\n* ±(2^53 − 1) the driver's `number` has already rounded, so stringifying it\n* would mint a spuriously-exact `bigint` that need not equal the stored value.\n*/\nconst decimalIntegerDecode = (codecId, wire) => {\n\tif (typeof wire === \"bigint\") return wire;\n\tconst text = String(wire);\n\tif (!DECIMAL_INTEGER.test(text)) throw postgresError(\"RUNTIME.DECODE_FAILED\", `${codecId} value must be a decimal integer`, { meta: {\n\t\tcodecId,\n\t\treceived: text\n\t} });\n\tif (typeof wire === \"number\" && !Number.isSafeInteger(wire)) throw postgresError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire number must be an integer within the safe integer range, got ${text}`, { meta: {\n\t\tcodecId,\n\t\treceived: text\n\t} });\n\treturn BigInt(text);\n};\n/** Reads an `int8` wire or JSON value as a `bigint`, rejecting anything `BigInt()` would misread. */\nconst pgInt8Decode = (wire) => decimalIntegerDecode(\"pg/int8@1\", wire);\n/**\n* Reads an unconstrained-`numeric` wire or JSON value as a `bigint`, rejecting\n* non-integral values — including `NaN` and the infinities, which are `numeric`\n* values but not integers.\n*/\nconst pgUnboundedIntDecode = (wire) => decimalIntegerDecode(\"pg/unboundedint@1\", wire);\n/**\n* A SQL number literal has no form for `NaN` or the infinities; PostgreSQL reads and writes them as\n* the text `NaN`, `Infinity`, `-Infinity`, so the float codecs carry them as that text on the wire,\n* as `encodeJsonFloat` does in JSON.\n*/\nconst pgFloatEncode = (value) => Number.isFinite(value) ? value : String(value);\n/**\n* Requires an integer within ±(2^53 − 1), the range a JS `number` holds\n* exactly. The guard throws rather than rounding: past the boundary a `number`\n* silently loses digits, which is the failure mode this codec exists to refuse.\n*/\nconst pgInt8NumberGuard = (code, value) => {\n\tif (!Number.isSafeInteger(value)) throw postgresError(code, `pg/int8number@1 value must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId: \"pg/int8number@1\",\n\t\treceived: String(value)\n\t} });\n\treturn value;\n};\nconst pgInt8NumberEncode = (value) => {\n\trequireJsType(\"pg/int8number@1\", \"number\", value);\n\treturn String(pgInt8NumberGuard(\"RUNTIME.ENCODE_FAILED\", value));\n};\nconst pgInt8NumberEncodeJson = (value) => pgInt8NumberEncode(value);\n/**\n* Reads an `int8` wire value as a `number`, throwing outside ±(2^53 − 1) and on\n* non-integral input. Decimal text goes through `BigInt` before the range check\n* so an out-of-range value is compared exactly rather than after rounding.\n*/\nconst pgInt8NumberDecode = (wire) => {\n\tif (typeof wire === \"number\") return pgInt8NumberGuard(\"RUNTIME.DECODE_FAILED\", wire);\n\tconst value = decimalIntegerDecode(\"pg/int8number@1\", wire);\n\tif (value < SAFE_INTEGER_BIGINT_RANGE.min || value > SAFE_INTEGER_BIGINT_RANGE.max) throw postgresError(\"RUNTIME.DECODE_FAILED\", `pg/int8number@1 value must be an integer within the safe integer range, got ${value}`, { meta: {\n\t\tcodecId: \"pg/int8number@1\",\n\t\treceived: value.toString()\n\t} });\n\treturn Number(value);\n};\nconst pgInt8NumberDecodeJson = (json) => Number(decodeJsonIntegerText(\"pg/int8number@1\", json, SAFE_INTEGER_BIGINT_RANGE));\n/**\n* Renders a decimal-text default as a `bigint` literal, for the codecs whose\n* canonical JSON is decimal text while the application type is `bigint`\n* (`pg/int8@1`, `pg/unboundedint@1`) — a plain string literal would not\n* typecheck against the emitted column type.\n*/\nconst decimalTextBigintLiteral = (value) => typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? `${value}n` : void 0;\n/** Renders the decimal text of `pg/int8number@1`, whose application type is `number`, as a number literal. */\nconst decimalTextNumberLiteral = (value) => typeof value === \"string\" && DECIMAL_INTEGER.test(value) ? value : void 0;\nconst pgNumericRenderOutputType = (typeParams) => {\n\tconst precision = typeParams.precision;\n\tif (precision === void 0) return void 0;\n\tif (typeof precision !== \"number\" || !Number.isFinite(precision) || !Number.isInteger(precision)) throw postgresError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"precision\" in typeParams for Numeric, got ${String(precision)}`, { meta: {\n\t\tnativeType: \"Numeric\",\n\t\tparam: \"precision\",\n\t\treceived: String(precision)\n\t} });\n\tconst scale = typeParams.scale;\n\tif (scale === void 0) return `Numeric<${precision}>`;\n\tif (typeof scale !== \"number\" || !Number.isFinite(scale) || !Number.isInteger(scale)) throw postgresError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"scale\" in typeParams for Numeric, got ${String(scale)}`, { meta: {\n\t\tnativeType: \"Numeric\",\n\t\tparam: \"scale\",\n\t\treceived: String(scale)\n\t} });\n\treturn `Numeric<${precision}, ${scale}>`;\n};\nconst ISO_DURATION = /^P(?!$)(-?\\d+Y)?(-?\\d+M)?(-?\\d+D)?(?:T(?!$)(-?\\d+H)?(-?\\d+M)?(-?\\d+(?:\\.\\d+)?S)?)?$/;\nconst MICROS_PER_SECOND = 1000000n;\n/**\n* Converts a fractional-seconds digit string to microseconds, rounding rather\n* than truncating past the sixth digit.\n*\n* PostgreSQL rounds: `INTERVAL '1.1234567 seconds'` is `1.123457`, and\n* `'1.9999999 seconds'` carries into `2`. Truncating here made the parsed value\n* disagree with the database for any input past microsecond resolution.\n*\n* Ties round toward positive infinity, matching `Math.round` on the sibling path\n* that reads the driver's component object — so the two agree. PostgreSQL's own\n* tie behaviour is unobservable, because it parses the literal into a double\n* first and an exact half never survives that.\n*/\nconst microsFromFraction = (fraction, negative) => {\n\tif (fraction === \"\") return 0n;\n\tconst kept = BigInt(fraction.slice(0, 6).padEnd(6, \"0\"));\n\tconst rest = fraction.slice(6).replace(/0+$/, \"\");\n\tif (rest === \"\") return kept;\n\tconst half = rest[0] === \"5\" && rest.length === 1;\n\treturn rest > \"5\" || half && !negative ? kept + 1n : kept;\n};\nconst intervalFieldsOf = (text) => {\n\tconst match = ISO_DURATION.exec(text);\n\tif (match === null) throw postgresError(\"RUNTIME.DECODE_FAILED\", `pg/interval@1 value must be an ISO-8601 duration, got ${text}`, { meta: {\n\t\tcodecId: \"pg/interval@1\",\n\t\treceived: text\n\t} });\n\tconst [, years, months, days, hours, minutes, seconds] = match;\n\tconst wholeNumber = (part) => part === void 0 ? 0 : Number(part.slice(0, -1));\n\tconst secondsLiteral = seconds === void 0 ? \"0\" : seconds.slice(0, -1);\n\tconst negative = secondsLiteral.startsWith(\"-\");\n\tconst [whole = \"0\", fraction = \"\"] = secondsLiteral.replace(\"-\", \"\").split(\".\");\n\tconst magnitude = BigInt(whole) * MICROS_PER_SECOND + microsFromFraction(fraction, negative);\n\treturn {\n\t\tmonths: wholeNumber(years) * 12 + wholeNumber(months),\n\t\tdays: wholeNumber(days),\n\t\tmicros: BigInt(wholeNumber(hours)) * 3600n * MICROS_PER_SECOND + BigInt(wholeNumber(minutes)) * 60n * MICROS_PER_SECOND + (negative ? -magnitude : magnitude)\n\t};\n};\nconst secondsText = (micros) => {\n\tconst sign = micros < 0n ? \"-\" : \"\";\n\tconst magnitude = micros < 0n ? -micros : micros;\n\tconst whole = magnitude / MICROS_PER_SECOND % 60n;\n\tconst fraction = magnitude % MICROS_PER_SECOND;\n\treturn `${sign}${whole}${fraction === 0n ? \"\" : `.${fraction.toString().padStart(6, \"0\").replace(/0+$/, \"\")}`}`;\n};\n/**\n* Renders {@link PgInterval} the way PostgreSQL spells an interval under\n* `IntervalStyle = 'iso_8601'`: zero components omitted, `T` present only when a\n* time component is, each component carrying its own sign, and an all-zero\n* interval written `PT0S`.\n*/\nconst formatIsoDuration = ({ months, days, micros }) => {\n\tconst years = Math.trunc(months / 12);\n\tconst restMonths = months % 12;\n\tconst sign = micros < 0n ? \"-\" : \"\";\n\tconst magnitude = micros < 0n ? -micros : micros;\n\tconst hours = magnitude / (3600n * MICROS_PER_SECOND);\n\tconst minutes = magnitude / (60n * MICROS_PER_SECOND) % 60n;\n\tconst hasSeconds = magnitude % (60n * MICROS_PER_SECOND) !== 0n;\n\tconst parts = [\n\t\tyears === 0 ? \"\" : `${years}Y`,\n\t\trestMonths === 0 ? \"\" : `${restMonths}M`,\n\t\tdays === 0 ? \"\" : `${days}D`\n\t];\n\tconst time = [\n\t\thours === 0n ? \"\" : `${sign}${hours}H`,\n\t\tminutes === 0n ? \"\" : `${sign}${minutes}M`,\n\t\thasSeconds ? `${secondsText(micros)}S` : \"\"\n\t].join(\"\");\n\tconst rendered = `P${parts.join(\"\")}${time === \"\" ? \"\" : `T${time}`}`;\n\treturn rendered === \"P\" ? \"PT0S\" : rendered;\n};\n/**\n* An interval as PostgreSQL prints it under `IntervalStyle = 'postgres'`: `1 year 2 mons 3 days\n* 04:05:06.5`, `-1 years -2 mons +3 days -04:00:00`, `00:00:00`.\n*/\nconst POSTGRES_INTERVAL = /^(?:([+-]?\\d+) years? ?)?(?:([+-]?\\d+) mons? ?)?(?:([+-]?\\d+) days? ?)?(?:([+-])?(\\d+):(\\d{2}):(\\d{2})(?:\\.(\\d+))?)?$/;\nfunction postgresIntervalFields(text) {\n\tconst match = POSTGRES_INTERVAL.exec(text);\n\tif (match === null || text === \"\" || text.endsWith(\" \")) return void 0;\n\tconst [, years = \"0\", months = \"0\", days = \"0\", sign, hours = \"0\", minutes = \"0\", seconds = \"0\"] = match;\n\tconst fraction = match[8] ?? \"\";\n\tconst magnitude = (BigInt(hours) * 3600n + BigInt(minutes) * 60n + BigInt(seconds)) * MICROS_PER_SECOND + microsFromFraction(fraction, sign === \"-\");\n\treturn {\n\t\tmonths: Number(years) * 12 + Number(months),\n\t\tdays: Number(days),\n\t\tmicros: sign === \"-\" ? -magnitude : magnitude\n\t};\n}\nfunction intervalRefused(message) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", message, {\n\t\twhy: \"pg/interval stores one canonical form for each interval (ADR 254), and reads ISO 8601 durations and the text PostgreSQL prints.\",\n\t\tfix: \"Write an ISO 8601 duration, as the message shows.\"\n\t});\n}\n/**\n* The canonical form of `pg/interval` (ADR 254), from an ISO 8601 duration or the text PostgreSQL\n* prints under `IntervalStyle = 'postgres'`.\n*/\nfunction pgIntervalCanonical(text) {\n\tconst fractionDigits = /\\.(\\d+)/.exec(text)?.[1]?.length ?? 0;\n\tif (fractionDigits > 6) intervalRefused(`\"${text}\" has ${fractionDigits} digits after the decimal point, but pg/interval holds microseconds, so at most 6. Round it, as in \"PT1.123456S\".`);\n\tif (ISO_DURATION.test(text)) return formatIsoDuration(intervalFieldsOf(text));\n\tconst fields = postgresIntervalFields(text);\n\tif (fields === void 0) intervalRefused(`pg/interval cannot read \"${text}\". Write an ISO 8601 duration, as in \"P1Y2M3DT4H5M6S\".`);\n\treturn formatIsoDuration(fields);\n}\n/** Renders the application value as its canonical ISO-8601 duration. */\nconst pgIntervalToIso = (value) => formatIsoDuration(value);\nconst pgIntervalEncodeJson = (value) => formatIsoDuration(value);\nconst pgIntervalDecodeJson = (json) => intervalFieldsOf(decodeJsonMatching(\"pg/interval@1\", json, ISO_DURATION, \"an ISO-8601 duration\"));\nconst intervalTextFields = (text) => {\n\tif (ISO_DURATION.test(text)) return intervalFieldsOf(text);\n\tconst fields = postgresIntervalFields(text);\n\tif (fields === void 0) throw postgresError(\"RUNTIME.DECODE_FAILED\", `pg/interval@1 value must be an ISO-8601 duration or PostgreSQL interval text, got ${text}`, { meta: {\n\t\tcodecId: \"pg/interval@1\",\n\t\treceived: text\n\t} });\n\treturn fields;\n};\nconst pgIntervalDecode = (wire) => {\n\tif (typeof wire === \"string\") return intervalTextFields(wire);\n\tconst part = (name) => {\n\t\tconst raw = wire[name];\n\t\treturn typeof raw === \"number\" ? raw : 0;\n\t};\n\tconst seconds = part(\"seconds\") + part(\"milliseconds\") / 1e3;\n\treturn {\n\t\tmonths: part(\"years\") * 12 + part(\"months\"),\n\t\tdays: part(\"days\"),\n\t\tmicros: BigInt(part(\"hours\")) * 3600n * MICROS_PER_SECOND + BigInt(part(\"minutes\")) * 60n * MICROS_PER_SECOND + BigInt(Math.round(seconds * 1e6))\n\t};\n};\nconst BASE64_TEXT = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\nconst pgByteaEncodeJson = (value) => Buffer.from(value).toString(\"base64\");\nconst pgByteaDecodeJson = (json) => new Uint8Array(Buffer.from(decodeJsonMatching(\"pg/bytea@1\", json, BASE64_TEXT, \"a base64 string\"), \"base64\"));\nconst BYTEA_TEXT = /^\\\\x(?:[0-9A-Fa-f]{2})*$/;\nconst BYTEA_FORMS = String.raw`Write base64, as in \"aGVsbG8=\", or PostgreSQL hex, written \"\\\\x68656c6c6f\" in a PSL string.`;\nfunction byteaRefused(message) {\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", message, {\n\t\twhy: \"pg/bytea stores its bytes as base64 (ADR 254), and reads base64 and the hex text PostgreSQL prints.\",\n\t\tfix: BYTEA_FORMS\n\t});\n}\n/**\n* The canonical form of `pg/bytea` (ADR 254), the base64 its codec writes, from base64 or the hex\n* text PostgreSQL prints under `bytea_output = 'hex'`.\n*/\nfunction pgByteaCanonical(text) {\n\tif (text.startsWith(\"\\\\x\")) {\n\t\tif (!BYTEA_TEXT.test(text)) byteaRefused(`${JSON.stringify(text)} is not PostgreSQL hex, which has two hexadecimal digits for each byte. ${BYTEA_FORMS}`);\n\t\treturn Buffer.from(text.slice(2), \"hex\").toString(\"base64\");\n\t}\n\tif (!BASE64_TEXT.test(text)) byteaRefused(`pg/bytea cannot read ${JSON.stringify(text)}. Write base64 with its padding, as in \"aGVsbG8=\", or PostgreSQL hex, written \"\\\\\\\\x68656c6c6f\" in a PSL string.`);\n\treturn Buffer.from(text, \"base64\").toString(\"base64\");\n}\nconst pgByteaDecodeWire = (wire) => {\n\tif (wire instanceof Uint8Array) return wire.constructor === Uint8Array ? wire : new Uint8Array(wire.buffer, wire.byteOffset, wire.byteLength);\n\tif (!BYTEA_TEXT.test(wire)) throw postgresError(\"RUNTIME.DECODE_FAILED\", \"pg/bytea@1 wire value must be a bytea hex string or Uint8Array\", { meta: {\n\t\tcodecId: \"pg/bytea@1\",\n\t\treceived: wire\n\t} });\n\treturn new Uint8Array(Buffer.from(wire.slice(2), \"hex\"));\n};\nconst parseJsonWire = JSON.parse;\nconst pgJsonEncode = (value) => JSON.stringify(value);\nconst pgJsonDecode = (wire) => typeof wire === \"string\" ? parseJsonWire(wire) : wire;\nconst pgJsonbEncode = (value) => JSON.stringify(value);\nconst pgJsonbDecode = (wire) => typeof wire === \"string\" ? parseJsonWire(wire) : wire;\n//#endregion\nexport { pgNumericRenderOutputType as A, pgIntervalEncodeJson as C, pgJsonbDecode as D, pgJsonEncode as E, renderLength as M, renderPrecision as N, pgJsonbEncode as O, pgIntervalDecodeJson as S, pgJsonDecode as T, pgInt8NumberDecodeJson as _, decimalTextNumberLiteral as a, pgIntervalCanonical as b, pgBigintEncode as c, pgByteaDecodeJson as d, pgByteaDecodeWire as f, pgInt8NumberDecode as g, pgInt8Decode as h, decimalTextBigintLiteral as i, pgUnboundedIntDecode as j, pgNumericDecode as k, pgBigintEncodeJson as l, pgFloatEncode as m, FLOAT4_MAX as n, fitsCharacterLength as o, pgByteaEncodeJson as p, canonicalUuid as r, fitsFloat4 as s, CANONICAL_UUID as t, pgByteaCanonical as u, pgInt8NumberEncode as v, pgIntervalToIso as w, pgIntervalDecode as x, pgInt8NumberEncodeJson as y };\n\n//# sourceMappingURL=codec-helpers-BKrVHgYc.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,oBAAoB,MAAM,QAAQ,aAAa;CACvD,MAAM,cAAc,cAAc,gBAAgB,MAAM,GAAG,IAAI;CAC/D,OAAO,YAAY,UAAU,UAAU,CAAC,GAAG,WAAW,CAAC,CAAC,UAAU;AACnE;;AAEA,MAAM,aAAa;;AAEnB,MAAM,iBAAiB;;;;AAIvB,SAAS,cAAc,MAAM;CAC5B,IAAI,CAAC,WAAW,KAAK,IAAI,GAAG,OAAO,KAAK;CACxC,MAAM,MAAM,KAAK,QAAQ,UAAU,EAAE,CAAC,CAAC,YAAY;CACnD,OAAO,GAAG,IAAI,MAAM,GAAG,CAAC,EAAE,GAAG,IAAI,MAAM,GAAG,EAAE,EAAE,GAAG,IAAI,MAAM,IAAI,EAAE,EAAE,GAAG,IAAI,MAAM,IAAI,EAAE,EAAE,GAAG,IAAI,MAAM,EAAE;AACxG;;AAEA,MAAM,aAAa;;AAEnB,SAAS,WAAW,OAAO;CAC1B,MAAM,SAAS,KAAK,OAAO,KAAK;CAChC,OAAO,OAAO,SAAS,MAAM,MAAM,UAAU,KAAK,WAAW;AAC9D;AACA,SAAS,aAAa,UAAU,YAAY;CAC3C,MAAM,SAAS,WAAW;CAC1B,IAAI,WAAW,KAAK,GAAG;CACvB,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,MAAM,KAAK,CAAC,OAAO,UAAU,MAAM,GAAG,MAAM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OAAO,IAAI,WAAW,OAAO,KAAK,KAAK,MAAM,CAAC,GAAG,KAAK,CAAC;AACxD;AACA,MAAM,gBAAgB,KAAK;AAC3B,MAAM,gBAAgB,UAAU,KAAK,UAAU,KAAK;AACpD,MAAM,gBAAgB,SAAS,OAAO,SAAS,WAAW,cAAc,IAAI,IAAI;AAChF,MAAM,iBAAiB,UAAU,KAAK,UAAU,KAAK;AACrD,MAAM,iBAAiB,SAAS,OAAO,SAAS,WAAW,cAAc,IAAI,IAAI"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { n as buildPostgresCodecDescriptorRegistry } from "./codec-descriptor-
|
|
2
|
-
import {
|
|
1
|
+
import { n as buildPostgresCodecDescriptorRegistry } from "./codec-descriptor-CZAGhM_O-DK9auM7J.mjs";
|
|
2
|
+
import { t as createPostgresBuiltinDataTypeLookup } from "./data-types-DzUVlWeo-CBMHoFoH.mjs";
|
|
3
|
+
import { r as codecDescriptors } from "./codecs-BzCRfsit-BbLlbudt.mjs";
|
|
4
|
+
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
5
|
import { extractCodecLookup } from "@prisma/orm-framework/components/control";
|
|
4
6
|
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
5
|
-
//#region ../../../3-targets/3-targets/postgres/dist/
|
|
7
|
+
//#region ../../../3-targets/3-targets/postgres/dist/codec-registry-CCCOytGc.mjs
|
|
6
8
|
/**
|
|
7
9
|
* Registry of every codec descriptor shipped by `@internal/target-postgres`.
|
|
8
10
|
*
|
|
@@ -10,26 +12,40 @@ import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-
|
|
|
10
12
|
*/
|
|
11
13
|
const postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);
|
|
12
14
|
const postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);
|
|
13
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A registry of `descriptors`, refusing a codec whose data type `dataTypeLookup` does not have: the
|
|
17
|
+
* SQL renderer writes a parameter's cast from the data type its codec represents.
|
|
18
|
+
*/
|
|
19
|
+
function buildPostgresCodecRegistry(descriptors, dataTypeLookup) {
|
|
14
20
|
const descriptorRegistry = buildPostgresCodecDescriptorRegistry(descriptors);
|
|
21
|
+
const validatedDescriptors = Array.from(descriptorRegistry.values());
|
|
22
|
+
for (const descriptor of validatedDescriptors) if (!dataTypeLookup.has(descriptor.dataType)) throw structuredError("CONTRACT.DATA_TYPE_UNREGISTERED", `Codec "${descriptor.codecId}" represents data type "${descriptor.dataType}", which no component registers.`, {
|
|
23
|
+
why: "A parameter of this codec is written with a cast named by its data type.",
|
|
24
|
+
fix: "Pass the data type beside the codec: in `dataTypes` of createPostgresAdapter, or in the `dataTypes` of the extension that contributes the codec.",
|
|
25
|
+
meta: {
|
|
26
|
+
codecId: descriptor.codecId,
|
|
27
|
+
dataType: descriptor.dataType
|
|
28
|
+
}
|
|
29
|
+
});
|
|
15
30
|
const registry = {
|
|
16
31
|
...extractCodecLookup([{
|
|
17
32
|
id: "postgres-codecs",
|
|
18
|
-
types: { codecTypes: { codecDescriptors:
|
|
33
|
+
types: { codecTypes: { codecDescriptors: validatedDescriptors } }
|
|
19
34
|
}]),
|
|
20
35
|
descriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),
|
|
21
36
|
values: () => descriptorRegistry.values()
|
|
22
37
|
};
|
|
23
38
|
return Object.freeze(registry);
|
|
24
39
|
}
|
|
25
|
-
function assemblePostgresCodecRegistry(components) {
|
|
26
|
-
return buildPostgresCodecRegistry(components.flatMap((component) => component.types?.codecTypes?.codecDescriptors ?? []));
|
|
40
|
+
function assemblePostgresCodecRegistry(components, dataTypeLookup) {
|
|
41
|
+
return buildPostgresCodecRegistry(components.flatMap((component) => component.types?.codecTypes?.codecDescriptors ?? []), dataTypeLookup);
|
|
27
42
|
}
|
|
28
|
-
function assemblePostgresCodecRegistryWithBuiltins(extensions) {
|
|
29
|
-
return buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...extensions.flatMap((extension) => extension.types?.codecTypes?.codecDescriptors ?? [])]);
|
|
43
|
+
function assemblePostgresCodecRegistryWithBuiltins(extensions, dataTypeLookup) {
|
|
44
|
+
return buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...extensions.flatMap((extension) => extension.types?.codecTypes?.codecDescriptors ?? [])], dataTypeLookup);
|
|
30
45
|
}
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
/** A registry of the built-in codecs and `codecDescriptors`, whose data types `dataTypeLookup` has. */
|
|
47
|
+
function createPostgresCodecRegistryWithBuiltins(codecDescriptors = [], dataTypeLookup = createPostgresBuiltinDataTypeLookup()) {
|
|
48
|
+
return buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...codecDescriptors], dataTypeLookup);
|
|
33
49
|
}
|
|
34
50
|
/**
|
|
35
51
|
* Build a coherent PostgreSQL codec registry populated with built-in descriptors only.
|
|
@@ -42,4 +58,4 @@ function createPostgresBuiltinCodecLookup() {
|
|
|
42
58
|
//#endregion
|
|
43
59
|
export { postgresCodecDescriptorRegistry as a, createPostgresCodecRegistryWithBuiltins as i, assemblePostgresCodecRegistryWithBuiltins as n, postgresCodecRegistry as o, createPostgresBuiltinCodecLookup as r, assemblePostgresCodecRegistry as t };
|
|
44
60
|
|
|
45
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=codec-registry-CCCOytGc-BFC0dvlt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-registry-CCCOytGc-BFC0dvlt.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-registry-CCCOytGc.mjs"],"sourcesContent":["import { t as createPostgresBuiltinDataTypeLookup } from \"./data-types-DzUVlWeo.mjs\";\nimport { n as buildPostgresCodecDescriptorRegistry } from \"./codec-descriptor-CZAGhM_O.mjs\";\nimport { t as codecDescriptors } from \"./codecs-BzCRfsit.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { extractCodecLookup } from \"@internal/framework-components/control\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/target-postgres`.\n*\n* Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.\n*/\nconst postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);\n//#endregion\n//#region src/core/codec-registry.ts\n/**\n* A registry of `descriptors`, refusing a codec whose data type `dataTypeLookup` does not have: the\n* SQL renderer writes a parameter's cast from the data type its codec represents.\n*/\nfunction buildPostgresCodecRegistry(descriptors, dataTypeLookup) {\n\tconst descriptorRegistry = buildPostgresCodecDescriptorRegistry(descriptors);\n\tconst validatedDescriptors = Array.from(descriptorRegistry.values());\n\tfor (const descriptor of validatedDescriptors) if (!dataTypeLookup.has(descriptor.dataType)) throw structuredError(\"CONTRACT.DATA_TYPE_UNREGISTERED\", `Codec \"${descriptor.codecId}\" represents data type \"${descriptor.dataType}\", which no component registers.`, {\n\t\twhy: \"A parameter of this codec is written with a cast named by its data type.\",\n\t\tfix: \"Pass the data type beside the codec: in `dataTypes` of createPostgresAdapter, or in the `dataTypes` of the extension that contributes the codec.\",\n\t\tmeta: {\n\t\t\tcodecId: descriptor.codecId,\n\t\t\tdataType: descriptor.dataType\n\t\t}\n\t});\n\tconst registry = {\n\t\t...extractCodecLookup([{\n\t\t\tid: \"postgres-codecs\",\n\t\t\ttypes: { codecTypes: { codecDescriptors: validatedDescriptors } }\n\t\t}]),\n\t\tdescriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),\n\t\tvalues: () => descriptorRegistry.values()\n\t};\n\treturn Object.freeze(registry);\n}\nfunction assemblePostgresCodecRegistry(components, dataTypeLookup) {\n\treturn buildPostgresCodecRegistry(components.flatMap((component) => component.types?.codecTypes?.codecDescriptors ?? []), dataTypeLookup);\n}\nfunction assemblePostgresCodecRegistryWithBuiltins(extensions, dataTypeLookup) {\n\treturn buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...extensions.flatMap((extension) => extension.types?.codecTypes?.codecDescriptors ?? [])], dataTypeLookup);\n}\n/** A registry of the built-in codecs and `codecDescriptors`, whose data types `dataTypeLookup` has. */\nfunction createPostgresCodecRegistryWithBuiltins(codecDescriptors = [], dataTypeLookup = createPostgresBuiltinDataTypeLookup()) {\n\treturn buildPostgresCodecRegistry([...postgresCodecDescriptorRegistry.values(), ...codecDescriptors], dataTypeLookup);\n}\n/**\n* Build a coherent PostgreSQL codec registry populated with built-in descriptors only.\n*\n* The returned registry supports both ordinary codec materialization and PostgreSQL target behavior. Stack-composed paths build the same combined registry from their complete ordered descriptor contributions.\n*/\nfunction createPostgresBuiltinCodecLookup() {\n\treturn createPostgresCodecRegistryWithBuiltins();\n}\n//#endregion\nexport { postgresCodecDescriptorRegistry as a, createPostgresCodecRegistryWithBuiltins as i, assemblePostgresCodecRegistryWithBuiltins as n, postgresCodecRegistry as o, createPostgresBuiltinCodecLookup as r, assemblePostgresCodecRegistry as t };\n\n//# sourceMappingURL=codec-registry-CCCOytGc.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,wBAAwB,6BAA6B,gBAAgB;AAC3E,MAAM,kCAAkC,qCAAqC,gBAAgB;;;;;AAO7F,SAAS,2BAA2B,aAAa,gBAAgB;CAChE,MAAM,qBAAqB,qCAAqC,WAAW;CAC3E,MAAM,uBAAuB,MAAM,KAAK,mBAAmB,OAAO,CAAC;CACnE,KAAK,MAAM,cAAc,sBAAsB,IAAI,CAAC,eAAe,IAAI,WAAW,QAAQ,GAAG,MAAM,gBAAgB,mCAAmC,UAAU,WAAW,QAAQ,0BAA0B,WAAW,SAAS,mCAAmC;EACnQ,KAAK;EACL,KAAK;EACL,MAAM;GACL,SAAS,WAAW;GACpB,UAAU,WAAW;EACtB;CACD,CAAC;CACD,MAAM,WAAW;EAChB,GAAG,mBAAmB,CAAC;GACtB,IAAI;GACJ,OAAO,EAAE,YAAY,EAAE,kBAAkB,qBAAqB,EAAE;EACjE,CAAC,CAAC;EACF,gBAAgB,YAAY,mBAAmB,cAAc,OAAO;EACpE,cAAc,mBAAmB,OAAO;CACzC;CACA,OAAO,OAAO,OAAO,QAAQ;AAC9B;AACA,SAAS,8BAA8B,YAAY,gBAAgB;CAClE,OAAO,2BAA2B,WAAW,SAAS,cAAc,UAAU,OAAO,YAAY,oBAAoB,CAAC,CAAC,GAAG,cAAc;AACzI;AACA,SAAS,0CAA0C,YAAY,gBAAgB;CAC9E,OAAO,2BAA2B,CAAC,GAAG,gCAAgC,OAAO,GAAG,GAAG,WAAW,SAAS,cAAc,UAAU,OAAO,YAAY,oBAAoB,CAAC,CAAC,CAAC,GAAG,cAAc;AAC3L;;AAEA,SAAS,wCAAwC,mBAAmB,CAAC,GAAG,iBAAiB,oCAAoC,GAAG;CAC/H,OAAO,2BAA2B,CAAC,GAAG,gCAAgC,OAAO,GAAG,GAAG,gBAAgB,GAAG,cAAc;AACrH;;;;;;AAMA,SAAS,mCAAmC;CAC3C,OAAO,wCAAwC;AAChD"}
|
package/dist/{codec-type-map-Br7wS7DK-DmphGfZE.d.mts → codec-type-map-B9MLL97E-RMa5Y4R4.d.mts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as AdaptedPostgresCodecDescriptor } from "./codec-descriptor-
|
|
2
|
-
import { A as PgTimestamptzDateDescriptor, C as PgNumericDescriptor, D as PgTimestampStringDescriptor, E as PgTimeTemporalDescriptor, F as PgUnboundedIntDescriptor, I as PgUuidDescriptor, L as PgVarbitDescriptor, M as PgTimestamptzTemporalDescriptor, N as PgTimetzDescriptor, O as PgTimestampTemporalDescriptor, P as PgTsqueryDescriptor, R as PgVarcharDescriptor, S as PgJsonbDescriptor, T as PgTimeStringDescriptor, _ as PgInt8NumberDescriptor, a as PgDateStringDescriptor, b as PgIntervalDescriptor, c as PgEnumDescriptor, d as PgFloat8Descriptor, f as PgFloatDescriptor, g as PgInt8Descriptor, h as PgInt4Descriptor, i as PgCharDescriptor, j as PgTimestamptzStringDescriptor, m as PgInt2Descriptor, n as PgBoolDescriptor, o as PgDateTemporalDescriptor, p as PgInetDescriptor, r as PgByteaDescriptor, t as PgBitDescriptor, u as PgFloat4Descriptor, v as PgIntDescriptor, w as PgTextDescriptor, x as PgJsonDescriptor } from "./codecs-
|
|
1
|
+
import { t as AdaptedPostgresCodecDescriptor } from "./codec-descriptor-DkeVTJ3N-XTfZgDGp.mjs";
|
|
2
|
+
import { A as PgTimestamptzDateDescriptor, C as PgNumericDescriptor, D as PgTimestampStringDescriptor, E as PgTimeTemporalDescriptor, F as PgUnboundedIntDescriptor, I as PgUuidDescriptor, L as PgVarbitDescriptor, M as PgTimestamptzTemporalDescriptor, N as PgTimetzDescriptor, O as PgTimestampTemporalDescriptor, P as PgTsqueryDescriptor, R as PgVarcharDescriptor, S as PgJsonbDescriptor, T as PgTimeStringDescriptor, _ as PgInt8NumberDescriptor, a as PgDateStringDescriptor, b as PgIntervalDescriptor, c as PgEnumDescriptor, d as PgFloat8Descriptor, f as PgFloatDescriptor, g as PgInt8Descriptor, h as PgInt4Descriptor, i as PgCharDescriptor, j as PgTimestamptzStringDescriptor, m as PgInt2Descriptor, n as PgBoolDescriptor, o as PgDateTemporalDescriptor, p as PgInetDescriptor, r as PgByteaDescriptor, t as PgBitDescriptor, u as PgFloat4Descriptor, v as PgIntDescriptor, w as PgTextDescriptor, x as PgJsonDescriptor } from "./codecs-Ckpsj4IT-C7kgMiKv.mjs";
|
|
3
3
|
import { ExtractCodecTypes } from "@prisma/orm-family-sql/relational-core/ast";
|
|
4
|
-
//#region ../../../3-targets/3-targets/postgres/dist/codec-type-map-
|
|
4
|
+
//#region ../../../3-targets/3-targets/postgres/dist/codec-type-map-B9MLL97E.d.mts
|
|
5
5
|
//#region src/core/codec-type-map.d.ts
|
|
6
6
|
declare const codecDescriptorMap: {
|
|
7
7
|
readonly char: AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlCharDescriptor>;
|
|
@@ -49,4 +49,4 @@ type CodecDescriptorMap = typeof codecDescriptorMap;
|
|
|
49
49
|
type ExtractedCodecTypes = ExtractCodecTypes<CodecDescriptorMap>;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { Resolve as n, ExtractedCodecTypes as t };
|
|
52
|
-
//# sourceMappingURL=codec-type-map-
|
|
52
|
+
//# sourceMappingURL=codec-type-map-B9MLL97E-RMa5Y4R4.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-type-map-
|
|
1
|
+
{"version":3,"file":"codec-type-map-B9MLL97E-RMa5Y4R4.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-type-map-B9MLL97E.d.mts"],"mappings":";;;;;cAIc;WACH,MAAM,2EAA2E;WACjF,SAAS,2EAA2E;WACpF,KAAK,2EAA2E;WAChF,OAAO,2EAA2E;WAClF,YAAY,2EAA2E;WACvF,MAAM;WACN,MAAM;WACN,WAAW;WACX,qBAAqB;WACrB,SAAS;WACT,oBAAoB;WACpB,MAAM;WACN,MAAM;WACN,MAAM;WACN,YAAY;WACZ,QAAQ;WACR,QAAQ;WACR,SAAS;WACT,cAAc;WACd,iBAAiB;WACjB,sBAAsB;WACtB,wBAAwB;WACxB,iBAAiB;WACjB,eAAe;WACf,oBAAoB;WACpB,sBAAsB;WACtB,oBAAoB;WACpB,eAAe;WACf,QAAQ;WACR,MAAM;WACN,KAAK;WACL,eAAe;WACf,OAAO;WACP,MAAM;WACN,MAAM;WACN,UAAU;WACV,MAAM;WACN,OAAO;WACP,SAAS;;KAEf,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,4BAA4B;KAC5B,sBAAsB,kBAAkB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./codecs-
|
|
2
|
-
import { n as Resolve, t as ExtractedCodecTypes } from "./codec-type-map-
|
|
1
|
+
import "./codecs-Ckpsj4IT-C7kgMiKv.mjs";
|
|
2
|
+
import { n as Resolve, t as ExtractedCodecTypes } from "./codec-type-map-B9MLL97E-RMa5Y4R4.mjs";
|
|
3
3
|
import { JsonValue as JsonValue$1 } from "@prisma/orm-framework/contract/types";
|
|
4
|
-
//#region ../../../3-targets/3-targets/postgres/dist/codec-types-
|
|
4
|
+
//#region ../../../3-targets/3-targets/postgres/dist/codec-types-Du6N0o5U.d.mts
|
|
5
5
|
//#region src/exports/codec-types.d.ts
|
|
6
6
|
type CodecTypes = Resolve<ExtractedCodecTypes>;
|
|
7
7
|
type Branded<T, Shape extends Record<string, unknown>> = T & { readonly [K in keyof Shape]: Shape[K]; };
|
|
@@ -48,4 +48,4 @@ type Interval<P extends number | undefined = undefined> = BrandedString<{
|
|
|
48
48
|
}>;
|
|
49
49
|
//#endregion
|
|
50
50
|
export { JsonValue$1 as a, TimeString as c, Timestamptz as d, TimestamptzString as f, Varchar as h, Interval as i, Timestamp as l, VarBit as m, Char as n, Numeric as o, Timetz as p, CodecTypes as r, Time as s, Bit as t, TimestampString as u };
|
|
51
|
-
//# sourceMappingURL=codec-types-
|
|
51
|
+
//# sourceMappingURL=codec-types-Du6N0o5U-DMAI6jag.d.mts.map
|
package/dist/{codec-types-DBeKvpNs-D9JlxBzY.d.mts.map → codec-types-Du6N0o5U-DMAI6jag.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-
|
|
1
|
+
{"version":3,"file":"codec-types-Du6N0o5U-DMAI6jag.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-types-Du6N0o5U.d.mts"],"mappings":";;;;;KAIK,aAAa,QAAQ;KACrB,QAAQ,GAAG,cAAc,2BAA2B,gBAAgB,WAAW,QAAQ,MAAM;KAC7F,cAAc,cAAc,2BAA2B,gBAAgB;KACvE,KAAK,oBAAoB;EAC5B,cAAc;;KAEX,QAAQ,oBAAoB;EAC/B,iBAAiB;;KAEd,QAAQ,kBAAkB,4CAA4C;EACzE,oBAAoB;EACpB,gBAAgB;;KAEb,IAAI,oBAAoB;EAC3B,aAAa;;KAEV,OAAO,oBAAoB;EAC9B,gBAAgB;;KAEb,UAAU,4CAA4C;EACzD,sBAAsB;;KAEnB,YAAY,4CAA4C;EAC3D,wBAAwB;;KAErB,KAAK,4CAA4C;EACpD,iBAAiB;;KAEd,OAAO,4CAA4C;EACtD,mBAAmB;;KAEhB,gBAAgB,4CAA4C;EAC/D,4BAA4B;;KAEzB,kBAAkB,4CAA4C;EACjE,8BAA8B;;KAE3B,WAAW,4CAA4C;EAC1D,uBAAuB;;KAEpB,SAAS,4CAA4C;EACxD,qBAAqB"}
|