@prisma/orm-target-postgres 8.0.0-rc.19-dev.9 → 8.0.0-rc.19-dev.10
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-CVkrJLWQ.d.mts → adapter-5qylEP__.d.mts} +7 -7
- package/dist/adapter-5qylEP__.d.mts.map +1 -0
- package/dist/{adapter-svGTIjA2-CtHa7kMs.mjs → adapter-svGTIjA2-1p-Iw8D2.mjs} +6 -6
- package/dist/adapter-svGTIjA2-1p-Iw8D2.mjs.map +1 -0
- package/dist/adapter.d.mts +10 -10
- package/dist/adapter.mjs +6 -6
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__column-types.d.mts +1 -1
- package/dist/adapter__column-types.mjs +1 -1
- package/dist/adapter__control.d.mts +3 -3
- package/dist/adapter__control.mjs +5 -5
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +5 -5
- 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 +4 -4
- package/dist/{aggregates-BjiTuckw.d.mts → aggregates-CEqqEg8k.d.mts} +2 -2
- package/dist/aggregates-CEqqEg8k.d.mts.map +1 -0
- package/dist/{aggregates-C7KEByGU.mjs → aggregates-Dw-lAutX.mjs} +3 -3
- package/dist/aggregates-Dw-lAutX.mjs.map +1 -0
- package/dist/{authoring-DWd5pnnV-g81c_ETF.d.mts → authoring-DWd5pnnV-BBX7P1wT.d.mts} +4 -4
- package/dist/authoring-DWd5pnnV-BBX7P1wT.d.mts.map +1 -0
- package/dist/{authoring-SbdvmVJh-CgZp23qA.mjs → authoring-SbdvmVJh-nQ7YliD_.mjs} +10 -10
- package/dist/authoring-SbdvmVJh-nQ7YliD_.mjs.map +1 -0
- package/dist/{autoincrement-widths-DonNJgfS-A-hWa3rO.mjs → autoincrement-widths-DonNJgfS-CCvZ4u1W.mjs} +3 -3
- package/dist/autoincrement-widths-DonNJgfS-CCvZ4u1W.mjs.map +1 -0
- package/dist/{canonicalize-B-xvDOdd-Cnht2N4h.d.mts → canonicalize-B-xvDOdd-G3yUeKj4.d.mts} +2 -2
- package/dist/canonicalize-B-xvDOdd-G3yUeKj4.d.mts.map +1 -0
- package/dist/{canonicalize-RdxoUHao-DK_M6HU-.mjs → canonicalize-RdxoUHao-FTTkizfe.mjs} +2 -2
- package/dist/canonicalize-RdxoUHao-FTTkizfe.mjs.map +1 -0
- package/dist/{check-expressions-7uCCP01t-WtUqfqkP.mjs → check-expressions-7uCCP01t-DtX2Vak9.mjs} +3 -3
- package/dist/check-expressions-7uCCP01t-DtX2Vak9.mjs.map +1 -0
- package/dist/{check-expressions-CtTzM58x-CsWFEeul.d.mts → check-expressions-CtTzM58x-LloO-5Vf.d.mts} +2 -2
- package/dist/check-expressions-CtTzM58x-LloO-5Vf.d.mts.map +1 -0
- package/dist/{codec-descriptor-DoR-cTFZ-DKTk9Oxm.mjs → codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs} +2 -2
- package/dist/codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs.map +1 -0
- package/dist/codec-descriptor-Fb3UoQGb.d.mts +1 -0
- package/dist/{codec-descriptor-d1ByNBEk-ClDTxfu9.d.mts → codec-descriptor-d1ByNBEk-DhrtS_5y.d.mts} +2 -2
- package/dist/codec-descriptor-d1ByNBEk-DhrtS_5y.d.mts.map +1 -0
- package/dist/{codec-ids-BMhEpFwv-BLIC4g3Y.mjs → codec-ids-BMhEpFwv-B8Zh0s_Q.mjs} +2 -2
- package/dist/codec-ids-BMhEpFwv-B8Zh0s_Q.mjs.map +1 -0
- package/dist/{codec-ids-C6II64Wy-CCU5G6CU.d.mts → codec-ids-C6II64Wy-CPYTqDTT.d.mts} +2 -2
- package/dist/codec-ids-C6II64Wy-CPYTqDTT.d.mts.map +1 -0
- package/dist/codec-ids-CcB5uBNf.d.mts +1 -0
- package/dist/{codec-registry-D7XslgPe-Gg6TMpPg.mjs → codec-registry-D7XslgPe-DTZnVB8W.mjs} +5 -5
- package/dist/codec-registry-D7XslgPe-DTZnVB8W.mjs.map +1 -0
- package/dist/{codec-type-map-Fj5xCgwT-DwIK_DR3.d.mts → codec-type-map-Fj5xCgwT-BeCXgfuR.d.mts} +4 -4
- package/dist/codec-type-map-Fj5xCgwT-BeCXgfuR.d.mts.map +1 -0
- package/dist/codec-types-BBACckHa.d.mts +2 -0
- package/dist/{codec-types-Ct_4iTVc-4VoGpl4J.d.mts → codec-types-Ct_4iTVc-3tFJcIBo.d.mts} +4 -4
- package/dist/codec-types-Ct_4iTVc-3tFJcIBo.d.mts.map +1 -0
- package/dist/{codecs-CADK7dCR-Cku8S_Im.d.mts → codecs-CADK7dCR-C8WToYQb.d.mts} +4 -4
- package/dist/codecs-CADK7dCR-C8WToYQb.d.mts.map +1 -0
- package/dist/{codecs-CRl9-i_r-CTWJYxL0.mjs → codecs-CRl9-i_r-Co-bgYl3.mjs} +7 -7
- package/dist/codecs-CRl9-i_r-Co-bgYl3.mjs.map +1 -0
- package/dist/{codecs-DEMQ3cMm.d.mts → codecs-CoEpEqjM.d.mts} +4 -4
- package/dist/codecs-CoEpEqjM.d.mts.map +1 -0
- package/dist/{column-types-CI9_dRcU.mjs → column-types-B4zsV-u3.mjs} +3 -3
- package/dist/column-types-B4zsV-u3.mjs.map +1 -0
- package/dist/{column-types-KP17SDia.d.mts → column-types-Bs2V0j8T.d.mts} +4 -4
- package/dist/column-types-Bs2V0j8T.d.mts.map +1 -0
- package/dist/{contract-contributions-Xz2FpyfI-CZW0_mEj.mjs → contract-contributions-Xz2FpyfI-CeQZqHKf.mjs} +16 -16
- package/dist/contract-contributions-Xz2FpyfI-CeQZqHKf.mjs.map +1 -0
- package/dist/{contract-free-DCPNGs2e.d.mts → contract-free-B6-wuc6M.d.mts} +4 -4
- package/dist/contract-free-B6-wuc6M.d.mts.map +1 -0
- package/dist/{contract-free-2xXXmS01.mjs → contract-free-o7olebm9.mjs} +5 -5
- package/dist/contract-free-o7olebm9.mjs.map +1 -0
- package/dist/{control-Cu-SPW3N.d.mts → control--HupSPoV.d.mts} +4 -4
- package/dist/control--HupSPoV.d.mts.map +1 -0
- package/dist/{control-BaUpALVp.d.mts → control-CQEjh4P7.d.mts} +2 -2
- package/dist/control-CQEjh4P7.d.mts.map +1 -0
- package/dist/{control-Dqf8WaSU.d.mts → control-D4cTcpcJ.d.mts} +7 -7
- package/dist/control-D4cTcpcJ.d.mts.map +1 -0
- package/dist/{control-C4-UbYOH.mjs → control-DZQwENIP.mjs} +3 -3
- package/dist/control-DZQwENIP.mjs.map +1 -0
- package/dist/{control-policy-DzFOPk9n-BmAgBCQb.mjs → control-policy-DtU5u9Dm-44r_OF94.mjs} +12 -12
- package/dist/control-policy-DtU5u9Dm-44r_OF94.mjs.map +1 -0
- package/dist/{data-transform-h9agBu_c-B5dsDs8G.mjs → data-transform-h9agBu_c-RlC5A7aY.mjs} +3 -3
- package/dist/data-transform-h9agBu_c-RlC5A7aY.mjs.map +1 -0
- package/dist/{data-transform-nGy9rz87-CEOXAj91.d.mts → data-transform-nGy9rz87-CE3DGlgn.d.mts} +3 -3
- package/dist/data-transform-nGy9rz87-CE3DGlgn.d.mts.map +1 -0
- package/dist/data-transform-nqkqNIb8.d.mts +1 -0
- package/dist/{data-type-entries-gQW3-KSb-uOS_mZiH.mjs → data-type-entries-gQW3-KSb-BIl8vgus.mjs} +3 -3
- package/dist/data-type-entries-gQW3-KSb-BIl8vgus.mjs.map +1 -0
- package/dist/{data-types-BbFUwMKs.d.mts → data-types--7V9yY1G.d.mts} +2 -2
- package/dist/data-types--7V9yY1G.d.mts.map +1 -0
- package/dist/{data-types-Chx0mjTP-Dy6isAwB.mjs → data-types-Chx0mjTP-DczU4S9b.mjs} +4 -4
- package/dist/data-types-Chx0mjTP-DczU4S9b.mjs.map +1 -0
- package/dist/{date-time-now-generators-CMkXVbMG-CYwplAuf.d.mts → date-time-now-generators-CMkXVbMG-C-GjhReE.d.mts} +2 -2
- package/dist/date-time-now-generators-CMkXVbMG-C-GjhReE.d.mts.map +1 -0
- package/dist/{ddl-B7Rqlz6D-BcwCMSB7.mjs → ddl-B7Rqlz6D-B7dRDgYb.mjs} +5 -5
- package/dist/ddl-B7Rqlz6D-B7dRDgYb.mjs.map +1 -0
- package/dist/ddl-B8nQZTWN.d.mts +1 -0
- package/dist/{default-constraint-names-CtcRXhV8-nz3ff6b8.mjs → default-constraint-names-Cz9Yoeim-sUzOGvIm.mjs} +3 -3
- package/dist/default-constraint-names-Cz9Yoeim-sUzOGvIm.mjs.map +1 -0
- package/dist/{default-normalizer-BqK6XxdC-BAgxt9FF.mjs → default-normalizer-BqK6XxdC-2OUb2ybG.mjs} +2 -2
- package/dist/default-normalizer-BqK6XxdC-2OUb2ybG.mjs.map +1 -0
- package/dist/{default-normalizer-P-u2VRBf.d.mts → default-normalizer-DO-cH75Q.d.mts} +2 -2
- package/dist/default-normalizer-DO-cH75Q.d.mts.map +1 -0
- package/dist/{descriptor-meta-BkD3nXF_-NNc0jaU9.mjs → descriptor-meta-BkD3nXF_-CZaNqC6r.mjs} +4 -4
- package/dist/descriptor-meta-BkD3nXF_-CZaNqC6r.mjs.map +1 -0
- package/dist/{descriptor-meta-DBH6aAIM-Cm1rNZaF.mjs → descriptor-meta-DBH6aAIM-C9xA44Ax.mjs} +12 -12
- package/dist/descriptor-meta-DBH6aAIM-C9xA44Ax.mjs.map +1 -0
- package/dist/{descriptor-meta-runtime-Dft1L7eE-CUaKX_mx.mjs → descriptor-meta-runtime-Dft1L7eE-D8vpOz_Z.mjs} +3 -3
- package/dist/descriptor-meta-runtime-Dft1L7eE-D8vpOz_Z.mjs.map +1 -0
- package/dist/{diff-database-schema-DPZdkysF.d.mts → diff-database-schema-BxzhZaVN.d.mts} +4 -4
- package/dist/diff-database-schema-BxzhZaVN.d.mts.map +1 -0
- package/dist/{diff-database-schema-B1NfYBTr-DPdFDCpE.mjs → diff-database-schema-DAEzWtzU-DoyVgKqh.mjs} +12 -12
- package/dist/diff-database-schema-DAEzWtzU-DoyVgKqh.mjs.map +1 -0
- package/dist/driver.d.mts +2 -2
- package/dist/driver.mjs +2 -2
- package/dist/driver__control.d.mts +1 -1
- package/dist/driver__control.mjs +1 -1
- package/dist/driver__runtime.d.mts +1 -1
- package/dist/driver__runtime.mjs +1 -1
- package/dist/{errors-BrhQYgdL-D_lIrddD.mjs → errors-BrhQYgdL-IvZHPjwL.mjs} +2 -2
- package/dist/errors-BrhQYgdL-IvZHPjwL.mjs.map +1 -0
- package/dist/{errors-BP-2V2_C.d.mts → errors-D3Mj-x0o.d.mts} +2 -2
- package/dist/errors-D3Mj-x0o.d.mts.map +1 -0
- package/dist/{full-text-8PmilGkW.mjs → full-text-BYg7EVX2.mjs} +4 -4
- package/dist/full-text-BYg7EVX2.mjs.map +1 -0
- package/dist/{full-text-r2wMygYZ.d.mts → full-text-SDbfxrE_.d.mts} +4 -4
- package/dist/full-text-SDbfxrE_.d.mts.map +1 -0
- package/dist/{full-text-collection-method-BFd2u2cs-DcN_Vf7f.d.mts → full-text-collection-method-BFd2u2cs-Ba3OiWM3.d.mts} +5 -5
- package/dist/full-text-collection-method-BFd2u2cs-Ba3OiWM3.d.mts.map +1 -0
- package/dist/{full-text-index-authoring-Ca6bWXyG.d.mts → full-text-index-authoring-CN1L9C1k.d.mts} +2 -2
- package/dist/full-text-index-authoring-CN1L9C1k.d.mts.map +1 -0
- package/dist/{full-text-index-definition-BPxQQBuC-BrpDsuJu.mjs → full-text-index-definition-BPxQQBuC-VLyQ1kEL.mjs} +3 -3
- package/dist/full-text-index-definition-BPxQQBuC-VLyQ1kEL.mjs.map +1 -0
- package/dist/{full-text-index-definition-D5iBWLss-FifKlctQ.d.mts → full-text-index-definition-D5iBWLss-BEpqiucV.d.mts} +2 -2
- package/dist/full-text-index-definition-D5iBWLss-BEpqiucV.d.mts.map +1 -0
- package/dist/{full-text-parsers-CFFxiOrp-BmiwdZ21.mjs → full-text-parsers-CFFxiOrp-CrZ7VI1m.mjs} +5 -5
- package/dist/full-text-parsers-CFFxiOrp-CrZ7VI1m.mjs.map +1 -0
- package/dist/{full-text-search-document-Doy5TF7c-DezgYsP-.mjs → full-text-search-document-Doy5TF7c-aMWM_1KB.mjs} +5 -5
- package/dist/full-text-search-document-Doy5TF7c-aMWM_1KB.mjs.map +1 -0
- package/dist/{index-types-BihjrAAq-ktkeKE97.mjs → index-types-BihjrAAq-C2VnfAyF.mjs} +3 -3
- package/dist/index-types-BihjrAAq-C2VnfAyF.mjs.map +1 -0
- package/dist/{indexes-BYf6nXVv-DznOOzlT.d.mts → indexes-BYf6nXVv-BXwLw7fO.d.mts} +5 -5
- package/dist/indexes-BYf6nXVv-BXwLw7fO.d.mts.map +1 -0
- package/dist/{infer-psl-contract-BSSHcuRi-DryV3wqN.mjs → infer-psl-contract-BSSHcuRi-ChdFSviw.mjs} +10 -10
- package/dist/infer-psl-contract-BSSHcuRi-ChdFSviw.mjs.map +1 -0
- package/dist/{issue-planner--zt__-Kk.d.mts → issue-planner-D-On52xP.d.mts} +5 -5
- package/dist/issue-planner-D-On52xP.d.mts.map +1 -0
- package/dist/{list-decoder-BcrLExnx-hTa7qY7a.d.mts → list-decoder-BcrLExnx-DlCwavhu.d.mts} +2 -2
- package/dist/list-decoder-BcrLExnx-DlCwavhu.d.mts.map +1 -0
- package/dist/{marker-lock-BGBqXaQ4.d.mts → marker-lock-BviIbusV.d.mts} +2 -2
- package/dist/marker-lock-BviIbusV.d.mts.map +1 -0
- package/dist/{marker-lock-DFc1Tfv5-QMJSzMIa.mjs → marker-lock-DFc1Tfv5-BkBKBRE3.mjs} +2 -2
- package/dist/marker-lock-DFc1Tfv5-BkBKBRE3.mjs.map +1 -0
- package/dist/{migration-CbOh59ZJ.mjs → migration-Be_iuIpn.mjs} +2 -2
- package/dist/migration-Be_iuIpn.mjs.map +1 -0
- package/dist/{migration-7VvUEoYO.d.mts → migration-D4lMmLVj.d.mts} +5 -5
- package/dist/migration-D4lMmLVj.d.mts.map +1 -0
- package/dist/{namespace-ids-xtp_ZY86-Cpp8PTxD.mjs → namespace-ids-xtp_ZY86-Cxc0dBbO.mjs} +2 -2
- package/dist/namespace-ids-xtp_ZY86-Cxc0dBbO.mjs.map +1 -0
- package/dist/{native-type-normalizer-DFE5L3YY.d.mts → native-type-normalizer-BaGa9eeb.d.mts} +2 -2
- package/dist/native-type-normalizer-BaGa9eeb.d.mts.map +1 -0
- package/dist/{native-type-normalizer-B7ZQZOCb.mjs → native-type-normalizer-Cn-RGt_E.mjs} +3 -3
- package/dist/native-type-normalizer-Cn-RGt_E.mjs.map +1 -0
- package/dist/{nodes-G8VTh4PM-D5t0nLdZ.mjs → nodes-G8VTh4PM-DNvIhHag.mjs} +2 -2
- package/dist/nodes-G8VTh4PM-DNvIhHag.mjs.map +1 -0
- package/dist/{nodes-s0Oe37jT-DY3kMSce.d.mts → nodes-s0Oe37jT-Cw3BU2gL.d.mts} +3 -3
- package/dist/nodes-s0Oe37jT-Cw3BU2gL.d.mts.map +1 -0
- package/dist/op-factory-call-CRaVUOb_.d.mts +1 -0
- package/dist/{op-factory-call-ClvHxHDs-CeVV_tro.mjs → op-factory-call-gGX-mZu--0QUG5xH4.mjs} +11 -11
- package/dist/op-factory-call-gGX-mZu--0QUG5xH4.mjs.map +1 -0
- package/dist/{op-factory-call-nLHvNx0O-CGQ3bNN5.d.mts → op-factory-call-nLHvNx0O-BTBhGbOF.d.mts} +9 -9
- package/dist/op-factory-call-nLHvNx0O-BTBhGbOF.d.mts.map +1 -0
- package/dist/{operation-types--Wa_cv45-jn5HQ8yt.d.mts → operation-types--Wa_cv45-RoRnL1Dn.d.mts} +5 -5
- package/dist/operation-types--Wa_cv45-RoRnL1Dn.d.mts.map +1 -0
- package/dist/operation-types-OXILTAOX.d.mts +1 -0
- package/dist/{pack-BLeBhGWE.d.mts → pack-HNfA3R_n.d.mts} +10 -10
- package/dist/pack-HNfA3R_n.d.mts.map +1 -0
- package/dist/{planner-CNG8pGm7.d.mts → planner-AD3Dt57t.d.mts} +5 -5
- package/dist/planner-AD3Dt57t.d.mts.map +1 -0
- package/dist/{planner-CvVTpZSI-Dkpd9l81.mjs → planner-VuR6URu3-CCUT2Osx.mjs} +14 -14
- package/dist/planner-VuR6URu3-CCUT2Osx.mjs.map +1 -0
- package/dist/{planner-ddl-builders-BvK8Reg3.d.mts → planner-ddl-builders-CPM3y7cQ.d.mts} +2 -2
- package/dist/planner-ddl-builders-CPM3y7cQ.d.mts.map +1 -0
- package/dist/{planner-ddl-builders-cYnH52gC-DaVKo24n.mjs → planner-ddl-builders-cYnH52gC-BWifb_M6.mjs} +3 -3
- package/dist/planner-ddl-builders-cYnH52gC-BWifb_M6.mjs.map +1 -0
- package/dist/{planner-identity-values-lke8kYOC.d.mts → planner-identity-values-Dsq989Lh.d.mts} +2 -2
- package/dist/planner-identity-values-Dsq989Lh.d.mts.map +1 -0
- package/dist/{planner-identity-values-QstrMJ2U-Cb8Fdh_W.mjs → planner-identity-values-QstrMJ2U-CcpaRVPY.mjs} +3 -3
- package/dist/planner-identity-values-QstrMJ2U-CcpaRVPY.mjs.map +1 -0
- package/dist/planner-produced-postgres-migration-BBUwtjA_.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-CGnbXiL_-Clhk4Jqj.mjs → planner-produced-postgres-migration-BZclL_xO-uflxtYuP.mjs} +5 -5
- package/dist/planner-produced-postgres-migration-BZclL_xO-uflxtYuP.mjs.map +1 -0
- package/dist/{planner-produced-postgres-migration-DyIXJ3MR-CvH0IEvz.d.mts → planner-produced-postgres-migration-DyIXJ3MR-DHO5wn_X.d.mts} +4 -4
- package/dist/planner-produced-postgres-migration-DyIXJ3MR-DHO5wn_X.d.mts.map +1 -0
- package/dist/{planner-schema-lookup-CdgWer9s.mjs → planner-schema-lookup-BbUY9oVy.mjs} +2 -2
- package/dist/planner-schema-lookup-BbUY9oVy.mjs.map +1 -0
- package/dist/{planner-schema-lookup-C4DHAddq.d.mts → planner-schema-lookup-ceCNOGFf.d.mts} +2 -2
- package/dist/planner-schema-lookup-ceCNOGFf.d.mts.map +1 -0
- package/dist/{planner-sql-checks-D-K44J19-BgZ15ipJ.mjs → planner-sql-checks-D-K44J19-CzvrqzNB.mjs} +5 -5
- package/dist/planner-sql-checks-D-K44J19-CzvrqzNB.mjs.map +1 -0
- package/dist/{planner-sql-checks-Ed-WGtge-Clnvg-zp.d.mts → planner-sql-checks-Ed-WGtge-D9ByMrW4.d.mts} +2 -2
- package/dist/planner-sql-checks-Ed-WGtge-D9ByMrW4.d.mts.map +1 -0
- package/dist/planner-sql-checks-rEjFx_Jv.d.mts +1 -0
- package/dist/{planner-target-details-CUEF0s90-COTks5yz.mjs → planner-target-details-CUEF0s90-6g-mOgTI.mjs} +2 -2
- package/dist/planner-target-details-CUEF0s90-6g-mOgTI.mjs.map +1 -0
- package/dist/{planner-target-details-HkP4RrRO-_xPQVPF0.d.mts → planner-target-details-HkP4RrRO-D6VtK0jY.d.mts} +2 -2
- package/dist/planner-target-details-HkP4RrRO-D6VtK0jY.d.mts.map +1 -0
- package/dist/{postgres-codec-traits-CnP5Bjxp-C8JED4J1.mjs → postgres-codec-traits-CnP5Bjxp-Dxdgv0TI.mjs} +3 -3
- package/dist/postgres-codec-traits-CnP5Bjxp-Dxdgv0TI.mjs.map +1 -0
- package/dist/{postgres-contract-view-BFzIDwwN-pJ6gJGOT.d.mts → postgres-contract-view-BFzIDwwN-hL3QLe_b.d.mts} +2 -2
- package/dist/postgres-contract-view-BFzIDwwN-hL3QLe_b.d.mts.map +1 -0
- package/dist/{postgres-contract-view-BO2elRMz-K6dYYr20.mjs → postgres-contract-view-BO2elRMz-BqMBzJoJ.mjs} +9 -9
- package/dist/postgres-contract-view-BO2elRMz-BqMBzJoJ.mjs.map +1 -0
- package/dist/{postgres-database-schema-node-Cv8usVNX-BP4GzjSf.d.mts → postgres-database-schema-node-Cv8usVNX-BmvGozi4.d.mts} +3 -3
- package/dist/postgres-database-schema-node-Cv8usVNX-BmvGozi4.d.mts.map +1 -0
- package/dist/{postgres-migration-gIPIgR1z-CvKPHina.mjs → postgres-migration-BSWmeRLo-CUfVTUf0.mjs} +16 -16
- package/dist/postgres-migration-BSWmeRLo-CUfVTUf0.mjs.map +1 -0
- package/dist/{postgres-migration-C5deJ3Ne-BBt4uBYb.d.mts → postgres-migration-C5deJ3Ne-C4Jxu-e6.d.mts} +7 -7
- package/dist/postgres-migration-C5deJ3Ne-C4Jxu-e6.d.mts.map +1 -0
- package/dist/{postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs → postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs} +2 -2
- package/dist/postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs.map +1 -0
- package/dist/{postgres-object-name-FPikIvOw-BNs44hTu.mjs → postgres-object-name-FPikIvOw-B8FfJI7z.mjs} +2 -2
- package/dist/postgres-object-name-FPikIvOw-B8FfJI7z.mjs.map +1 -0
- package/dist/{postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts → postgres-rls-policy-CnDxf3z9-BjpVyUnK.d.mts} +2 -2
- package/dist/postgres-rls-policy-CnDxf3z9-BjpVyUnK.d.mts.map +1 -0
- package/dist/{postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs → postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs} +3 -3
- package/dist/postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs.map +1 -0
- package/dist/{postgres-schema-C6w1rzOF-bzaF5PIS.mjs → postgres-schema-C6w1rzOF-D1fdwqRx.mjs} +6 -6
- package/dist/postgres-schema-C6w1rzOF-D1fdwqRx.mjs.map +1 -0
- package/dist/{postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts → postgres-schema-Xsjt3RKO-bis-SVSB.d.mts} +4 -4
- package/dist/postgres-schema-Xsjt3RKO-bis-SVSB.d.mts.map +1 -0
- package/dist/{postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs → postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs} +2 -2
- package/dist/postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs.map +1 -0
- package/dist/{prisma7-binding-kYc2Xcxt.d.mts → prisma7-binding-C-we4Znm.d.mts} +11 -11
- package/dist/prisma7-binding-C-we4Znm.d.mts.map +1 -0
- package/dist/{prisma7-binding-TQ2GIDxX.mjs → prisma7-binding-CVuACrdW.mjs} +10 -10
- package/dist/prisma7-binding-CVuACrdW.mjs.map +1 -0
- package/dist/{render-ops-DKPk74iS-Cfil02bJ.mjs → render-ops-BgqtCw9Z-T8BPTX85.mjs} +4 -4
- package/dist/render-ops-BgqtCw9Z-T8BPTX85.mjs.map +1 -0
- package/dist/{render-ops-DPwhZt2W.d.mts → render-ops-Bl84i7ut.d.mts} +3 -3
- package/dist/render-ops-Bl84i7ut.d.mts.map +1 -0
- package/dist/{render-typescript-6sCFvMBh.d.mts → render-typescript-BysdXYpH.d.mts} +2 -2
- package/dist/render-typescript-BysdXYpH.d.mts.map +1 -0
- package/dist/{render-typescript-Dqp1Spgn-B128r1qw.mjs → render-typescript-Dqp1Spgn-B4mJhuVr.mjs} +2 -2
- package/dist/render-typescript-Dqp1Spgn-B4mJhuVr.mjs.map +1 -0
- package/dist/{resolve-ddl-schema-D3VNPMSm-DVuswLch.mjs → resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs} +4 -4
- package/dist/resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs.map +1 -0
- package/dist/{runtime-BDq9yVrM.d.mts → runtime-C0VXuM0b.d.mts} +2 -2
- package/dist/runtime-C0VXuM0b.d.mts.map +1 -0
- package/dist/{runtime-DugW4mig.mjs → runtime-CXfxy5ED.mjs} +3 -3
- package/dist/runtime-CXfxy5ED.mjs.map +1 -0
- package/dist/{runtime-CQckFo7G.d.mts → runtime-Ci_toEDZ.d.mts} +5 -5
- package/dist/runtime-Ci_toEDZ.d.mts.map +1 -0
- package/dist/{runtime-XXYjt_3Q.d.mts → runtime-DtjW0GP_.d.mts} +4 -4
- package/dist/runtime-DtjW0GP_.d.mts.map +1 -0
- package/dist/{schema-ir-annotations-DuuYh0gl.d.mts → schema-ir-annotations-BygaWBiC.d.mts} +2 -2
- package/dist/schema-ir-annotations-BygaWBiC.d.mts.map +1 -0
- package/dist/{schema-node-kinds-C52Bb1ve-OVH80Tx2.d.mts → schema-node-kinds-C52Bb1ve-DmxQRPPS.d.mts} +2 -2
- package/dist/schema-node-kinds-C52Bb1ve-DmxQRPPS.d.mts.map +1 -0
- package/dist/{server-text-types-DeNPQpv5-DPxA9uXV.mjs → server-text-types-DeNPQpv5-DqX0h8WF.mjs} +2 -2
- package/dist/server-text-types-DeNPQpv5-DqX0h8WF.mjs.map +1 -0
- package/dist/{sql-renderer-BdWJPa5F-Q6M1dydc.mjs → sql-renderer-BdWJPa5F-Ct0CPlXc.mjs} +4 -4
- package/dist/sql-renderer-BdWJPa5F-Ct0CPlXc.mjs.map +1 -0
- package/dist/{sql-renderer-CGc-Ln4u.d.mts → sql-renderer-BiBhge7D.d.mts} +6 -6
- package/dist/sql-renderer-BiBhge7D.d.mts.map +1 -0
- package/dist/{sql-utils-Bnw3JbWf-zvWDkyrr.mjs → sql-utils-Bnw3JbWf-BN0gcjZB.mjs} +3 -3
- package/dist/sql-utils-Bnw3JbWf-BN0gcjZB.mjs.map +1 -0
- package/dist/{sql-utils-B7LfCQCB.d.mts → sql-utils-CnnGiZBc.d.mts} +3 -3
- package/dist/sql-utils-CnnGiZBc.d.mts.map +1 -0
- package/dist/{table-source-ikHOZmhD-DriY1Lcr.d.mts → table-source-ikHOZmhD-vYcblBYv.d.mts} +2 -2
- package/dist/table-source-ikHOZmhD-vYcblBYv.d.mts.map +1 -0
- package/dist/target.d.mts +60 -60
- package/dist/target.mjs +44 -44
- 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-ids.d.mts +2 -2
- package/dist/target__codec-ids.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 +2 -2
- package/dist/target__contract-free.d.mts +2 -2
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.d.mts +3 -3
- package/dist/target__control.mjs +46 -46
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-transform.d.mts +2 -2
- package/dist/target__data-transform.mjs +1 -1
- package/dist/target__data-types.d.mts +1 -1
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__ddl.d.mts +3 -3
- package/dist/target__ddl.mjs +1 -1
- package/dist/target__default-normalizer.d.mts +1 -1
- 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__errors.mjs +1 -1
- package/dist/target__full-text-index-authoring.d.mts +2 -2
- package/dist/target__full-text-index-authoring.mjs +2 -2
- package/dist/target__full-text.d.mts +3 -3
- package/dist/target__full-text.mjs +2 -2
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__marker-lock.d.mts +1 -1
- package/dist/target__marker-lock.mjs +1 -1
- package/dist/target__migration.d.mts +3 -3
- package/dist/target__migration.mjs +4 -4
- package/dist/target__native-type-normalizer.d.mts +1 -1
- 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 +3 -3
- package/dist/target__pack.d.mts +2 -2
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.d.mts +1 -1
- 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-schema-lookup.d.mts +1 -1
- package/dist/target__planner-schema-lookup.mjs +1 -1
- package/dist/target__planner-sql-checks.d.mts +2 -2
- package/dist/target__planner-sql-checks.mjs +1 -1
- package/dist/target__planner-target-details.d.mts +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.d.mts +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__render-typescript.d.mts +1 -1
- package/dist/target__render-typescript.mjs +1 -1
- package/dist/target__rls-canonicalize.d.mts +1 -1
- package/dist/target__rls-canonicalize.mjs +1 -1
- package/dist/target__runtime.d.mts +5 -5
- package/dist/target__runtime.mjs +10 -10
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.d.mts +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.d.mts +2 -2
- package/dist/target__sql-utils.mjs +3 -3
- package/dist/target__types.d.mts +7 -7
- package/dist/target__types.mjs +5 -5
- package/dist/types-AvjnIUna.d.mts +2 -0
- package/dist/{types-D6lgKhE5-Fxmh_bQa.d.mts → types-D6lgKhE5-D1J9YJnd.d.mts} +5 -5
- package/dist/types-D6lgKhE5-D1J9YJnd.d.mts.map +1 -0
- package/dist/{types-BP1e5MBV.d.mts → types-DOmgp_12.d.mts} +8 -8
- package/dist/types-DOmgp_12.d.mts.map +1 -0
- package/dist/{types-ue6jkJyF-BQJzjx1P.d.mts → types-ue6jkJyF-D79DmBTl.d.mts} +2 -2
- package/dist/types-ue6jkJyF-D79DmBTl.d.mts.map +1 -0
- package/package.json +9 -9
- package/dist/adapter-CVkrJLWQ.d.mts.map +0 -1
- package/dist/adapter-svGTIjA2-CtHa7kMs.mjs.map +0 -1
- package/dist/aggregates-BjiTuckw.d.mts.map +0 -1
- package/dist/aggregates-C7KEByGU.mjs.map +0 -1
- package/dist/authoring-DWd5pnnV-g81c_ETF.d.mts.map +0 -1
- package/dist/authoring-SbdvmVJh-CgZp23qA.mjs.map +0 -1
- package/dist/autoincrement-widths-DonNJgfS-A-hWa3rO.mjs.map +0 -1
- package/dist/canonicalize-B-xvDOdd-Cnht2N4h.d.mts.map +0 -1
- package/dist/canonicalize-RdxoUHao-DK_M6HU-.mjs.map +0 -1
- package/dist/check-expressions-7uCCP01t-WtUqfqkP.mjs.map +0 -1
- package/dist/check-expressions-CtTzM58x-CsWFEeul.d.mts.map +0 -1
- package/dist/codec-descriptor-CzyUKm6m.d.mts +0 -1
- package/dist/codec-descriptor-DoR-cTFZ-DKTk9Oxm.mjs.map +0 -1
- package/dist/codec-descriptor-d1ByNBEk-ClDTxfu9.d.mts.map +0 -1
- package/dist/codec-ids-BMhEpFwv-BLIC4g3Y.mjs.map +0 -1
- package/dist/codec-ids-C2HurNhZ.d.mts +0 -1
- package/dist/codec-ids-C6II64Wy-CCU5G6CU.d.mts.map +0 -1
- package/dist/codec-registry-D7XslgPe-Gg6TMpPg.mjs.map +0 -1
- package/dist/codec-type-map-Fj5xCgwT-DwIK_DR3.d.mts.map +0 -1
- package/dist/codec-types-CVyCyOV-.d.mts +0 -2
- package/dist/codec-types-Ct_4iTVc-4VoGpl4J.d.mts.map +0 -1
- package/dist/codecs-CADK7dCR-Cku8S_Im.d.mts.map +0 -1
- package/dist/codecs-CRl9-i_r-CTWJYxL0.mjs.map +0 -1
- package/dist/codecs-DEMQ3cMm.d.mts.map +0 -1
- package/dist/column-types-CI9_dRcU.mjs.map +0 -1
- package/dist/column-types-KP17SDia.d.mts.map +0 -1
- package/dist/contract-contributions-Xz2FpyfI-CZW0_mEj.mjs.map +0 -1
- package/dist/contract-free-2xXXmS01.mjs.map +0 -1
- package/dist/contract-free-DCPNGs2e.d.mts.map +0 -1
- package/dist/control-BaUpALVp.d.mts.map +0 -1
- package/dist/control-C4-UbYOH.mjs.map +0 -1
- package/dist/control-Cu-SPW3N.d.mts.map +0 -1
- package/dist/control-Dqf8WaSU.d.mts.map +0 -1
- package/dist/control-policy-DzFOPk9n-BmAgBCQb.mjs.map +0 -1
- package/dist/data-transform-C-3UJ3hC.d.mts +0 -1
- package/dist/data-transform-h9agBu_c-B5dsDs8G.mjs.map +0 -1
- package/dist/data-transform-nGy9rz87-CEOXAj91.d.mts.map +0 -1
- package/dist/data-type-entries-gQW3-KSb-uOS_mZiH.mjs.map +0 -1
- package/dist/data-types-BbFUwMKs.d.mts.map +0 -1
- package/dist/data-types-Chx0mjTP-Dy6isAwB.mjs.map +0 -1
- package/dist/date-time-now-generators-CMkXVbMG-CYwplAuf.d.mts.map +0 -1
- package/dist/ddl-B7Rqlz6D-BcwCMSB7.mjs.map +0 -1
- package/dist/ddl-DC1--N63.d.mts +0 -1
- package/dist/default-constraint-names-CtcRXhV8-nz3ff6b8.mjs.map +0 -1
- package/dist/default-normalizer-BqK6XxdC-BAgxt9FF.mjs.map +0 -1
- package/dist/default-normalizer-P-u2VRBf.d.mts.map +0 -1
- package/dist/descriptor-meta-BkD3nXF_-NNc0jaU9.mjs.map +0 -1
- package/dist/descriptor-meta-DBH6aAIM-Cm1rNZaF.mjs.map +0 -1
- package/dist/descriptor-meta-runtime-Dft1L7eE-CUaKX_mx.mjs.map +0 -1
- package/dist/diff-database-schema-B1NfYBTr-DPdFDCpE.mjs.map +0 -1
- package/dist/diff-database-schema-DPZdkysF.d.mts.map +0 -1
- package/dist/errors-BP-2V2_C.d.mts.map +0 -1
- package/dist/errors-BrhQYgdL-D_lIrddD.mjs.map +0 -1
- package/dist/full-text-8PmilGkW.mjs.map +0 -1
- package/dist/full-text-collection-method-BFd2u2cs-DcN_Vf7f.d.mts.map +0 -1
- package/dist/full-text-index-authoring-Ca6bWXyG.d.mts.map +0 -1
- package/dist/full-text-index-definition-BPxQQBuC-BrpDsuJu.mjs.map +0 -1
- package/dist/full-text-index-definition-D5iBWLss-FifKlctQ.d.mts.map +0 -1
- package/dist/full-text-parsers-CFFxiOrp-BmiwdZ21.mjs.map +0 -1
- package/dist/full-text-r2wMygYZ.d.mts.map +0 -1
- package/dist/full-text-search-document-Doy5TF7c-DezgYsP-.mjs.map +0 -1
- package/dist/index-types-BihjrAAq-ktkeKE97.mjs.map +0 -1
- package/dist/indexes-BYf6nXVv-DznOOzlT.d.mts.map +0 -1
- package/dist/infer-psl-contract-BSSHcuRi-DryV3wqN.mjs.map +0 -1
- package/dist/issue-planner--zt__-Kk.d.mts.map +0 -1
- package/dist/list-decoder-BcrLExnx-hTa7qY7a.d.mts.map +0 -1
- package/dist/marker-lock-BGBqXaQ4.d.mts.map +0 -1
- package/dist/marker-lock-DFc1Tfv5-QMJSzMIa.mjs.map +0 -1
- package/dist/migration-7VvUEoYO.d.mts.map +0 -1
- package/dist/migration-CbOh59ZJ.mjs.map +0 -1
- package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs.map +0 -1
- package/dist/native-type-normalizer-B7ZQZOCb.mjs.map +0 -1
- package/dist/native-type-normalizer-DFE5L3YY.d.mts.map +0 -1
- package/dist/nodes-G8VTh4PM-D5t0nLdZ.mjs.map +0 -1
- package/dist/nodes-s0Oe37jT-DY3kMSce.d.mts.map +0 -1
- package/dist/op-factory-call-C2r4PNO_.d.mts +0 -1
- package/dist/op-factory-call-ClvHxHDs-CeVV_tro.mjs.map +0 -1
- package/dist/op-factory-call-nLHvNx0O-CGQ3bNN5.d.mts.map +0 -1
- package/dist/operation-types--Wa_cv45-jn5HQ8yt.d.mts.map +0 -1
- package/dist/operation-types-BcOviE0b.d.mts +0 -1
- package/dist/pack-BLeBhGWE.d.mts.map +0 -1
- package/dist/planner-CNG8pGm7.d.mts.map +0 -1
- package/dist/planner-CvVTpZSI-Dkpd9l81.mjs.map +0 -1
- package/dist/planner-ddl-builders-BvK8Reg3.d.mts.map +0 -1
- package/dist/planner-ddl-builders-cYnH52gC-DaVKo24n.mjs.map +0 -1
- package/dist/planner-identity-values-QstrMJ2U-Cb8Fdh_W.mjs.map +0 -1
- package/dist/planner-identity-values-lke8kYOC.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-CGnbXiL_-Clhk4Jqj.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-DEfRhvVl.d.mts +0 -1
- package/dist/planner-produced-postgres-migration-DyIXJ3MR-CvH0IEvz.d.mts.map +0 -1
- package/dist/planner-schema-lookup-C4DHAddq.d.mts.map +0 -1
- package/dist/planner-schema-lookup-CdgWer9s.mjs.map +0 -1
- package/dist/planner-sql-checks-D-K44J19-BgZ15ipJ.mjs.map +0 -1
- package/dist/planner-sql-checks-Ed-WGtge-Clnvg-zp.d.mts.map +0 -1
- package/dist/planner-sql-checks-K_EFdkCw.d.mts +0 -1
- package/dist/planner-target-details-CUEF0s90-COTks5yz.mjs.map +0 -1
- package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts.map +0 -1
- package/dist/postgres-codec-traits-CnP5Bjxp-C8JED4J1.mjs.map +0 -1
- package/dist/postgres-contract-view-BFzIDwwN-pJ6gJGOT.d.mts.map +0 -1
- package/dist/postgres-contract-view-BO2elRMz-K6dYYr20.mjs.map +0 -1
- package/dist/postgres-database-schema-node-Cv8usVNX-BP4GzjSf.d.mts.map +0 -1
- package/dist/postgres-migration-C5deJ3Ne-BBt4uBYb.d.mts.map +0 -1
- package/dist/postgres-migration-gIPIgR1z-CvKPHina.mjs.map +0 -1
- package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs.map +0 -1
- package/dist/postgres-object-name-FPikIvOw-BNs44hTu.mjs.map +0 -1
- package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts.map +0 -1
- package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs.map +0 -1
- package/dist/postgres-schema-C6w1rzOF-bzaF5PIS.mjs.map +0 -1
- package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts.map +0 -1
- package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs.map +0 -1
- package/dist/prisma7-binding-TQ2GIDxX.mjs.map +0 -1
- package/dist/prisma7-binding-kYc2Xcxt.d.mts.map +0 -1
- package/dist/render-ops-DKPk74iS-Cfil02bJ.mjs.map +0 -1
- package/dist/render-ops-DPwhZt2W.d.mts.map +0 -1
- package/dist/render-typescript-6sCFvMBh.d.mts.map +0 -1
- package/dist/render-typescript-Dqp1Spgn-B128r1qw.mjs.map +0 -1
- package/dist/resolve-ddl-schema-D3VNPMSm-DVuswLch.mjs.map +0 -1
- package/dist/runtime-BDq9yVrM.d.mts.map +0 -1
- package/dist/runtime-CQckFo7G.d.mts.map +0 -1
- package/dist/runtime-DugW4mig.mjs.map +0 -1
- package/dist/runtime-XXYjt_3Q.d.mts.map +0 -1
- package/dist/schema-ir-annotations-DuuYh0gl.d.mts.map +0 -1
- package/dist/schema-node-kinds-C52Bb1ve-OVH80Tx2.d.mts.map +0 -1
- package/dist/server-text-types-DeNPQpv5-DPxA9uXV.mjs.map +0 -1
- package/dist/sql-renderer-BdWJPa5F-Q6M1dydc.mjs.map +0 -1
- package/dist/sql-renderer-CGc-Ln4u.d.mts.map +0 -1
- package/dist/sql-utils-B7LfCQCB.d.mts.map +0 -1
- package/dist/sql-utils-Bnw3JbWf-zvWDkyrr.mjs.map +0 -1
- package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts.map +0 -1
- package/dist/types-BP1e5MBV.d.mts.map +0 -1
- package/dist/types-D6lgKhE5-Fxmh_bQa.d.mts.map +0 -1
- package/dist/types-DwVVpdFJ.d.mts +0 -2
- package/dist/types-ue6jkJyF-BQJzjx1P.d.mts.map +0 -1
package/dist/{postgres-schema-C6w1rzOF-bzaF5PIS.mjs → postgres-schema-C6w1rzOF-D1fdwqRx.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as PG_TEXT_CODEC_ID } from "./codec-ids-BMhEpFwv-
|
|
2
|
-
import { i as quoteIdentifier, n as escapeLiteral } from "./sql-utils-Bnw3JbWf-
|
|
3
|
-
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-
|
|
4
|
-
import { a as assertFullTextIndexes } from "./full-text-index-definition-BPxQQBuC-
|
|
1
|
+
import { S as PG_TEXT_CODEC_ID } from "./codec-ids-BMhEpFwv-B8Zh0s_Q.mjs";
|
|
2
|
+
import { i as quoteIdentifier, n as escapeLiteral } from "./sql-utils-Bnw3JbWf-BN0gcjZB.mjs";
|
|
3
|
+
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
|
|
4
|
+
import { a as assertFullTextIndexes } from "./full-text-index-definition-BPxQQBuC-VLyQ1kEL.mjs";
|
|
5
5
|
import { TableSource } from "@prisma/orm-family-sql/relational-core/ast";
|
|
6
6
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
7
7
|
import { type } from "arktype";
|
|
@@ -12,7 +12,7 @@ import { nameOf, parseNaming } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
|
12
12
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
13
13
|
import { composeSqlEntityKinds } from "@prisma/orm-family-sql/contract/entity-kinds";
|
|
14
14
|
import { cfExpr } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
15
|
-
//#region ../../../3-targets/
|
|
15
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-schema-C6w1rzOF.mjs
|
|
16
16
|
/**
|
|
17
17
|
* Postgres contract-IR marker for `@@rls` on a model: the table named here is
|
|
18
18
|
* RLS-controlled (`ENABLE ROW LEVEL SECURITY` is driven by this marker, never
|
|
@@ -420,4 +420,4 @@ function postgresCreateNamespace(input) {
|
|
|
420
420
|
//#endregion
|
|
421
421
|
export { roleEntityKind as _, PostgresRlsPolicySchema as a, PostgresSchema as c, isPostgresSchema as d, nativeEnumEntityKind as f, rlsEnablementEntityKind as g, postgresCreateNamespace as h, PostgresRlsPolicy as i, PostgresTableSource as l, policyInputFromSerialized as m, PostgresRlsEnablement as n, PostgresRole as o, policyEntityKind as p, PostgresRlsEnablementSchema as r, PostgresRoleSchema as s, PostgresNativeEnumSchema as t, PostgresUnboundSchema as u };
|
|
422
422
|
|
|
423
|
-
//# sourceMappingURL=postgres-schema-C6w1rzOF-
|
|
423
|
+
//# sourceMappingURL=postgres-schema-C6w1rzOF-D1fdwqRx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-schema-C6w1rzOF-D1fdwqRx.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-schema-C6w1rzOF.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID } from \"./codec-ids-BMhEpFwv.mjs\";\nimport { i as quoteIdentifier, n as escapeLiteral } from \"./sql-utils-Bnw3JbWf.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { n as assertFullTextIndexes } from \"./full-text-index-definition-BPxQQBuC.mjs\";\nimport { TableSource } from \"@internal/sql-relational-core/ast\";\nimport { type } from \"arktype\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { SqlNamespaceBase, SqlNode } from \"@internal/sql-contract/types\";\nimport { nameOf, parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { invariant } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { composeSqlEntityKinds } from \"@internal/sql-contract/entity-kinds\";\nimport { cfExpr } from \"@internal/sql-relational-core/contract-free\";\n//#region src/core/postgres-rls-enablement.ts\n/**\n* Postgres contract-IR marker for `@@rls` on a model: the table named here is\n* RLS-controlled (`ENABLE ROW LEVEL SECURITY` is driven by this marker, never\n* by the policy set).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an\n* entity kind, extends `SqlNode`, and is stored in `contract.json` under\n* `entries.rls[tableName]`. Target-only concept — no SQL-family abstract.\n* Frozen at construction via `freezeNode(this)`. The `kind: 'rls'`\n* discriminant is enumerable so it survives JSON serialization; the literal\n* matches the entries key (one-string rule).\n*/\nvar PostgresRlsEnablement = class extends SqlNode {\n\tkind = \"rls\";\n\ttableName;\n\tnamespaceId;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.tableName = input.tableName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-rls-policy.ts\n/**\n* Postgres contract-IR class for a row-level security policy (`CREATE POLICY … ON …`).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an entity\n* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;\n* the schema-diff tree uses `PostgresPolicySchemaNode` for that role.\n*\n* Target-only concept — no SQL-family abstract. Extends `SqlNode` directly.\n* Frozen at construction via `freezeNode(this)`. The `kind: 'policy'`\n* discriminant is enumerable (overrides SqlNode's non-enumerable `'sql'`) so it\n* survives JSON serialization and enables dispatch. The literal matches the\n* entries key (one-string rule: node.kind === entries key === entity kind).\n*/\nvar PostgresRlsPolicy = class extends SqlNode {\n\tkind = \"policy\";\n\tname;\n\ttableName;\n\tnamespaceId;\n\toperation;\n\troles;\n\tpermissive;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = nameOf(input.naming);\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.tableName = input.tableName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.operation = input.operation;\n\t\tthis.roles = Object.freeze([...input.roles]);\n\t\tif (input.using !== void 0) this.using = input.using;\n\t\tif (input.withCheck !== void 0) this.withCheck = input.withCheck;\n\t\tthis.permissive = input.permissive;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-role.ts\n/**\n* Roles are referenced by the contract but never owned — the framework\n* issues no `CREATE`/`DROP ROLE`, so a role's effective governance is always\n* `external`: a missing declared role fails verify, an extra live role is\n* tolerated, and the planner emits zero role DDL. `external` is the only\n* value a role's control can ever carry.\n*/\nconst ROLE_DEFAULT_CONTROL_POLICY = \"external\";\n/**\n* Postgres contract-IR class for a database role (`CREATE ROLE …`).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an entity\n* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;\n* the schema-diff tree uses `PostgresRoleSchemaNode` for that role.\n*\n* Roles are cluster-scoped, so their namespace coordinate is always\n* `UNBOUND_NAMESPACE_ID`. Target-only concept — no SQL-family abstract.\n* Extends `SqlNode` directly, frozen at construction via `freezeNode(this)`.\n* The `kind: 'role'` discriminant is enumerable so it survives JSON.\n* Matches the entries key (one-string rule).\n*\n* `control` always carries a value (never omitted): it defaults to\n* {@link ROLE_DEFAULT_CONTROL_POLICY} in the constructor, so both a\n* freshly-authored role and one hydrated from an older `contract.json`\n* lacking the field resolve the same way — the control-policy resolver\n* reads it directly off the entity instead of special-casing role issues.\n*/\nvar PostgresRole = class extends SqlNode {\n\tkind = \"role\";\n\tname;\n\tnamespaceId;\n\tcontrol;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.control = input.control ?? \"external\";\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\n//#region src/core/postgres-validators.ts\nconst PostgresRoleSchema = type({\n\tkind: \"'role'\",\n\tname: \"string\",\n\tnamespaceId: \"string\",\n\t\"control?\": \"'external'\"\n});\nconst PostgresRlsPolicySchema = type({\n\tkind: \"'policy'\",\n\tname: \"string\",\n\t\"prefix?\": \"string\",\n\ttableName: \"string\",\n\tnamespaceId: \"string\",\n\toperation: \"'select' | 'insert' | 'update' | 'delete' | 'all'\",\n\troles: type.string.array().readonly(),\n\t\"using?\": \"string\",\n\t\"withCheck?\": \"string\",\n\tpermissive: \"boolean\"\n});\nconst PostgresRlsEnablementSchema = type({\n\tkind: \"'rls'\",\n\ttableName: \"string\",\n\tnamespaceId: \"string\"\n});\nconst PostgresNativeEnumSchema = type({\n\tkind: \"'postgres-enum'\",\n\ttypeName: \"string\",\n\tmembers: type.string.array().readonly(),\n\t\"control?\": \"'managed' | 'tolerated' | 'external' | 'observed'\"\n});\n//#endregion\n//#region src/core/ast/table-source.ts\nvar PostgresTableSource = class extends TableSource {\n\tschema;\n\tconstructor(options) {\n\t\tsuper(options.name, options.alias);\n\t\tthis.schema = options.schema;\n\t\tthis.freeze();\n\t}\n\trewrite(rewriter) {\n\t\treturn rewriter.tableSource ? rewriter.tableSource(this) : this;\n\t}\n};\n//#endregion\n//#region src/core/serialized-rls-policy.ts\n/**\n* Hydrates one stored policy into constructor input. The name and the prefix\n* are separate fields in the file and can disagree there, so the pair is\n* checked on the way in.\n*/\nfunction policyInputFromSerialized(flat) {\n\treturn {\n\t\tnaming: parseNaming(flat.name, flat.prefix),\n\t\ttableName: flat.tableName,\n\t\tnamespaceId: flat.namespaceId,\n\t\toperation: flat.operation,\n\t\troles: flat.roles,\n\t\tusing: flat.using,\n\t\twithCheck: flat.withCheck,\n\t\tpermissive: flat.permissive\n\t};\n}\n//#endregion\n//#region src/core/entity-kinds.ts\nconst policyEntityKind = {\n\tkind: \"policy\",\n\tschema: PostgresRlsPolicySchema,\n\tconstruct: (input) => new PostgresRlsPolicy(policyInputFromSerialized(input))\n};\nconst roleEntityKind = {\n\tkind: \"role\",\n\tschema: PostgresRoleSchema,\n\tconstruct: (input) => new PostgresRole(input)\n};\nconst rlsEnablementEntityKind = {\n\tkind: \"rls\",\n\tschema: PostgresRlsEnablementSchema,\n\tconstruct: (input) => new PostgresRlsEnablement(input)\n};\nconst nativeEnumEntityKind = {\n\tkind: \"native_enum\",\n\tschema: PostgresNativeEnumSchema,\n\tconstruct: (input) => new PostgresNativeEnum(input)\n};\n//#endregion\n//#region src/core/postgres-schema.ts\n/**\n* Postgres target `Namespace` concretion — a Postgres schema (`CREATE\n* SCHEMA …`). Each Postgres `SqlStorage` carries a\n* `namespaces: Record<NamespaceId, PostgresSchema>` map populated by\n* the Postgres PSL interpreter from `namespace { … }` AST buckets.\n*\n* `entries` holds entity-kind maps (`table`, `valueSet`). Qualifier\n* emission is the rendering seam: DDL / SQL emission asks the namespace\n* for its qualifier (`\"<schema>\"`) or for a qualified table name\n* (`\"<schema>\".\"<table>\"`) and consumes the result polymorphically.\n* The unbound singleton below overrides these methods to elide the\n* prefix entirely — call sites stay polymorphic and never branch on\n* `id === UNBOUND_NAMESPACE_ID`.\n*/\nvar PostgresSchema = class extends SqlNamespaceBase {\n\t/**\n\t* Stable singleton reference for the late-bound slot. Materialised\n\t* lazily below the singleton subclass declaration so the static\n\t* initialiser sees the subclass before assigning. Consumers always\n\t* reach for `PostgresSchema.unbound` (or `PostgresUnboundSchema.instance`\n\t* — same identity).\n\t*/\n\tstatic unbound;\n\tid;\n\tentries;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst dispatched = hydrateNamespaceEntities(input.entries, composeSqlEntityKinds([\n\t\t\tpolicyEntityKind,\n\t\t\troleEntityKind,\n\t\t\trlsEnablementEntityKind,\n\t\t\tnativeEnumEntityKind\n\t\t]), \"carry\");\n\t\tconst nativeEnumSlot = dispatched[\"native_enum\"];\n\t\tif (nativeEnumSlot !== void 0) {\n\t\t\tconst rekeyed = {};\n\t\t\tfor (const [handle, entity] of Object.entries(nativeEnumSlot)) {\n\t\t\t\tconst physicalName = PostgresNativeEnum.is(entity) ? entity.typeName : handle;\n\t\t\t\tinvariant(!Object.hasOwn(rekeyed, physicalName), `PostgresSchema \"${input.id}\": two native_enum entities resolve to the same physical type name \"${physicalName}\". Give them distinct @@map type names.`);\n\t\t\t\trekeyed[physicalName] = entity;\n\t\t\t}\n\t\t\tdispatched[\"native_enum\"] = Object.freeze(rekeyed);\n\t\t}\n\t\tconst valueSetRaw = dispatched[\"valueSet\"];\n\t\tconst entriesInput = { ...valueSetRaw !== void 0 && Object.keys(valueSetRaw).length === 0 ? {\n\t\t\t...dispatched,\n\t\t\tvalueSet: void 0\n\t\t} : dispatched };\n\t\tthis.entries = Object.freeze(blindCast(entriesInput));\n\t\tfor (const table of Object.values(this.entries.table ?? {})) assertFullTextIndexes(table);\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: \"schema\",\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget table() {\n\t\treturn this.entries.table ?? Object.freeze({});\n\t}\n\tget valueSet() {\n\t\treturn this.entries.valueSet;\n\t}\n\tget policy() {\n\t\treturn this.entries.policy ?? Object.freeze({});\n\t}\n\tget role() {\n\t\treturn this.entries.role ?? Object.freeze({});\n\t}\n\tget rls() {\n\t\treturn this.entries.rls ?? Object.freeze({});\n\t}\n\t/**\n\t* The bare schema qualifier as it would appear in a rendered SQL\n\t* fragment (already quoted). The unbound-schema singleton overrides\n\t* this to return `''`.\n\t*/\n\tqualifier() {\n\t\treturn quoteIdentifier(this.id);\n\t}\n\t/**\n\t* Qualify a table name with the schema prefix\n\t* (`\"<schema>\".\"<table>\"`). The unbound-schema singleton overrides\n\t* this to emit just `\"<table>\"` so the resolved DDL is unqualified\n\t* and `search_path` decides where the object lands at runtime.\n\t*/\n\tqualifyTable(tableName) {\n\t\treturn `${quoteIdentifier(this.id)}.${quoteIdentifier(tableName)}`;\n\t}\n\t/**\n\t* Render a SQL string-literal containing the qualified-name form\n\t* suitable for `to_regclass(...)` arguments (e.g. `'\"public\".\"user\"'`).\n\t* The unbound singleton overrides this to elide the schema prefix\n\t* (`'\"user\"'`) so `search_path` resolves the object at runtime.\n\t*/\n\tregclassLiteral(name) {\n\t\treturn `'${escapeLiteral(this.qualifyTable(name))}'`;\n\t}\n\t/**\n\t* Render a SQL expression that evaluates to this namespace's schema\n\t* name at runtime, ready to drop into a `WHERE table_schema = …` /\n\t* `WHERE n.nspname = …` clause. Named schemas emit a quoted SQL\n\t* literal (`'public'`); the unbound singleton overrides this to emit\n\t* `current_schema()` so catalog queries match whichever schema the\n\t* connection's `search_path` resolved at runtime.\n\t*/\n\tschemaSqlExpression() {\n\t\treturn `'${escapeLiteral(this.id)}'`;\n\t}\n\t/**\n\t* Typed-AST counterpart of {@link schemaSqlExpression}: the expression a\n\t* builder-built catalog check compares `n.nspname` / `table_schema`\n\t* against. Named schemas bind the schema name as a text parameter; the\n\t* unbound singleton overrides this to the opaque `current_schema()`\n\t* expression so the live connection's `search_path` decides at runtime.\n\t*/\n\tschemaFilterExpression() {\n\t\treturn cfExpr.param(this.id, PG_TEXT_CODEC_ID);\n\t}\n\t/**\n\t* Typed-AST counterpart of {@link qualifyTable}: the FROM source a\n\t* builder-built check uses to address a user table in this namespace.\n\t* Named schemas qualify (`\"schema\".\"table\"`); the unbound singleton\n\t* overrides this to leave the table unqualified so `search_path`\n\t* resolves it at runtime.\n\t*/\n\ttableSource(tableName, alias) {\n\t\treturn new PostgresTableSource({\n\t\t\tname: tableName,\n\t\t\tschema: this.id,\n\t\t\t...ifDefined(\"alias\", alias)\n\t\t});\n\t}\n\t/**\n\t* The bare schema name a DDL planner should target when emitting\n\t* statements that need to identify this namespace in the live\n\t* database (e.g. `CREATE TABLE \"<ddlSchemaName>\".\"<table>\" …`,\n\t* catalog filters, planner conflict lookups). Named schemas resolve\n\t* to their own id. The `PostgresUnboundSchema` singleton inherits\n\t* this and returns `UNBOUND_NAMESPACE_ID` — callers that dispatch\n\t* through `qualifyTableName` route through the polymorphic\n\t* `PostgresUnboundSchema` overrides and produce unqualified\n\t* (search-path-resolved) output automatically.\n\t*/\n\tddlSchemaName(_storage) {\n\t\treturn this.id;\n\t}\n};\n/**\n* Singleton subclass for the reserved sentinel namespace id\n* (`UNBOUND_NAMESPACE_ID`) — the late-bound Postgres slot whose binding\n* the connection's `search_path` resolves at runtime. Overrides\n* qualifier emission to elide the schema prefix; call sites that consume\n* `qualifier()` / `qualifyTable()` get unqualified output without\n* branching on the namespace id.\n*\n* This is the target-side materialization of \"the framework provides\n* affordances; targets implement specifics\": the framework names the\n* sentinel; Postgres decides what late-bound means here (the table\n* name, naked — the schema is supplied by the live connection's\n* `search_path`).\n*\n* `ddlSchemaName` is inherited from `PostgresSchema` and returns\n* `UNBOUND_NAMESPACE_ID`. Downstream helpers such as `qualifyTableName`\n* route through the polymorphic factory and produce unqualified output\n* automatically.\n*/\nvar PostgresUnboundSchema = class PostgresUnboundSchema extends PostgresSchema {\n\tstatic instance = new PostgresUnboundSchema();\n\tconstructor(input) {\n\t\tsuper(input ?? {\n\t\t\tid: UNBOUND_NAMESPACE_ID,\n\t\t\tentries: { table: {} }\n\t\t});\n\t}\n\tqualifier() {\n\t\treturn \"\";\n\t}\n\tqualifyTable(tableName) {\n\t\treturn quoteIdentifier(tableName);\n\t}\n\tschemaSqlExpression() {\n\t\treturn \"current_schema()\";\n\t}\n\tschemaFilterExpression() {\n\t\treturn cfExpr.raw(\"current_schema()\", {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t});\n\t}\n\ttableSource(tableName, alias) {\n\t\treturn new PostgresTableSource({\n\t\t\tname: tableName,\n\t\t\t...ifDefined(\"alias\", alias)\n\t\t});\n\t}\n};\nPostgresSchema.unbound = PostgresUnboundSchema.instance;\n/**\n* Narrow an arbitrary namespace (or `undefined`) to `PostgresSchema`\n* so callers can dispatch to the polymorphic emission methods without\n* branching at the call site. Uses the structural `kind` discriminator\n* (`'schema'`) rather than `instanceof` so the check survives realm /\n* bundle / hot-reload boundaries — matching the rest of the IR's\n* narrowing convention. `PostgresUnboundSchema` passes through because\n* it inherits the same `kind: 'schema'` from `PostgresSchema`.\n*/\nfunction isPostgresSchema(ns) {\n\treturn typeof ns === \"object\" && ns !== null && Reflect.get(ns, \"kind\") === \"schema\";\n}\n/**\n* Target-supplied `Namespace` factory the Postgres target plumbs\n* through `defineContract({ createNamespace })` and the SQL PSL\n* interpreter. Returns the unbound singleton for the framework\n* sentinel and a fresh `PostgresSchema` for any other coordinate.\n*\n* The factory has no per-call state — every named id deterministically\n* maps to a distinct schema instance — so callers can pass it through\n* by reference and trust the resulting `SqlStorage.namespaces` map to\n* be value-stable for a given input set. Native-enum column type names are\n* schema-qualified earlier, at column construction, via the target's\n* `authoring.qualifyColumnType` hook (`postgresQualifyColumnType`), so this\n* factory just materialises the namespace from already-qualified entries.\n*/\nfunction postgresCreateNamespace(input) {\n\tconst schemaInput = {\n\t\tid: input.id,\n\t\tentries: {\n\t\t\t...input.entries,\n\t\t\ttable: input.entries[\"table\"] ?? {}\n\t\t}\n\t};\n\tif (input.id === UNBOUND_NAMESPACE_ID) return new PostgresUnboundSchema(schemaInput);\n\treturn new PostgresSchema(schemaInput);\n}\n//#endregion\nexport { PostgresRlsPolicy as _, nativeEnumEntityKind as a, roleEntityKind as c, PostgresNativeEnumSchema as d, PostgresRlsEnablementSchema as f, ROLE_DEFAULT_CONTROL_POLICY as g, PostgresRole as h, postgresCreateNamespace as i, policyInputFromSerialized as l, PostgresRoleSchema as m, PostgresUnboundSchema as n, policyEntityKind as o, PostgresRlsPolicySchema as p, isPostgresSchema as r, rlsEnablementEntityKind as s, PostgresSchema as t, PostgresTableSource as u, PostgresRlsEnablement as v };\n\n//# sourceMappingURL=postgres-schema-C6w1rzOF.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAI,wBAAwB,cAAc,QAAQ;CACjD,OAAO;CACP;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,YAAY,MAAM;EACvB,KAAK,cAAc,MAAM;EACzB,WAAW,IAAI;CAChB;AACD;;;;;;;;;;;;;;AAgBA,IAAI,oBAAoB,cAAc,QAAQ;CAC7C,OAAO;CACP;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,OAAO,OAAO,MAAM,MAAM;EAC/B,IAA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,KAAK;EAC5B,CAAC;CACF;;;;;;;;;;;;CAYA,cAAc,UAAU;EACvB,OAAO,KAAK;CACb;AACD;;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,wBAAwB,MAAM,8BAA8B,eAAe;CAC9E,OAAO,WAAW,IAAI,sBAAsB;CAC5C,YAAY,OAAO;EAClB,MAAM,SAAS;GACd,IAAI;GACJ,SAAS,EAAE,OAAO,CAAC,EAAE;EACtB,CAAC;CACF;CACA,YAAY;EACX,OAAO;CACR;CACA,aAAa,WAAW;EACvB,OAAO,gBAAgB,SAAS;CACjC;CACA,sBAAsB;EACrB,OAAO;CACR;CACA,yBAAyB;EACxB,OAAO,OAAO,IAAI,oBAAoB;GACrC,SAAS;GACT,UAAU;EACX,CAAC;CACF;CACA,YAAY,WAAW,OAAO;EAC7B,OAAO,IAAI,oBAAoB;GAC9B,MAAM;GACN,GAAG,UAAU,SAAS,KAAK;EAC5B,CAAC;CACF;AACD;AACA,eAAe,UAAU,sBAAsB;;;;;;;;;;AAU/C,SAAS,iBAAiB,IAAI;CAC7B,OAAO,OAAO,OAAO,YAAY,OAAO,QAAQ,QAAQ,IAAI,IAAI,MAAM,MAAM;AAC7E;;;;;;;;;;;;;;;AAeA,SAAS,wBAAwB,OAAO;CACvC,MAAM,cAAc;EACnB,IAAI,MAAM;EACV,SAAS;GACR,GAAG,MAAM;GACT,OAAO,MAAM,QAAQ,YAAY,CAAC;EACnC;CACD;CACA,IAAI,MAAM,OAAO,sBAAsB,OAAO,IAAI,sBAAsB,WAAW;CACnF,OAAO,IAAI,eAAe,WAAW;AACtC"}
|
package/dist/{postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts → postgres-schema-Xsjt3RKO-bis-SVSB.d.mts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as PostgresRlsPolicy } from "./postgres-rls-policy-CnDxf3z9-
|
|
2
|
-
import { t as PostgresTableSource } from "./table-source-ikHOZmhD-
|
|
1
|
+
import { t as PostgresRlsPolicy } from "./postgres-rls-policy-CnDxf3z9-BjpVyUnK.mjs";
|
|
2
|
+
import { t as PostgresTableSource } from "./table-source-ikHOZmhD-vYcblBYv.mjs";
|
|
3
3
|
import { SqlNamespaceBase, SqlNamespaceEntries, SqlNamespaceInput, SqlNode, SqlStorage, StorageTable, StorageValueSet } from "@prisma/orm-family-sql/contract/types";
|
|
4
4
|
import { CfExpr } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
5
5
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
6
|
-
//#region ../../../3-targets/
|
|
6
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-schema-Xsjt3RKO.d.mts
|
|
7
7
|
//#region src/core/postgres-native-enum.d.ts
|
|
8
8
|
interface PostgresNativeEnumInput<Members extends readonly string[] = readonly string[]> {
|
|
9
9
|
/** The Postgres type name (`CREATE TYPE <typeName> AS ENUM (…)`). */
|
|
@@ -266,4 +266,4 @@ declare function isPostgresSchema(ns: unknown): ns is PostgresSchema;
|
|
|
266
266
|
declare function postgresCreateNamespace(input: SqlNamespaceInput): PostgresSchema;
|
|
267
267
|
//#endregion
|
|
268
268
|
export { PostgresRlsEnablementInput as a, PostgresSchema as c, postgresCreateNamespace as d, PostgresRlsEnablement as i, PostgresUnboundSchema as l, PostgresNativeEnum as n, PostgresRole as o, PostgresNativeEnumInput as r, PostgresRoleInput as s, PostgresContract as t, isPostgresSchema as u };
|
|
269
|
-
//# sourceMappingURL=postgres-schema-Xsjt3RKO-
|
|
269
|
+
//# sourceMappingURL=postgres-schema-Xsjt3RKO-bis-SVSB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-schema-Xsjt3RKO-bis-SVSB.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-schema-Xsjt3RKO.d.mts"],"mappings":";;;;;;;UAMU,wBAAwB;;WAEvB;;WAEA,SAAS;WACT,UAAU;;;;;;;;;;;;;;;;;;;;;cAqBP,mBAAmB,+DAA+D;SACvF,GAAG,gBAAgB,QAAQ;WACzB;WACA;WACA,SAAS;WACT,UAAU;EACnB,YAAY,OAAO,wBAAwB;;;;UAInC;;WAEC;;WAEA;;;;;;;;;;;;;;cAcG,8BAA8B;WACjC;WACA;WACA;EACT,YAAY,OAAO;;;;UAIX;WACC;;;;;WAKA;;;;;WAKA;;;;;;;;;;;;;;;;;;;;;cAqBG,qBAAqB;WACxB;WACA;WACA;WACA;EACT,YAAY,OAAO;;;;KAIhB,mBAAmB,SAAS;WACtB;;KAEN,2BAA2B;WACrB,SAAS,SAAS,eAAe;WACjC,OAAO,SAAS,eAAe;WAC/B,MAAM,SAAS,eAAe;WAC9B,cAAc,SAAS,eAAe;;UAEvC;WACC;WACA,SAAS,SAAS,eAAe,SAAS;;;;;;;;;;;;;;;;cAgBvC,uBAAuB;;;;;;;;SAQ5B,SAAS;WACP;WACA;WACA,SAAS;EAClB,YAAY,OAAO;MACf,SAAS,SAAS,eAAe;MACjC,YAAY,SAAS,eAAe;MACpC,UAAU,SAAS,eAAe;MAClC,QAAQ,SAAS,eAAe;MAChC,OAAO,SAAS,eAAe;;;;;;EAMnC;;;;;;;EAOA,aAAa;;;;;;;EAOb,gBAAgB;;;;;;;;;EAShB;;;;;;;;EAQA,0BAA0B;;;;;;;;EAQ1B,YAAY,mBAAmB,iBAAiB;;;;;;;;;;;;EAYhD,cAAc,UAAU;;;;;;;;;;;;;;;;;;;;;cAqBZ,8BAA8B;kBAC1B,UAAU;EAC1B,YAAY,QAAQ;EACpB;EACA,aAAa;EACb;EACA,0BAA0B;EAC1B,YAAY,mBAAmB,iBAAiB;;;;;;;;;;;iBAWjC,iBAAiB,cAAc,MAAM;;;;;;;;;;;;;;;iBAerC,wBAAwB,OAAO,oBAAoB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
2
2
|
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
3
3
|
import { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIRNode, SqlUniqueIR, assertNode, relationalNodeEntityKind, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
|
|
4
|
-
//#region ../../../3-targets/
|
|
4
|
+
//#region ../../../3-targets/postgres/1-target/dist/postgres-table-schema-node-BBkitBQh.mjs
|
|
5
5
|
/**
|
|
6
6
|
* The `nodeKind` discriminant for each Postgres schema-diff node. Each node
|
|
7
7
|
* carries a unique value; the static `is`/`assert` guards compare against these
|
|
@@ -209,4 +209,4 @@ var PostgresTableSchemaNode = class PostgresTableSchemaNode extends SqlSchemaIRN
|
|
|
209
209
|
//#endregion
|
|
210
210
|
export { postgresDiffSubjectGranularity as a, postgresDiffSubjectEntityKind as i, PostgresSchemaNodeKind as n, postgresNodeEntityKind as o, PostgresTableSchemaNode as r, PostgresNativeEnumSchemaNode as t };
|
|
211
211
|
|
|
212
|
-
//# sourceMappingURL=postgres-table-schema-node-BBkitBQh-
|
|
212
|
+
//# sourceMappingURL=postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/postgres-table-schema-node-BBkitBQh.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIRNode, SqlUniqueIR, assertNode, relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\n//#region src/core/schema-ir/schema-node-kinds.ts\n/**\n* The `nodeKind` discriminant for each Postgres schema-diff node. Each node\n* carries a unique value; the static `is`/`assert` guards compare against these\n* identifiers rather than spelling the string inline or using `instanceof`. The\n* field is an enumerable own property carried on every node instance.\n*/\nconst PostgresSchemaNodeKind = {\n\tdatabase: \"postgres-database\",\n\tnamespace: \"postgres-namespace\",\n\ttable: \"postgres-table\",\n\tpolicy: \"postgres-policy\",\n\trole: \"postgres-role\",\n\tnativeEnum: \"postgres-native-enum\"\n};\n/**\n* The one real map from a Postgres-specific `nodeKind` to the\n* framework-neutral {@link DiffSubjectGranularity} its diff issues carry —\n* resolution is by `nodeKind` equality against this map, never a\n* `nodeKind`-suffix string match and never anything stamped on the node.\n*/\nconst POSTGRES_NODE_GRANULARITY = {\n\t[PostgresSchemaNodeKind.database]: \"structural\",\n\t[PostgresSchemaNodeKind.namespace]: \"namespace\",\n\t[PostgresSchemaNodeKind.table]: \"entity\",\n\t[PostgresSchemaNodeKind.policy]: \"structural\",\n\t[PostgresSchemaNodeKind.role]: \"structural\",\n\t[PostgresSchemaNodeKind.nativeEnum]: \"entity\"\n};\nfunction isPostgresSchemaNodeKind(nodeKind) {\n\treturn Object.hasOwn(POSTGRES_NODE_GRANULARITY, nodeKind);\n}\n/** Looks up the subject granularity for a Postgres-specific `nodeKind`. */\nfunction postgresNodeGranularity(nodeKind) {\n\treturn POSTGRES_NODE_GRANULARITY[nodeKind];\n}\n/**\n* The subject granularity for any node kind that appears in a Postgres diff\n* tree — the tree mixes Postgres-specific kinds (database/namespace/table/\n* policy/role) with the relational leaf kinds (columns, constraints, indexes,\n* …), so this dispatches to whichever family/target map owns the kind. Called\n* on demand by consumers (the family verdict, the framework aggregate's\n* unclaimed-elements sweep, via the {@link\n* import('@internal/framework-components/control').SchemaSubjectClassifierCapable}\n* capability) — never stamped onto the issue or the node.\n*/\nfunction postgresDiffSubjectGranularity(nodeKind) {\n\treturn isPostgresSchemaNodeKind(nodeKind) ? postgresNodeGranularity(nodeKind) : relationalNodeGranularity(nodeKind);\n}\n/**\n* The map from a Postgres-specific `nodeKind` to its storage `entityKind` — the\n* same vocabulary the contract storage's `entries` dictionary keys use. The\n* whole-table and native-enum kinds each have an entity of their own;\n* database/namespace/policy/role nodes map to nothing here (a namespace is\n* addressed by id, not by an `entries` kind; policies and roles are\n* structural, never a sibling space's unclaimed entity).\n*\n* The native enum keys under its PHYSICAL type name in `entries.native_enum`\n* (ADR 221), so its diff node's `typeName` addresses the entity on the generic\n* coordinate directly — no by-type-name walk needed. This lets the framework's\n* unclaimed-elements sweep classify enum ownership the same coordinate way it\n* classifies tables.\n*/\nconst POSTGRES_NODE_ENTITY_KIND = {\n\t[PostgresSchemaNodeKind.table]: \"table\",\n\t[PostgresSchemaNodeKind.nativeEnum]: \"native_enum\"\n};\n/** Looks up the storage entityKind for a Postgres-specific `nodeKind`. */\nfunction postgresNodeEntityKind(nodeKind) {\n\treturn POSTGRES_NODE_ENTITY_KIND[nodeKind];\n}\n/**\n* The storage `entityKind` for any node kind that appears in a Postgres diff\n* tree — sibling of {@link postgresDiffSubjectGranularity}, dispatching the\n* same way to whichever family/target map owns the kind. Called on demand by\n* the framework aggregate's unclaimed-elements sweep via the {@link\n* import('@internal/framework-components/control').SchemaSubjectClassifierCapable}\n* capability — never stamped onto the issue or the node.\n*/\nfunction postgresDiffSubjectEntityKind(nodeKind) {\n\treturn isPostgresSchemaNodeKind(nodeKind) ? postgresNodeEntityKind(nodeKind) : relationalNodeEntityKind(nodeKind);\n}\n//#endregion\n//#region src/core/schema-ir/postgres-native-enum-schema-node.ts\n/**\n* Schema-diff leaf node for a native Postgres enum type.\n*\n* This is a derived, transient node walked by the differ — it is NEVER\n* serialized. Both sides derive it on the namespace node: the expected side\n* from the contract's hydrated `entries.native_enum` entities, the actual\n* side from the adapter's introspected `nativeEnums`.\n*\n* Enum types are schema-scoped, so identity is (namespace, type name): the\n* namespace coordinate comes from tree position (the differ pairs enum nodes\n* only inside an already-paired namespace) and `id` carries the type name,\n* prefixed with the entries-kind vocabulary (`native_enum:<typeName>`) so it\n* cannot collide with a sibling table of the same name — the same\n* sibling-prefix convention relational column nodes use (`column:<name>`).\n*\n* `isEqualTo` compares members POSITIONALLY — `['a','b'] ≠ ['b','a']` —\n* because Postgres enum sort order is semantic. `control` is contract\n* metadata, not database state, and does not participate in equality.\n*/\nvar PostgresNativeEnumSchemaNode = class PostgresNativeEnumSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.nativeEnum;\n\ttypeName;\n\tnamespaceId;\n\tmembers;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.typeName = input.typeName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.members = Object.freeze([...input.members]);\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn `native_enum:${this.typeName}`;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresNativeEnumSchemaNode.assert(node);\n\t\treturn this.typeName === node.typeName && this.members.length === node.members.length && this.members.every((member, index) => member === node.members[index]);\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.nativeEnum;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresNativeEnumSchemaNode\", PostgresNativeEnumSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-table-schema-node.ts\n/**\n* Postgres-specific table schema-diff node. Carries all `SqlTableIR` fields\n* plus `policies`, and implements `DiffableNode` so the table instance is\n* directly the diff-tree node — no separate wrapper needed.\n*\n* Extends `SqlSchemaIRNode` directly rather than `SqlTableIR` because\n* `SqlTableIR` calls `freezeNode` in its own constructor, which prevents\n* subclass field initialisation.\n*\n* `id` is the table name. `isEqualTo` compares id + `rlsEnabled` — the\n* table's one own diffable attribute; all other structural drift is\n* expressed by its children. `children()` returns every column, the primary\n* key (when present), every foreign key, unique, index, and check constraint,\n* plus the policy nodes — one flat list, so a drifted column and a drifted\n* policy are both reported by the same walk. Order is deterministic (object\n* key order for columns, array order for the rest) so two structurally equal\n* tables always produce the same child list.\n*/\nvar PostgresTableSchemaNode = class PostgresTableSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.table;\n\tname;\n\tcolumns;\n\tforeignKeys;\n\tuniques;\n\tindexes;\n\tpolicies;\n\trlsEnabled;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.rlsEnabled = input.rlsEnabled;\n\t\tthis.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([key, col]) => [key, col instanceof SqlColumnIR ? col : new SqlColumnIR(col)])));\n\t\tthis.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk)));\n\t\tthis.uniques = Object.freeze(input.uniques.map((u) => u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u)));\n\t\tthis.indexes = Object.freeze(input.indexes.map((i) => i instanceof SqlIndexIR ? i : new SqlIndexIR(i)));\n\t\tif (input.primaryKey !== void 0) this.primaryKey = input.primaryKey instanceof PrimaryKey ? input.primaryKey : new PrimaryKey(input.primaryKey);\n\t\tif (input.annotations !== void 0) this.annotations = input.annotations;\n\t\tif (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map((c) => c instanceof SqlCheckConstraintIR ? c : new SqlCheckConstraintIR(c)));\n\t\tthis.policies = Object.freeze([...input.policies ?? []]);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\t/**\n\t* Equal iff the ids (names) match AND `rlsEnabled` matches — the table's\n\t* one own attribute in the diff; all other structural drift is expressed\n\t* by children. A paired `not-equal` therefore always means enablement\n\t* drift, which the planner maps to ENABLE/DISABLE ROW LEVEL SECURITY.\n\t*/\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresTableSchemaNode.assert(node);\n\t\treturn this.id === node.id && this.rlsEnabled === node.rlsEnabled;\n\t}\n\tchildren() {\n\t\treturn [\n\t\t\t...Object.values(this.columns),\n\t\t\t...this.primaryKey ? [this.primaryKey] : [],\n\t\t\t...this.foreignKeys,\n\t\t\t...this.uniques,\n\t\t\t...this.indexes,\n\t\t\t...this.checks ?? [],\n\t\t\t...this.policies\n\t\t];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.table;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresTableSchemaNode\", PostgresTableSchemaNode.is);\n\t}\n};\n//#endregion\nexport { postgresDiffSubjectGranularity as a, postgresDiffSubjectEntityKind as i, PostgresNativeEnumSchemaNode as n, postgresNodeEntityKind as o, PostgresSchemaNodeKind as r, PostgresTableSchemaNode as t };\n\n//# sourceMappingURL=postgres-table-schema-node-BBkitBQh.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,yBAAyB;CAC9B,UAAU;CACV,WAAW;CACX,OAAO;CACP,QAAQ;CACR,MAAM;CACN,YAAY;AACb;;;;;;;AAOA,MAAM,4BAA4B;EAChC,uBAAuB,WAAW;EAClC,uBAAuB,YAAY;EACnC,uBAAuB,QAAQ;EAC/B,uBAAuB,SAAS;EAChC,uBAAuB,OAAO;EAC9B,uBAAuB,aAAa;AACtC;AACA,SAAS,yBAAyB,UAAU;CAC3C,OAAO,OAAO,OAAO,2BAA2B,QAAQ;AACzD;;AAEA,SAAS,wBAAwB,UAAU;CAC1C,OAAO,0BAA0B;AAClC;;;;;;;;;;;AAWA,SAAS,+BAA+B,UAAU;CACjD,OAAO,yBAAyB,QAAQ,IAAI,wBAAwB,QAAQ,IAAI,0BAA0B,QAAQ;AACnH;;;;;;;;;;;;;;;AAeA,MAAM,4BAA4B;EAChC,uBAAuB,QAAQ;EAC/B,uBAAuB,aAAa;AACtC;;AAEA,SAAS,uBAAuB,UAAU;CACzC,OAAO,0BAA0B;AAClC;;;;;;;;;AASA,SAAS,8BAA8B,UAAU;CAChD,OAAO,yBAAyB,QAAQ,IAAI,uBAAuB,QAAQ,IAAI,yBAAyB,QAAQ;AACjH;;;;;;;;;;;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f3z9-
|
|
2
|
-
import { a as PostgresRlsEnablementInput, d as postgresCreateNamespace, i as PostgresRlsEnablement, n as PostgresNativeEnum, o as PostgresRole } from "./postgres-schema-Xsjt3RKO-
|
|
3
|
-
import { i as postgresRenderCheckExpressions } from "./check-expressions-CtTzM58x-
|
|
4
|
-
import { dt as postgresQualifyColumnType } from "./codecs-CADK7dCR-
|
|
5
|
-
import { c as FullTextSearchLanguage, i as FullTextFieldsInput } from "./full-text-index-definition-D5iBWLss-
|
|
6
|
-
import { r as CodecTypes, s as ParameterizedOutputTypesForTypeParams } from "./codec-types-Ct_4iTVc-
|
|
7
|
-
import { l as QueryOperationTypesForCodecs } from "./operation-types--Wa_cv45-
|
|
8
|
-
import { a as policyUsingOnlySpec, c as roleSpec, i as policyBothPredicatesSpec, n as RoleExtensionBlock, o as policyWithCheckOnlySpec, r as nativeEnumSpec, s as postgresLowerEntityHandles, t as RlsPolicyExtensionBlock } from "./authoring-DWd5pnnV-
|
|
1
|
+
import { t as PostgresRlsPolicy } from "./postgres-rls-policy-CnDxf3z9-BjpVyUnK.mjs";
|
|
2
|
+
import { a as PostgresRlsEnablementInput, d as postgresCreateNamespace, i as PostgresRlsEnablement, n as PostgresNativeEnum, o as PostgresRole } from "./postgres-schema-Xsjt3RKO-bis-SVSB.mjs";
|
|
3
|
+
import { i as postgresRenderCheckExpressions } from "./check-expressions-CtTzM58x-LloO-5Vf.mjs";
|
|
4
|
+
import { dt as postgresQualifyColumnType } from "./codecs-CADK7dCR-C8WToYQb.mjs";
|
|
5
|
+
import { c as FullTextSearchLanguage, i as FullTextFieldsInput } from "./full-text-index-definition-D5iBWLss-BEpqiucV.mjs";
|
|
6
|
+
import { r as CodecTypes, s as ParameterizedOutputTypesForTypeParams } from "./codec-types-Ct_4iTVc-3tFJcIBo.mjs";
|
|
7
|
+
import { l as QueryOperationTypesForCodecs } from "./operation-types--Wa_cv45-RoRnL1Dn.mjs";
|
|
8
|
+
import { a as policyUsingOnlySpec, c as roleSpec, i as policyBothPredicatesSpec, n as RoleExtensionBlock, o as policyWithCheckOnlySpec, r as nativeEnumSpec, s as postgresLowerEntityHandles, t as RlsPolicyExtensionBlock } from "./authoring-DWd5pnnV-BBX7P1wT.mjs";
|
|
9
9
|
import "@prisma/orm-family-sql/contract/data-type";
|
|
10
|
-
//#region ../../../3-targets/
|
|
10
|
+
//#region ../../../3-targets/postgres/1-target/dist/prisma7-binding.d.mts
|
|
11
11
|
//#region src/core/prisma7-type-map.d.ts
|
|
12
12
|
/** A Prisma 8 constructor call: its name and the values of its arguments. */
|
|
13
13
|
interface ConstructorCall {
|
|
@@ -15,7 +15,7 @@ interface ConstructorCall {
|
|
|
15
15
|
readonly args: readonly unknown[];
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
-
//#region src/core/
|
|
18
|
+
//#region src/core/default-constraint-names.d.ts
|
|
19
19
|
/** `{table}_pkey` cut as Postgres cuts the name of a primary key it names itself: `CREATE TABLE` writes an unnamed primary key. */
|
|
20
20
|
declare function defaultPrimaryKeyName(tableName: string): string;
|
|
21
21
|
/** `{table}_{columns}_fkey`, cut to the 63 bytes Postgres stores. */
|
|
@@ -1647,4 +1647,4 @@ declare const prisma7PostgresBinding: {
|
|
|
1647
1647
|
};
|
|
1648
1648
|
//#endregion
|
|
1649
1649
|
export { prisma7PostgresBinding as t };
|
|
1650
|
-
//# sourceMappingURL=prisma7-binding-
|
|
1650
|
+
//# sourceMappingURL=prisma7-binding-C-we4Znm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma7-binding-C-we4Znm.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/prisma7-binding.d.mts"],"mappings":";;;;;;;;;;;;UAYU;WACC;WACA;;;;;iBAKM,sBAAsB;;iBAEtB,sBAAsB,mBAAmB;;;;;;;;iBAQzC,2BAA2B,gBAAgB;;;iBAG3C,YAAY;;;;;;;;cAQf;WACH;aACE;aACA;aACA,yDAAyD,iBAAiB,uBAAuB;eAC/F;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;SACN;eACM;QACP;QACA;;;aAGK;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;;qBAEF;uBACE;;;;iBAIN;mBACE;qBACE;qBACA;qBACA;uBACE;yBACE;;uBAEF;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;;uBAEF;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;;uBAEF;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;;uBAEF;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;;uBAEF;yBACE;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;;uBAEF;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;qBACE;qBACA;qBACA;uBACE;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;;;;iBAMV;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;qBAEA;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;uBAEF;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;qBACA;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;mBACA;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;mBAOZ;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA,QAAQ;uBACN;uBACA;;uBAEA;;uBAEA;yBACE;2BACE;2BACA;;yBAEF;2BACE;2BACA;;;;;mBAKR;qBACE;qBACA;uBACE;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;uBAEA;uBACA;uBACA;uBACA;;qBAEF;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;yBACE;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;yBAIN;2BACE;2BACA;2BACA;6BACE;+BACE;+BACA;;;;;;;;iBAQd;mBACE;mBACA;qBACE;;;iBAGJ;mBACE;qBACE;qBACA;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;;;mBAGJ;qBACE;qBACA;uBACE;uBACA;yBACE;2BACE;2BACA;;;uBAGJ;;;;;eAKR,WAAW,SAAS,kEAAkE;eACtF,uEAAuE;eACvE;iBACE;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,oBAAoB,wDAAwD,2BAA2B;;;iBAG5H;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;;mBAEO;qBACE,UAAU,OAAO,+BAA+B;;;iBAGpD;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;mBAEO;YACP,UAAU,OAAO,yBAAyB,wDAAwD,2BAA2B;YAC7H,eAAe,QAAQ;cACrB;;;;iBAIG;mBACE;mBACA;mBACA,+DAA+D;YACtE;YACA;YACA;YACA;;mBAEO;YACP,UAAU,sCAAsC,wBAAwB,yBAAyB,wDAAwD,2BAA2B;YACpL,iBAAiB,QAAQ;cACvB;cACA;;;;;eAKC;iBACE;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;qBACW;qBACA;;UAEX;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;UACb;UACA;YACE,0CAA0C;cACxC;8CACgC;;;iBAG7B;UACP;UACA;UACA;UACA;UACA;YACE;;UAEF,aAAa;;;eAGR;iBACE;mBACE;mBACA;mBACA,qCAAqC;mBACrC,QAAQ,SAAS,sBAAsB,wDAAwD;YACtG;YACA,QAAQ;;;iBAGH;mBACE;mBACA;mBACA,qCAAqC;mBACrC;mBACA,QAAQ;qBACN,QAAQ;qBACR,WAAW;qBACX;qBACA;qBACA,uCAAuC;aAC/C,wDAAwD;YACzD;cACE;cACA;cACA;gBACE;gBACA;;cAEF;cACA;cACA;cACA;;;;;eAKC,wBAAwB;eACxB,0BAA0B;eAC1B,+BAA+B;eAC/B,2BAA2B;;aAE7B;eACE;eACA,YAAY,8DAA8D;iBACxE;iBACA;mBACE;mBACA,qCAAqC,sDAAsD,6CAA6C,8CAA8C;mBACtL;;;eAGJ;;eAEA;eACA,YAAY,8DAA8D;iBACxE;iBACA;mBACE;mBACA,qCAAqC,0CAA0C;mBAC/E;;;eAGJ;;eAEA;eACA,YAAY,8DAA8D;iBACxE;iBACA;mBACE;mBACA,qCAAqC,uDAAuD,6CAA6C,+CAA+C;mBACxL;;;eAGJ;2DAC4C,sFAAsF;aACpI;eACE,yBAAyB;eACzB,gFAAgF;;aAElF;eACE;iBACE;mBACE;mBACA;mBACA;;;;aAIN;aACA;aACA;aACA;aACA;aACA;aACA,mEAAmE;aACnE,eAAe;;aAEf,eAAe;aACf,wBAAwB;aACxB,6BAA6B;aAC7B;eACE;iBACE;iBACA;;;;WAIN,wBAAwB;WACxB;WACA;IACP,SAAS,SAAS,eAAe;IACjC,aAAa,SAAS,eAAe;;WAE9B;aACE;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;;;WAGF;WACA;aACE,mBAAmB;aACnB,mBAAmB;;WAErB,mCAAmC;WACnC,uBAAuB,UAAU;aAC/B;aACA,aAAa,SAAS;;aAEtB;aACA;aACA;aACA;;aAEA;aACA;aACA,aAAa;aACb;;aAEA;aACA;aACA,OAAO;aACP,kBAAkB;MACzB;MACA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as pgJsonb, C as pgInet, E as pgInt8, F as pgText, J as pgVarchar, K as pgUuid, L as pgTime, M as pgNumeric, S as pgFloat8, T as pgInt4, U as pgTimetz, V as pgTimestamptz, Y as postgresDataTypes, _ as pgDate, d as pgBool, f as pgBytea, h as pgChar, k as pgJson, w as pgInt2, x as pgFloat4, z as pgTimestamp } from "./data-types-Chx0mjTP-
|
|
2
|
-
import { a as postgresCodecDescriptorRegistry } from "./codec-registry-D7XslgPe-
|
|
3
|
-
import { h as postgresCreateNamespace } from "./postgres-schema-C6w1rzOF-
|
|
4
|
-
import { f as postgresScalarAndNativeTypeConstructors } from "./authoring-SbdvmVJh-
|
|
5
|
-
import { t as postgresDataTypeEntries } from "./data-type-entries-gQW3-KSb-
|
|
6
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DBH6aAIM-
|
|
7
|
-
import { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from "./default-constraint-names-
|
|
8
|
-
import { l as buildPslDocumentAst, m as noInferredDefaults, p as noColumnDefaults, u as createPostgresDefaultMapping } from "./infer-psl-contract-BSSHcuRi-
|
|
1
|
+
import { A as pgJsonb, C as pgInet, E as pgInt8, F as pgText, J as pgVarchar, K as pgUuid, L as pgTime, M as pgNumeric, S as pgFloat8, T as pgInt4, U as pgTimetz, V as pgTimestamptz, Y as postgresDataTypes, _ as pgDate, d as pgBool, f as pgBytea, h as pgChar, k as pgJson, w as pgInt2, x as pgFloat4, z as pgTimestamp } from "./data-types-Chx0mjTP-DczU4S9b.mjs";
|
|
2
|
+
import { a as postgresCodecDescriptorRegistry } from "./codec-registry-D7XslgPe-DTZnVB8W.mjs";
|
|
3
|
+
import { h as postgresCreateNamespace } from "./postgres-schema-C6w1rzOF-D1fdwqRx.mjs";
|
|
4
|
+
import { f as postgresScalarAndNativeTypeConstructors } from "./authoring-SbdvmVJh-nQ7YliD_.mjs";
|
|
5
|
+
import { t as postgresDataTypeEntries } from "./data-type-entries-gQW3-KSb-BIl8vgus.mjs";
|
|
6
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DBH6aAIM-C9xA44Ax.mjs";
|
|
7
|
+
import { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from "./default-constraint-names-Cz9Yoeim-sUzOGvIm.mjs";
|
|
8
|
+
import { l as buildPslDocumentAst, m as noInferredDefaults, p as noColumnDefaults, u as createPostgresDefaultMapping } from "./infer-psl-contract-BSSHcuRi-ChdFSviw.mjs";
|
|
9
9
|
import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
10
10
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
11
11
|
import { authoringTypeConstructorArguments } from "@prisma/orm-framework/components/authoring";
|
|
@@ -13,7 +13,7 @@ import { SqlSchemaIR, SqlTableIR } from "@prisma/orm-family-sql/schema-ir/types"
|
|
|
13
13
|
import { inferredTypeConstructors } from "@prisma/orm-family-sql/family/psl-build";
|
|
14
14
|
import { toModelName } from "@prisma/orm-family-sql/family/psl-infer";
|
|
15
15
|
import { flatPslModels } from "@prisma/orm-framework/components/psl-ast";
|
|
16
|
-
//#region ../../../3-targets/
|
|
16
|
+
//#region ../../../3-targets/postgres/1-target/dist/prisma7-binding.mjs
|
|
17
17
|
const RFC_3339 = /^(\d{4}-\d{2}-\d{2})[Tt ](\d{2}:\d{2}:\d{2}(?:\.\d+)?)([Zz]|[+-]\d{2}:\d{2})$/;
|
|
18
18
|
/**
|
|
19
19
|
* What a Prisma 7 `DateTime` default, such as `2024-01-02T03:04:05.123+02:00`, means on a column of `dataType`, as the body of the type's tag: `date` keeps the written date, `time` and `timestamp` the written wall-clock time without the offset, `timetz` the time with the written offset, and `timestamptz` the written instant, offset included. The tag reads the body as Postgres reads the default Prisma 7 writes. `undefined` for text that is not an RFC 3339 date and time, or a type that is not a date or time type.
|
|
@@ -304,4 +304,4 @@ const prisma7PostgresBinding = {
|
|
|
304
304
|
//#endregion
|
|
305
305
|
export { prisma7PostgresBinding as t };
|
|
306
306
|
|
|
307
|
-
//# sourceMappingURL=prisma7-binding-
|
|
307
|
+
//# sourceMappingURL=prisma7-binding-CVuACrdW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prisma7-binding-CVuACrdW.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/prisma7-binding.mjs"],"sourcesContent":["import { D as pgTime, I as pgUuid, N as pgTimetz, R as pgVarchar, S as pgNumeric, T as pgText, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, j as pgTimestamptz, k as pgTimestamp, m as pgInet, o as pgChar, p as pgFloat8, y as pgJson, z as postgresDataTypes } from \"./data-types-Chx0mjTP.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-gQW3-KSb.mjs\";\nimport { a as postgresCodecDescriptorRegistry } from \"./codec-registry-D7XslgPe.mjs\";\nimport { l as postgresScalarAndNativeTypeConstructors } from \"./authoring-SbdvmVJh.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-C6w1rzOF.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-DBH6aAIM.mjs\";\nimport { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from \"./default-constraint-names-Cz9Yoeim.mjs\";\nimport { i as noInferredDefaults, r as createPostgresDefaultMapping, t as buildPslDocumentAst, u as noColumnDefaults } from \"./infer-psl-contract-BSSHcuRi.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { authoringTypeConstructorArguments } from \"@internal/framework-components/authoring\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { inferredTypeConstructors } from \"@internal/family-sql/psl-build\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)([Zz]|[+-]\\d{2}:\\d{2})$/;\n/**\n* What a Prisma 7 `DateTime` default, such as `2024-01-02T03:04:05.123+02:00`, means on a column of `dataType`, as the body of the type's tag: `date` keeps the written date, `time` and `timestamp` the written wall-clock time without the offset, `timetz` the time with the written offset, and `timestamptz` the written instant, offset included. The tag reads the body as Postgres reads the default Prisma 7 writes. `undefined` for text that is not an RFC 3339 date and time, or a type that is not a date or time type.\n*/\nfunction prisma7TemporalTagBody(text, dataType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst offset = zone.toUpperCase();\n\tswitch (dataType) {\n\t\tcase pgDate.id: return date;\n\t\tcase pgTime.id: return clock;\n\t\tcase pgTimetz.id: return `${clock}${offset}`;\n\t\tcase pgTimestamp.id: return `${date}T${clock}`;\n\t\tcase pgTimestamptz.id: return `${date}T${clock}${offset}`;\n\t\tdefault: return;\n\t}\n}\nconst MICROSECONDS_PER_SECOND = 1000000n;\nconst POSTGRES_EPOCH_MS = Date.UTC(2e3, 0, 1);\n/**\n* The value PostgreSQL stores for a Prisma 7 `DateTime` default with more fraction digits than a column of `dataType` with `precision` holds, written in the same RFC 3339 form: the fraction is first rounded to microseconds as PostgreSQL reads text, then to `precision` digits as it rounds a value for its column, a tie going away from midnight on 2000-01-01, PostgreSQL's epoch. `undefined` when the column holds the text as written, or for a date column, which keeps only the date.\n*/\nfunction prisma7TemporalStored(text, dataType, precision) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null || dataType === pgDate.id) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst [hms = \"\", fraction = \"\"] = clock.split(\".\");\n\tif (fraction.length <= precision) return void 0;\n\tconst [year, month, day] = date.split(\"-\").map(Number);\n\tconst [hour, minute, second] = hms.split(\":\").map(Number);\n\tconst wallMs = (/* @__PURE__ */ new Date(0)).setUTCFullYear(year ?? 0, (month ?? 1) - 1, day ?? 1);\n\tconst wall = (BigInt(wallMs - POSTGRES_EPOCH_MS) / 1000n + BigInt((hour ?? 0) * 3600 + (minute ?? 0) * 60 + (second ?? 0))) * MICROSECONDS_PER_SECOND + microsecondsOf(fraction);\n\tconst instant = dataType === pgTimestamptz.id ? wall - offsetMicroseconds(zone) : wall;\n\tconst tieGoesEarlier = (dataType === pgTimestamp.id || dataType === pgTimestamptz.id) && instant < 0n;\n\treturn `${printedWall(roundedTo(wall, 10n ** BigInt(6 - precision), tieGoesEarlier), precision)}${zone}`;\n}\n/** PostgreSQL reads the fraction of a second as a double and rounds it to whole microseconds. */\nfunction microsecondsOf(fraction) {\n\tif (fraction.length <= 6) return BigInt(fraction.padEnd(6, \"0\"));\n\tconst scaled = Number(`0.${fraction}`) * 1e6;\n\tconst floor = Math.floor(scaled);\n\tconst rest = scaled - floor;\n\tconst rounded = rest > .5 || rest === .5 && floor % 2 === 1 ? floor + 1 : floor;\n\treturn BigInt(rounded);\n}\nfunction offsetMicroseconds(zone) {\n\tconst offset = /^([+-])(\\d{2}):(\\d{2})$/.exec(zone);\n\tif (offset === null) return 0n;\n\tconst [, sign, hours = \"0\", minutes = \"0\"] = offset;\n\tconst seconds = BigInt(Number(hours) * 3600 + Number(minutes) * 60);\n\treturn (sign === \"-\" ? -seconds : seconds) * MICROSECONDS_PER_SECOND;\n}\nfunction roundedTo(value, step, tieGoesEarlier) {\n\tconst rest = (value % step + step) % step;\n\tconst below = value - rest;\n\tconst twice = rest * 2n;\n\tif (twice > step || twice === step && !tieGoesEarlier) return below + step;\n\treturn below;\n}\nfunction printedWall(microseconds, precision) {\n\tconst rest = (microseconds % MICROSECONDS_PER_SECOND + MICROSECONDS_PER_SECOND) % MICROSECONDS_PER_SECOND;\n\tconst seconds = (microseconds - rest) / MICROSECONDS_PER_SECOND;\n\tconst at = new Date(POSTGRES_EPOCH_MS + Number(seconds) * 1e3);\n\tconst two = (n) => String(n).padStart(2, \"0\");\n\treturn `${`${String(at.getUTCFullYear()).padStart(4, \"0\")}-${two(at.getUTCMonth() + 1)}-${two(at.getUTCDate())}`}T${`${two(at.getUTCHours())}:${two(at.getUTCMinutes())}:${two(at.getUTCSeconds())}`}${precision === 0 ? \"\" : `.${String(rest).padStart(6, \"0\").slice(0, precision)}`}`;\n}\n//#endregion\n//#region src/core/prisma7-type-map.ts\nconst of = (type, params = {}) => ({\n\tdataType: type.id,\n\tparams\n});\n/**\n* What Prisma 7.10.0 creates in Postgres for each Prisma 7 scalar and `@db.*` native type, as a data type and its parameters. Derived from the SQL recorded in `test/integration/test/fixtures/prisma7-source/reference/migration.sql`. A `@db.*` attribute's own arguments replace the parameters; without any, the column gets these, so `@db.Char` is the `character(1)` Postgres stores for Prisma 7's `CHAR`.\n*/\nconst prisma7PostgresTypes = {\n\tscalars: {\n\t\tString: of(pgText),\n\t\tBoolean: of(pgBool),\n\t\tInt: of(pgInt4),\n\t\tBigInt: of(pgInt8),\n\t\tFloat: of(pgFloat8),\n\t\tDecimal: of(pgNumeric, {\n\t\t\tprecision: 65,\n\t\t\tscale: 30\n\t\t}),\n\t\tDateTime: of(pgTimestamp, { precision: 3 }),\n\t\tJson: of(pgJsonb),\n\t\tBytes: of(pgBytea)\n\t},\n\tnativeTypes: {\n\t\tText: of(pgText),\n\t\tVarChar: of(pgVarchar),\n\t\tChar: of(pgChar, { length: 1 }),\n\t\tUuid: of(pgUuid),\n\t\tInet: of(pgInet),\n\t\tBoolean: of(pgBool),\n\t\tInteger: of(pgInt4),\n\t\tSmallInt: of(pgInt2),\n\t\tBigInt: of(pgInt8),\n\t\tReal: of(pgFloat4),\n\t\tDoublePrecision: of(pgFloat8),\n\t\tDecimal: of(pgNumeric),\n\t\tTimestamp: of(pgTimestamp),\n\t\tTimestamptz: of(pgTimestamptz),\n\t\tDate: of(pgDate),\n\t\tTime: of(pgTime),\n\t\tTimetz: of(pgTimetz),\n\t\tJson: of(pgJson),\n\t\tJsonB: of(pgJsonb),\n\t\tByteA: of(pgBytea)\n\t}\n};\nconst marked = inferredTypeConstructors({\n\tauthoringTypes: postgresScalarAndNativeTypeConstructors,\n\tcodecLookup: postgresCodecDescriptorRegistry,\n\tdataTypeLookup: createDataTypeLookup(postgresDataTypes)\n});\n/**\n* The constructor marked `inferred` for the column's data type, with every parameter Prisma 7 gives the column as an argument. The reader builds a contract, so it keeps each parameter rather than the fewest arguments printed PSL writes.\n*/\nfunction mappingOf({ dataType, params }) {\n\tconst markedConstructor = marked.get(dataType);\n\tconst args = markedConstructor === void 0 ? void 0 : authoringTypeConstructorArguments(markedConstructor.descriptor, {\n\t\tcodecId: markedConstructor.descriptor.output.codecId,\n\t\ttypeParams: params\n\t});\n\tif (markedConstructor === void 0 || args === void 0) throw new InternalError(`No constructor marked inferred writes ${dataType} with these parameters.`);\n\treturn {\n\t\tconstructorName: markedConstructor.path.join(\".\"),\n\t\targs\n\t};\n}\nfunction mappingsOf(types) {\n\treturn Object.fromEntries(Object.entries(types).map(([name, type]) => [name, mappingOf(type)]));\n}\n/** {@link prisma7PostgresTypes} as the Prisma 7 reader takes it: each type's constructor call. */\nconst prisma7PostgresTypeMap = {\n\tscalars: mappingsOf(prisma7PostgresTypes.scalars),\n\tnativeTypes: mappingsOf(prisma7PostgresTypes.nativeTypes)\n};\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\ttypeText: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\ttypeText: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\tcolumnTypes: () => ({\n\t\t\tpath: [\"Int\"],\n\t\t\targs: [],\n\t\t\tvalues: []\n\t\t}),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tdefaultOf: noInferredDefaults,\n\t\tcolumnDefaults: noColumnDefaults\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\n/** The date and time types a Prisma 7 `DateTime` default can be written on. */\nconst DATE_TIME_TYPES = /* @__PURE__ */ new Set([\n\tpgTimestamp.id,\n\tpgTimestamptz.id,\n\tpgDate.id,\n\tpgTime.id,\n\tpgTimetz.id\n]);\nconst ENTRIES = postgresDataTypeEntries();\n/** The tag the authoring entry of `dataType` writes its values with. */\nfunction tagOf(dataType) {\n\tconst written = ENTRIES[dataType]?.written;\n\treturn written?.kind === \"tag\" ? written.tag : void 0;\n}\n/** A date or time column without a precision holds microseconds. */\nfunction precisionOf(typeParams) {\n\tconst precision = typeParams?.[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 6;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is read through the tag its column type's authoring entry\n* writes, as the current schema language reads it: a `Bytes` default's base64\n* as the hex body of `bytea`, and a `DateTime` default as the body of the date\n* or time tag that keeps what the written value means on the column.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tdefaultConstraintNames: {\n\t\tprimaryKey: defaultPrimaryKeyName,\n\t\tforeignKey: defaultForeignKeyName\n\t},\n\tjunctionRelationFieldNames,\n\tliteralDefaultForm: ({ dataType, typeParams }) => {\n\t\tif (dataType === pgJson.id || dataType === pgJsonb.id) return { kind: \"json\" };\n\t\tconst tag = tagOf(dataType);\n\t\tif (tag === void 0) return void 0;\n\t\tif (dataType === pgBytea.id) return {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: base64ToHex\n\t\t};\n\t\tif (!DATE_TIME_TYPES.has(dataType)) return void 0;\n\t\treturn {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: (text) => prisma7TemporalTagBody(text, dataType),\n\t\t\tfinerThanColumn: (text) => {\n\t\t\t\tconst heldDigits = precisionOf(typeParams);\n\t\t\t\tconst stored = prisma7TemporalStored(text, dataType, heldDigits);\n\t\t\t\treturn stored === void 0 ? void 0 : {\n\t\t\t\t\theldDigits,\n\t\t\t\t\tstored\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,WAAW;;;;AAIjB,SAAS,uBAAuB,MAAM,UAAU;CAC/C,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,MAAM,OAAO,KAAK;CAChC,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,SAAS,KAAK,YAAY;CAChC,QAAQ,UAAR;EACC,KAAK,OAAO,IAAI,OAAO;EACvB,KAAK,OAAO,IAAI,OAAO;EACvB,KAAK,SAAS,IAAI,OAAO,GAAG,QAAQ;EACpC,KAAK,YAAY,IAAI,OAAO,GAAG,KAAK,GAAG;EACvC,KAAK,cAAc,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ;EACjD,SAAS;CACV;AACD;AACA,MAAM,0BAA0B;AAChC,MAAM,oBAAoB,KAAK,IAAI,KAAK,GAAG,CAAC;;;;AAI5C,SAAS,sBAAsB,MAAM,UAAU,WAAW;CACzD,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,QAAQ,aAAa,OAAO,IAAI,OAAO,KAAK;CAC1D,MAAM,GAAG,OAAO,IAAI,QAAQ,I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Z,YAAY;CACb;CACA;CACA,qBAAqB,EAAE,UAAU,iBAAiB;EACjD,IAAI,aAAa,OAAO,MAAM,aAAa,QAAQ,IAAI,OAAO,EAAE,MAAM,OAAO;EAC7E,MAAM,MAAM,MAAM,QAAQ;EAC1B,IAAI,QAAQ,KAAK,GAAG,OAAO,KAAK;EAChC,IAAI,aAAa,QAAQ,IAAI,OAAO;GACnC,MAAM;GACN;GACA,MAAM;EACP;EACA,IAAI,CAAC,gBAAgB,IAAI,QAAQ,GAAG,OAAO,KAAK;EAChD,OAAO;GACN,MAAM;GACN;GACA,OAAO,SAAS,uBAAuB,MAAM,QAAQ;GACrD,kBAAkB,SAAS;IAC1B,MAAM,aAAa,YAAY,UAAU;IACzC,MAAM,SAAS,sBAAsB,MAAM,UAAU,UAAU;IAC/D,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI;KACnC;KACA;IACD;GACD;EACD;CACD;AACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as postgresError } from "./errors-BrhQYgdL-
|
|
2
|
-
import { W as isPostgresOpFactoryCall } from "./op-factory-call-
|
|
1
|
+
import { c as postgresError } from "./errors-BrhQYgdL-IvZHPjwL.mjs";
|
|
2
|
+
import { W as isPostgresOpFactoryCall } from "./op-factory-call-gGX-mZu--0QUG5xH4.mjs";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { isThenable } from "@prisma/orm-framework/utils/promise";
|
|
5
|
-
//#region ../../../3-targets/
|
|
5
|
+
//#region ../../../3-targets/postgres/1-target/dist/render-ops-BgqtCw9Z.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Asserts an op materialised by an `OpFactoryCall` targets postgres. The
|
|
8
8
|
* extension surface lets any contributor emit calls, so this is the
|
|
@@ -38,4 +38,4 @@ function renderOps(calls, lowerer) {
|
|
|
38
38
|
//#endregion
|
|
39
39
|
export { renderOps as t };
|
|
40
40
|
|
|
41
|
-
//# sourceMappingURL=render-ops-
|
|
41
|
+
//# sourceMappingURL=render-ops-BgqtCw9Z-T8BPTX85.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-ops-BgqtCw9Z-T8BPTX85.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/render-ops-BgqtCw9Z.mjs"],"sourcesContent":["import { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport { V as isPostgresOpFactoryCall } from \"./op-factory-call-gGX-mZu-.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isThenable } from \"@internal/utils/promise\";\n//#region src/core/migrations/render-ops.ts\n/**\n* Asserts an op materialised by an `OpFactoryCall` targets postgres. The\n* extension surface lets any contributor emit calls, so this is the\n* integration boundary where a stray non-postgres op would otherwise\n* silently flow through to postgres-shaped renderers — exactly the\n* place to fail loudly with op metadata (`id` + `target.id`).\n*/\nfunction assertPostgresOp(op, callFactoryName) {\n\tconst targetId = blindCast(op).target?.id;\n\tif (targetId !== \"postgres\") throw postgresError(\"MIGRATION.TARGET_MISMATCH\", `renderOps: expected postgres op but got target.id=\"${String(targetId)}\" for op.id=\"${op.id}\" (factoryName=\"${callFactoryName}\"). An OpFactoryCall produced an op for a different target on the postgres planner path; check the call's target binding.`, { meta: {\n\t\topId: op.id,\n\t\ttargetId: String(targetId),\n\t\tfactoryName: callFactoryName\n\t} });\n}\nfunction checkedOp(opOrPromise, callFactoryName) {\n\tif (isThenable(opOrPromise)) {\n\t\tconst checked = opOrPromise.then((op) => {\n\t\t\tassertPostgresOp(op, callFactoryName);\n\t\t\treturn op;\n\t\t});\n\t\tchecked.catch(() => void 0);\n\t\treturn checked;\n\t}\n\tassertPostgresOp(opOrPromise, callFactoryName);\n\treturn opOrPromise;\n}\nfunction renderOps(calls, lowerer) {\n\treturn calls.flatMap((c) => {\n\t\treturn (isPostgresOpFactoryCall(c) ? c.toOps(lowerer) : [blindCast(c).toOp(lowerer)]).map((opOrPromise) => checkedOp(opOrPromise, c.factoryName));\n\t});\n}\n//#endregion\nexport { renderOps as t };\n\n//# sourceMappingURL=render-ops-BgqtCw9Z.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,iBAAiB,IAAI,iBAAiB;CAC9C,MAAM,WAAW,UAAU,EAAE,CAAC,CAAC,QAAQ;CACvC,IAAI,aAAa,YAAY,MAAM,cAAc,6BAA6B,sDAAsD,OAAO,QAAQ,EAAE,eAAe,GAAG,GAAG,kBAAkB,gBAAgB,4HAA4H,EAAE,MAAM;EAC/U,MAAM,GAAG;EACT,UAAU,OAAO,QAAQ;EACzB,aAAa;CACd,EAAE,CAAC;AACJ;AACA,SAAS,UAAU,aAAa,iBAAiB;CAChD,IAAI,WAAW,WAAW,GAAG;EAC5B,MAAM,UAAU,YAAY,MAAM,OAAO;GACxC,iBAAiB,IAAI,eAAe;GACpC,OAAO;EACR,CAAC;EACD,QAAQ,YAAY,KAAK,CAAC;EAC1B,OAAO;CACR;CACA,iBAAiB,aAAa,eAAe;CAC7C,OAAO;AACR;AACA,SAAS,UAAU,OAAO,SAAS;CAClC,OAAO,MAAM,SAAS,MAAM;EAC3B,QAAQ,wBAAwB,CAAC,IAAI,EAAE,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,EAAA,CAAG,KAAK,gBAAgB,UAAU,aAAa,EAAE,WAAW,CAAC;CACjJ,CAAC;AACF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as PostgresPlanTargetDetails } from "./planner-target-details-HkP4RrRO-
|
|
1
|
+
import { t as PostgresPlanTargetDetails } from "./planner-target-details-HkP4RrRO-D6VtK0jY.mjs";
|
|
2
2
|
import { OpFactoryCall } from "@prisma/orm-framework/components/control";
|
|
3
3
|
import { SqlMigrationPlanOperation } from "@prisma/orm-family-sql/family/control";
|
|
4
4
|
import { ExecuteRequestLowerer } from "@prisma/orm-family-sql/family/control-adapter";
|
|
5
|
-
//#region ../../../3-targets/
|
|
5
|
+
//#region ../../../3-targets/postgres/1-target/dist/render-ops.d.mts
|
|
6
6
|
//#region src/core/migrations/render-ops.d.ts
|
|
7
7
|
type Op = SqlMigrationPlanOperation<PostgresPlanTargetDetails>;
|
|
8
8
|
declare function renderOps(calls: readonly OpFactoryCall[], lowerer?: ExecuteRequestLowerer): (Op | Promise<Op>)[];
|
|
9
9
|
//#endregion
|
|
10
10
|
export { renderOps as t };
|
|
11
|
-
//# sourceMappingURL=render-ops-
|
|
11
|
+
//# sourceMappingURL=render-ops-Bl84i7ut.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-ops-Bl84i7ut.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/render-ops.d.mts"],"mappings":";;;;;;KAKK,KAAK,0BAA0B;iBACnB,UAAU,gBAAgB,iBAAiB,UAAU,yBAAyB,KAAK,QAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpFactoryCall } from "@prisma/orm-framework/components/control";
|
|
2
2
|
import { ImportSpecifierResolver } from "@prisma/orm-framework/components/emission";
|
|
3
|
-
//#region ../../../3-targets/
|
|
3
|
+
//#region ../../../3-targets/postgres/1-target/dist/render-typescript.d.mts
|
|
4
4
|
//#region src/core/migrations/render-typescript.d.ts
|
|
5
5
|
interface RenderMigrationMeta {
|
|
6
6
|
readonly from: string | null;
|
|
@@ -18,4 +18,4 @@ interface RenderMigrationMeta {
|
|
|
18
18
|
declare function renderCallsToTypeScript(calls: ReadonlyArray<OpFactoryCall>, meta: RenderMigrationMeta): string;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { renderCallsToTypeScript as t };
|
|
21
|
-
//# sourceMappingURL=render-typescript-
|
|
21
|
+
//# sourceMappingURL=render-typescript-BysdXYpH.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-typescript-BysdXYpH.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/render-typescript.d.mts"],"mappings":";;;;UAGU;WACC;WACA;;WAEA;;;;;;;WAOA,yBAAyB;;iBAEnB,wBAAwB,OAAO,cAAc,gBAAgB,MAAM"}
|
package/dist/{render-typescript-Dqp1Spgn-B128r1qw.mjs → render-typescript-Dqp1Spgn-B4mJhuVr.mjs}
RENAMED
|
@@ -2,7 +2,7 @@ import { contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier } from "@
|
|
|
2
2
|
import { renderImports } from "@prisma/orm-framework/ts-render";
|
|
3
3
|
import { resolveRequirementSpecifiers } from "@prisma/orm-framework/components/emission";
|
|
4
4
|
import { detectScaffoldRuntime, shebangLineFor } from "@prisma/orm-toolchain/migration-tools/migration-ts";
|
|
5
|
-
//#region ../../../3-targets/
|
|
5
|
+
//#region ../../../3-targets/postgres/1-target/dist/render-typescript-Dqp1Spgn.mjs
|
|
6
6
|
/**
|
|
7
7
|
* Polymorphic TypeScript emitter for the Postgres migration IR.
|
|
8
8
|
*
|
|
@@ -114,4 +114,4 @@ function indent(text, spaces) {
|
|
|
114
114
|
//#endregion
|
|
115
115
|
export { renderCallsToTypeScript as t };
|
|
116
116
|
|
|
117
|
-
//# sourceMappingURL=render-typescript-Dqp1Spgn-
|
|
117
|
+
//# sourceMappingURL=render-typescript-Dqp1Spgn-B4mJhuVr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-typescript-Dqp1Spgn-B4mJhuVr.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/render-typescript-Dqp1Spgn.mjs"],"sourcesContent":["import { contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier } from \"@internal/framework-components/control\";\nimport { renderImports } from \"@internal/ts-render\";\nimport { resolveRequirementSpecifiers } from \"@internal/framework-components/emission\";\nimport { detectScaffoldRuntime, shebangLineFor } from \"@internal/migration-tools/migration-ts\";\n//#region src/core/migrations/render-typescript.ts\n/**\n* Polymorphic TypeScript emitter for the Postgres migration IR.\n*\n* Each `OpFactoryCall` renders itself via `renderTypeScript()` and\n* declares its own `importRequirements()`; this file just composes the module\n* source around those contributions. The design mirrors the Mongo target's\n* `render-typescript.ts` deliberately — byte-for-byte alignment isn't required\n* (different factory module specifiers, different base-class name) but the\n* shape is, so future consolidation to a framework-level helper is mechanical.\n*/\n/**\n* Always-present base imports for the rendered scaffold. Both come from\n* `@internal/postgres/migration` so an authored Postgres\n* `migration.ts` only needs a single dependency for its base class and\n* its CLI entrypoint:\n*\n* - `Migration` — the facade re-export fixes the `SqlMigration`\n* generic to `PostgresPlanTargetDetails` and the abstract `targetId`\n* to `'postgres'`, so user-authored migrations don't need to thread\n* target-details or redeclare `targetId`.\n* - `MigrationCLI` — the migration-file CLI entrypoint, re-exported from\n* `@internal/cli/migration-cli`. Loads `prisma.config.ts`,\n* assembles a `ControlStack`, and instantiates the migration class.\n* The migration file owns this dependency directly: pulling CLI\n* machinery in at script run time is acceptable because the script's\n* whole purpose is to be invoked from the project that owns the\n* config.\n*/\nconst BASE_IMPORTS = [{\n\tmoduleSpecifier: \"@internal/postgres/migration\",\n\tsymbol: \"Migration\"\n}, {\n\tmoduleSpecifier: \"@internal/postgres/migration\",\n\tsymbol: \"MigrationCLI\"\n}];\nfunction renderCallsToTypeScript(calls, meta) {\n\tconst imports = buildImports(calls, meta);\n\tconst operationsBody = calls.map((c) => renderCall(c)).join(\",\\n\");\n\tconst hasStart = meta.from !== null;\n\tconst startField = hasStart ? [\" override readonly startContractJson = startContract;\"] : [];\n\treturn [\n\t\tshebangLineFor(detectScaffoldRuntime()),\n\t\timports,\n\t\t\"\",\n\t\t`export default class M extends Migration<${hasStart ? \"Start\" : \"never\"}, End> {`,\n\t\t...startField,\n\t\t\" override readonly endContractJson = endContract;\",\n\t\t\"\",\n\t\t\" override get operations() {\",\n\t\t\" return [\",\n\t\tindent(operationsBody, 6),\n\t\t\" ];\",\n\t\t\" }\",\n\t\t\"}\",\n\t\t\"\",\n\t\t\"MigrationCLI.run(import.meta.url, M);\",\n\t\t\"\"\n\t].join(\"\\n\");\n}\nfunction renderCall(call) {\n\treturn call.renderTypeScript();\n}\nfunction buildImports(calls, meta) {\n\tconst requirements = [...BASE_IMPORTS, ...contractImports(meta)];\n\tfor (const call of calls) for (const req of call.importRequirements()) requirements.push(req);\n\treturn renderImports(resolveRequirementSpecifiers(requirements, meta.resolveImportSpecifier));\n}\n/**\n* The committed contract-JSON imports the scaffold reads its from/to identity\n* from, resolved to the deduplicated snapshot store under\n* `meta.snapshotsImportPath`. The end snapshot is always present; the start\n* snapshot is added only for a non-baseline migration (`meta.from !== null`).\n* The matching `Contract` type imports (aliased `Start`/`End`) feed the\n* `Migration<Start, End>` generics. Baseline emits `Migration<never, End>` with\n* no start imports — `never` is the honest \"no prior contract\" Start.\n*/\nfunction contractImports(meta) {\n\tconst reqs = [{\n\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"endContract\",\n\t\tkind: \"default\",\n\t\tattributes: { type: \"json\" }\n\t}, {\n\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"Contract\",\n\t\talias: \"End\",\n\t\ttypeOnly: true\n\t}];\n\tif (meta.from !== null) {\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"startContract\",\n\t\t\tkind: \"default\",\n\t\t\tattributes: { type: \"json\" }\n\t\t});\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"Contract\",\n\t\t\talias: \"Start\",\n\t\t\ttypeOnly: true\n\t\t});\n\t}\n\treturn reqs;\n}\nfunction indent(text, spaces) {\n\tconst pad = \" \".repeat(spaces);\n\treturn text.split(\"\\n\").map((line) => line.trim() ? `${pad}${line}` : line).join(\"\\n\");\n}\n//#endregion\nexport { renderCallsToTypeScript as t };\n\n//# sourceMappingURL=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AAiB,8BAA8B,KAAK,qBAAqB,KAAK,IAAI;GAClF,QAAQ;GACR,MAAM;GACN,YAAY,EAAE,MAAM,OAAO;EAC5B,CAAC;EACD,KAAK,KAAK;GACT,iBAAiB,+BAA+B,KAAK,qBAAqB,KAAK,IAAI;GACnF,QAAQ;GACR,OAAO;GACP,UAAU;EACX,CAAC;CACF;CACA,OAAO;AACR;AACA,SAAS,OAAO,MAAM,QAAQ;CAC7B,MAAM,MAAM,IAAI,OAAO,MAAM;CAC7B,OAAO,KAAK,MAAM,IAAI,CAAC,CAAC,KAAK,SAAS,KAAK,KAAK,IAAI,GAAG,MAAM,SAAS,IAAI,CAAC,CAAC,KAAK,IAAI;AACtF"}
|
package/dist/{resolve-ddl-schema-D3VNPMSm-DVuswLch.mjs → resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-
|
|
2
|
-
import { d as isPostgresSchema } from "./postgres-schema-C6w1rzOF-
|
|
1
|
+
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cxc0dBbO.mjs";
|
|
2
|
+
import { d as isPostgresSchema } from "./postgres-schema-C6w1rzOF-D1fdwqRx.mjs";
|
|
3
3
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
4
|
-
//#region ../../../3-targets/
|
|
4
|
+
//#region ../../../3-targets/postgres/1-target/dist/resolve-ddl-schema-D3VNPMSm.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Given the contract's storage and a namespace id, returns the live Postgres
|
|
7
7
|
* DDL schema name that namespace maps to. A named Postgres namespace dispatches
|
|
@@ -31,4 +31,4 @@ function ddlSchemaOfCallSchema(callSchemaName) {
|
|
|
31
31
|
//#endregion
|
|
32
32
|
export { emissionSchemaForNamespace as n, resolveDdlSchemaForNamespaceStorage as r, ddlSchemaOfCallSchema as t };
|
|
33
33
|
|
|
34
|
-
//# sourceMappingURL=resolve-ddl-schema-D3VNPMSm-
|
|
34
|
+
//# sourceMappingURL=resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-ddl-schema-D3VNPMSm-BuB6NyOI.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/resolve-ddl-schema-D3VNPMSm.mjs"],"sourcesContent":["import { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { r as isPostgresSchema } from \"./postgres-schema-C6w1rzOF.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\n//#region src/core/migrations/resolve-ddl-schema.ts\n/**\n* Given the contract's storage and a namespace id, returns the live Postgres\n* DDL schema name that namespace maps to. A named Postgres namespace dispatches\n* to its `ddlSchemaName(storage)`; the unbound sentinel resolves to\n* `DEFAULT_NAMESPACE_ID` (the search-path default for offline planning); a\n* bare object payload (used by some tests) falls back to the namespace id\n* itself.\n*/\nfunction resolveDdlSchemaForNamespaceStorage(storage, namespaceId) {\n\tif (namespaceId === UNBOUND_NAMESPACE_ID) return DEFAULT_NAMESPACE_ID;\n\tconst namespace = storage.namespaces[namespaceId];\n\tif (namespace && isPostgresSchema(namespace)) return namespace.ddlSchemaName(storage);\n\treturn namespaceId;\n}\n/**\n* The schema name a planned call carries for a namespace: the unbound sentinel stays as it is, so the call renders without a schema, and a named namespace resolves to its DDL schema.\n*/\nfunction emissionSchemaForNamespace(contract, namespaceId) {\n\treturn namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : resolveDdlSchemaForNamespaceStorage(contract.storage, namespaceId);\n}\n/**\n* The live DDL schema a call's schema name stands for: the unbound sentinel is `DEFAULT_NAMESPACE_ID`, and any other name is already a DDL schema.\n*/\nfunction ddlSchemaOfCallSchema(callSchemaName) {\n\treturn callSchemaName === UNBOUND_NAMESPACE_ID ? DEFAULT_NAMESPACE_ID : callSchemaName;\n}\n//#endregion\nexport { emissionSchemaForNamespace as n, resolveDdlSchemaForNamespaceStorage as r, ddlSchemaOfCallSchema as t };\n\n//# sourceMappingURL=resolve-ddl-schema-D3VNPMSm.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,oCAAoC,SAAS,aAAa;CAClE,IAAI,gBAAgB,sBAAsB,OAAO;CACjD,MAAM,YAAY,QAAQ,WAAW;CACrC,IAAI,aAAa,iBAAiB,SAAS,GAAG,OAAO,UAAU,cAAc,OAAO;CACpF,OAAO;AACR;;;;AAIA,SAAS,2BAA2B,UAAU,aAAa;CAC1D,OAAO,gBAAgB,uBAAuB,uBAAuB,oCAAoC,SAAS,SAAS,WAAW;AACvI;;;;AAIA,SAAS,sBAAsB,gBAAgB;CAC9C,OAAO,mBAAmB,uBAAuB,uBAAuB;AACzE"}
|
|
@@ -2,7 +2,7 @@ import { SqlDriver } from "@prisma/orm-family-sql/relational-core/ast";
|
|
|
2
2
|
import { Client, Pool, QueryResult, QueryResultRow } from "pg";
|
|
3
3
|
import { suppressIdleConnectionErrors as suppressIdleConnectionErrors$1 } from "@prisma/orm-framework/utils/suppress-idle-connection-errors";
|
|
4
4
|
import { RuntimeDriverDescriptor, RuntimeDriverInstance } from "@prisma/orm-framework/components/execution";
|
|
5
|
-
//#region ../../../3-targets/
|
|
5
|
+
//#region ../../../3-targets/postgres/3-driver/dist/runtime.d.mts
|
|
6
6
|
//#region src/postgres-driver.d.ts
|
|
7
7
|
type QueryResult$1<T extends QueryResultRow = QueryResultRow> = QueryResult<T>;
|
|
8
8
|
/**
|
|
@@ -54,4 +54,4 @@ type PostgresRuntimeDriver = RuntimeDriverInstance<'sql', 'postgres'> & SqlDrive
|
|
|
54
54
|
declare const postgresRuntimeDriverDescriptor: RuntimeDriverDescriptor<'sql', 'postgres', PostgresDriverCreateOptions, PostgresRuntimeDriver>;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { postgresRuntimeDriverDescriptor as a, QueryResult$1 as i, PostgresDriverCreateOptions as n, suppressIdleConnectionErrors$1 as o, PostgresRuntimeDriver as r, PostgresBinding as t };
|
|
57
|
-
//# sourceMappingURL=runtime-
|
|
57
|
+
//# sourceMappingURL=runtime-C0VXuM0b.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-C0VXuM0b.d.mts","names":[],"sources":["../../../../3-targets/postgres/3-driver/dist/runtime.d.mts"],"mappings":";;;;;;KAKK,cAAY,UAAU,iBAAiB,kBAAkB,YAAc;;;;;;;;;;;;;KAavE;WACM;WACA;;WAEA;WACA,MAAM;;WAEN;WACA,QAAQ;;UAET;WACC;WACA;;UAED;WACC;IACP,QAAQ;;IAER,MAAM;;WAEC,SAAS;;;;;;;;WAQT;;KAEN,8BAA8B,KAAK;;;KAGnC,wBAAwB,2CAA2C,UAAU;cACpE,iCAAiC,2CAA2C,6BAA6B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as postgresDriverDescriptorMeta, i as normalizePgError, n as isAlreadyConnectedError, o as serverTextTypes, r as isPostgresError } from "./server-text-types-DeNPQpv5-
|
|
1
|
+
import { a as postgresDriverDescriptorMeta, i as normalizePgError, n as isAlreadyConnectedError, o as serverTextTypes, r as isPostgresError } from "./server-text-types-DeNPQpv5-DqX0h8WF.mjs";
|
|
2
2
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
3
|
import { Pool } from "pg";
|
|
4
4
|
import { suppressIdleConnectionErrors, suppressIdleConnectionErrors as suppressIdleConnectionErrors$1 } from "@prisma/orm-framework/utils/suppress-idle-connection-errors";
|
|
5
5
|
import Cursor from "pg-cursor";
|
|
6
|
-
//#region ../../../3-targets/
|
|
6
|
+
//#region ../../../3-targets/postgres/3-driver/dist/runtime.mjs
|
|
7
7
|
function driverError(code, message, details) {
|
|
8
8
|
const error = new Error(message);
|
|
9
9
|
Object.defineProperty(error, "name", {
|
|
@@ -657,4 +657,4 @@ const postgresRuntimeDriverDescriptor = {
|
|
|
657
657
|
//#endregion
|
|
658
658
|
export { suppressIdleConnectionErrors$1 as n, postgresRuntimeDriverDescriptor as t };
|
|
659
659
|
|
|
660
|
-
//# sourceMappingURL=runtime-
|
|
660
|
+
//# sourceMappingURL=runtime-CXfxy5ED.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-CXfxy5ED.mjs","names":["#queue","#connection","#onRelease","#onDestroy","#txState","#onSettled","#settle","#closed","suppressIdleConnectionErrors$1","#connected","#connectionMutex","#closeWhileHoldingLease","#connectPromise","#cursorOpts","#preparedStatements","#delegate","#disconnectedState","#notConnectedError","#requireDelegate","#wrapConnection"],"sources":["../../../../3-targets/postgres/3-driver/dist/runtime.mjs"],"sourcesContent":["import { a as normalizePgError, i as isPostgresError, n as serverTextTypes, o as postgresDriverDescriptorMeta, r as isAlreadyConnectedError } from \"./server-text-types-DeNPQpv5.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { suppressIdleConnectionErrors, suppressIdleConnectionErrors as suppressIdleConnectionErrors$1 } from \"@internal/utils/suppress-idle-connection-errors\";\nimport { Pool } from \"pg\";\nimport Cursor from \"pg-cursor\";\n//#region src/driver-error.ts\nfunction driverError(code, message, details) {\n\tconst error = new Error(message);\n\tObject.defineProperty(error, \"name\", {\n\t\tvalue: \"RuntimeError\",\n\t\tconfigurable: true\n\t});\n\treturn details === void 0 ? Object.assign(error, {\n\t\tcode,\n\t\tcategory: \"DRIVER\",\n\t\tseverity: \"error\"\n\t}) : Object.assign(error, {\n\t\tcode,\n\t\tcategory: \"DRIVER\",\n\t\tseverity: \"error\",\n\t\tdetails\n\t});\n}\n//#endregion\n//#region src/callback-to-promise.ts\nfunction callbackToPromise(fn) {\n\treturn new Promise((resolve, reject) => {\n\t\tfn((err, result) => {\n\t\t\tif (err) {\n\t\t\t\treject(err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresolve(result);\n\t\t});\n\t});\n}\n//#endregion\n//#region src/named-cursor.ts\nlet nextNamedPortalId = 1;\n/** Streaming cursor for a server-side named prepared statement. */\nvar NamedCursor = class extends Cursor {\n\tname;\n\tconstructor(opts) {\n\t\tsuper(opts.text, [...opts.values], opts.config);\n\t\tthis.name = opts.name;\n\t\tthis.submit = this.submitNamed;\n\t}\n\tsubmitNamed(connection) {\n\t\tconst self = this;\n\t\tconst conn = connection;\n\t\tself.state = \"submitted\";\n\t\tself.connection = conn;\n\t\tself._portal = `np_${nextNamedPortalId++}`;\n\t\tif (!conn.parsedStatements[this.name]) {\n\t\t\tconst parseMessage = {\n\t\t\t\ttext: self.text,\n\t\t\t\tname: this.name,\n\t\t\t\ttypes: []\n\t\t\t};\n\t\t\tconn.parse(parseMessage, true);\n\t\t}\n\t\tconst bindMessage = {\n\t\t\tportal: self._portal,\n\t\t\tstatement: this.name,\n\t\t\tvalues: self.values ?? []\n\t\t};\n\t\tconn.bind(bindMessage, true);\n\t\tconn.describe({\n\t\t\ttype: \"P\",\n\t\t\tname: self._portal\n\t\t}, true);\n\t\tconn.flush();\n\t\tif (self._conf.types) self._result._getTypeParser = self._conf.types.getTypeParser;\n\t\tconn.once(\"noData\", self._ifNoData);\n\t\tconn.once(\"rowDescription\", self._rowDescription);\n\t}\n};\n//#endregion\n//#region src/postgres-driver.ts\nconst DEFAULT_BATCH_SIZE = 100;\nconst DEFAULT_PREPARED_STATEMENTS = true;\nfunction createHandleAllocator() {\n\tlet next = 1;\n\treturn { mint: () => `pn_${next++}` };\n}\nfunction buildConnectionOptions(options) {\n\treturn {\n\t\t...options.cursor?.disabled ? { cursorDisabled: true } : {\n\t\t\tcursorBatchSize: options.cursor?.batchSize ?? DEFAULT_BATCH_SIZE,\n\t\t\tcursorDisabled: false\n\t\t},\n\t\tpreparedStatementsEnabled: options.preparedStatements ?? DEFAULT_PREPARED_STATEMENTS,\n\t\thandleAllocator: createHandleAllocator()\n\t};\n}\nfunction isStalePreparedStatementError(error) {\n\tif (!(error instanceof Error) || !(\"code\" in error) || typeof error.code !== \"string\") return false;\n\tconst code = error.code;\n\treturn code === \"26000\" || code === \"0A000\";\n}\nvar AsyncMutex = class {\n\t#queue = Promise.resolve();\n\tasync lock() {\n\t\tconst previous = this.#queue;\n\t\tlet releaseLock;\n\t\tthis.#queue = new Promise((resolve) => {\n\t\t\treleaseLock = resolve;\n\t\t});\n\t\tawait previous;\n\t\treturn () => {\n\t\t\treleaseLock?.();\n\t\t\treleaseLock = void 0;\n\t\t};\n\t}\n};\nconst clientQueryLocks = /* @__PURE__ */ new WeakMap();\nfunction acquireClientQueryLock(client) {\n\tlet mutex = clientQueryLocks.get(client);\n\tif (mutex === void 0) {\n\t\tmutex = new AsyncMutex();\n\t\tclientQueryLocks.set(client, mutex);\n\t}\n\treturn mutex.lock();\n}\nvar PostgresQueryable = class {\n\toptions;\n\tconstructor(options) {\n\t\tthis.options = options;\n\t}\n\tasync *query(request) {\n\t\ttry {\n\t\t\tconst preparedStatementHandle = request.preparedStatementHandle;\n\t\t\tif (preparedStatementHandle === void 0 || !this.options.preparedStatementsEnabled) {\n\t\t\t\tyield* this.runQuery(request);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst name = this.preparedStatementName(preparedStatementHandle);\n\t\t\tyield* this.withStaleHandleStreamRetry(preparedStatementHandle, name, (name) => this.runQuery(request, name));\n\t\t} catch (error) {\n\t\t\tthrow normalizePgError(error);\n\t\t}\n\t}\n\tasync execute(request) {\n\t\ttry {\n\t\t\tconst preparedStatementHandle = request.preparedStatementHandle;\n\t\t\tif (preparedStatementHandle === void 0 || !this.options.preparedStatementsEnabled) return await this.runExecute(request);\n\t\t\tconst name = this.preparedStatementName(preparedStatementHandle);\n\t\t\treturn await this.withStaleHandleRetry(preparedStatementHandle, name, (name) => this.runExecute(request, name));\n\t\t} catch (error) {\n\t\t\tthrow normalizePgError(error);\n\t\t}\n\t}\n\tpreparedStatementName(handle) {\n\t\tconst existingName = handle.get();\n\t\tif (typeof existingName === \"string\") return existingName;\n\t\tconst mintedName = this.options.handleAllocator.mint();\n\t\thandle.set(mintedName);\n\t\treturn mintedName;\n\t}\n\tasync withStaleHandleRetry(preparedStatementHandle, name, attempt) {\n\t\ttry {\n\t\t\treturn await attempt(name);\n\t\t} catch (error) {\n\t\t\tif (!isStalePreparedStatementError(error)) throw error;\n\t\t\tconst retryName = this.options.handleAllocator.mint();\n\t\t\tpreparedStatementHandle.set(retryName);\n\t\t\ttry {\n\t\t\t\treturn await attempt(retryName);\n\t\t\t} catch (retryError) {\n\t\t\t\tthrow prepareFailedError(retryError, retryName);\n\t\t\t}\n\t\t}\n\t}\n\tasync *withStaleHandleStreamRetry(preparedStatementHandle, name, attempt) {\n\t\tconst stream = await this.withStaleHandleRetry(preparedStatementHandle, name, async (name) => {\n\t\t\tconst iterator = attempt(name)[Symbol.asyncIterator]();\n\t\t\treturn {\n\t\t\t\titerator,\n\t\t\t\tfirst: await iterator.next()\n\t\t\t};\n\t\t});\n\t\tif (stream.first.done) return;\n\t\tlet streamCompleted = false;\n\t\ttry {\n\t\t\tyield stream.first.value;\n\t\t\twhile (true) {\n\t\t\t\tconst next = await stream.iterator.next();\n\t\t\t\tif (next.done) {\n\t\t\t\t\tstreamCompleted = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tyield next.value;\n\t\t\t}\n\t\t} finally {\n\t\t\tif (!streamCompleted) await stream.iterator.return?.();\n\t\t}\n\t}\n\tasync runExecute(request, name) {\n\t\tconst client = await this.acquireClient();\n\t\ttry {\n\t\t\tconst releaseLock = await acquireClientQueryLock(client);\n\t\t\ttry {\n\t\t\t\treturn { affectedRows: (await client.query({\n\t\t\t\t\tname,\n\t\t\t\t\ttext: request.sql,\n\t\t\t\t\tvalues: blindCast(request.params ?? [])\n\t\t\t\t})).rowCount ?? 0 };\n\t\t\t} finally {\n\t\t\t\treleaseLock();\n\t\t\t}\n\t\t} finally {\n\t\t\tawait this.releaseClient(client);\n\t\t}\n\t}\n\tinExplicitTransaction() {\n\t\treturn false;\n\t}\n\tasync *runQuery(request, name) {\n\t\tconst client = await this.acquireClient();\n\t\tlet rows;\n\t\ttry {\n\t\t\tif (!this.options.cursorDisabled) {\n\t\t\t\tconst releaseLock = await acquireClientQueryLock(client);\n\t\t\t\ttry {\n\t\t\t\t\tfor await (const row of this.streamWithPortalProtection(client, request, this.options.cursorBatchSize, name)) yield blindCast(row);\n\t\t\t\t\treturn;\n\t\t\t\t} catch (cursorError) {\n\t\t\t\t\tif (!(cursorError instanceof Error) || isPostgresError(cursorError)) throw cursorError;\n\t\t\t\t} finally {\n\t\t\t\t\treleaseLock();\n\t\t\t\t}\n\t\t\t}\n\t\t\trows = await this.executeBuffered(client, request.sql, request.params, name);\n\t\t} finally {\n\t\t\tawait this.releaseClient(client);\n\t\t}\n\t\tfor (const row of rows) yield blindCast(row);\n\t}\n\tasync explain(request) {\n\t\tconst text = `EXPLAIN (FORMAT JSON) ${request.sql}`;\n\t\tconst client = await this.acquireClient();\n\t\ttry {\n\t\t\tconst releaseLock = await acquireClientQueryLock(client);\n\t\t\ttry {\n\t\t\t\treturn { rows: blindCast((await client.query(text, request.params === void 0 ? void 0 : [...request.params]).catch(rethrowNormalizedError)).rows) };\n\t\t\t} finally {\n\t\t\t\treleaseLock();\n\t\t\t}\n\t\t} finally {\n\t\t\tawait this.releaseClient(client);\n\t\t}\n\t}\n\tasync *streamWithPortalProtection(client, request, cursorBatchSize, name) {\n\t\tif (this.inExplicitTransaction()) {\n\t\t\tyield* this.executeWithCursor(client, request.sql, request.params, cursorBatchSize, name);\n\t\t\treturn;\n\t\t}\n\t\tawait client.query(\"BEGIN\");\n\t\tlet streamFailed = false;\n\t\ttry {\n\t\t\tyield* this.executeWithCursor(client, request.sql, request.params, cursorBatchSize, name);\n\t\t} catch (error) {\n\t\t\tstreamFailed = true;\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tawait this.commitStreamSpan(client, streamFailed);\n\t\t}\n\t}\n\tasync commitStreamSpan(client, streamFailed) {\n\t\ttry {\n\t\t\tawait client.query(\"COMMIT\");\n\t\t} catch (commitError) {\n\t\t\tif (!streamFailed) throw commitError;\n\t\t}\n\t}\n\tasync *executeWithCursor(client, sql, params, cursorBatchSize, name) {\n\t\tconst values = blindCast(params ?? []);\n\t\tconst config = { types: serverTextTypes };\n\t\tconst cursor = client.query(name === void 0 ? new Cursor(sql, values, config) : new NamedCursor({\n\t\t\tname,\n\t\t\ttext: sql,\n\t\t\tvalues,\n\t\t\tconfig\n\t\t}));\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tconst rows = await readCursor(cursor, cursorBatchSize);\n\t\t\t\tif (rows.length === 0) break;\n\t\t\t\tfor (const row of rows) yield row;\n\t\t\t}\n\t\t} finally {\n\t\t\tawait closeCursor(cursor);\n\t\t}\n\t}\n\tasync executeBuffered(client, sql, params, name) {\n\t\tconst config = {\n\t\t\tname,\n\t\t\ttext: sql,\n\t\t\tvalues: blindCast(params ?? []),\n\t\t\ttypes: serverTextTypes\n\t\t};\n\t\tconst releaseLock = await acquireClientQueryLock(client);\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await client.query(config);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t}\n\t\treturn blindCast(result.rows);\n\t}\n};\nvar PostgresConnectionImpl = class extends PostgresQueryable {\n\t#connection;\n\t#onRelease;\n\t#onDestroy;\n\t#txState;\n\tconstructor(connection, options, onRelease, onDestroy, txState) {\n\t\tsuper(options);\n\t\tthis.#connection = connection;\n\t\tthis.#onRelease = onRelease;\n\t\tthis.#onDestroy = onDestroy;\n\t\tthis.#txState = txState ?? { open: false };\n\t}\n\tacquireClient() {\n\t\treturn Promise.resolve(this.#connection);\n\t}\n\treleaseClient(_client) {\n\t\treturn Promise.resolve();\n\t}\n\tinExplicitTransaction() {\n\t\treturn this.#txState.open;\n\t}\n\tasync beginTransaction() {\n\t\tconst releaseLock = await acquireClientQueryLock(this.#connection);\n\t\ttry {\n\t\t\tawait this.#connection.query(\"BEGIN\").catch(rethrowNormalizedError);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t}\n\t\tthis.#txState.open = true;\n\t\treturn new PostgresTransactionImpl(this.#connection, this.options, () => {\n\t\t\tthis.#txState.open = false;\n\t\t});\n\t}\n\tasync release() {\n\t\tconst conn = this.#connection;\n\t\tif (\"release\" in conn) conn.release();\n\t\tconst onRelease = this.#onRelease;\n\t\tthis.#onRelease = void 0;\n\t\tthis.#onDestroy = void 0;\n\t\tonRelease?.();\n\t}\n\tasync destroy(reason) {\n\t\tconst onDestroy = this.#onDestroy;\n\t\tconst onRelease = this.#onRelease;\n\t\tthis.#onDestroy = void 0;\n\t\tthis.#onRelease = void 0;\n\t\tconst conn = this.#connection;\n\t\tif (\"release\" in conn) {\n\t\t\tconst releaseArg = reason instanceof Error ? reason : /* @__PURE__ */ new Error(\"Connection destroyed\");\n\t\t\tconn.release(releaseArg);\n\t\t}\n\t\tif (onDestroy) await onDestroy(reason);\n\t\telse onRelease?.();\n\t}\n};\nvar PostgresTransactionImpl = class extends PostgresQueryable {\n\t#connection;\n\t#onSettled;\n\tconstructor(connection, options, onSettled) {\n\t\tsuper(options);\n\t\tthis.#connection = connection;\n\t\tthis.#onSettled = onSettled;\n\t}\n\tacquireClient() {\n\t\treturn Promise.resolve(this.#connection);\n\t}\n\treleaseClient(_client) {\n\t\treturn Promise.resolve();\n\t}\n\tinExplicitTransaction() {\n\t\treturn true;\n\t}\n\t#settle() {\n\t\tconst onSettled = this.#onSettled;\n\t\tthis.#onSettled = void 0;\n\t\tonSettled?.();\n\t}\n\tasync commit() {\n\t\tconst releaseLock = await acquireClientQueryLock(this.#connection);\n\t\ttry {\n\t\t\tawait this.#connection.query(\"COMMIT\").catch(rethrowNormalizedError);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t\tthis.#settle();\n\t\t}\n\t}\n\tasync rollback() {\n\t\tconst releaseLock = await acquireClientQueryLock(this.#connection);\n\t\ttry {\n\t\t\tawait this.#connection.query(\"ROLLBACK\").catch(rethrowNormalizedError);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t\tthis.#settle();\n\t\t}\n\t}\n};\nvar PostgresPoolDriverImpl = class extends PostgresQueryable {\n\tpool;\n\t#closed = false;\n\tconstructor(options) {\n\t\tsuper(buildConnectionOptions(options));\n\t\tthis.pool = options.connect.pool;\n\t}\n\tget state() {\n\t\treturn this.#closed ? \"closed\" : \"connected\";\n\t}\n\tasync connect(_binding) {}\n\tasync acquireConnection() {\n\t\treturn new PostgresConnectionImpl(await this.acquireClient(), this.options);\n\t}\n\tasync close() {\n\t\tif (this.#closed) return;\n\t\tthis.#closed = true;\n\t\tawait this.pool.end();\n\t}\n\tasync acquireClient() {\n\t\treturn suppressIdleConnectionErrors$1(await this.pool.connect());\n\t}\n\tasync releaseClient(client) {\n\t\tclient.release();\n\t}\n};\nvar PostgresDirectDriverImpl = class extends PostgresQueryable {\n\tdirectClient;\n\t#connectionMutex = new AsyncMutex();\n\t#closed = false;\n\t#connected = false;\n\t#connectPromise;\n\t#txState = { open: false };\n\tconstructor(options) {\n\t\tsuper(buildConnectionOptions(options));\n\t\tthis.directClient = options.connect.client;\n\t\tthis.directClient.on(\"error\", () => {\n\t\t\tthis.#closed = true;\n\t\t\tthis.#connected = false;\n\t\t});\n\t}\n\tinExplicitTransaction() {\n\t\treturn this.#txState.open;\n\t}\n\tget state() {\n\t\treturn this.#closed ? \"closed\" : \"connected\";\n\t}\n\tasync connect(_binding) {}\n\tasync acquireConnection() {\n\t\tconst releaseLease = await this.#connectionMutex.lock();\n\t\ttry {\n\t\t\treturn new PostgresConnectionImpl(await this.acquireClient(), this.options, releaseLease, async () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait this.#closeWhileHoldingLease({ waitForStatement: false });\n\t\t\t\t} finally {\n\t\t\t\t\treleaseLease();\n\t\t\t\t}\n\t\t\t}, this.#txState);\n\t\t} catch (error) {\n\t\t\treleaseLease();\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync close() {\n\t\tconst releaseLease = await this.#connectionMutex.lock();\n\t\ttry {\n\t\t\tawait this.#closeWhileHoldingLease({ waitForStatement: true });\n\t\t} finally {\n\t\t\treleaseLease();\n\t\t}\n\t}\n\tasync #closeWhileHoldingLease(options) {\n\t\tif (this.#closed) return;\n\t\tthis.#closed = true;\n\t\tconst releaseQueryLock = options.waitForStatement ? await acquireClientQueryLock(this.directClient) : () => {};\n\t\ttry {\n\t\t\tawait this.directClient.end();\n\t\t} finally {\n\t\t\treleaseQueryLock();\n\t\t}\n\t\tthis.#connected = false;\n\t}\n\tasync acquireClient() {\n\t\tif (this.#closed) throw driverError(\"DRIVER.NOT_CONNECTED\", \"Postgres connection lost or closed. Create a new client to reconnect.\");\n\t\tif (this.#connected) return this.directClient;\n\t\tif (this.#connectPromise !== void 0) {\n\t\t\tawait this.#connectPromise;\n\t\t\treturn this.directClient;\n\t\t}\n\t\tthis.#connectPromise = (async () => {\n\t\t\ttry {\n\t\t\t\tawait this.directClient.connect();\n\t\t\t} catch (error) {\n\t\t\t\tif (!isAlreadyConnectedError(error)) throw error;\n\t\t\t} finally {\n\t\t\t\tthis.#connectPromise = void 0;\n\t\t\t}\n\t\t\tthis.#connected = true;\n\t\t})();\n\t\tawait this.#connectPromise;\n\t\treturn this.directClient;\n\t}\n\tasync releaseClient(_client) {}\n};\nfunction createBoundDriverFromBinding(binding, cursorOpts, extraOpts) {\n\tconst preparedStatements = extraOpts?.preparedStatements;\n\tswitch (binding.kind) {\n\t\tcase \"url\": return new PostgresPoolDriverImpl({\n\t\t\tconnect: { pool: suppressIdleConnectionErrors$1(new Pool({\n\t\t\t\tconnectionString: binding.url,\n\t\t\t\tconnectionTimeoutMillis: 2e4,\n\t\t\t\tidleTimeoutMillis: 3e4\n\t\t\t})) },\n\t\t\tcursor: cursorOpts,\n\t\t\tpreparedStatements\n\t\t});\n\t\tcase \"pgPool\": return new PostgresPoolDriverImpl({\n\t\t\tconnect: { pool: suppressIdleConnectionErrors$1(binding.pool) },\n\t\t\tcursor: cursorOpts,\n\t\t\tpreparedStatements\n\t\t});\n\t\tcase \"pgClient\": return new PostgresDirectDriverImpl({\n\t\t\tconnect: { client: suppressIdleConnectionErrors$1(binding.client) },\n\t\t\tcursor: cursorOpts,\n\t\t\tpreparedStatements\n\t\t});\n\t}\n}\nfunction readCursor(cursor, size) {\n\treturn callbackToPromise((cb) => {\n\t\tcursor.read(size, (err, rows) => cb(err, rows));\n\t});\n}\nfunction closeCursor(cursor) {\n\treturn callbackToPromise((cb) => cursor.close(cb));\n}\nfunction rethrowNormalizedError(error) {\n\tthrow normalizePgError(error);\n}\nfunction prepareFailedError(retryError, handle) {\n\tconst cause = normalizePgError(retryError);\n\treturn Object.assign(driverError(\"DRIVER.PREPARE_FAILED\", `Prepared statement failed again after re-preparing with a fresh handle: ${cause.message}`, { handle }), { cause });\n}\n//#endregion\n//#region src/exports/runtime.ts\nconst USE_BEFORE_CONNECT_MESSAGE = \"Postgres driver not connected. Call connect(binding) before acquireConnection or execute.\";\nconst CLOSED_MESSAGE = \"Postgres driver is closed. Call connect(binding) to reconnect.\";\nconst CONNECTION_LOST_MESSAGE = \"Postgres connection lost or closed. Call connect(binding) to reconnect.\";\nconst ALREADY_CONNECTED_MESSAGE = \"Postgres driver already connected. Call close() before reconnecting with a new binding.\";\nfunction unboundQuery(notConnected) {\n\treturn { [Symbol.asyncIterator]() {\n\t\treturn { async next() {\n\t\t\tthrow notConnected();\n\t\t} };\n\t} };\n}\nconst notConnectedMessages = {\n\tunbound: USE_BEFORE_CONNECT_MESSAGE,\n\tclosed: CLOSED_MESSAGE,\n\tconnectionLost: CONNECTION_LOST_MESSAGE\n};\nvar PostgresUnboundDriverImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\t#delegate = null;\n\t#disconnectedState = \"unbound\";\n\t#cursorOpts;\n\t#preparedStatements;\n\tconstructor(options) {\n\t\tthis.#cursorOpts = options?.cursor;\n\t\tthis.#preparedStatements = options?.preparedStatements;\n\t}\n\tget state() {\n\t\tif (this.#delegate !== null) return \"connected\";\n\t\treturn this.#disconnectedState === \"unbound\" ? \"unbound\" : \"closed\";\n\t}\n\t#notConnectedError() {\n\t\treturn driverError(\"DRIVER.NOT_CONNECTED\", notConnectedMessages[this.#disconnectedState]);\n\t}\n\t#requireDelegate() {\n\t\tconst delegate = this.#delegate;\n\t\tif (delegate === null) throw this.#notConnectedError();\n\t\treturn delegate;\n\t}\n\tasync connect(binding) {\n\t\tif (this.#delegate !== null) throw driverError(\"DRIVER.ALREADY_CONNECTED\", ALREADY_CONNECTED_MESSAGE, { bindingKind: binding.kind });\n\t\tthis.#delegate = createBoundDriverFromBinding(binding, this.#cursorOpts, { preparedStatements: this.#preparedStatements });\n\t\tthis.#disconnectedState = \"unbound\";\n\t}\n\tasync acquireConnection() {\n\t\tconst delegate = this.#requireDelegate();\n\t\tconst connection = await delegate.acquireConnection();\n\t\treturn this.#wrapConnection(connection, delegate);\n\t}\n\t/**\n\t* Wraps an acquired connection so that teardown paths which close the\n\t* underlying delegate (notably `destroy()` on a pgClient binding, where\n\t* the single socket means a destroyed connection invalidates the driver)\n\t* also reset our own `#delegate` reference. Without this, a failed\n\t* transaction rollback would leave the outer unbound wrapper reporting\n\t* `connected` while routing subsequent work to an already-ended delegate.\n\t*/\n\t#wrapConnection(connection, delegate) {\n\t\tconst syncDelegateState = () => {\n\t\t\tif (this.#delegate === delegate && delegate.state === \"closed\") {\n\t\t\t\tthis.#delegate = null;\n\t\t\t\tthis.#disconnectedState = \"connectionLost\";\n\t\t\t}\n\t\t};\n\t\tconst wrapped = {\n\t\t\tbeginTransaction: connection.beginTransaction.bind(connection),\n\t\t\tquery: connection.query.bind(connection),\n\t\t\texecute: connection.execute.bind(connection),\n\t\t\trelease: async () => {\n\t\t\t\ttry {\n\t\t\t\t\tawait connection.release();\n\t\t\t\t} finally {\n\t\t\t\t\tsyncDelegateState();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdestroy: async (reason) => {\n\t\t\t\ttry {\n\t\t\t\t\tawait connection.destroy(reason);\n\t\t\t\t} finally {\n\t\t\t\t\tsyncDelegateState();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tif (connection.explain) wrapped.explain = connection.explain.bind(connection);\n\t\treturn wrapped;\n\t}\n\tasync close() {\n\t\tconst delegate = this.#delegate;\n\t\tthis.#delegate = null;\n\t\tthis.#disconnectedState = \"closed\";\n\t\tawait delegate?.close();\n\t}\n\tquery(request) {\n\t\tconst delegate = this.#delegate;\n\t\treturn delegate === null ? unboundQuery(() => this.#notConnectedError()) : delegate.query(request);\n\t}\n\tasync execute(request) {\n\t\treturn this.#requireDelegate().execute(request);\n\t}\n\tasync explain(request) {\n\t\tconst delegate = this.#requireDelegate();\n\t\tconst explain = delegate.explain;\n\t\tif (explain === void 0) throw driverError(\"DRIVER.NOT_CONNECTED\", USE_BEFORE_CONNECT_MESSAGE);\n\t\treturn explain.call(delegate, request);\n\t}\n};\nconst postgresRuntimeDriverDescriptor = {\n\t...postgresDriverDescriptorMeta,\n\tcreate(options) {\n\t\treturn new PostgresUnboundDriverImpl(options);\n\t}\n};\n//#endregion\nexport { postgresRuntimeDriverDescriptor as default, suppressIdleConnectionErrors };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;AAMA,SAAS,YAAY,MAAM,SAAS,SAAS;CAC5C,MAAM,QAAQ,IAAI,MAAM,OAAO;CAC/B,OAAO,eAAe,OAAO,QAAQ;EACpC,OAAO;EACP,cAAc;CACf,CAAC;CACD,OAAO,YAAY,KAAK,IAAI,OAAO,OAAO,OAAO;EAChD;EACA,UAAU;EACV,UAAU;CACX,CAAC,IAAI,OAAO,OAAO,OAAO;EACzB;EACA,UAAU;EACV,UAAU;EACV;CACD,CAAC;AACF;AAGA,SAAS,kBAAkB,IAAI;CAC9B,OAAO,IAAI,SAAS,SAAS,WAAW;EACvC,IAAI,KAAK,WAAW;GACnB,IAAI,KAAK;IACR,OAAO,GAAG;I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