@prisma/orm-target-postgres 8.0.0-rc.18-dev.16 → 8.0.0-rc.18-dev.18
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-BiuJIKUc.d.mts → adapter-BBw3Q5WW.d.mts} +12 -12
- package/dist/{adapter-BiuJIKUc.d.mts.map → adapter-BBw3Q5WW.d.mts.map} +1 -1
- package/dist/{adapter-HQtZIZ2r-kQG81kJ1.mjs → adapter-C2XsLnXe-DLYvtWWr.mjs} +6 -6
- package/dist/{adapter-HQtZIZ2r-kQG81kJ1.mjs.map → adapter-C2XsLnXe-DLYvtWWr.mjs.map} +1 -1
- package/dist/adapter.d.mts +8 -9
- package/dist/adapter.mjs +5 -6
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +3 -4
- package/dist/adapter__control.mjs +6 -7
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +4 -4
- 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/{aggregates-BNxcV7HS.d.mts → aggregates-D2J3oSFz.d.mts} +10 -10
- package/dist/{aggregates-BNxcV7HS.d.mts.map → aggregates-D2J3oSFz.d.mts.map} +1 -1
- package/dist/{aggregates-Brwk0sYS.mjs → aggregates-DHIDeR2f.mjs} +3 -3
- package/dist/{aggregates-Brwk0sYS.mjs.map → aggregates-DHIDeR2f.mjs.map} +1 -1
- package/dist/{authoring-BPkERq95-SR5fDsa_.mjs → authoring-DAorKc0L-DpWukVxn.mjs} +8 -8
- package/dist/authoring-DAorKc0L-DpWukVxn.mjs.map +1 -0
- package/dist/{autoincrement-widths-D_WhWVXx-D6BupdY2.mjs → autoincrement-widths-BLCRgB3t-BWl20PCZ.mjs} +3 -3
- package/dist/{autoincrement-widths-D_WhWVXx-D6BupdY2.mjs.map → autoincrement-widths-BLCRgB3t-BWl20PCZ.mjs.map} +1 -1
- package/dist/codec-descriptor-BlMs1rkg.d.mts +1 -0
- package/dist/{codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts → codec-descriptor-Cbz5bbma-dxeoAwS2.d.mts} +4 -4
- package/dist/codec-descriptor-Cbz5bbma-dxeoAwS2.d.mts.map +1 -0
- package/dist/{codec-descriptor-C5Ec_6Mw-CpacG1CL.mjs → codec-descriptor-DSMjoW72-ZoCcTHLX.mjs} +3 -4
- package/dist/codec-descriptor-DSMjoW72-ZoCcTHLX.mjs.map +1 -0
- package/dist/{codec-registry-DSRFjaLX-Dwg0yBK7.mjs → codec-registry-pg69n-o5-D8K3p40k.mjs} +5 -5
- package/dist/{codec-registry-DSRFjaLX-Dwg0yBK7.mjs.map → codec-registry-pg69n-o5-D8K3p40k.mjs.map} +1 -1
- package/dist/{codec-type-map-BznmYkRz-QD11Yx27.d.mts → codec-type-map-eTeOtvJB-c3tjqXBa.d.mts} +4 -4
- package/dist/{codec-type-map-BznmYkRz-QD11Yx27.d.mts.map → codec-type-map-eTeOtvJB-c3tjqXBa.d.mts.map} +1 -1
- package/dist/{codec-types-BZXuhZ1c-B9YQf_UN.d.mts → codec-types-Cf0IZ0WQ-CMVP-ecb.d.mts} +4 -4
- package/dist/{codec-types-BZXuhZ1c-B9YQf_UN.d.mts.map → codec-types-Cf0IZ0WQ-CMVP-ecb.d.mts.map} +1 -1
- package/dist/codec-types-o-BM2rPP.d.mts +2 -0
- package/dist/{codecs-BChKdFcD.d.mts → codecs-B-8uGsxq.d.mts} +3 -3
- package/dist/{codecs-BChKdFcD.d.mts.map → codecs-B-8uGsxq.d.mts.map} +1 -1
- package/dist/{codecs-CQaKsvhH-X9bscCr9.mjs → codecs-CaWZPjFi-hllqyGdW.mjs} +605 -574
- package/dist/codecs-CaWZPjFi-hllqyGdW.mjs.map +1 -0
- package/dist/{codecs-CCzJelD2-bt89qO8s.d.mts → codecs-DanVXZ_F-D1_8_x3j.d.mts} +150 -169
- package/dist/codecs-DanVXZ_F-D1_8_x3j.d.mts.map +1 -0
- package/dist/{contract-contributions-DC-ACLe5-BtAuL8oB.mjs → contract-contributions-C8XjOBIq-BuK0mnF9.mjs} +55 -40
- package/dist/contract-contributions-C8XjOBIq-BuK0mnF9.mjs.map +1 -0
- package/dist/{control-Bs7Il_Ju.mjs → control--DStfvkM.mjs} +17 -14
- package/dist/control--DStfvkM.mjs.map +1 -0
- package/dist/{control-B0dyj3WB.d.mts → control-Co7_lX4j.d.mts} +2 -11
- package/dist/control-Co7_lX4j.d.mts.map +1 -0
- package/dist/{control-B6nnypMh.d.mts → control-Mc7bM0Ho.d.mts} +4 -14
- package/dist/control-Mc7bM0Ho.d.mts.map +1 -0
- package/dist/{control-policy-CQ8hGDrk-jyie0S2j.mjs → control-policy-DrK_x_Qd-BcT8Z5TM.mjs} +13 -30
- package/dist/control-policy-DrK_x_Qd-BcT8Z5TM.mjs.map +1 -0
- package/dist/{data-type-entries-MxmSzT8p-D8CgbLxS.mjs → data-type-entries-DECnlc43-BYnGiJLy.mjs} +30 -3
- package/dist/data-type-entries-DECnlc43-BYnGiJLy.mjs.map +1 -0
- package/dist/data-types-BIvSDTYw-AK5Is74Z.mjs +961 -0
- package/dist/data-types-BIvSDTYw-AK5Is74Z.mjs.map +1 -0
- package/dist/{data-types-BDkZIUMI.d.mts → data-types-BkFfMhgz.d.mts} +10 -16
- package/dist/{data-types-BDkZIUMI.d.mts.map → data-types-BkFfMhgz.d.mts.map} +1 -1
- package/dist/default-normalizer-BqFHmlox-CP8ywN-r.mjs +313 -0
- package/dist/default-normalizer-BqFHmlox-CP8ywN-r.mjs.map +1 -0
- package/dist/default-normalizer-CTAiFe9Y.d.mts +25 -0
- package/dist/default-normalizer-CTAiFe9Y.d.mts.map +1 -0
- package/dist/{descriptor-meta-CqUL_be_-BkT3aEIm.mjs → descriptor-meta-CNFvhRlG-8_vCDF2W.mjs} +6 -6
- package/dist/{descriptor-meta-CqUL_be_-BkT3aEIm.mjs.map → descriptor-meta-CNFvhRlG-8_vCDF2W.mjs.map} +1 -1
- package/dist/{descriptor-meta-DzC2NwDh-C_D6wtZj.mjs → descriptor-meta-_qLKFkLd-Cb4H-vZf.mjs} +4 -4
- package/dist/{descriptor-meta-DzC2NwDh-C_D6wtZj.mjs.map → descriptor-meta-_qLKFkLd-Cb4H-vZf.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs → descriptor-meta-runtime-BKtwKsDm-BirZ12T5.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-CpGl9XzU-CZHs_TNl.mjs.map → descriptor-meta-runtime-BKtwKsDm-BirZ12T5.mjs.map} +1 -1
- package/dist/{diff-database-schema-BKkcK7s--BxbpuwVf.mjs → diff-database-schema-C6fmfclD-Dqn9QqOO.mjs} +4 -4
- package/dist/{diff-database-schema-BKkcK7s--BxbpuwVf.mjs.map → diff-database-schema-C6fmfclD-Dqn9QqOO.mjs.map} +1 -1
- package/dist/{full-text-DzMPXaCj.d.mts → full-text-Ht1M3vH4.d.mts} +3 -3
- package/dist/{full-text-DzMPXaCj.d.mts.map → full-text-Ht1M3vH4.d.mts.map} +1 -1
- package/dist/{full-text-collection-method-B9e_oZFf-dyzLx5i6.d.mts → full-text-collection-method-Dye6N2u5-DGPEZRTD.d.mts} +4 -4
- package/dist/full-text-collection-method-Dye6N2u5-DGPEZRTD.d.mts.map +1 -0
- package/dist/{infer-psl-contract-DgOUfqJq-At4pgf6x.mjs → infer-psl-contract-hJUt-dtW-iwec11iw.mjs} +160 -56
- package/dist/infer-psl-contract-hJUt-dtW-iwec11iw.mjs.map +1 -0
- package/dist/{issue-planner-DDhlcfH2.d.mts → issue-planner-B3E9yChD.d.mts} +2 -2
- package/dist/{issue-planner-DDhlcfH2.d.mts.map → issue-planner-B3E9yChD.d.mts.map} +1 -1
- package/dist/migration-CbOh59ZJ.mjs.map +1 -1
- package/dist/{migration-DdE7N4ne.d.mts → migration-cGzKlTv0.d.mts} +2 -2
- package/dist/{migration-DdE7N4ne.d.mts.map → migration-cGzKlTv0.d.mts.map} +1 -1
- package/dist/{op-factory-call-BCBPUVFr-CW8l_JKw.mjs → op-factory-call-DJz5P0h1-Cs7DC10N.mjs} +4 -4
- package/dist/{op-factory-call-BCBPUVFr-CW8l_JKw.mjs.map → op-factory-call-DJz5P0h1-Cs7DC10N.mjs.map} +1 -1
- package/dist/op-factory-call-uVDKZqw1.d.mts +1 -0
- package/dist/{op-factory-call-COYbR6tp-XukKl6qj.d.mts → op-factory-call-z5TKsamx-DDfPa57U.d.mts} +2 -2
- package/dist/{op-factory-call-COYbR6tp-XukKl6qj.d.mts.map → op-factory-call-z5TKsamx-DDfPa57U.d.mts.map} +1 -1
- package/dist/{operation-types-BAiYtHkM-BN_YTibJ.d.mts → operation-types--RnlMCZS-qXBhNS1Q.d.mts} +3 -3
- package/dist/{operation-types-BAiYtHkM-BN_YTibJ.d.mts.map → operation-types--RnlMCZS-qXBhNS1Q.d.mts.map} +1 -1
- package/dist/operation-types-Dfg-5VmM.d.mts +1 -0
- package/dist/{pack-4sJCj0w-.d.mts → pack-_zBIeh-3.d.mts} +4 -4
- package/dist/{pack-4sJCj0w-.d.mts.map → pack-_zBIeh-3.d.mts.map} +1 -1
- package/dist/{planner-Pcd2R46Y.d.mts → planner-BBGH1cAB.d.mts} +2 -2
- package/dist/{planner-Pcd2R46Y.d.mts.map → planner-BBGH1cAB.d.mts.map} +1 -1
- package/dist/planner-ddl-builders-Byw5BICu.d.mts +16 -0
- package/dist/planner-ddl-builders-Byw5BICu.d.mts.map +1 -0
- package/dist/planner-ddl-builders-D0r6cT4A-D9Wm1myF.mjs +29 -0
- package/dist/planner-ddl-builders-D0r6cT4A-D9Wm1myF.mjs.map +1 -0
- package/dist/{planner-RhYHAxZm-9qT-aXSU.mjs → planner-ewMcuoHd-DwCCA-Kc.mjs} +9 -8
- package/dist/planner-ewMcuoHd-DwCCA-Kc.mjs.map +1 -0
- package/dist/{planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs → planner-identity-values-CWUHmsB9-CBQ00C_3.mjs} +3 -3
- package/dist/{planner-identity-values-DwvdO5iZ-C9_lmJx6.mjs.map → planner-identity-values-CWUHmsB9-CBQ00C_3.mjs.map} +1 -1
- package/dist/planner-produced-postgres-migration-D-ZcNy7h.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-B3b3MBKL-CxswQFN2.mjs → planner-produced-postgres-migration-Dy5zHiFB-BDpfjZD5.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-B3b3MBKL-CxswQFN2.mjs.map → planner-produced-postgres-migration-Dy5zHiFB-BDpfjZD5.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-eM7nl_4L-DSW4rLOj.d.mts → planner-produced-postgres-migration-sxhIP3Te-Cn3sD9zE.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-sxhIP3Te-Cn3sD9zE.d.mts.map +1 -0
- package/dist/{planner-sql-checks-BV2akIx8-l8qCWzYf.mjs → planner-sql-checks-D0w3Kt_G-Bh1Vlz0T.mjs} +5 -5
- package/dist/{planner-sql-checks-BV2akIx8-l8qCWzYf.mjs.map → planner-sql-checks-D0w3Kt_G-Bh1Vlz0T.mjs.map} +1 -1
- package/dist/{postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs → postgres-codec-traits-DY-tFVjg-CjMZUKNx.mjs} +3 -3
- package/dist/{postgres-codec-traits-DOTVjmpT-B4f6Rkh7.mjs.map → postgres-codec-traits-DY-tFVjg-CjMZUKNx.mjs.map} +1 -1
- package/dist/{postgres-contract-view-Cei64xbt-BcDzLVah.mjs → postgres-contract-view-o6bwzfH6-D4jvq9PJ.mjs} +6 -6
- package/dist/{postgres-contract-view-Cei64xbt-BcDzLVah.mjs.map → postgres-contract-view-o6bwzfH6-D4jvq9PJ.mjs.map} +1 -1
- package/dist/{postgres-migration-D0TY1HnO-CXuyvNiq.d.mts → postgres-migration-D6_R3__I-rFg_i2gz.d.mts} +2 -2
- package/dist/{postgres-migration-D0TY1HnO-CXuyvNiq.d.mts.map → postgres-migration-D6_R3__I-rFg_i2gz.d.mts.map} +1 -1
- package/dist/{postgres-migration-Bj3MPD7z-Clk_A5s-.mjs → postgres-migration-Dtkb6eDn-CrButm3l.mjs} +14 -22
- package/dist/postgres-migration-Dtkb6eDn-CrButm3l.mjs.map +1 -0
- package/dist/{prisma7-binding-BwBQ58iZ.mjs → prisma7-binding-BsucflfD.mjs} +106 -87
- package/dist/prisma7-binding-BsucflfD.mjs.map +1 -0
- package/dist/{prisma7-binding-LcYpTBjP.d.mts → prisma7-binding-DGp7Ea38.d.mts} +24 -15
- package/dist/prisma7-binding-DGp7Ea38.d.mts.map +1 -0
- package/dist/{render-ops-TAy4wxZ8-FnL41Aq3.mjs → render-ops-Db7MhDM0-DsIQjmcY.mjs} +3 -3
- package/dist/{render-ops-TAy4wxZ8-FnL41Aq3.mjs.map → render-ops-Db7MhDM0-DsIQjmcY.mjs.map} +1 -1
- package/dist/{runtime-CNTEAZIz.d.mts → runtime-CXQ7Xh-G.d.mts} +2 -2
- package/dist/{runtime-CNTEAZIz.d.mts.map → runtime-CXQ7Xh-G.d.mts.map} +1 -1
- package/dist/{runtime-C1HMiDVY.d.mts → runtime-CmUxJgD8.d.mts} +2 -2
- package/dist/{runtime-C1HMiDVY.d.mts.map → runtime-CmUxJgD8.d.mts.map} +1 -1
- package/dist/{sql-renderer-Q8LMpTcq-CliGmy0r.mjs → sql-renderer-CD5aYQos-nO-jTG1T.mjs} +5 -4
- package/dist/sql-renderer-CD5aYQos-nO-jTG1T.mjs.map +1 -0
- package/dist/{sql-renderer-hQ3HTY-B.d.mts → sql-renderer-dk7d0cK0.d.mts} +4 -4
- package/dist/{sql-renderer-hQ3HTY-B.d.mts.map → sql-renderer-dk7d0cK0.d.mts.map} +1 -1
- package/dist/target.d.mts +27 -27
- package/dist/target.mjs +23 -24
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__aggregates.mjs +1 -1
- 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 +2 -2
- package/dist/target__codecs.mjs +2 -3
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +4 -5
- package/dist/target__data-types.d.mts +2 -2
- package/dist/target__data-types.mjs +3 -3
- package/dist/target__default-normalizer.d.mts +2 -2
- package/dist/target__default-normalizer.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__full-text-index-authoring.mjs +1 -1
- package/dist/target__full-text.d.mts +3 -3
- 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__op-factory-call.d.mts +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__operation-types.d.mts +2 -2
- package/dist/target__pack.d.mts +2 -2
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.d.mts +2 -2
- package/dist/target__planner-ddl-builders.mjs +2 -2
- 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.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__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +4 -4
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/{types-D6lgKhE5-DYkeCAjr.d.mts → types-D6lgKhE5-CjLf9QtO.d.mts} +5 -5
- package/dist/{types-D6lgKhE5-DYkeCAjr.d.mts.map → types-D6lgKhE5-CjLf9QtO.d.mts.map} +1 -1
- package/dist/types-xDgmVoc4.d.mts +2 -0
- package/package.json +9 -9
- package/dist/authoring-BPkERq95-SR5fDsa_.mjs.map +0 -1
- package/dist/codec-descriptor-C5Ec_6Mw-CpacG1CL.mjs.map +0 -1
- package/dist/codec-descriptor-DAQDOwCJ.d.mts +0 -1
- package/dist/codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts.map +0 -1
- package/dist/codec-helpers-IfGdyCFt-ihgFCc7D.mjs +0 -571
- package/dist/codec-helpers-IfGdyCFt-ihgFCc7D.mjs.map +0 -1
- package/dist/codec-types-ZfL8TSVm.d.mts +0 -2
- package/dist/codecs-CCzJelD2-bt89qO8s.d.mts.map +0 -1
- package/dist/codecs-CQaKsvhH-X9bscCr9.mjs.map +0 -1
- package/dist/contract-contributions-DC-ACLe5-BtAuL8oB.mjs.map +0 -1
- package/dist/control-B0dyj3WB.d.mts.map +0 -1
- package/dist/control-B6nnypMh.d.mts.map +0 -1
- package/dist/control-Bs7Il_Ju.mjs.map +0 -1
- package/dist/control-policy-CQ8hGDrk-jyie0S2j.mjs.map +0 -1
- package/dist/data-type-entries-MxmSzT8p-D8CgbLxS.mjs.map +0 -1
- package/dist/data-types-DnIWGq_1-DTMjYG8M.mjs +0 -375
- package/dist/data-types-DnIWGq_1-DTMjYG8M.mjs.map +0 -1
- package/dist/default-normalizer-BnxtqsRm-CDjZe4vK.mjs +0 -510
- package/dist/default-normalizer-BnxtqsRm-CDjZe4vK.mjs.map +0 -1
- package/dist/default-normalizer-ZZ7Y5boE.d.mts +0 -31
- package/dist/default-normalizer-ZZ7Y5boE.d.mts.map +0 -1
- package/dist/full-text-collection-method-B9e_oZFf-dyzLx5i6.d.mts.map +0 -1
- package/dist/infer-psl-contract-DgOUfqJq-At4pgf6x.mjs.map +0 -1
- package/dist/list-decoder-DXee1orj-K3y-hxiI.mjs +0 -22
- package/dist/list-decoder-DXee1orj-K3y-hxiI.mjs.map +0 -1
- package/dist/op-factory-call-B58Fw5Rz.d.mts +0 -1
- package/dist/operation-types-CScw-diG.d.mts +0 -1
- package/dist/planner-RhYHAxZm-9qT-aXSU.mjs.map +0 -1
- package/dist/planner-ddl-builders-BBQC5ET6.d.mts +0 -38
- package/dist/planner-ddl-builders-BBQC5ET6.d.mts.map +0 -1
- package/dist/planner-ddl-builders-oCsZMJ3b-BTMfg1YV.mjs +0 -91
- package/dist/planner-ddl-builders-oCsZMJ3b-BTMfg1YV.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-DiBkh1Tj.d.mts +0 -1
- package/dist/planner-produced-postgres-migration-eM7nl_4L-DSW4rLOj.d.mts.map +0 -1
- package/dist/postgres-migration-Bj3MPD7z-Clk_A5s-.mjs.map +0 -1
- package/dist/prisma7-binding-BwBQ58iZ.mjs.map +0 -1
- package/dist/prisma7-binding-LcYpTBjP.d.mts.map +0 -1
- package/dist/sql-renderer-Q8LMpTcq-CliGmy0r.mjs.map +0 -1
- package/dist/types-DIUPMK41.d.mts +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
|
|
2
|
-
import { c as PostgresLoweredStatement, s as PostgresAdapterOptions } from "./types-D6lgKhE5-
|
|
3
|
-
import { t as PostgresCodecRegistry } from "./codecs-
|
|
2
|
+
import { c as PostgresLoweredStatement, s as PostgresAdapterOptions } from "./types-D6lgKhE5-CjLf9QtO.mjs";
|
|
3
|
+
import { t as PostgresCodecRegistry } from "./codecs-B-8uGsxq.mjs";
|
|
4
4
|
import { v as PostgresDdlNode } from "./nodes-DOXes-fG-BifJqoRd.mjs";
|
|
5
5
|
import "./ddl-D_JWHRzo.mjs";
|
|
6
6
|
import { Adapter, AdapterProfile, AnyQueryAst, LowererContext } from "@prisma/orm-family-sql/relational-core/ast";
|
|
@@ -97,7 +97,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
97
97
|
readonly codecId: "pg/int8number@1";
|
|
98
98
|
};
|
|
99
99
|
readonly nullable: false;
|
|
100
|
-
readonly
|
|
100
|
+
readonly emptyResultWire: "0";
|
|
101
101
|
}, {
|
|
102
102
|
readonly operation: "countBigInt";
|
|
103
103
|
readonly input: {
|
|
@@ -108,13 +108,13 @@ declare const postgresAdapterContractContributions: {
|
|
|
108
108
|
readonly codecId: "pg/int8@1";
|
|
109
109
|
};
|
|
110
110
|
readonly nullable: false;
|
|
111
|
-
readonly
|
|
111
|
+
readonly emptyResultWire: "0";
|
|
112
112
|
readonly lower: import("@prisma/orm-family-sql/relational-core/aggregate-descriptor-registry").SqlAggregateLowering;
|
|
113
113
|
}, ...({
|
|
114
114
|
readonly operation: "sum";
|
|
115
115
|
readonly input: {
|
|
116
116
|
readonly kind: "codec";
|
|
117
|
-
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
117
|
+
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
118
118
|
};
|
|
119
119
|
readonly output: {
|
|
120
120
|
readonly kind: "codec";
|
|
@@ -126,7 +126,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
126
126
|
readonly operation: "sumBigInt";
|
|
127
127
|
readonly input: {
|
|
128
128
|
readonly kind: "codec";
|
|
129
|
-
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/
|
|
129
|
+
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
130
130
|
};
|
|
131
131
|
readonly output: {
|
|
132
132
|
readonly kind: "codec";
|
|
@@ -239,7 +239,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
239
239
|
readonly operation: "avg";
|
|
240
240
|
readonly input: {
|
|
241
241
|
readonly kind: "codec";
|
|
242
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
242
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
243
243
|
};
|
|
244
244
|
readonly output: {
|
|
245
245
|
readonly kind: "codec";
|
|
@@ -251,7 +251,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
251
251
|
readonly operation: "avgDecimal";
|
|
252
252
|
readonly input: {
|
|
253
253
|
readonly kind: "codec";
|
|
254
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/
|
|
254
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
255
255
|
};
|
|
256
256
|
readonly output: {
|
|
257
257
|
readonly kind: "codec";
|
|
@@ -262,7 +262,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
262
262
|
readonly operation: "avg";
|
|
263
263
|
readonly input: {
|
|
264
264
|
readonly kind: "codec";
|
|
265
|
-
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/
|
|
265
|
+
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/float4@1" | "pg/float@1";
|
|
266
266
|
};
|
|
267
267
|
readonly output: {
|
|
268
268
|
readonly kind: "codec";
|
|
@@ -348,7 +348,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
348
348
|
readonly operation: "min";
|
|
349
349
|
readonly input: {
|
|
350
350
|
readonly kind: "codec";
|
|
351
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
351
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/interval@1" | "pg/time-string@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/text-array@1" | "pg/date-string@1" | "pg/date-temporal@1";
|
|
352
352
|
};
|
|
353
353
|
readonly output: {
|
|
354
354
|
readonly kind: "self";
|
|
@@ -389,7 +389,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
389
389
|
readonly operation: "max";
|
|
390
390
|
readonly input: {
|
|
391
391
|
readonly kind: "codec";
|
|
392
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
392
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/interval@1" | "pg/time-string@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/text-array@1" | "pg/date-string@1" | "pg/date-temporal@1";
|
|
393
393
|
};
|
|
394
394
|
readonly output: {
|
|
395
395
|
readonly kind: "self";
|
|
@@ -400,4 +400,4 @@ declare const postgresAdapterContractContributions: {
|
|
|
400
400
|
};
|
|
401
401
|
//#endregion
|
|
402
402
|
export { postgresRawCodecInferer as i, postgresAdapterCapabilities as n, postgresAdapterContractContributions as r, createPostgresAdapter as t };
|
|
403
|
-
//# sourceMappingURL=adapter-
|
|
403
|
+
//# sourceMappingURL=adapter-BBw3Q5WW.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-
|
|
1
|
+
{"version":3,"file":"adapter-BBw3Q5WW.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB;EAClF,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;;cAQC;WACH,cAAc;aACZ;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;aAEF;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;;WAGJ;aACE;eACE;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;;eAEA;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;eACA,6EAA6E;;eAE7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as createPostgresCodecRegistryWithBuiltins } from "./codec-registry-
|
|
3
|
-
import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-
|
|
4
|
-
import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./contract-contributions-
|
|
1
|
+
import { J as postgresDataTypes } from "./data-types-BIvSDTYw-AK5Is74Z.mjs";
|
|
2
|
+
import { i as createPostgresCodecRegistryWithBuiltins } from "./codec-registry-pg69n-o5-D8K3p40k.mjs";
|
|
3
|
+
import { n as renderLoweredSql, t as adapterError } from "./sql-renderer-CD5aYQos-nO-jTG1T.mjs";
|
|
4
|
+
import { n as postgresAdapterCapabilities, t as PostgresControlAdapter } from "./contract-contributions-C8XjOBIq-BuK0mnF9.mjs";
|
|
5
5
|
import { isDdlNode } from "@prisma/orm-family-sql/relational-core/ast";
|
|
6
6
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
8
|
-
//#region ../../../3-targets/6-adapters/postgres/dist/adapter-
|
|
8
|
+
//#region ../../../3-targets/6-adapters/postgres/dist/adapter-C2XsLnXe.mjs
|
|
9
9
|
var PostgresAdapterImpl = class {
|
|
10
10
|
familyId = "sql";
|
|
11
11
|
targetId = "postgres";
|
|
@@ -86,4 +86,4 @@ function createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup) {
|
|
|
86
86
|
//#endregion
|
|
87
87
|
export { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };
|
|
88
88
|
|
|
89
|
-
//# sourceMappingURL=adapter-
|
|
89
|
+
//# sourceMappingURL=adapter-C2XsLnXe-DLYvtWWr.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-
|
|
1
|
+
{"version":3,"file":"adapter-C2XsLnXe-DLYvtWWr.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-C2XsLnXe.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-CD5aYQos.mjs\";\nimport { n as PostgresControlAdapter, r as postgresAdapterCapabilities } from \"./contract-contributions-C8XjOBIq.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { postgresDataTypes } from \"@internal/target-postgres/data-types\";\n//#region src/core/adapter.ts\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tdataTypeLookup;\n\tconstructor(codecRegistry, dataTypeLookup, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry, dataTypeLookup);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: postgresAdapterCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\tconst rows = [];\n\t\t\t\t\tfor await (const row of queryable.query({\n\t\t\t\t\t\tsql,\n\t\t\t\t\t\t...params === void 0 ? {} : { params }\n\t\t\t\t\t})) rows.push(row);\n\t\t\t\t\treturn { rows };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t}\n};\nconst INT4_MIN = -2147483648;\nconst INT4_MAX = 2147483647;\n/**\n* The codec a bare JS number is bound through.\n*\n* An integer picks the narrowest column type that holds it: `int4` while it\n* fits the signed 32-bit range, `int8` (number-valued) up to the safe-integer\n* limit. Past that limit a JS number is no longer an exact integer, so it\n* binds as `float8` rather than pretending to a precision it does not have.\n*/\nfunction inferNumberCodecId(value) {\n\tif (!Number.isSafeInteger(value)) return \"pg/float8@1\";\n\treturn value >= INT4_MIN && value <= INT4_MAX ? \"pg/int4@1\" : \"pg/int8number@1\";\n}\n/**\n* Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot.\n*\n* The ids are versioned because that is how the codec registry keys them: lowering resolves an interpolated value's codec by exact id through `descriptorFor`.\n*/\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return inferNumberCodecId(value);\n\t\tcase \"bigint\": return \"pg/int8@1\";\n\t\tcase \"string\": return \"pg/text@1\";\n\t\tcase \"boolean\": return \"pg/bool@1\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea@1\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst dataTypeLookup = assembleDataTypes([{\n\t\tid: \"postgres\",\n\t\tdataTypes: postgresDataTypes\n\t}, {\n\t\tid: \"createPostgresAdapter\",\n\t\tdataTypes: options?.dataTypes ?? []\n\t}]).lookup;\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors, dataTypeLookup);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry, dataTypeLookup) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, dataTypeLookup));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-C2XsLnXe.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA;CACA,YAAY,eAAe,gBAAgB,WAAW;EACrD,KAAK,gBAAgB;EACrB,KAAK,iBAAiB;EACtB,MAAM,iBAAiB,IAAI,uBAAuB,eAAe,cAAc;EAC/E,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI,aAAa;GACjB,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,eAAe,wBAAwB;IACjE,UAAU;IACV,UAAU;IACV,OAAO,OAAO,KAAK,WAAW;KAC7B,MAAM,OAAO,CAAC;KACd,WAAW,MAAM,OAAO,UAAU,MAAM;MACvC;MACA,GAAG,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,OAAO;KACtC,CAAC,GAAG,KAAK,KAAK,GAAG;KACjB,OAAO,EAAE,KAAK;IACf;IACA,OAAO,YAAY,CAAC;GACrB,GAAG,YAAY;EAChB,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,aAAa,2BAA2B,+HAA+H,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EACzO,OAAO,iBAAiB,KAAK,QAAQ,UAAU,KAAK,eAAe,KAAK,gBAAgB,2BAA2B;CACpH;AACD;AACA,MAAM,WAAW;AACjB,MAAM,WAAW;;;;;;;;;AASjB,SAAS,mBAAmB,OAAO;CAClC,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO;CACzC,OAAO,SAAS,YAAY,SAAS,WAAW,cAAc;AAC/D;;;;;;AAMA,MAAM,0BAA0B,EAAE,WAAW,OAAO;CACnD,QAAQ,OAAO,OAAf;EACC,KAAK,UAAU,OAAO,mBAAmB,KAAK;EAC9C,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,IAAI,iBAAiB,YAAY,OAAO;CACxD;CACA,MAAM,aAAa,6CAA6C,+GAA+G,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AACrN,EAAE;AACF,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,kBAAkB,CAAC;EACzC,IAAI;EACJ,WAAW;CACZ,GAAG;EACF,IAAI;EACJ,WAAW,SAAS,aAAa,CAAC;CACnC,CAAC,CAAC,CAAC,CAAC;CACJ,MAAM,gBAAgB,wCAAwC,SAAS,kBAAkB,cAAc;CACvG,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,gBAAgB,SAAS,SAAS,CAAC;AAChG;AACA,SAAS,uCAAuC,eAAe,gBAAgB;CAC9E,OAAO,OAAO,OAAO,IAAI,oBAAoB,eAAe,cAAc,CAAC;AAC5E"}
|
package/dist/adapter.d.mts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
|
|
2
|
-
import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-
|
|
3
|
-
import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, t as PostgresCodecRegistry } from "./codecs-
|
|
4
|
-
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-
|
|
2
|
+
import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-CjLf9QtO.mjs";
|
|
3
|
+
import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, t as PostgresCodecRegistry } from "./codecs-B-8uGsxq.mjs";
|
|
4
|
+
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-BBw3Q5WW.mjs";
|
|
5
5
|
import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-COdejX_b.mjs";
|
|
6
|
-
import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
|
|
7
6
|
import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
|
|
8
7
|
import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B7LfCQCB.mjs";
|
|
9
|
-
import { t as PostgresControlAdapter } from "./control-
|
|
10
|
-
import { t as SqlRuntimeAdapter } from "./runtime-
|
|
11
|
-
import { t as renderLoweredSql } from "./sql-renderer-
|
|
12
|
-
import "./types-
|
|
13
|
-
export { type BinaryExpr, type ColumnRef, type Direction, type Expr, type OrderClause, type ParamRef, type PostgresAdapterOptions, type PostgresCodecRegistry, type PostgresContract, PostgresControlAdapter, type PostgresLoweredStatement, type SelectAst, SqlRuntimeAdapter, type StorageColumn, type StorageTable, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn,
|
|
8
|
+
import { t as PostgresControlAdapter } from "./control-Mc7bM0Ho.mjs";
|
|
9
|
+
import { t as SqlRuntimeAdapter } from "./runtime-CXQ7Xh-G.mjs";
|
|
10
|
+
import { t as renderLoweredSql } from "./sql-renderer-dk7d0cK0.mjs";
|
|
11
|
+
import "./types-xDgmVoc4.mjs";
|
|
12
|
+
export { type BinaryExpr, type ColumnRef, type Direction, type Expr, type OrderClause, type ParamRef, type PostgresAdapterOptions, type PostgresCodecRegistry, type PostgresContract, PostgresControlAdapter, type PostgresLoweredStatement, type SelectAst, SqlRuntimeAdapter, type StorageColumn, type StorageTable, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer, qualifyName, quoteIdentifier, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
|
package/dist/adapter.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { i as quoteIdentifier, n as escapeLiteral, r as qualifyName } from "./sql-utils-Df-nf6eM-Ov1KgjWm.mjs";
|
|
2
|
-
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup } from "./codec-registry-
|
|
3
|
-
import { t as parsePostgresDefault } from "./default-normalizer-BnxtqsRm-CDjZe4vK.mjs";
|
|
2
|
+
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup } from "./codec-registry-pg69n-o5-D8K3p40k.mjs";
|
|
4
3
|
import { n as normalizeSchemaNativeType } from "./native-type-normalizer-CwyVR7xB.mjs";
|
|
5
|
-
import { n as renderLoweredSql } from "./sql-renderer-
|
|
6
|
-
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as PostgresControlAdapter } from "./contract-contributions-
|
|
7
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-
|
|
4
|
+
import { n as renderLoweredSql } from "./sql-renderer-CD5aYQos-nO-jTG1T.mjs";
|
|
5
|
+
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as PostgresControlAdapter } from "./contract-contributions-C8XjOBIq-BuK0mnF9.mjs";
|
|
6
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-C2XsLnXe-DLYvtWWr.mjs";
|
|
8
7
|
import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-Bbc3IVA7.mjs";
|
|
9
|
-
export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn,
|
|
8
|
+
export { PostgresControlAdapter, bitColumn, boolColumn, byteaColumn, charColumn, createPostgresAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, dateStringColumn, dateTemporalColumn, escapeLiteral, float4Column, float8Column, int2Column, int4Column, int8Column, intervalColumn, jsonColumn, jsonbColumn, normalizeSchemaNativeType, numericColumn, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer, qualifyName, quoteIdentifier, renderLoweredSql, textColumn, timeStringColumn, timeTemporalColumn, timestampStringColumn, timestampTemporalColumn, timestamptzJsDateColumn, timestamptzStringColumn, timestamptzTemporalColumn, timetzColumn, varbitColumn, varcharColumn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-
|
|
1
|
+
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-BBw3Q5WW.mjs";
|
|
2
2
|
export { createPostgresAdapter, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions } from "./contract-contributions-
|
|
2
|
-
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-
|
|
1
|
+
import { n as postgresAdapterCapabilities, r as postgresAdapterContractContributions } from "./contract-contributions-C8XjOBIq-BuK0mnF9.mjs";
|
|
2
|
+
import { r as postgresRawCodecInferer, t as createPostgresAdapter } from "./adapter-C2XsLnXe-DLYvtWWr.mjs";
|
|
3
3
|
export { createPostgresAdapter, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup } from "./codecs-
|
|
2
|
-
import { t as parsePostgresDefault } from "./default-normalizer-ZZ7Y5boE.mjs";
|
|
1
|
+
import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup } from "./codecs-B-8uGsxq.mjs";
|
|
3
2
|
import { i as normalizeSchemaNativeType } from "./native-type-normalizer-BFo5tSyh.mjs";
|
|
4
3
|
import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B7LfCQCB.mjs";
|
|
5
|
-
import { n as postgresAdapterDescriptor, t as PostgresControlAdapter } from "./control-
|
|
6
|
-
export { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType,
|
|
4
|
+
import { n as postgresAdapterDescriptor, t as PostgresControlAdapter } from "./control-Mc7bM0Ho.mjs";
|
|
5
|
+
export { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, qualifyName, quoteIdentifier };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { i as quoteIdentifier, n as escapeLiteral, r as qualifyName } from "./sql-utils-Df-nf6eM-Ov1KgjWm.mjs";
|
|
2
|
-
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-
|
|
3
|
-
import { a as instantNowControlDescriptor, s as plainDateTimeNowControlDescriptor } from "./authoring-
|
|
4
|
-
import {
|
|
5
|
-
import { n as postgresPslTypeConstructors } from "./control-Bs7Il_Ju.mjs";
|
|
2
|
+
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-pg69n-o5-D8K3p40k.mjs";
|
|
3
|
+
import { a as instantNowControlDescriptor, s as plainDateTimeNowControlDescriptor } from "./authoring-DAorKc0L-DpWukVxn.mjs";
|
|
4
|
+
import { n as postgresPslTypeConstructors } from "./control--DStfvkM.mjs";
|
|
6
5
|
import { n as normalizeSchemaNativeType } from "./native-type-normalizer-CwyVR7xB.mjs";
|
|
7
|
-
import { t as PostgresControlAdapter } from "./contract-contributions-
|
|
8
|
-
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-
|
|
6
|
+
import { t as PostgresControlAdapter } from "./contract-contributions-C8XjOBIq-BuK0mnF9.mjs";
|
|
7
|
+
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-_qLKFkLd-Cb4H-vZf.mjs";
|
|
9
8
|
import { timestampNowControlDescriptor } from "@prisma/orm-framework/components/control";
|
|
10
9
|
import { int, num, oneOf, optional } from "@prisma/orm-framework/psl-parser";
|
|
11
10
|
import { builtinGeneratorRegistryMetadata } from "@prisma/orm-framework/ids";
|
|
@@ -159,6 +158,6 @@ const postgresAdapterDescriptor = {
|
|
|
159
158
|
}
|
|
160
159
|
};
|
|
161
160
|
//#endregion
|
|
162
|
-
export { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType,
|
|
161
|
+
export { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, qualifyName, quoteIdentifier };
|
|
163
162
|
|
|
164
163
|
//# sourceMappingURL=adapter__control.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { n as PostgresControlAdapter } from \"./contract-contributions-
|
|
1
|
+
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { n as PostgresControlAdapter } from \"./contract-contributions-C8XjOBIq.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-_qLKFkLd.mjs\";\nimport { timestampNowControlDescriptor } from \"@internal/framework-components/control\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { normalizeSchemaNativeType } from \"@internal/target-postgres/native-type-normalizer\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { instantNowControlDescriptor, plainDateTimeNowControlDescriptor, postgresPslTypeConstructors } from \"@internal/target-postgres/control\";\nimport { builtinGeneratorRegistryMetadata } from \"@internal/ids\";\nimport { int, num, oneOf, optional } from \"@internal/psl-parser\";\n//#region src/core/control-mutation-defaults.ts\nfunction executionGenerator(id, params) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"execution\",\n\t\t\tgenerated: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid,\n\t\t\t\t...params ? { params } : {}\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerAutoincrement() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"autoincrement()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerNow() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"now()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerUlid() {\n\treturn executionGenerator(\"ulid\");\n}\nfunction lowerUuid(input) {\n\treturn input.call.args[\"version\"] === 7 ? executionGenerator(\"uuidv7\") : executionGenerator(\"uuidv4\");\n}\nfunction lowerCuid() {\n\treturn executionGenerator(\"cuid2\");\n}\nfunction lowerNanoid(input) {\n\tconst size = input.call.args[\"size\"];\n\treturn typeof size === \"number\" ? executionGenerator(\"nanoid\", { size }) : executionGenerator(\"nanoid\");\n}\nconst nowSig = { documentation: \"Uses the current database timestamp as the default value.\" };\nconst autoincrementSig = { documentation: \"Generates an increasing integer value in the database.\" };\nconst ulidSig = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst uuidSig = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSig = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst nanoidSig = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: 2,\n\t\t\tmax: 255\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Omit to use the generator default.\"\n\t}]\n};\nconst postgresDefaultFunctionRegistryEntries = [\n\t[\"autoincrement\", {\n\t\tsignature: autoincrementSig,\n\t\tlower: lowerAutoincrement,\n\t\tusageSignatures: [\"autoincrement()\"]\n\t}],\n\t[\"now\", {\n\t\tsignature: nowSig,\n\t\tlower: lowerNow,\n\t\tusageSignatures: [\"now()\"]\n\t}],\n\t[\"uuid\", {\n\t\tsignature: uuidSig,\n\t\tlower: lowerUuid,\n\t\tusageSignatures: [\n\t\t\t\"uuid()\",\n\t\t\t\"uuid(4)\",\n\t\t\t\"uuid(7)\"\n\t\t]\n\t}],\n\t[\"cuid\", {\n\t\tsignature: cuidSig,\n\t\tlower: lowerCuid,\n\t\tusageSignatures: [\"cuid(2)\"]\n\t}],\n\t[\"ulid\", {\n\t\tsignature: ulidSig,\n\t\tlower: lowerUlid,\n\t\tusageSignatures: [\"ulid()\"]\n\t}],\n\t[\"nanoid\", {\n\t\tsignature: nanoidSig,\n\t\tlower: lowerNanoid,\n\t\tusageSignatures: [\"nanoid()\", \"nanoid(<2-255>)\"]\n\t}]\n];\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\nfunction createPostgresMutationDefaultGeneratorDescriptors() {\n\treturn [\n\t\t...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({\n\t\t\tid,\n\t\t\tapplicableCodecIds\n\t\t})),\n\t\ttimestampNowControlDescriptor(),\n\t\tinstantNowControlDescriptor(),\n\t\tplainDateTimeNowControlDescriptor()\n\t];\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: postgresPslTypeConstructors,\n\t\tvalueObjectStorageType: \"Jsonb\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: createPostgresMutationDefaultGeneratorDescriptors()\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t], stack.dataTypes.lookup), stack.dataTypes.lookup);\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, normalizeSchemaNativeType, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as postgresRuntimeAdapterDescriptor, t as SqlRuntimeAdapter } from "./runtime-
|
|
1
|
+
import { n as postgresRuntimeAdapterDescriptor, t as SqlRuntimeAdapter } from "./runtime-CXQ7Xh-G.mjs";
|
|
2
2
|
export { SqlRuntimeAdapter, postgresRuntimeAdapterDescriptor as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as postgresCodecRegistry, t as assemblePostgresCodecRegistry } from "./codec-registry-
|
|
2
|
-
import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-
|
|
3
|
-
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-
|
|
4
|
-
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { o as postgresCodecRegistry, t as assemblePostgresCodecRegistry } from "./codec-registry-pg69n-o5-D8K3p40k.mjs";
|
|
2
|
+
import { i as instantNow, n as PLAIN_DATE_TIME_NOW_GENERATOR_ID, o as plainDateTimeNow, t as INSTANT_NOW_GENERATOR_ID } from "./authoring-DAorKc0L-DpWukVxn.mjs";
|
|
3
|
+
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-C2XsLnXe-DLYvtWWr.mjs";
|
|
4
|
+
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-_qLKFkLd-Cb4H-vZf.mjs";
|
|
5
5
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
6
6
|
import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
|
|
7
7
|
import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-
|
|
1
|
+
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-C2XsLnXe.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-_qLKFkLd.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { INSTANT_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, instantNow, plainDateTimeNow } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t{\n\t\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => instantNow(),\n\t\t\tstability: \"query\"\n\t\t},\n\t\t{\n\t\t\tid: PLAIN_DATE_TIME_NOW_GENERATOR_ID,\n\t\t\tgenerate: () => plainDateTimeNow(),\n\t\t\tstability: \"query\"\n\t\t}\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypeLookup = assembleDataTypes(components).lookup;\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypeLookup), dataTypeLookup);\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B;GACC,IAAI;GACJ,gBAAgB,WAAW;GAC3B,WAAW;EACZ;EACA;GACC,IAAI;GACJ,gBAAgB,iBAAiB;GACjC,WAAW;EACZ;CACD;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,MAAM,aAAa;GAClB,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV;EACA,MAAM,iBAAiB,kBAAkB,UAAU,CAAC,CAAC;EACrD,OAAO,uCAAuC,8BAA8B,YAAY,cAAc,GAAG,cAAc;CACxH;AACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as renderLoweredSql } from "./sql-renderer-
|
|
1
|
+
import { t as renderLoweredSql } from "./sql-renderer-dk7d0cK0.mjs";
|
|
2
2
|
export { renderLoweredSql };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as renderLoweredSql } from "./sql-renderer-
|
|
1
|
+
import { n as renderLoweredSql } from "./sql-renderer-CD5aYQos-nO-jTG1T.mjs";
|
|
2
2
|
export { renderLoweredSql };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
|
|
2
|
-
import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-
|
|
3
|
-
import { t as PostgresCodecRegistry } from "./codecs-
|
|
4
|
-
import "./types-
|
|
2
|
+
import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-CjLf9QtO.mjs";
|
|
3
|
+
import { t as PostgresCodecRegistry } from "./codecs-B-8uGsxq.mjs";
|
|
4
|
+
import "./types-xDgmVoc4.mjs";
|
|
5
5
|
export type { BinaryExpr, ColumnRef, Direction, Expr, OrderClause, ParamRef, PostgresAdapterOptions, PostgresCodecRegistry, PostgresContract, PostgresLoweredStatement, SelectAst, StorageColumn, StorageTable };
|
|
@@ -14,7 +14,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
14
14
|
readonly codecId: "pg/int8number@1";
|
|
15
15
|
};
|
|
16
16
|
readonly nullable: false;
|
|
17
|
-
readonly
|
|
17
|
+
readonly emptyResultWire: "0";
|
|
18
18
|
}, {
|
|
19
19
|
readonly operation: "countBigInt";
|
|
20
20
|
readonly input: {
|
|
@@ -25,13 +25,13 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
25
25
|
readonly codecId: "pg/int8@1";
|
|
26
26
|
};
|
|
27
27
|
readonly nullable: false;
|
|
28
|
-
readonly
|
|
28
|
+
readonly emptyResultWire: "0";
|
|
29
29
|
readonly lower: SqlAggregateLowering;
|
|
30
30
|
}, ...({
|
|
31
31
|
readonly operation: "sum";
|
|
32
32
|
readonly input: {
|
|
33
33
|
readonly kind: "codec";
|
|
34
|
-
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
34
|
+
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
35
35
|
};
|
|
36
36
|
readonly output: {
|
|
37
37
|
readonly kind: "codec";
|
|
@@ -43,7 +43,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
43
43
|
readonly operation: "sumBigInt";
|
|
44
44
|
readonly input: {
|
|
45
45
|
readonly kind: "codec";
|
|
46
|
-
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/
|
|
46
|
+
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
47
47
|
};
|
|
48
48
|
readonly output: {
|
|
49
49
|
readonly kind: "codec";
|
|
@@ -156,7 +156,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
156
156
|
readonly operation: "avg";
|
|
157
157
|
readonly input: {
|
|
158
158
|
readonly kind: "codec";
|
|
159
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
159
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
160
160
|
};
|
|
161
161
|
readonly output: {
|
|
162
162
|
readonly kind: "codec";
|
|
@@ -168,7 +168,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
168
168
|
readonly operation: "avgDecimal";
|
|
169
169
|
readonly input: {
|
|
170
170
|
readonly kind: "codec";
|
|
171
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/
|
|
171
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/int2@1" | "pg/int@1";
|
|
172
172
|
};
|
|
173
173
|
readonly output: {
|
|
174
174
|
readonly kind: "codec";
|
|
@@ -179,7 +179,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
179
179
|
readonly operation: "avg";
|
|
180
180
|
readonly input: {
|
|
181
181
|
readonly kind: "codec";
|
|
182
|
-
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/
|
|
182
|
+
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/float4@1" | "pg/float@1";
|
|
183
183
|
};
|
|
184
184
|
readonly output: {
|
|
185
185
|
readonly kind: "codec";
|
|
@@ -265,7 +265,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
265
265
|
readonly operation: "min";
|
|
266
266
|
readonly input: {
|
|
267
267
|
readonly kind: "codec";
|
|
268
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
268
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/interval@1" | "pg/time-string@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/text-array@1" | "pg/date-string@1" | "pg/date-temporal@1";
|
|
269
269
|
};
|
|
270
270
|
readonly output: {
|
|
271
271
|
readonly kind: "self";
|
|
@@ -306,7 +306,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
306
306
|
readonly operation: "max";
|
|
307
307
|
readonly input: {
|
|
308
308
|
readonly kind: "codec";
|
|
309
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
309
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/interval@1" | "pg/time-string@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/text-array@1" | "pg/date-string@1" | "pg/date-temporal@1";
|
|
310
310
|
};
|
|
311
311
|
readonly output: {
|
|
312
312
|
readonly kind: "self";
|
|
@@ -315,4 +315,4 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
315
315
|
})[]];
|
|
316
316
|
//#endregion
|
|
317
317
|
export { postgresAggregateDescriptors as t };
|
|
318
|
-
//# sourceMappingURL=aggregates-
|
|
318
|
+
//# sourceMappingURL=aggregates-D2J3oSFz.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregates-
|
|
1
|
+
{"version":3,"file":"aggregates-D2J3oSFz.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc;WACH;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;;WAEA;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF"}
|
|
@@ -103,7 +103,7 @@ const postgresAggregateDescriptors = [
|
|
|
103
103
|
codecId: PG_INT8_NUMBER_CODEC_ID
|
|
104
104
|
},
|
|
105
105
|
nullable: false,
|
|
106
|
-
|
|
106
|
+
emptyResultWire: "0"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
operation: "countBigInt",
|
|
@@ -113,7 +113,7 @@ const postgresAggregateDescriptors = [
|
|
|
113
113
|
codecId: PG_INT8_CODEC_ID
|
|
114
114
|
},
|
|
115
115
|
nullable: false,
|
|
116
|
-
|
|
116
|
+
emptyResultWire: "0",
|
|
117
117
|
lower: computedWith("count")
|
|
118
118
|
},
|
|
119
119
|
...FIXED_WIDTH_INTEGER_CODECS.map((codecId) => produces("sum", {
|
|
@@ -194,4 +194,4 @@ const postgresAggregateDescriptors = [
|
|
|
194
194
|
//#endregion
|
|
195
195
|
export { postgresAggregateDescriptors as t };
|
|
196
196
|
|
|
197
|
-
//# sourceMappingURL=aggregates-
|
|
197
|
+
//# sourceMappingURL=aggregates-DHIDeR2f.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregates-Brwk0sYS.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/aggregates.mjs"],"sourcesContent":["import { A as PG_TIME_TEMPORAL_CODEC_ID, B as SQL_VARCHAR_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, L as SQL_FLOAT_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, O as PG_TIMETZ_CODEC_ID, R as SQL_INT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, s as PG_ENUM_CODEC_ID, u as PG_FLOAT_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { AggregateExpr, CastExpr } from \"@internal/sql-relational-core/ast\";\n//#region src/core/aggregates.ts\n/**\n* An aggregate whose result is one of the input values, so it carries the input's codec — type parameters included, since a `numeric(10,3)` minimum is still a `numeric(10,3)`.\n*/\nconst preservesInput = (operation, input) => ({\n\toperation,\n\tinput,\n\toutput: { kind: \"self\" },\n\tnullable: true\n});\n/**\n* An aggregate whose result is a new value. It names its result codec without type parameters: a sum leaves the input's width behind (a `numeric(10,3)` column sums to an unconstrained `numeric`), so carrying the input's parameters into the result would understate the range.\n*/\nconst produces = (operation, input, codecId) => ({\n\toperation,\n\tinput,\n\toutput: {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t},\n\tnullable: true\n});\n/** The same, for an operation that builds its own expression. */\nconst producesVia = (operation, input, codecId, lower) => ({\n\t...produces(operation, input, codecId),\n\tlower\n});\n/** The SQL aggregate a lossless variant computes with. `sumBigInt` is a `sum` read exactly, `countBigInt` a `count`, `avgDecimal` an `avg`: the variants differ in how the result is read, never in what the database computes. */\nconst computedWith = (fn) => ({ expr }) => new AggregateExpr(fn, expr);\n/** `avg` over an integer column, rounded once. PostgreSQL computes the exact `numeric` mean and the cast turns that one value into the `double precision` the result codec reads; casting the input instead would round every value before it was accumulated. */\nconst avgCastToFloat8 = ({ expr }) => CastExpr.as(new AggregateExpr(\"avg\", expr), \"float8\");\n/** Integer codecs whose `sum` widens to `bigint` — every built-in integer bar the 64-bit ones, whose sum goes to `numeric` instead. */\nconst SUM_WIDENS_TO_INT8 = [\n\tPG_INT2_CODEC_ID,\n\tPG_INT4_CODEC_ID,\n\tPG_INT_CODEC_ID,\n\tSQL_INT_CODEC_ID\n];\n/** The 64-bit integer codecs: PostgreSQL computes their `sum` as a `numeric`, a total free to leave the range an `int8` holds. */\nconst SUM_WIDENS_TO_NUMERIC = [PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID];\n/** The integer codecs a `sum` reads back as a `number`: every fixed-width one, whatever its own application type. */\nconst FIXED_WIDTH_INTEGER_CODECS = [...SUM_WIDENS_TO_INT8, ...SUM_WIDENS_TO_NUMERIC];\n/** Every built-in integer codec, the unbounded one included: `avg` over any of them is a `numeric` mean. */\nconst INTEGER_CODECS = [...FIXED_WIDTH_INTEGER_CODECS, PG_UNBOUNDED_INT_CODEC_ID];\n/** Codecs over `double precision`, whose `sum` and `avg` stay there. */\nconst DOUBLE_PRECISION_CODECS = [\n\tPG_FLOAT8_CODEC_ID,\n\tPG_FLOAT_CODEC_ID,\n\tSQL_FLOAT_CODEC_ID\n];\n/**\n* Codecs whose `min`/`max` returns the input type and whose traits do not already say so: the temporal types, `inet`, `text[]`, and native enums advertise `order` or `equality`, which `uuid`, `bit`, `bit varying`, `bool`, `bytea`, `json`, and `jsonb` also advertise while having no `min`/`max` at all. An exact overload per supported codec is therefore the only honest shape — a trait fallback over `order` would claim the unsupported ones too.\n*/\nconst MIN_MAX_PRESERVING_CODECS = [\n\tPG_ENUM_CODEC_ID,\n\tPG_TIMETZ_CODEC_ID,\n\tPG_INTERVAL_CODEC_ID,\n\tPG_INET_CODEC_ID,\n\tPG_TEXT_ARRAY_CODEC_ID,\n\tPG_DATE_STRING_CODEC_ID,\n\tPG_TIMESTAMP_STRING_CODEC_ID,\n\tPG_TIMESTAMPTZ_STRING_CODEC_ID,\n\tPG_TIMESTAMPTZ_DATE_CODEC_ID,\n\tPG_TIME_STRING_CODEC_ID,\n\tPG_DATE_TEMPORAL_CODEC_ID,\n\tPG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\tPG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\tPG_TIME_TEMPORAL_CODEC_ID\n];\n/**\n* `min`/`max` over the character types, where the trait rung does hold: every `textual` codec returns its input type — except the two `varchar` codecs, whose result PostgreSQL widens to `text`, and which therefore claim themselves exactly and shadow the fallback.\n*/\nconst MIN_MAX_WIDENS_TO_TEXT = [PG_VARCHAR_CODEC_ID, SQL_VARCHAR_CODEC_ID];\nconst orderingDescriptors = (operation) => [\n\tpreservesInput(operation, {\n\t\tkind: \"trait\",\n\t\ttrait: \"numeric\"\n\t}),\n\tpreservesInput(operation, {\n\t\tkind: \"trait\",\n\t\ttrait: \"textual\"\n\t}),\n\t...MIN_MAX_WIDENS_TO_TEXT.map((codecId) => produces(operation, {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_TEXT_CODEC_ID)),\n\t...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}))\n];\n/**\n* Every aggregate overload the PostgreSQL target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.\n*/\nconst postgresAggregateDescriptors = [\n\t{\n\t\toperation: \"count\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: PG_INT8_NUMBER_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultJson: \"0\"\n\t},\n\t{\n\t\toperation: \"countBigInt\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: PG_INT8_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultJson: \"0\",\n\t\tlower: computedWith(\"count\")\n\t},\n\t...FIXED_WIDTH_INTEGER_CODECS.map((codecId) => produces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_INT8_NUMBER_CODEC_ID)),\n\t...SUM_WIDENS_TO_INT8.map((codecId) => producesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_INT8_CODEC_ID, computedWith(\"sum\"))),\n\t...SUM_WIDENS_TO_NUMERIC.map((codecId) => producesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_UNBOUNDED_INT_CODEC_ID, computedWith(\"sum\"))),\n\tproducesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_UNBOUNDED_INT_CODEC_ID\n\t}, PG_UNBOUNDED_INT_CODEC_ID, computedWith(\"sum\")),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_FLOAT4_CODEC_ID\n\t}, PG_FLOAT4_CODEC_ID),\n\t...DOUBLE_PRECISION_CODECS.map((codecId) => produces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_FLOAT8_CODEC_ID)),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_NUMERIC_CODEC_ID\n\t}, PG_NUMERIC_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_UNBOUNDED_INT_CODEC_ID\n\t}, PG_UNBOUNDED_INT_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_INTERVAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_STRING_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_TEMPORAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\t...INTEGER_CODECS.map((codecId) => producesVia(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_FLOAT8_CODEC_ID, avgCastToFloat8)),\n\t...[...INTEGER_CODECS, PG_NUMERIC_CODEC_ID].map((codecId) => producesVia(\"avgDecimal\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_NUMERIC_CODEC_ID, computedWith(\"avg\"))),\n\t...[PG_FLOAT4_CODEC_ID, ...DOUBLE_PRECISION_CODECS].map((codecId) => produces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_FLOAT8_CODEC_ID)),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_NUMERIC_CODEC_ID\n\t}, PG_NUMERIC_CODEC_ID),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_INTERVAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_STRING_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_TEMPORAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\t...orderingDescriptors(\"min\"),\n\t...orderingDescriptors(\"max\")\n];\n//#endregion\nexport { postgresAggregateDescriptors };\n\n//# sourceMappingURL=aggregates.mjs.map"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"aggregates-DHIDeR2f.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/aggregates.mjs"],"sourcesContent":["import { A as PG_TIME_TEMPORAL_CODEC_ID, B as SQL_VARCHAR_CODEC_ID, C as PG_TIMESTAMPTZ_DATE_CODEC_ID, D as PG_TIMESTAMP_TEMPORAL_CODEC_ID, E as PG_TIMESTAMP_STRING_CODEC_ID, F as PG_VARCHAR_CODEC_ID, L as SQL_FLOAT_CODEC_ID, M as PG_UNBOUNDED_INT_CODEC_ID, O as PG_TIMETZ_CODEC_ID, R as SQL_INT_CODEC_ID, S as PG_TEXT_CODEC_ID, T as PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, _ as PG_INT_CODEC_ID, a as PG_DATE_STRING_CODEC_ID, b as PG_NUMERIC_CODEC_ID, c as PG_FLOAT4_CODEC_ID, d as PG_INET_CODEC_ID, f as PG_INT2_CODEC_ID, g as PG_INTERVAL_CODEC_ID, h as PG_INT8_NUMBER_CODEC_ID, k as PG_TIME_STRING_CODEC_ID, l as PG_FLOAT8_CODEC_ID, m as PG_INT8_CODEC_ID, o as PG_DATE_TEMPORAL_CODEC_ID, p as PG_INT4_CODEC_ID, s as PG_ENUM_CODEC_ID, u as PG_FLOAT_CODEC_ID, w as PG_TIMESTAMPTZ_STRING_CODEC_ID, x as PG_TEXT_ARRAY_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { AggregateExpr, CastExpr } from \"@internal/sql-relational-core/ast\";\n//#region src/core/aggregates.ts\n/**\n* An aggregate whose result is one of the input values, so it carries the input's codec — type parameters included, since a `numeric(10,3)` minimum is still a `numeric(10,3)`.\n*/\nconst preservesInput = (operation, input) => ({\n\toperation,\n\tinput,\n\toutput: { kind: \"self\" },\n\tnullable: true\n});\n/**\n* An aggregate whose result is a new value. It names its result codec without type parameters: a sum leaves the input's width behind (a `numeric(10,3)` column sums to an unconstrained `numeric`), so carrying the input's parameters into the result would understate the range.\n*/\nconst produces = (operation, input, codecId) => ({\n\toperation,\n\tinput,\n\toutput: {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t},\n\tnullable: true\n});\n/** The same, for an operation that builds its own expression. */\nconst producesVia = (operation, input, codecId, lower) => ({\n\t...produces(operation, input, codecId),\n\tlower\n});\n/** The SQL aggregate a lossless variant computes with. `sumBigInt` is a `sum` read exactly, `countBigInt` a `count`, `avgDecimal` an `avg`: the variants differ in how the result is read, never in what the database computes. */\nconst computedWith = (fn) => ({ expr }) => new AggregateExpr(fn, expr);\n/** `avg` over an integer column, rounded once. PostgreSQL computes the exact `numeric` mean and the cast turns that one value into the `double precision` the result codec reads; casting the input instead would round every value before it was accumulated. */\nconst avgCastToFloat8 = ({ expr }) => CastExpr.as(new AggregateExpr(\"avg\", expr), \"float8\");\n/** Integer codecs whose `sum` widens to `bigint` — every built-in integer bar the 64-bit ones, whose sum goes to `numeric` instead. */\nconst SUM_WIDENS_TO_INT8 = [\n\tPG_INT2_CODEC_ID,\n\tPG_INT4_CODEC_ID,\n\tPG_INT_CODEC_ID,\n\tSQL_INT_CODEC_ID\n];\n/** The 64-bit integer codecs: PostgreSQL computes their `sum` as a `numeric`, a total free to leave the range an `int8` holds. */\nconst SUM_WIDENS_TO_NUMERIC = [PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID];\n/** The integer codecs a `sum` reads back as a `number`: every fixed-width one, whatever its own application type. */\nconst FIXED_WIDTH_INTEGER_CODECS = [...SUM_WIDENS_TO_INT8, ...SUM_WIDENS_TO_NUMERIC];\n/** Every built-in integer codec, the unbounded one included: `avg` over any of them is a `numeric` mean. */\nconst INTEGER_CODECS = [...FIXED_WIDTH_INTEGER_CODECS, PG_UNBOUNDED_INT_CODEC_ID];\n/** Codecs over `double precision`, whose `sum` and `avg` stay there. */\nconst DOUBLE_PRECISION_CODECS = [\n\tPG_FLOAT8_CODEC_ID,\n\tPG_FLOAT_CODEC_ID,\n\tSQL_FLOAT_CODEC_ID\n];\n/**\n* Codecs whose `min`/`max` returns the input type and whose traits do not already say so: the temporal types, `inet`, `text[]`, and native enums advertise `order` or `equality`, which `uuid`, `bit`, `bit varying`, `bool`, `bytea`, `json`, and `jsonb` also advertise while having no `min`/`max` at all. An exact overload per supported codec is therefore the only honest shape — a trait fallback over `order` would claim the unsupported ones too.\n*/\nconst MIN_MAX_PRESERVING_CODECS = [\n\tPG_ENUM_CODEC_ID,\n\tPG_TIMETZ_CODEC_ID,\n\tPG_INTERVAL_CODEC_ID,\n\tPG_INET_CODEC_ID,\n\tPG_TEXT_ARRAY_CODEC_ID,\n\tPG_DATE_STRING_CODEC_ID,\n\tPG_TIMESTAMP_STRING_CODEC_ID,\n\tPG_TIMESTAMPTZ_STRING_CODEC_ID,\n\tPG_TIMESTAMPTZ_DATE_CODEC_ID,\n\tPG_TIME_STRING_CODEC_ID,\n\tPG_DATE_TEMPORAL_CODEC_ID,\n\tPG_TIMESTAMP_TEMPORAL_CODEC_ID,\n\tPG_TIMESTAMPTZ_TEMPORAL_CODEC_ID,\n\tPG_TIME_TEMPORAL_CODEC_ID\n];\n/**\n* `min`/`max` over the character types, where the trait rung does hold: every `textual` codec returns its input type — except the two `varchar` codecs, whose result PostgreSQL widens to `text`, and which therefore claim themselves exactly and shadow the fallback.\n*/\nconst MIN_MAX_WIDENS_TO_TEXT = [PG_VARCHAR_CODEC_ID, SQL_VARCHAR_CODEC_ID];\nconst orderingDescriptors = (operation) => [\n\tpreservesInput(operation, {\n\t\tkind: \"trait\",\n\t\ttrait: \"numeric\"\n\t}),\n\tpreservesInput(operation, {\n\t\tkind: \"trait\",\n\t\ttrait: \"textual\"\n\t}),\n\t...MIN_MAX_WIDENS_TO_TEXT.map((codecId) => produces(operation, {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_TEXT_CODEC_ID)),\n\t...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}))\n];\n/**\n* Every aggregate overload the PostgreSQL target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.\n*/\nconst postgresAggregateDescriptors = [\n\t{\n\t\toperation: \"count\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: PG_INT8_NUMBER_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultWire: \"0\"\n\t},\n\t{\n\t\toperation: \"countBigInt\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: PG_INT8_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultWire: \"0\",\n\t\tlower: computedWith(\"count\")\n\t},\n\t...FIXED_WIDTH_INTEGER_CODECS.map((codecId) => produces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_INT8_NUMBER_CODEC_ID)),\n\t...SUM_WIDENS_TO_INT8.map((codecId) => producesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_INT8_CODEC_ID, computedWith(\"sum\"))),\n\t...SUM_WIDENS_TO_NUMERIC.map((codecId) => producesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_UNBOUNDED_INT_CODEC_ID, computedWith(\"sum\"))),\n\tproducesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_UNBOUNDED_INT_CODEC_ID\n\t}, PG_UNBOUNDED_INT_CODEC_ID, computedWith(\"sum\")),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_FLOAT4_CODEC_ID\n\t}, PG_FLOAT4_CODEC_ID),\n\t...DOUBLE_PRECISION_CODECS.map((codecId) => produces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_FLOAT8_CODEC_ID)),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_NUMERIC_CODEC_ID\n\t}, PG_NUMERIC_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_UNBOUNDED_INT_CODEC_ID\n\t}, PG_UNBOUNDED_INT_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_INTERVAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_STRING_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_TEMPORAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\t...INTEGER_CODECS.map((codecId) => producesVia(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_FLOAT8_CODEC_ID, avgCastToFloat8)),\n\t...[...INTEGER_CODECS, PG_NUMERIC_CODEC_ID].map((codecId) => producesVia(\"avgDecimal\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_NUMERIC_CODEC_ID, computedWith(\"avg\"))),\n\t...[PG_FLOAT4_CODEC_ID, ...DOUBLE_PRECISION_CODECS].map((codecId) => produces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, PG_FLOAT8_CODEC_ID)),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_NUMERIC_CODEC_ID\n\t}, PG_NUMERIC_CODEC_ID),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_INTERVAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_STRING_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\tproduces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId: PG_TIME_TEMPORAL_CODEC_ID\n\t}, PG_INTERVAL_CODEC_ID),\n\t...orderingDescriptors(\"min\"),\n\t...orderingDescriptors(\"max\")\n];\n//#endregion\nexport { postgresAggregateDescriptors };\n\n//# sourceMappingURL=aggregates.mjs.map"],"mappings":"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"}
|