@prisma/orm-target-postgres 8.0.0-rc.19-dev.9 → 8.0.0-rc.19-dev.11
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-BQtzekxT.d.mts} +11 -11
- package/dist/pack-BQtzekxT.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-TQ2GIDxX.mjs → prisma7-binding-CVuACrdW.mjs} +10 -10
- package/dist/prisma7-binding-CVuACrdW.mjs.map +1 -0
- package/dist/{prisma7-binding-kYc2Xcxt.d.mts → prisma7-binding-OsCHkC_x.d.mts} +12 -12
- package/dist/prisma7-binding-OsCHkC_x.d.mts.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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ddl-B7Rqlz6D-BcwCMSB7.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/ddl-B7Rqlz6D.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, n as PG_BOOL_CODEC_ID } from \"./codec-ids-BMhEpFwv.mjs\";\nimport { i as postgresCreateNamespace, u as PostgresTableSource } from \"./postgres-schema-C6w1rzOF.mjs\";\nimport { _ as PostgresDropIndex, a as PostgresAlterIndexRename, b as PostgresDropType, c as PostgresAlterTable, d as PostgresCreatePolicy, f as PostgresCreateSchema, g as PostgresDisableRowLevelSecurity, i as DropDefaultAction, l as PostgresAlterTableSetSchema, m as PostgresCreateType, n as AddConstraintAction, o as PostgresAlterPolicyRename, p as PostgresCreateTable, r as AlterColumnTypeAction, s as PostgresAlterSchemaRename, t as AddColumnAction, u as PostgresCreateIndex, v as PostgresDropPolicy, y as PostgresDropSchema } from \"./nodes-G8VTh4PM.mjs\";\nimport { opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { cfExpr, cfTable, exprSelect } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/checks.ts\n/**\n* `to_regclass($1)` with the qualified table name bound as a text parameter.\n* Thin vocabulary wrapper over the core `cfExpr.fn` helper — the target\n* supplies only the template and the codec'd operand.\n*/\nfunction toRegclass(qualifiedName) {\n\treturn cfExpr.fn({\n\t\tmethod: \"to_regclass\",\n\t\ttemplate: \"to_regclass({{self}})\",\n\t\tself: cfExpr.param(qualifiedName, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed builder for the migration planner's table-existence checks. Produces\n* FROM-less `SELECT to_regclass($1) IS [NOT] NULL AS \"result\"` ASTs with the\n* qualified table name bound as a text parameter — never inlined into the SQL.\n*\n* `schema` is a namespace coordinate: the framework `__unbound__` sentinel\n* elides the qualifier (search_path decides at runtime); any other id\n* qualifies as `\"schema\".\"table\"`.\n*/\nfunction tableExistsAst(schema, table) {\n\tconst regclass = toRegclass(postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table));\n\treturn {\n\t\ttableAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build(),\n\t\ttablePresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build()\n\t};\n}\n/**\n* Typed builder for the migration planner's constraint-existence checks.\n* Produces `SELECT [NOT ]EXISTS (SELECT 1 FROM pg_constraint c JOIN\n* pg_namespace n ON n.oid = c.connamespace WHERE c.conname = $1 AND\n* n.nspname = $2 [AND c.conrelid = to_regclass($3)]) AS \"result\"` with the\n* constraint name, schema name, and qualified table name bound as text\n* parameters.\n*\n* When `table` is omitted the check matches by name + schema across all\n* tables. Pass `table` to scope the check to a single table (prevents false\n* matches on identically-named constraints in different tables). `schema`\n* is a namespace coordinate: the `__unbound__` sentinel compares `nspname`\n* against `current_schema()` instead of a bound parameter.\n*/\nfunction constraintExistsAst(options) {\n\tconst namespace = postgresCreateNamespace({\n\t\tid: options.schema,\n\t\tentries: { table: {} }\n\t});\n\tconst conditions = [cfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression())];\n\tif (options.table !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tconstraintPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tconstraintAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction checkNamespace(schema) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t});\n}\nfunction informationSchemaColumns() {\n\treturn new PostgresTableSource({\n\t\tschema: \"information_schema\",\n\t\tname: \"columns\"\n\t});\n}\nfunction infoSchemaColumnConditions(options) {\n\treturn [\n\t\tcfExpr.identifierRef(\"table_schema\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.identifierRef(\"table_name\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"column_name\").eqParam(options.column, PG_TEXT_CODEC_ID)\n\t];\n}\nfunction infoSchemaColumnQuery(conditions) {\n\treturn exprSelect().from(informationSchemaColumns()).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n}\n/**\n* Typed builder for column-existence checks over\n* `information_schema.columns`, with schema, table, and column names bound\n* as text parameters.\n*/\nfunction columnExistsAst(options) {\n\tconst inner = () => infoSchemaColumnQuery(infoSchemaColumnConditions(options));\n\treturn {\n\t\tcolumnPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tcolumnAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed nullability check: EXISTS over `information_schema.columns` with\n* `is_nullable` compared against the bound `'YES'` / `'NO'` marker.\n*/\nfunction columnNullabilityAst(options) {\n\tconst conditions = [...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"is_nullable\").eqParam(options.nullable ? \"YES\" : \"NO\", PG_TEXT_CODEC_ID)];\n\treturn exprSelect().project(\"result\", cfExpr.exists(infoSchemaColumnQuery(conditions))).build();\n}\n/**\n* Typed default-presence checks over `information_schema.columns`.\n* `defaultPresent` / `defaultAbsent` assert the column row exists with a\n* non-null / null `column_default`; `noDefault` is the NOT EXISTS variant\n* (also true when the column row is missing entirely).\n*/\nfunction columnDefaultAst(options) {\n\tconst withDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNotNull()]);\n\tconst withoutDefault = () => infoSchemaColumnQuery([...infoSchemaColumnConditions(options), cfExpr.identifierRef(\"column_default\").isNull()]);\n\treturn {\n\t\tdefaultPresent: () => exprSelect().project(\"result\", cfExpr.exists(withDefault())).build(),\n\t\tdefaultAbsent: () => exprSelect().project(\"result\", cfExpr.exists(withoutDefault())).build(),\n\t\tnoDefault: () => exprSelect().project(\"result\", cfExpr.notExists(withDefault())).build()\n\t};\n}\n/**\n* Typed check that a column takes its default from the sequence it owns: the column's default (`pg_attrdef`) depends on the sequence `pg_get_serial_sequence` finds for it. A `nextval(...)` default records that dependency on the sequence it reads, so a default that reads another sequence, an earlier default, or no default does not pass. It compares catalog identities, never the default's text.\n*/\nfunction columnDefaultSequenceAst(options) {\n\tconst regclassOf = (catalog) => cfExpr.raw(`'${catalog}'::regclass`, {\n\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\tnullable: false\n\t});\n\tconst defaultOnOwnedSequence = exprSelect().from(cfTable(\"pg_attrdef\", \"d\")).join(cfTable(\"pg_attribute\", \"a\"), cfExpr.columnRef(\"a\", \"attrelid\").eqExpr(cfExpr.columnRef(\"d\", \"adrelid\")).and(cfExpr.columnRef(\"a\", \"attnum\").eqExpr(cfExpr.columnRef(\"d\", \"adnum\")))).join(cfTable(\"pg_depend\", \"dep\"), cfExpr.columnRef(\"dep\", \"objid\").eqExpr(cfExpr.columnRef(\"d\", \"oid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"d\", \"adrelid\").eqExpr(toRegclass(checkNamespace(options.schema).qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"dep\", \"classid\").eqExpr(regclassOf(\"pg_attrdef\")),\n\t\tcfExpr.columnRef(\"dep\", \"refclassid\").eqExpr(regclassOf(\"pg_class\")),\n\t\tcfExpr.columnRef(\"dep\", \"refobjid\").eqExpr(ownedSequenceOf(options))\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(defaultOnOwnedSequence)).build();\n}\n/**\n* The sequence the column owns, as a `regclass`, found in the catalog with `pg_get_serial_sequence`; `NULL` when it owns none. A SERIAL column and an identity column both own one, and it keeps its name when the table or column is renamed.\n*/\nfunction ownedSequenceOf(location) {\n\treturn cfExpr.fn({\n\t\tmethod: \"pg_get_serial_sequence\",\n\t\ttemplate: \"pg_get_serial_sequence({{self}}, {{arg0}})::regclass\",\n\t\tself: cfExpr.param(checkNamespace(location.schema).qualifyTable(location.table), PG_TEXT_CODEC_ID),\n\t\targs: [cfExpr.param(location.column, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n}\n/**\n* Typed check that a column's autoincrement default has a sequence to use: the column already owns one, whatever its name, or no relation has the name `sequence`, which the operation creates.\n*/\nfunction sequenceNameAvailableAst(options) {\n\tconst qualifiedSequence = checkNamespace(options.schema).qualifyTable(options.sequence);\n\treturn exprSelect().project(\"result\", ownedSequenceOf(options).isNotNull().or(toRegclass(qualifiedSequence).isNull())).build();\n}\n/**\n* Typed column-type check: EXISTS over `pg_attribute` joined to `pg_class`\n* and `pg_namespace`, comparing `format_type(a.atttypid, a.atttypmod)`\n* against the bound expected display type and excluding dropped columns.\n*/\nfunction columnTypeAst(options) {\n\tconst formatType = cfExpr.fn({\n\t\tmethod: \"format_type\",\n\t\ttemplate: \"format_type({{self}}, {{arg0}})\",\n\t\tself: cfExpr.columnRef(\"a\", \"atttypid\"),\n\t\targs: [cfExpr.columnRef(\"a\", \"atttypmod\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"a\", \"attrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tformatType.eqParam(options.expectedType, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed primary-key existence check over `pg_index` joined to `pg_class`\n* and `pg_namespace`, with a LEFT JOIN on the index relation so an\n* optional `constraintName` can scope the match to a named constraint.\n*/\nfunction tablePrimaryKeyAst(options) {\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"i\", \"indisprimary\")\n\t];\n\tif (options.constraintName !== void 0) conditions.push(cfExpr.columnRef(\"c2\", \"relname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID));\n\tconst inner = () => exprSelect().from(cfTable(\"pg_index\", \"i\")).join(cfTable(\"pg_class\", \"c\"), cfExpr.columnRef(\"c\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indrelid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).leftJoin(cfTable(\"pg_class\", \"c2\"), cfExpr.columnRef(\"c2\", \"oid\").eqExpr(cfExpr.columnRef(\"i\", \"indexrelid\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn {\n\t\tpkPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpkAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed emptiness check: NOT EXISTS over the user table itself with\n* `LIMIT 1`. The table is addressed through the namespace's polymorphic\n* `tableSource` (qualified for named schemas, bare for the unbound slot).\n*/\nfunction tableIsEmptyAst(schema, table) {\n\tconst inner = exprSelect().from(checkNamespace(schema).tableSource(table)).project(\"one\", cfExpr.lit(1)).limit(1);\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed no-NULL-values data check used by `SET NOT NULL` prechecks:\n* NOT EXISTS over the user table where the column IS NULL.\n*/\nfunction noNullValuesAst(options) {\n\tconst inner = exprSelect().from(checkNamespace(options.schema).tableSource(options.table)).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(options.column).isNull());\n\treturn exprSelect().project(\"result\", cfExpr.notExists(inner)).build();\n}\n/**\n* Typed extension existence check over `pg_extension`, with the extension\n* name bound as a text parameter.\n*/\nfunction extensionExistsAst(extensionName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_extension\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"extname\").eqParam(extensionName, PG_TEXT_CODEC_ID));\n\treturn {\n\t\textensionPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\textensionAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed RLS-policy existence check over `pg_policies`, with schema, table,\n* and policy names bound as text parameters (never inlined). The `schema`\n* coordinate is the resolved live-database schema name (e.g. `'public'`),\n* compared against `pg_policies.schemaname` as a bound parameter.\n*/\nfunction rlsPolicyExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tpolicyPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tpolicyAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed row-level-security enabled check over `pg_class` joined to\n* `pg_namespace`, comparing `pg_class.relrowsecurity` against the expected\n* boolean. Schema and table names are bound as text parameters.\n*/\nfunction rlsEnabledAst(schema, table) {\n\tconst inner = (enabled) => exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"c\", \"relname\").eqParam(table, PG_TEXT_CODEC_ID),\n\t\tenabled ? cfExpr.columnRef(\"c\", \"relrowsecurity\") : cfExpr.columnRef(\"c\", \"relrowsecurity\").not()\n\t]));\n\treturn {\n\t\trlsEnabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(true))).build(),\n\t\trlsDisabled: () => exprSelect().project(\"result\", cfExpr.exists(inner(false))).build()\n\t};\n}\n/**\n* Typed index existence check riding the same `to_regclass` vocabulary as\n* `tableExistsAst`, with the qualified index name bound as a text parameter.\n*/\nfunction indexExistsAst(schema, indexName) {\n\tconst regclass = toRegclass(checkNamespace(schema).qualifyTable(indexName));\n\treturn {\n\t\tindexPresent: () => exprSelect().project(\"result\", regclass.isNotNull()).build(),\n\t\tindexAbsent: () => exprSelect().project(\"result\", regclass.isNull()).build()\n\t};\n}\n/**\n* Typed native-enum type existence check over `pg_type` joined to\n* `pg_namespace`, restricted to enum types (`typtype = 'e'`). Schema and\n* type name are bound as text parameters; `schema` is a namespace\n* coordinate (the `__unbound__` sentinel compares against\n* `current_schema()`), matching {@link tableExistsAst} et al.\n*/\nfunction nativeEnumTypeExistsAst(schema, typeName) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_type\", \"t\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"t\", \"typtype\").eqParam(\"e\", PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\ttypePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\ttypeAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Typed native-enum member-value existence check over `pg_enum` joined to\n* `pg_type` and `pg_namespace`. Schema, type name, and the candidate member\n* value are bound as text parameters — used by `addNativeEnumValue`'s\n* precheck (value absent) and postcheck (value present).\n*/\nfunction nativeEnumValueExistsAst(options) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_enum\", \"e\")).join(cfTable(\"pg_type\", \"t\"), cfExpr.columnRef(\"t\", \"oid\").eqExpr(cfExpr.columnRef(\"e\", \"enumtypid\"))).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"t\", \"typnamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(checkNamespace(options.schema).schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"t\", \"typname\").eqParam(options.typeName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"e\", \"enumlabel\").eqParam(options.value, PG_TEXT_CODEC_ID)\n\t]));\n\treturn {\n\t\tvaluePresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tvalueAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\n/**\n* Whether the attribute numbers in `keys` (an `int2[]` or `int2vector` such as `pg_constraint.conkey` or `pg_index.indkey`) name, in order, exactly the columns `names` of the relation `relation`. Key `0`, an expression slot of an index, names no column.\n*/\nfunction keyColumnsAre(keys, relation, names) {\n\treturn cfExpr.fn({\n\t\tmethod: \"key_columns_are\",\n\t\ttemplate: \"(SELECT coalesce(jsonb_agg(key_attribute.attname ORDER BY key_column.position), '[]'::jsonb) FROM unnest({{self}}::int2[]) WITH ORDINALITY AS key_column(attnum, position) JOIN pg_attribute key_attribute ON key_attribute.attrelid = {{arg0}} AND key_attribute.attnum = key_column.attnum) = ({{arg1}})::jsonb\",\n\t\tself: keys,\n\t\targs: [relation, cfExpr.param(JSON.stringify(names), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n}\n/**\n* Typed check that the relation `name` exists and its `pg_class.relkind` is one of `kinds`, so a view, sequence or index of the same name does not pass as a table.\n*/\nfunction relationKindAst(options) {\n\tconst relation = toRegclass(checkNamespace(options.schema).qualifyTable(options.name));\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"c\", \"oid\").eqExpr(relation), options.kinds.map((kind) => cfExpr.columnRef(\"c\", \"relkind\").eqParam(kind, PG_TEXT_CODEC_ID)).reduce((either, kind) => either.or(kind))]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the constraint `constraintName` on `table` is of kind `contype` (`p`, `u`, `f` or `c`), on the columns `columns` in order when given, and for a foreign key, references `foreignKey`'s table and columns in order with its delete and update actions. It reads only catalog values, never the text Postgres prints for a constraint.\n*/\nfunction constraintDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst conditions = [\n\t\tcfExpr.columnRef(\"c\", \"conname\").eqParam(options.constraintName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"n\", \"nspname\").eqExpr(namespace.schemaFilterExpression()),\n\t\tcfExpr.columnRef(\"c\", \"conrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"c\", \"contype\").eqParam(options.contype, PG_TEXT_CODEC_ID)\n\t];\n\tif (options.columns !== void 0) conditions.push(keyColumnsAre(cfExpr.columnRef(\"c\", \"conkey\"), cfExpr.columnRef(\"c\", \"conrelid\"), options.columns));\n\tconst foreignKey = options.foreignKey;\n\tif (foreignKey !== void 0) conditions.push(cfExpr.columnRef(\"c\", \"confrelid\").eqExpr(toRegclass(checkNamespace(foreignKey.referencedSchema).qualifyTable(foreignKey.referencedTable))), keyColumnsAre(cfExpr.columnRef(\"c\", \"confkey\"), cfExpr.columnRef(\"c\", \"confrelid\"), foreignKey.referencedColumns), cfExpr.columnRef(\"c\", \"confdeltype\").eqParam(foreignKey.onDelete, PG_TEXT_CODEC_ID), cfExpr.columnRef(\"c\", \"confupdtype\").eqParam(foreignKey.onUpdate, PG_TEXT_CODEC_ID));\n\tconst inner = exprSelect().from(cfTable(\"pg_constraint\", \"c\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"connamespace\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf(conditions));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that `index` is an index on `table` with the given uniqueness and access method, on the columns `columns` in order, and with or without a predicate. For an index written as an element list (`expression`) it checks no elements: the list can be a real expression, which Postgres stores in `indexprs`, or plain columns with a sort order, operator class or collation, which it stores as columns, and comparing its text would need the form Postgres prints.\n*/\nfunction indexDefinitionAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst indexColumn = (name) => cfExpr.columnRef(\"i\", name);\n\tconst inner = exprSelect().from(cfTable(\"pg_class\", \"c\")).join(cfTable(\"pg_index\", \"i\"), cfExpr.columnRef(\"i\", \"indexrelid\").eqExpr(cfExpr.columnRef(\"c\", \"oid\"))).join(cfTable(\"pg_am\", \"m\"), cfExpr.columnRef(\"m\", \"oid\").eqExpr(cfExpr.columnRef(\"c\", \"relam\"))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"c\", \"oid\").eqExpr(toRegclass(namespace.qualifyTable(options.index))),\n\t\tcfExpr.columnRef(\"c\", \"relkind\").eqParam(\"i\", PG_TEXT_CODEC_ID).or(cfExpr.columnRef(\"c\", \"relkind\").eqParam(\"I\", PG_TEXT_CODEC_ID)),\n\t\tindexColumn(\"indrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\toptions.unique ? indexColumn(\"indisunique\") : indexColumn(\"indisunique\").not(),\n\t\tcfExpr.columnRef(\"m\", \"amname\").eqParam(options.method, PG_TEXT_CODEC_ID),\n\t\t...\"columns\" in options.elements ? [indexColumn(\"indexprs\").isNull().and(keyColumnsAre(indexColumn(\"indkey\"), indexColumn(\"indrelid\"), options.elements.columns))] : [],\n\t\toptions.hasPredicate ? indexColumn(\"indpred\").isNotNull() : indexColumn(\"indpred\").isNull()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the RLS policy `policyName` on `table` exists with the command `command` (as `pg_policies.cmd` prints it, such as `ALL` or `SELECT`), the permissive flag, and exactly the roles `roles`, in any order. A role written as `current_user`, `current_role` or `session_user` stands for the role it names in the session that runs the check, as `CREATE POLICY` resolves it. It never compares the policy's expressions.\n*/\nfunction rlsPolicyDefinitionAst(options) {\n\tconst rolesAre = cfExpr.fn({\n\t\tmethod: \"roles_are\",\n\t\ttemplate: `(SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT policy_role::text COLLATE \"C\" AS role_name FROM unnest({{self}}) AS policy_role) AS actual_roles) = (SELECT coalesce(jsonb_agg(role_name ORDER BY role_name), '[]'::jsonb) FROM (SELECT DISTINCT (CASE expected_role WHEN 'current_user' THEN current_user::text WHEN 'current_role' THEN current_role::text WHEN 'session_user' THEN session_user::text ELSE expected_role END) COLLATE \"C\" AS role_name FROM jsonb_array_elements_text(({{arg0}})::jsonb) AS expected_role) AS expected_roles)`,\n\t\tself: cfExpr.identifierRef(\"roles\"),\n\t\targs: [cfExpr.param(JSON.stringify(options.roles), PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_policies\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.identifierRef(\"schemaname\").eqParam(options.schema, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"tablename\").eqParam(options.table, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"policyname\").eqParam(options.policyName, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"cmd\").eqParam(options.command, PG_TEXT_CODEC_ID),\n\t\tcfExpr.identifierRef(\"permissive\").eqParam(options.permissive ? \"PERMISSIVE\" : \"RESTRICTIVE\", PG_TEXT_CODEC_ID),\n\t\trolesAre\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the column owns a sequence, whatever its name, of the type `sequenceType` (`smallint`, `integer` or `bigint`). With `orNone`, a column that owns no sequence passes too.\n*/\nfunction columnOwnsSequenceAst(options) {\n\tconst ownedSequence = ownedSequenceOf(options);\n\tconst sequenceType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.sequenceType, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst sequenceOfType = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequence), cfExpr.columnRef(\"s\", \"seqtypid\").eqExpr(sequenceType)]));\n\treturn exprSelect().project(\"result\", options.orNone ? ownedSequence.isNull().or(cfExpr.exists(sequenceOfType)) : ownedSequence.isNotNull().and(cfExpr.exists(sequenceOfType))).build();\n}\n/**\n* Typed column-type check by the type's identity: compares the column's `pg_attribute.atttypid` with `to_regtype(type)`, or with that type's array type for a list. It checks a type that claims a kind, such as an enum, whatever schema it is in, and a type the stack's data types do not read. `to_regtype` drops a type modifier, so `varchar(20)` matches any `varchar`.\n*/\nfunction columnTypeOidAst(options) {\n\tconst namespace = checkNamespace(options.schema);\n\tconst expectedType = cfExpr.fn({\n\t\tmethod: \"to_regtype\",\n\t\ttemplate: options.many ? \"(SELECT \\\"t\\\".\\\"typarray\\\" FROM \\\"pg_catalog\\\".\\\"pg_type\\\" AS \\\"t\\\" WHERE \\\"t\\\".\\\"oid\\\" = to_regtype({{self}}))\" : \"to_regtype({{self}})\",\n\t\tself: cfExpr.param(options.type, PG_TEXT_CODEC_ID),\n\t\treturns: {\n\t\t\tcodecId: PG_TEXT_CODEC_ID,\n\t\t\tnullable: true\n\t\t}\n\t});\n\tconst inner = exprSelect().from(cfTable(\"pg_attribute\", \"a\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([\n\t\tcfExpr.columnRef(\"a\", \"attrelid\").eqExpr(toRegclass(namespace.qualifyTable(options.table))),\n\t\tcfExpr.columnRef(\"a\", \"attname\").eqParam(options.column, PG_TEXT_CODEC_ID),\n\t\tcfExpr.columnRef(\"a\", \"atttypid\").eqExpr(expectedType),\n\t\tcfExpr.columnRef(\"a\", \"attisdropped\").not()\n\t]));\n\treturn exprSelect().project(\"result\", cfExpr.exists(inner)).build();\n}\n/**\n* Typed check that the sequence the column owns has handed out no value above `maxValue`, so narrowing it to a smaller integer type keeps every value it already gave. The sequence's position is read only when its current maximum is above `maxValue`, that is when the change narrows it, so widening needs no rights on the sequence. A sequence that has never been read, and a column that owns none, pass.\n*/\nfunction sequenceValuesFitAst(options) {\n\tconst pastMax = cfExpr.fn({\n\t\tmethod: \"sequence_past_max\",\n\t\ttemplate: \"CASE WHEN {{self}} <= ({{arg0}})::bigint THEN false ELSE coalesce(pg_sequence_last_value(\\\"s\\\".\\\"seqrelid\\\"), 0) > ({{arg0}})::bigint END\",\n\t\tself: cfExpr.columnRef(\"s\", \"seqmax\"),\n\t\targs: [cfExpr.param(options.maxValue, PG_TEXT_CODEC_ID)],\n\t\treturns: {\n\t\t\tcodecId: PG_BOOL_CODEC_ID,\n\t\t\tnullable: false\n\t\t}\n\t});\n\tconst narrowedPastMax = exprSelect().from(cfTable(\"pg_sequence\", \"s\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.columnRef(\"s\", \"seqrelid\").eqExpr(ownedSequenceOf(options)).and(pastMax));\n\treturn exprSelect().project(\"result\", cfExpr.notExists(narrowedPastMax)).build();\n}\n/** Typed schema existence check over `pg_namespace`, with the schema name bound as a text parameter. */\nfunction schemaExistsAst(schema) {\n\tconst inner = () => exprSelect().from(cfTable(\"pg_namespace\")).project(\"one\", cfExpr.lit(1)).where(cfExpr.identifierRef(\"nspname\").eqParam(schema, PG_TEXT_CODEC_ID));\n\treturn {\n\t\tschemaPresent: () => exprSelect().project(\"result\", cfExpr.exists(inner())).build(),\n\t\tschemaAbsent: () => exprSelect().project(\"result\", cfExpr.notExists(inner())).build()\n\t};\n}\nfunction objectsInSchema(catalog, namespaceColumn, schema, only = []) {\n\treturn exprSelect().from(cfTable(catalog, \"o\")).join(cfTable(\"pg_namespace\", \"n\"), cfExpr.columnRef(\"n\", \"oid\").eqExpr(cfExpr.columnRef(\"o\", namespaceColumn))).project(\"one\", cfExpr.lit(1)).where(cfExpr.allOf([cfExpr.columnRef(\"n\", \"nspname\").eqParam(schema, PG_TEXT_CODEC_ID), ...only]));\n}\n/**\n* Whether a schema holds no relations (tables, views, sequences, indexes), no types of its own and\n* no functions, so `DROP SCHEMA` without `CASCADE` succeeds. A table's row type and an array type\n* belong to another object and are not counted.\n*/\nfunction schemaHoldsNoObjectsAst(schema) {\n\treturn exprSelect().project(\"result\", cfExpr.allOf([\n\t\tcfExpr.notExists(objectsInSchema(\"pg_class\", \"relnamespace\", schema)),\n\t\tcfExpr.notExists(objectsInSchema(\"pg_type\", \"typnamespace\", schema, [cfExpr.columnRef(\"o\", \"typrelid\").eqLit(0), cfExpr.columnRef(\"o\", \"typelem\").eqLit(0)])),\n\t\tcfExpr.notExists(objectsInSchema(\"pg_proc\", \"pronamespace\", schema))\n\t])).build();\n}\n/**\n* After a table of the unbound namespace moves to `toSchema`: the search path finds no table of that\n* name, or finds only the moved one, which it does when `toSchema` is on the search path.\n*/\nfunction unboundTableMovedAst(table, toSchema) {\n\tconst found = toRegclass(checkNamespace(UNBOUND_NAMESPACE_ID).qualifyTable(table));\n\tconst moved = toRegclass(checkNamespace(toSchema).qualifyTable(table));\n\treturn exprSelect().project(\"result\", found.isNull().or(found.eqExpr(moved))).build();\n}\n//#endregion\n//#region src/contract-free/ddl.ts\n/**\n* Build a Postgres `CREATE TABLE` query node.\n*\n* Pass `constraints` for table-level composite primary keys, foreign keys, and\n* unique constraints — use the {@link PrimaryKeyConstraint}, {@link ForeignKeyConstraint},\n* and {@link UniqueConstraint} classes from `@internal/sql-relational-core/ast`.\n*\n* Precondition: identifiers (`table`, `schema`, column names/types) are\n* emitted to SQL verbatim — they are not quoted or escaped, so callers must\n* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal\n* default values, by contrast, are single-quote-escaped (embedded `'` doubled)\n* by the renderer. Identifier quoting for untrusted identifiers is added when\n* the migration planner adopts this lowering path.\n*/\nfunction createTable(options) {\n\treturn new PostgresCreateTable(options);\n}\n/**\n* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the\n* pre-trusted-identifier precondition.\n*/\nfunction createSchema(options) {\n\treturn new PostgresCreateSchema(options);\n}\n/**\n* Build a Postgres `CREATE TYPE … AS ENUM (…)` DDL node. The type name (and\n* optional schema) are quoted by the renderer; the enum member `values` are\n* emitted as single-quote-escaped string literals. An absent `schema` renders\n* the type name unqualified so the connection's `search_path` resolves it.\n*/\nfunction createType(options) {\n\treturn new PostgresCreateType(options);\n}\n/**\n* Build a Postgres `DROP TYPE` DDL node. See {@link createType} for the\n* identifier-quoting and unqualified-when-schemaless behaviour.\n*/\nfunction dropType(options) {\n\treturn new PostgresDropType(options);\n}\n/**\n* Build an `ADD COLUMN` action for use inside {@link alterTable}.\n* The column is a structured `DdlColumn` so codec-encoded defaults flow\n* through the adapter's `pgRenderDdlColumn` → `pgRenderDdlColumnDefault` path.\n*/\nfunction addColumnAction(column) {\n\treturn new AddColumnAction(column);\n}\n/**\n* Build a `DROP DEFAULT` action (`ALTER COLUMN \"<name>\" DROP DEFAULT`) for\n* use inside {@link alterTable}. The renderer quotes the column name.\n*/\nfunction dropDefaultAction(columnName) {\n\treturn new DropDefaultAction(columnName);\n}\n/**\n* Build an `ADD CONSTRAINT` action for use inside {@link alterTable}. The renderer writes the constraint as `CREATE TABLE` writes it.\n*/\nfunction addConstraintAction(constraint) {\n\treturn new AddConstraintAction(constraint);\n}\n/**\n* Build an `ALTER COLUMN \"<columnName>\" TYPE <type> USING …` action for use inside {@link alterTable}. `type` is written verbatim; `using` is opaque SQL, and when it is absent or empty the conversion is `\"<columnName>\"::<type>`.\n*/\nfunction alterColumnTypeAction(options) {\n\treturn new AlterColumnTypeAction({\n\t\tcolumnName: options.columnName,\n\t\ttype: options.type,\n\t\tusing: options.using ? opaqueSql(options.using) : void 0\n\t});\n}\n/**\n* Build a Postgres `ALTER TABLE` query node carrying one or more actions.\n* See {@link addColumnAction}, {@link dropDefaultAction}, {@link addConstraintAction} and {@link alterColumnTypeAction} for building actions.\n*/\nfunction alterTable(options) {\n\treturn new PostgresAlterTable(options);\n}\n/**\n* Build a Postgres `CREATE POLICY` DDL node.\n*\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n* `using` and `withCheck` are emitted verbatim as predicate SQL — callers\n* must supply safe, pre-validated SQL expressions.\n*/\nfunction createPolicy(options) {\n\tconst { using, withCheck, ...rest } = options;\n\treturn new PostgresCreatePolicy({\n\t\t...rest,\n\t\t...ifDefined(\"using\", using === void 0 ? void 0 : opaqueSql(using)),\n\t\t...ifDefined(\"withCheck\", withCheck === void 0 ? void 0 : opaqueSql(withCheck))\n\t});\n}\n/**\n* Build a Postgres `DROP POLICY` DDL node.\n* Identifiers (`schema`, `table`, `name`) are quoted by the renderer.\n*/\nfunction dropPolicy(options) {\n\treturn new PostgresDropPolicy(options);\n}\n/**\n* Build a Postgres `ALTER POLICY … RENAME TO` DDL node.\n* Identifiers (`schema`, `table`, `name`, `newName`) are quoted by the renderer.\n*/\nfunction alterPolicyRename(options) {\n\treturn new PostgresAlterPolicyRename(options);\n}\n/**\n* Build a Postgres `CREATE [UNIQUE] INDEX` DDL node. Identifiers (`schema`,\n* `table`, `name`, column elements, `type`, option keys) are quoted by the\n* renderer; the `expression` element list and the `where` predicate are\n* inserted verbatim (opaque SQL). An absent `schema` renders the object\n* names unqualified (the unbound namespace).\n*/\nfunction createIndex(options) {\n\tconst { elements, where, ...rest } = options;\n\treturn new PostgresCreateIndex({\n\t\t...rest,\n\t\telements: \"columns\" in elements ? { columns: elements.columns } : { expression: opaqueSql(elements.expression) },\n\t\twhere: where === void 0 ? void 0 : opaqueSql(where)\n\t});\n}\n/**\n* Build a Postgres `DROP INDEX` DDL node. The index name (and optional\n* schema) are quoted by the renderer.\n*/\nfunction dropIndex(options) {\n\treturn new PostgresDropIndex(options);\n}\n/**\n* Build a Postgres `ALTER INDEX … RENAME TO` DDL node. Identifiers are\n* quoted by the renderer.\n*/\nfunction alterIndexRename(options) {\n\treturn new PostgresAlterIndexRename(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … DISABLE ROW LEVEL SECURITY` DDL node.\n* Identifiers (`schema`, `table`) are quoted by the renderer.\n*/\nfunction disableRowLevelSecurity(options) {\n\treturn new PostgresDisableRowLevelSecurity(options);\n}\n/**\n* Build a Postgres `ALTER TABLE … SET SCHEMA` DDL node. Identifiers are quoted by the renderer; an\n* absent `schema` leaves the table unqualified (the unbound namespace).\n*/\nfunction alterTableSetSchema(options) {\n\treturn new PostgresAlterTableSetSchema(options);\n}\n/** Build a Postgres `ALTER SCHEMA … RENAME TO` DDL node. Identifiers are quoted by the renderer. */\nfunction alterSchemaRename(options) {\n\treturn new PostgresAlterSchemaRename(options);\n}\n/** Build a Postgres `DROP SCHEMA` DDL node, without `CASCADE`. The name is quoted by the renderer. */\nfunction dropSchema(options) {\n\treturn new PostgresDropSchema(options);\n}\n//#endregion\nexport { indexDefinitionAst as A, schemaHoldsNoObjectsAst as B, columnNullabilityAst as C, constraintDefinitionAst as D, columnTypeOidAst as E, relationKindAst as F, tablePrimaryKeyAst as G, sequenceValuesFitAst as H, rlsEnabledAst as I, toRegclass as K, rlsPolicyDefinitionAst as L, nativeEnumTypeExistsAst as M, nativeEnumValueExistsAst as N, constraintExistsAst as O, noNullValuesAst as P, rlsPolicyExistsAst as R, columnExistsAst as S, columnTypeAst as T, tableExistsAst as U, sequenceNameAvailableAst as V, tableIsEmptyAst as W, dropPolicy as _, alterPolicyRename as a, columnDefaultAst as b, alterTableSetSchema as c, createSchema as d, createTable as f, dropIndex as g, dropDefaultAction as h, alterIndexRename as i, indexExistsAst as j, extensionExistsAst as k, createIndex as l, disableRowLevelSecurity as m, addConstraintAction as n, alterSchemaRename as o, createType as p, unboundTableMovedAst as q, alterColumnTypeAction as r, alterTable as s, addColumnAction as t, createPolicy as u, dropSchema as v, columnOwnsSequenceAst as w, columnDefaultSequenceAst as x, dropType as y, schemaExistsAst as z };\n\n//# sourceMappingURL=ddl-B7Rqlz6D.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,WAAW,eAAe;CAClC,OAAO,OAAO,GAAG;EAChB,QAAQ;EACR,UAAU;EACV,MAAM,OAAO,MAAM,eAAe,gBAAgB;EAClD,SAAS;GACR,SAAS;GACT,UAAU;EACX;CACD,CAAC;AACF;;;;;;;;;;AAUA,SAAS,eAAe,QAAQ,OAAO;CACtC,MAAM,WAAW,WAAW,wBAAwB;EACnD,IAAI;EACJ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC;CACtB,OAAO;EACN,mBAAmB,WAAW,CAAC,CAAC,QAAQ,UAAU,SAAS,OAAO,CAAC,CAAC,CAAC,MAAM;EAC3E,oBAAoB,WAAW,CAAC,CAAC,QAAQ,UAAU,SAAS,UAAU,CAAC,CAAC,CAAC,MAAM;CAChF;AACD;;;;;;;;;;;;;;;AAeA,SAAS,oBAAoB,SAAS;CACrC,MAAM,YAAY,wBAAwB;EACzC,IAAI,QAAQ;EACZ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC;CACD,MAAM,aAAa,CAAC,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,QAAQ,QAAQ,gBAAgB,gBAAgB,GAAG,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,OAAO,UAAU,uBAAuB,CAAC,CAAC;CACnL,IAAI,QAAQ,UAAU,KAAK,GAAG,WAAW,KAAK,OAAO,UAAU,KAAK,UAAU,CAAC,CAAC,OAAO,WAAW,UAAU,aAAa,QAAQ,KAAK,CAAC,CAAC,CAAC;CACzI,MAAM,cAAc,WAAW,CAAC,CAAC,KAAK,QAAQ,iBAAiB,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ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AkB,OAAO;AACrC;;;;;AAKA,SAAS,iBAAiB,SAAS;CAClC,OAAO,IAAI,yBAAyB,OAAO;AAC5C;;;;;AAKA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,gCAAgC,OAAO;AACnD;;;;;AAKA,SAAS,oBAAoB,SAAS;CACrC,OAAO,IAAI,4BAA4B,OAAO;AAC/C;;AAEA,SAAS,kBAAkB,SAAS;CACnC,OAAO,IAAI,0BAA0B,OAAO;AAC7C;;AAEA,SAAS,WAAW,SAAS;CAC5B,OAAO,IAAI,mBAAmB,OAAO;AACtC"}
|
package/dist/ddl-DC1--N63.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./nodes-s0Oe37jT-DY3kMSce.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-constraint-names-CtcRXhV8-nz3ff6b8.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-constraint-names-CtcRXhV8.mjs"],"sourcesContent":["import { n as storedIdentifier, t as postgresObjectName } from \"./postgres-object-name-FPikIvOw.mjs\";\n//#region src/core/migrations/default-constraint-names.ts\n/** `{table}_pkey` cut as Postgres cuts the name of a primary key it names itself: `CREATE TABLE` writes an unnamed primary key. */\nfunction defaultPrimaryKeyName(tableName) {\n\treturn postgresObjectName(tableName, void 0, \"pkey\");\n}\n/** `{table}_{columns}_key`, cut to the 63 bytes Postgres stores. */\nfunction defaultUniqueName(tableName, columns) {\n\treturn storedIdentifier(`${tableName}_${columns.join(\"_\")}_key`);\n}\n/** `{table}_{columns}_fkey`, cut to the 63 bytes Postgres stores. */\nfunction defaultForeignKeyName(tableName, columns) {\n\treturn storedIdentifier(`${tableName}_${columns.join(\"_\")}_fkey`);\n}\n//#endregion\nexport { defaultPrimaryKeyName as n, defaultUniqueName as r, defaultForeignKeyName as t };\n\n//# sourceMappingURL=default-constraint-names-CtcRXhV8.mjs.map"],"mappings":";;;AAGA,SAAS,sBAAsB,WAAW;CACzC,OAAO,mBAAmB,WAAW,KAAK,GAAG,MAAM;AACpD;;AAEA,SAAS,kBAAkB,WAAW,SAAS;CAC9C,OAAO,iBAAiB,GAAG,UAAU,GAAG,QAAQ,KAAK,GAAG,EAAE,KAAK;AAChE;;AAEA,SAAS,sBAAsB,WAAW,SAAS;CAClD,OAAO,iBAAiB,GAAG,UAAU,GAAG,QAAQ,KAAK,GAAG,EAAE,MAAM;AACjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-normalizer-BqK6XxdC-BAgxt9FF.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-normalizer-BqK6XxdC.mjs"],"sourcesContent":["//#region src/core/default-normalizer.ts\nconst NEXTVAL_PATTERN = /^nextval\\s*\\(/i;\nconst NOW_FUNCTION_PATTERN = /^(now\\s*\\(\\s*\\)|CURRENT_TIMESTAMP)$/i;\nconst CLOCK_TIMESTAMP_PATTERN = /^clock_timestamp\\s*\\(\\s*\\)$/i;\nconst TIMESTAMP_CAST_SUFFIX = /::timestamp(?:tz|\\s+(?:with|without)\\s+time\\s+zone)?$/i;\nconst TEXT_CAST_SUFFIX = /::text$/i;\nconst NOW_LITERAL_PATTERN = /^'now'$/i;\nconst UUID_PATTERN = /^gen_random_uuid\\s*\\(\\s*\\)$/i;\nconst UUID_OSSP_PATTERN = /^uuid_generate_v4\\s*\\(\\s*\\)$/i;\nconst NULL_PATTERN = /^NULL(?:::.+)?$/i;\nconst TRUE_PATTERN = /^true$/i;\nconst FALSE_PATTERN = /^false$/i;\n/**\n* A decimal numeral with an optional sign and an optional exponent. Postgres prints a `real` or\n* `double precision` default in exponent notation once its magnitude is large or small enough:\n* `'1e+20'::real`, `'1e-320'::double precision`.\n*/\nconst NUMERAL = String.raw`[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?`;\nconst NUMERIC_PATTERN = new RegExp(`^${NUMERAL}$`);\n/**\n* A type modifier: `(3)`, `(65,30)`, or a numeric type's negative scale, `(5,-2)`, which PostgreSQL\n* 15 and later accept.\n*/\nconst TYPE_MODIFIER = String.raw`\\(\\d+(?:,\\s*-?\\d+)?\\)`;\n/**\n* A cast target type: a builtin of one or more words, where any word may carry a modifier\n* (`timestamp(3) without time zone`, `numeric(65,30)`), or a quoted identifier (`\"AuditAction\"`);\n* either may be qualified by a possibly quoted schema (`audit.\"AuditAction\"`, `\"my schema\".t`).\n*/\nconst TYPE_NAME = String.raw`(?:(?:\"(?:[^\"]|\"\")+\"|\\w+)\\.)?(?:\"(?:[^\"]|\"\")+\"|\\w+(?:${TYPE_MODIFIER})?(?:\\s+\\w+(?:${TYPE_MODIFIER})?)*)`;\nconst QUOTED_LITERAL_PATTERN = new RegExp(`^'((?:[^']|'')*)'(?:::(${TYPE_NAME}))?$`);\n/** A string constant with backslash escapes, `E'...'`, which PostgreSQL prints when `standard_conforming_strings` is off. */\nconst ESCAPE_STRING_LITERAL_PATTERN = new RegExp(String.raw`^[Ee]'((?:[^'\\\\]|\\\\.|'')*)'(?:::(${TYPE_NAME}))?$`, \"s\");\nconst NUMBER_LITERAL_PATTERN = new RegExp(`^(${NUMERAL})(?:::(${TYPE_NAME}))?$`);\nconst PARENTHESISED_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::(${TYPE_NAME})$`, \"s\");\nconst INTEGER_PATTERN = /^-?\\d+$/;\nconst INTEGER_TYPE_PATTERN = /^(?:smallint|integer|bigint|int2|int4|int8)$/i;\nconst NUMBER_TYPE_PATTERN = new RegExp(`^(?:smallint|integer|bigint|int2|int4|int8|real|double precision|float4|float8|numeric|decimal)(?:${TYPE_MODIFIER})?$`, \"i\");\n/**\n* Matches a Postgres array literal default of the form `'{...}'::elemtype[]`.\n* The literal body is captured in group 1; the cast (including `[]`) is optional.\n* Examples: `'{}'::text[]`, `'{1,2}'::integer[]`, `'{}'`\n*/\nconst ARRAY_LITERAL_PATTERN = /^'(\\{.*\\})'(?:::.+\\[\\])?$/;\n/**\n* Matches the constructor spelling Postgres reports for a default written as\n* `ARRAY[...]`: `ARRAY['a'::text, 'b'::text]`, `ARRAY[1, 2]`, `ARRAY[]::text[]`.\n* The element list is captured in group 1; the outer cast is optional.\n*/\nconst ARRAY_CONSTRUCTOR_PATTERN = new RegExp(String.raw`^ARRAY\\[(.*?)\\](?:::${TYPE_NAME}\\[\\])?$`, \"is\");\nconst OUTER_ARRAY_CAST_PATTERN = new RegExp(String.raw`^\\((.+)\\)::${TYPE_NAME}\\[\\]$`, \"s\");\n/**\n* Returns the canonical expression for a timestamp default function, or undefined\n* if the expression is not a recognized timestamp default.\n*\n* Keeps now()/CURRENT_TIMESTAMP and clock_timestamp() distinct:\n* - now(), CURRENT_TIMESTAMP, ('now'::text)::timestamp... → 'now()'\n* - clock_timestamp(), clock_timestamp()::timestamptz → 'clock_timestamp()'\n*\n* These are semantically different in Postgres: now() returns the transaction\n* start time (constant within a transaction), while clock_timestamp() returns\n* the actual wall-clock time (can differ across rows in a single INSERT).\n*/\nfunction canonicalizeTimestampDefault(expr) {\n\tif (NOW_FUNCTION_PATTERN.test(expr)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(expr)) return \"clock_timestamp()\";\n\tif (!TIMESTAMP_CAST_SUFFIX.test(expr)) return void 0;\n\tlet inner = expr.replace(TIMESTAMP_CAST_SUFFIX, \"\").trim();\n\tif (inner.startsWith(\"(\") && inner.endsWith(\")\")) inner = inner.slice(1, -1).trim();\n\tif (NOW_FUNCTION_PATTERN.test(inner)) return \"now()\";\n\tif (CLOCK_TIMESTAMP_PATTERN.test(inner)) return \"clock_timestamp()\";\n\tinner = inner.replace(TEXT_CAST_SUFFIX, \"\").trim();\n\tif (NOW_LITERAL_PATTERN.test(inner)) return \"now()\";\n}\n/**\n* A numeral cast to a number type. A cast to an integer type rounds a fraction, so that numeral is\n* not the value.\n*/\nfunction castNumber(numeral, castType) {\n\tif (castType === void 0) return {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n\tif (!NUMBER_TYPE_PATTERN.test(castType)) return void 0;\n\tif (INTEGER_TYPE_PATTERN.test(castType) && !INTEGER_PATTERN.test(numeral)) return void 0;\n\treturn {\n\t\tkind: \"number\",\n\t\tnumeral\n\t};\n}\n/**\n* Reads a literal by its cast type: `'-1'::integer` and `(1)::bigint` are numbers, `'a'::text` is a\n* string. A parenthesised cast is read only from number to number: `('now'::text)::date` is\n* evaluated on insert. Anything else, such as an operator or a function call, is not a literal.\n*/\nfunction readLiteralToken(expression) {\n\tconst escaped = ESCAPE_STRING_LITERAL_PATTERN.exec(expression);\n\tconst quoted = escaped ?? QUOTED_LITERAL_PATTERN.exec(expression);\n\tif (quoted?.[1] !== void 0) {\n\t\tconst text = escaped === null ? quoted[1].replace(/''/g, \"'\") : unescapeEscapeString(quoted[1]);\n\t\tconst castType = quoted[2];\n\t\treturn castType !== void 0 && NUMBER_TYPE_PATTERN.test(castType) && NUMERIC_PATTERN.test(text) ? castNumber(text, castType) : {\n\t\t\tkind: \"string\",\n\t\t\ttext\n\t\t};\n\t}\n\tconst number = NUMBER_LITERAL_PATTERN.exec(expression);\n\tif (number?.[1] !== void 0) return castNumber(number[1], number[2]);\n\tconst parenthesised = PARENTHESISED_CAST_PATTERN.exec(expression);\n\tif (parenthesised?.[1] === void 0 || parenthesised[2] === void 0) return void 0;\n\tconst inner = readLiteralToken(parenthesised[1].trim());\n\treturn inner?.kind === \"number\" ? castNumber(inner.numeral, parenthesised[2]) : void 0;\n}\n/**\n* Splits a Postgres array literal body (without the enclosing braces) into its\n* element tokens, honouring quoting. A comma only separates elements when it is\n* outside double quotes; inside a quoted element a doubled quote (`\"\"`) or a\n* backslash-escaped quote (`\\\"`) is a literal quote, and a backslash escapes the\n* next character. Returns undefined if the body is malformed (e.g. an unbalanced\n* quote), nests an array, which puts a brace outside quotes, or escapes a character outside\n* quotes with a backslash, which Postgres never prints.\n*/\nfunction splitArrayElements(inner) {\n\tconst tokens = [];\n\tlet current = \"\";\n\tlet inQuotes = false;\n\tlet quoted = false;\n\tfor (let i = 0; i < inner.length; i++) {\n\t\tconst char = inner[i];\n\t\tif (inQuotes) {\n\t\t\tif (char === \"\\\\\") {\n\t\t\t\tconst next = inner[i + 1];\n\t\t\t\tif (next === void 0) return void 0;\n\t\t\t\tcurrent += next;\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (char === \"\\\"\") {\n\t\t\t\tif (inner[i + 1] === \"\\\"\") {\n\t\t\t\t\tcurrent += \"\\\"\";\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tinQuotes = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcurrent += char;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\") {\n\t\t\tinQuotes = true;\n\t\t\tquoted = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"{\" || char === \"}\" || char === \"\\\\\") return void 0;\n\t\tif (char === \",\") {\n\t\t\ttokens.push({\n\t\t\t\tvalue: current,\n\t\t\t\tquoted\n\t\t\t});\n\t\t\tcurrent = \"\";\n\t\t\tquoted = false;\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\tif (inQuotes) return void 0;\n\ttokens.push({\n\t\tvalue: current,\n\t\tquoted\n\t});\n\treturn tokens;\n}\n/**\n* Splits an `ARRAY[...]` element list on the commas outside quotes and parentheses, so\n* `numeric(65,30)` and `'a,b'` stay inside one element. A doubled quote inside an element is a\n* literal quote, so it never closes one.\n*/\nfunction splitConstructorElements(body) {\n\tconst elements = [];\n\tlet current = \"\";\n\tlet quote;\n\tlet depth = 0;\n\tfor (const char of body) {\n\t\tif (quote !== void 0) {\n\t\t\tif (char === quote) quote = void 0;\n\t\t} else if (char === \"'\" || char === \"\\\"\") quote = char;\n\t\telse if (char === \"(\") depth++;\n\t\telse if (char === \")\") depth--;\n\t\telse if (char === \",\" && depth === 0) {\n\t\t\telements.push(current);\n\t\t\tcurrent = \"\";\n\t\t\tcontinue;\n\t\t}\n\t\tcurrent += char;\n\t}\n\telements.push(current);\n\treturn elements.map((element) => element.trim());\n}\nfunction unwrapOuterArrayCasts(expression) {\n\tconst match = OUTER_ARRAY_CAST_PATTERN.exec(expression);\n\treturn match?.[1] === void 0 ? expression : unwrapOuterArrayCasts(match[1].trim());\n}\nconst BACKSLASH_ESCAPES = {\n\tb: \"\\b\",\n\tf: \"\\f\",\n\tn: \"\\n\",\n\tr: \"\\r\",\n\tt: \"\t\"\n};\n/** The text of an `E'...'` string constant: a doubled quote is a quote, and a backslash escapes the next character, an octal byte or a hexadecimal byte. */\nfunction unescapeEscapeString(body) {\n\treturn body.replace(/''|\\\\([0-7]{1,3}|x[0-9A-Fa-f]{1,2}|.)/gs, (_match, escaped) => {\n\t\tif (escaped === void 0) return \"'\";\n\t\tif (/^[0-7]/.test(escaped)) return String.fromCharCode(Number.parseInt(escaped, 8));\n\t\tif (escaped.startsWith(\"x\") && escaped.length > 1) return String.fromCharCode(Number.parseInt(escaped.slice(1), 16));\n\t\treturn BACKSLASH_ESCAPES[escaped] ?? escaped;\n\t});\n}\nfunction functionDefault(expression) {\n\treturn {\n\t\tkind: \"function\",\n\t\texpression\n\t};\n}\n/**\n* Reads a column's reported default. A list column (`many`) has a literal that is an array literal (`'{a,b}'::text[]`) or an `ARRAY[...]` constructor of literals. A `nextval(...)` default is `autoincrement()`, and the forms of `now()` and of `gen_random_uuid()` are named as the contract names them. Any other expression is a function default, kept as reported.\n*/\nfunction readPostgresDefault(rawDefault, many) {\n\tconst trimmed = rawDefault.trim();\n\tif (NEXTVAL_PATTERN.test(trimmed)) return functionDefault(\"autoincrement()\");\n\tif (NULL_PATTERN.test(trimmed)) return { kind: \"null\" };\n\tif (many) {\n\t\tconst elements = listElementBodies(trimmed);\n\t\treturn elements === void 0 ? functionDefault(trimmed) : {\n\t\t\tkind: \"literal\",\n\t\t\tliteral: {\n\t\t\t\tkind: \"list\",\n\t\t\t\telements\n\t\t\t}\n\t\t};\n\t}\n\tconst timestampFunction = canonicalizeTimestampDefault(trimmed);\n\tif (timestampFunction !== void 0) return functionDefault(timestampFunction);\n\tif (UUID_PATTERN.test(trimmed) || UUID_OSSP_PATTERN.test(trimmed)) return functionDefault(\"gen_random_uuid()\");\n\tconst body = literalBody(trimmed);\n\treturn body === void 0 ? functionDefault(trimmed) : {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody\n\t\t}\n\t};\n}\n/** The body of a scalar literal: `true`, `false`, a numeral, or the text of a quoted string. */\nfunction literalBody(expression) {\n\tif (TRUE_PATTERN.test(expression)) return \"true\";\n\tif (FALSE_PATTERN.test(expression)) return \"false\";\n\tconst token = readLiteralToken(expression);\n\tif (token === void 0) return void 0;\n\treturn token.kind === \"number\" ? token.numeral : token.text;\n}\n/** The element bodies of a list literal, with `null` for SQL NULL, or `undefined` when the default is not a list of literals. */\nfunction listElementBodies(expression) {\n\tconst arrayLiteral = ARRAY_LITERAL_PATTERN.exec(expression)?.[1];\n\tif (arrayLiteral !== void 0) return arrayLiteralElements(arrayLiteral.replace(/''/g, \"'\"));\n\tconst constructed = ARRAY_CONSTRUCTOR_PATTERN.exec(unwrapOuterArrayCasts(expression))?.[1];\n\tif (constructed === void 0) return void 0;\n\tif (constructed.trim() === \"\") return [];\n\tconst elements = [];\n\tfor (const element of splitConstructorElements(constructed)) {\n\t\tif (NULL_PATTERN.test(element)) {\n\t\t\telements.push(null);\n\t\t\tcontinue;\n\t\t}\n\t\tconst body = literalBody(element);\n\t\tif (body === void 0) return void 0;\n\t\telements.push(body);\n\t}\n\treturn elements;\n}\n/** The elements of an array literal (`{...}`): a quoted element is its text, and an unquoted `NULL` is SQL NULL. */\nfunction arrayLiteralElements(literal) {\n\tconst inner = literal.slice(1, -1).trim();\n\tif (inner === \"\") return [];\n\tconst tokens = splitArrayElements(inner);\n\tif (tokens === void 0) return void 0;\n\tconst elements = [];\n\tfor (const token of tokens) {\n\t\tif (token.quoted) {\n\t\t\telements.push(token.value);\n\t\t\tcontinue;\n\t\t}\n\t\tconst element = token.value.trim();\n\t\tif (element === \"\") return void 0;\n\t\telements.push(element.toUpperCase() === \"NULL\" ? null : element);\n\t}\n\treturn elements;\n}\n/**\n* Names a contract's expression default the way {@link readPostgresDefault} names the same function in the database, so `` sql`CURRENT_TIMESTAMP` `` and the database's `CURRENT_TIMESTAMP` compare equal, and a `nextval(...)` default is `autoincrement()`. A literal default, and an expression that writes a literal, pass through unchanged; introspection reads the latter's literal with the column's codec, and the diff compares the values.\n*/\nfunction postgresResolveDefault(def, column) {\n\tif (def.kind !== \"function\") return def;\n\tconst read = readPostgresDefault(def.expression, column.many);\n\treturn read.kind === \"function\" ? read : def;\n}\n//#endregion\nexport { readPostgresDefault as n, postgresResolveDefault as t };\n\n//# sourceMappingURL=default-normalizer-BqK6XxdC.mjs.map"],"mappings":";AACA,MAAM,kBAAkB;AACxB,MAAM,uBAAuB;AAC7B,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,gBAAgB;;;;;;AAMtB,MAAM,UAAU,OAAO,GAAG;AAC1B,MAAM,kBAAkB,IAAI,OAAO,IAAI,QAAQ,EAAE;;;;;AAKjD,MAAM,gBAAgB,OAAO,GAAG;;;;;;AAMhC,MAAM,YAAY,OAAO,GAAG,wDAAwD,cAAc,gBAAgB,cAAc;AAChI,MAAM,yBAAyB,IAAI,OAAO,0BAA0B,UAAU,KAAK;;AAEnF,MAAM,gCAAgC,IAAI,OAAO,OAAO,GAAG,oCAAoC,UAAU,OAAO,GAAG;AACnH,MAAM,yBAAyB,IAAI,OAAO,KAAK,QAAQ,SAAS,UAAU,KAAK;AAC/E,MAAM,6BAA6B,IAAI,OAAO,OAAO,GAAG,eAAe,UAAU,KAAK,GAAG;AACzF,M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AAgB,KAAK,GAAG,OAAO,KAAK;CACxC,IAAI,YAAY,KAAK,MAAM,IAAI,OAAO,CAAC;CACvC,MAAM,WAAW,CAAC;CAClB,KAAK,MAAM,WAAW,yBAAyB,WAAW,GAAG;EAC5D,IAAI,aAAa,KAAK,OAAO,GAAG;GAC/B,SAAS,KAAK,IAAI;GAClB;EACD;EACA,MAAM,OAAO,YAAY,OAAO;EAChC,IAAI,SAAS,KAAK,GAAG,OAAO,KAAK;EACjC,SAAS,KAAK,IAAI;CACnB;CACA,OAAO;AACR;;AAEA,SAAS,qBAAqB,SAAS;CACtC,MAAM,QAAQ,QAAQ,MAAM,GAAG,EAAE,CAAC,CAAC,KAAK;CACxC,IAAI,UAAU,IAAI,OAAO,CAAC;CAC1B,MAAM,SAAS,mBAAmB,KAAK;CACvC,IAAI,WAAW,KAAK,GAAG,OAAO,KAAK;CACnC,MAAM,WAAW,CAAC;CAClB,KAAK,MAAM,SAAS,QAAQ;EAC3B,IAAI,MAAM,QAAQ;GACjB,SAAS,KAAK,MAAM,KAAK;GACzB;EACD;EACA,MAAM,UAAU,MAAM,MAAM,KAAK;EACjC,IAAI,YAAY,IAAI,OAAO,KAAK;EAChC,SAAS,KAAK,QAAQ,YAAY,MAAM,SAAS,OAAO,OAAO;CAChE;CACA,OAAO;AACR;;;;AAIA,SAAS,uBAAuB,KAAK,QAAQ;CAC5C,IAAI,IAAI,SAAS,YAAY,OAAO;CACpC,MAAM,OAAO,oBAAoB,IAAI,YAAY,OAAO,IAAI;CAC5D,OAAO,KAAK,SAAS,aAAa,OAAO;AAC1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-normalizer-P-u2VRBf.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/default-normalizer.d.mts"],"mappings":";;;;;KAIK;WACM;WACA;;WAEA;;WAEA;WACA,SAAS;;;;;iBAKH,oBAAoB,oBAAoB,gBAAgB;;;;iBAIxD,uBAAuB,KAAK,eAAe,QAAQ,wBAAwB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-BkD3nXF_-NNc0jaU9.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/descriptor-meta-BkD3nXF_.mjs"],"sourcesContent":["import { t as postgresAdapterContractContributions } from \"./contract-contributions-Xz2FpyfI.mjs\";\nimport { postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\n//#region src/core/descriptor-meta.ts\nconst postgresAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: postgresAdapterContractContributions.capabilities,\n\ttypes: {\n\t\taggregateDescriptors: postgresAdapterContractContributions.types.aggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(postgresCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"PgTypes\"\n\t\t\t},\n\t\t\ttypeImports: [{\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"JsonValue\",\n\t\t\t\talias: \"JsonValue\"\n\t\t\t}],\n\t\t\tparameterizedOutputTypes: {\n\t\t\t\tpackage: \"@internal/target-postgres/codec-types\",\n\t\t\t\tnamed: \"ParameterizedOutputTypesForTypeParams\",\n\t\t\t\talias: \"PgParameterizedOutputTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { postgresAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-BkD3nXF_.mjs.map"],"mappings":";;;AAGA,MAAM,gCAAgC;CACrC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,qCAAqC;CACnD,OAAO;EACN,sBAAsB,qCAAqC,MAAM;EACjE,YAAY;GACX,kBAAkB,MAAM,KAAK,sBAAsB,OAAO,CAAC;GAC3D,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;GACA,aAAa,CAAC;IACb,SAAS;IACT,OAAO;IACP,OAAO;GACR,CAAC;GACD,0BAA0B;IACzB,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-DBH6aAIM-Cm1rNZaF.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-DBH6aAIM.mjs"],"sourcesContent":["import { F as PG_VARCHAR_CODEC_ID, N as PG_UUID_CODEC_ID, S as PG_TEXT_CODEC_ID, i as PG_CHAR_CODEC_ID } from \"./codec-ids-BMhEpFwv.mjs\";\nimport { B as postgresTextDataTypes, g as pgInt4 } from \"./data-types-Chx0mjTP.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-gQW3-KSb.mjs\";\nimport { E as postgresQualifyColumnType } from \"./codecs-CRl9-i_r.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { a as postgresAuthoringPslBlockDescriptors, d as postgresNowGeneratorFunction, f as postgresNowGeneratorControlDescriptors, i as postgresAuthoringModelAttributes, l as postgresScalarAndNativeTypeConstructors, n as postgresAuthoringEntityTypes, o as postgresAuthoringTypes, r as postgresAuthoringFieldPresets, s as postgresLowerEntityHandles } from \"./authoring-SbdvmVJh.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-C6w1rzOF.mjs\";\nimport { t as postgresRenderCheckExpressions } from \"./check-expressions-7uCCP01t.mjs\";\nimport { t as postgresTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-Dft1L7eE.mjs\";\nimport { n as postgresIndexTypes } from \"./index-types-BihjrAAq.mjs\";\nimport { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions } from \"@internal/family-sql/pack\";\nimport { TIMESTAMP_NOW_GENERATOR_ID } from \"@internal/framework-components/authoring\";\n//#region src/core/generator-functions.ts\nconst postgresGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: pgInt4.id }),\n\tpostgresNowGeneratorFunction,\n\t...idGeneratorFunctionBindings({\n\t\ttext: [\n\t\t\tPG_CHAR_CODEC_ID,\n\t\t\tPG_VARCHAR_CODEC_ID,\n\t\t\tPG_TEXT_CODEC_ID\n\t\t],\n\t\tuuid: [PG_UUID_CODEC_ID]\n\t})\n];\n/** The `now` generators Postgres binds. The SQL family registers the identifier generators. */\nconst postgresGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }, ...postgresNowGeneratorControlDescriptors()];\nconst postgresTargetDescriptorMeta = {\n\t...postgresTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: DEFAULT_NAMESPACE_ID,\n\tsupportsNamespaces: true,\n\tindexTypes: postgresIndexTypes,\n\tauthoring: {\n\t\ttype: {\n\t\t\t...postgresScalarAndNativeTypeConstructors,\n\t\t\t...postgresAuthoringTypes\n\t\t},\n\t\tfield: postgresAuthoringFieldPresets,\n\t\tdataTypes: postgresDataTypeEntries(),\n\t\ttextDataTypes: postgresTextDataTypes,\n\t\tentityTypes: postgresAuthoringEntityTypes,\n\t\tpslBlockDescriptors: postgresAuthoringPslBlockDescriptors,\n\t\tmodelAttributes: postgresAuthoringModelAttributes,\n\t\tcreateNamespace: postgresCreateNamespace,\n\t\tqualifyColumnType: postgresQualifyColumnType,\n\t\trenderCheckExpressions: postgresRenderCheckExpressions,\n\t\tlowerEntityHandles: postgresLowerEntityHandles\n\t},\n\tgeneratorFunctions: postgresGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: postgresGeneratorDescriptors\n\t},\n\ttypes: { queryOperationTypes: { import: {\n\t\tpackage: \"@internal/target-postgres/operation-types\",\n\t\tnamed: \"QueryOperationTypes\",\n\t\talias: \"PgTargetQueryOps\"\n\t} } }\n};\n//#endregion\nexport { postgresTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DBH6aAIM.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,6BAA6B;CAClC,GAAG,qCAAqC,EAAE,SAAS,OAAO,GAAG,CAAC;CAC9D;CACA,GAAG,4BAA4B;EAC9B,MAAM;GACL;GACA;GACA;EACD;EACA,MAAM,CAAC,gBAAgB;CACxB,CAAC;AACF;;AAEA,MAAM,+BAA+B,CAAC,EAAE,IAAI,2BAA2B,GAAG,GAAG,uCAAuC,CAAC;AACrH,MAAM,+BAA+B;CACpC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,YAAY;CACZ,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,OAAO;EACP,WAAW,wBAAwB;EACnC,eAAe;EACf,aAAa;EACb,qBAAqB;EACrB,iBAAiB;EACjB,iBAAiB;EACjB,mBAAmB;EACnB,wBAAwB;EACxB,oBAAoB;CACrB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;CACA,OAAO,EAAE,qBAAqB,EAAE,QAAQ;EACvC,SAAS;EACT,OAAO;EACP,OAAO;CACR,EAAE,EAAE;AACL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-runtime-Dft1L7eE-CUaKX_mx.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/descriptor-meta-runtime-Dft1L7eE.mjs"],"sourcesContent":["import { z as postgresDataTypes } from \"./data-types-Chx0mjTP.mjs\";\nconst postgresTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tid: \"postgres\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: postgresDataTypes\n};\n//#endregion\nexport { postgresTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-Dft1L7eE.mjs.map"],"mappings":";;AACA,MAAM,sCAAsC;CAC3C,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;AACZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-database-schema-B1NfYBTr-DPdFDCpE.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/diff-database-schema-B1NfYBTr.mjs"],"sourcesContent":["import { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport { i as fullTextIndexDefinitionOf, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-BPxQQBuC.mjs\";\nimport { r as isPostgresSchema } from \"./postgres-schema-C6w1rzOF.mjs\";\nimport { t as postgresAccessMethodOf } from \"./index-types-BihjrAAq.mjs\";\nimport { t as postgresResolveDefault } from \"./default-normalizer-BqK6XxdC.mjs\";\nimport { a as postgresDiffSubjectGranularity, n as PostgresNativeEnumSchemaNode, r as PostgresSchemaNodeKind, t as PostgresTableSchemaNode } from \"./postgres-table-schema-node-BBkitBQh.mjs\";\nimport { i as PostgresDatabaseSchemaNode, n as PostgresPolicySchemaNode, r as PostgresNamespaceSchemaNode, t as PostgresRoleSchemaNode } from \"./postgres-role-schema-node-B8Z5i5D-.mjs\";\nimport { n as renderFullTextIndexDocument } from \"./full-text-search-document-Doy5TF7c.mjs\";\nimport { r as resolveDdlSchemaForNamespaceStorage } from \"./resolve-ddl-schema-D3VNPMSm.mjs\";\nimport { i as resolvePostgresNodeIssueControlPolicySubject } from \"./control-policy-DzFOPk9n.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { diffSchemas, issueOutcome } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { namingOf } from \"@internal/sql-schema-ir/naming\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { contractNamespaceToSchemaIR, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { classifyDiffSubjectGranularity } from \"@internal/family-sql/diff\";\nimport { PrimaryKey, RelationalSchemaNodeKind, SqlForeignKeyIR, SqlIndexIR, SqlUniqueIR } from \"@internal/sql-schema-ir/types\";\n//#region src/core/migrations/contract-to-postgres-database-schema-node.ts\n/** The database root's fixed sentinel id (`PostgresDatabaseSchemaNode#id`). */\nfunction databaseStep() {\n\treturn {\n\t\tnodeKind: PostgresSchemaNodeKind.database,\n\t\tid: \"database\"\n\t};\n}\nfunction tableDependsOn(namespaceId, tableName) {\n\treturn [\n\t\tdatabaseStep(),\n\t\t{\n\t\t\tnodeKind: PostgresSchemaNodeKind.namespace,\n\t\t\tid: namespaceId\n\t\t},\n\t\t{\n\t\t\tnodeKind: PostgresSchemaNodeKind.table,\n\t\t\tid: tableName\n\t\t}\n\t];\n}\nfunction roleDependsOn(role) {\n\treturn [databaseStep(), {\n\t\tnodeKind: PostgresSchemaNodeKind.role,\n\t\tid: role\n\t}];\n}\n/**\n* The chains from a table-child object (foreign key, index, unique, primary\n* key) to each of the own columns it is built on, in the Postgres tree.\n* Dropping a covered column auto-drops the object, so the object's drop must\n* precede the column's; the graph derives that direction from these edges.\n*/\nfunction columnDependsOn(namespaceId, tableName, columns) {\n\treturn columns.map((column) => [...tableDependsOn(namespaceId, tableName), {\n\t\tnodeKind: RelationalSchemaNodeKind.column,\n\t\tid: `column:${column}`\n\t}]);\n}\nfunction toPolicyNode(policy, namespaceId) {\n\treturn new PostgresPolicySchemaNode({\n\t\tnaming: namingOf(policy.name, policy.prefix),\n\t\ttableName: policy.tableName,\n\t\tnamespaceId,\n\t\toperation: policy.operation,\n\t\troles: [...policy.roles],\n\t\tusing: policy.using,\n\t\twithCheck: policy.withCheck,\n\t\tpermissive: policy.permissive,\n\t\tdependsOn: [tableDependsOn(namespaceId, policy.tableName), ...policy.roles.map(roleDependsOn)]\n\t});\n}\n/**\n* Projects a Postgres contract into the expected schema-diff tree: a\n* `PostgresDatabaseSchemaNode` root holding one `PostgresNamespaceSchemaNode`\n* per Postgres namespace, each holding its `PostgresTableSchemaNode`s with\n* their `PostgresPolicySchemaNode`s, plus the database roles on the root.\n*\n* Not a duplicate of the family's `contractToSchemaIR`: that builds a flat,\n* single `{ tables }` map (and throws on cross-namespace name collisions, with\n* no RLS/role concept) for SQLite's single-schema world. This is the\n* Postgres-specific *tree* shape — multi-schema, RLS-policy-aware, role-aware.\n* It reuses the family's per-namespace table conversion (`contractNamespaceToSchemaIR`)\n* for column/FK/index building and only adds the Postgres tree/policy/role shape.\n*\n* Tables are grouped by their owning namespace (resolved DDL schema name) so\n* the tree mirrors Postgres's object hierarchy. The DDL schema name is\n* resolved once per namespace.\n*\n* A policy that references a table absent from its namespace is a malformed\n* contract — the loop throws rather than fabricating a stub table.\n*/\nfunction contractToPostgresDatabaseSchemaNode(contract, options) {\n\tif (contract === null) return new PostgresDatabaseSchemaNode({\n\t\tnamespaces: {},\n\t\troles: [],\n\t\texistingSchemas: [],\n\t\tpgVersion: \"\"\n\t});\n\tconst namespaces = {};\n\tconst roles = [];\n\tconst ownedSchemas = [];\n\tfor (const ns of Object.values(contract.storage.namespaces)) {\n\t\tif (!isPostgresSchema(ns)) continue;\n\t\tfor (const role of Object.values(ns.role)) roles.push(new PostgresRoleSchemaNode({\n\t\t\tname: role.name,\n\t\t\tnamespaceId: role.namespaceId\n\t\t}));\n\t\tif (ns.id === UNBOUND_NAMESPACE_ID) {\n\t\t\tif (!Object.entries(ns.entries).some(([entriesKey, slot]) => entriesKey !== \"role\" && Object.keys(slot).length > 0)) continue;\n\t\t}\n\t\tconst ddlSchema = resolveDdlSchemaForNamespaceStorage(contract.storage, ns.id);\n\t\townedSchemas.push(ddlSchema);\n\t\tconst sqlTables = contractNamespaceToSchemaIR(contract.storage, ns.id, options).tables;\n\t\tconst policiesByTable = /* @__PURE__ */ new Map();\n\t\tfor (const policy of Object.values(ns.policy)) {\n\t\t\tconst list = policiesByTable.get(policy.tableName) ?? [];\n\t\t\tlist.push(toPolicyNode(policy, ddlSchema));\n\t\t\tpoliciesByTable.set(policy.tableName, list);\n\t\t}\n\t\tconst tables = {};\n\t\tfor (const tableName of Object.keys(ns.table)) {\n\t\t\tconst sqlTable = sqlTables[tableName];\n\t\t\tif (sqlTable === void 0) continue;\n\t\t\tconst foreignKeys = sqlTable.foreignKeys.map((fk) => {\n\t\t\t\tconst resolvedReferencedNamespace = resolveDdlSchemaForNamespaceStorage(contract.storage, fk.referencedSchema ?? UNBOUND_NAMESPACE_ID);\n\t\t\t\treturn new SqlForeignKeyIR({\n\t\t\t\t\tcolumns: fk.columns,\n\t\t\t\t\treferencedTable: fk.referencedTable,\n\t\t\t\t\treferencedColumns: fk.referencedColumns,\n\t\t\t\t\treferencedSchema: fk.referencedSchema ?? UNBOUND_NAMESPACE_ID,\n\t\t\t\t\t...ifDefined(\"name\", fk.name),\n\t\t\t\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t\t\t\t...ifDefined(\"onUpdate\", fk.onUpdate),\n\t\t\t\t\t...ifDefined(\"annotations\", fk.annotations),\n\t\t\t\t\tresolvedReferencedNamespace,\n\t\t\t\t\tdependsOn: [tableDependsOn(resolvedReferencedNamespace, fk.referencedTable), ...columnDependsOn(ddlSchema, tableName, fk.columns)]\n\t\t\t\t});\n\t\t\t});\n\t\t\tconst uniques = sqlTable.uniques.map((u) => new SqlUniqueIR({\n\t\t\t\tcolumns: u.columns,\n\t\t\t\t...ifDefined(\"name\", u.name),\n\t\t\t\t...ifDefined(\"annotations\", u.annotations),\n\t\t\t\tdependsOn: columnDependsOn(ddlSchema, tableName, u.columns)\n\t\t\t}));\n\t\t\tconst indexes = sqlTable.indexes.map((i) => {\n\t\t\t\tconst fullText = fullTextIndexDefinitionOf(i);\n\t\t\t\tif (fullText !== void 0) return new SqlIndexIR({\n\t\t\t\t\tnaming: namingOf(i.name, i.prefix),\n\t\t\t\t\twhere: i.where,\n\t\t\t\t\tunique: i.unique,\n\t\t\t\t\tpartial: i.partial,\n\t\t\t\t\ttype: postgresAccessMethodOf(FULL_TEXT_INDEX_TYPE),\n\t\t\t\t\toptions: void 0,\n\t\t\t\t\tannotations: i.annotations,\n\t\t\t\t\texpression: renderFullTextIndexDocument(fullText),\n\t\t\t\t\tdependsOn: columnDependsOn(ddlSchema, tableName, fullText.weightGroups.flat())\n\t\t\t\t});\n\t\t\t\tconst base = {\n\t\t\t\t\tnaming: namingOf(i.name, i.prefix),\n\t\t\t\t\twhere: i.where,\n\t\t\t\t\tunique: i.unique,\n\t\t\t\t\tpartial: i.partial,\n\t\t\t\t\ttype: i.type,\n\t\t\t\t\toptions: i.options,\n\t\t\t\t\tannotations: i.annotations,\n\t\t\t\t\tdependsOn: columnDependsOn(ddlSchema, tableName, i.columns ?? Object.keys(sqlTable.columns))\n\t\t\t\t};\n\t\t\t\treturn new SqlIndexIR(i.expression !== void 0 ? {\n\t\t\t\t\t...base,\n\t\t\t\t\texpression: i.expression\n\t\t\t\t} : {\n\t\t\t\t\t...base,\n\t\t\t\t\tcolumns: i.columns ?? []\n\t\t\t\t});\n\t\t\t});\n\t\t\tconst primaryKey = sqlTable.primaryKey !== void 0 ? new PrimaryKey({\n\t\t\t\tcolumns: sqlTable.primaryKey.columns,\n\t\t\t\t...ifDefined(\"name\", sqlTable.primaryKey.name),\n\t\t\t\tdependsOn: columnDependsOn(ddlSchema, tableName, sqlTable.primaryKey.columns)\n\t\t\t}) : void 0;\n\t\t\ttables[tableName] = new PostgresTableSchemaNode({\n\t\t\t\tname: sqlTable.name,\n\t\t\t\tcolumns: sqlTable.columns,\n\t\t\t\tforeignKeys,\n\t\t\t\tuniques,\n\t\t\t\tindexes,\n\t\t\t\t...ifDefined(\"primaryKey\", primaryKey),\n\t\t\t\t...ifDefined(\"annotations\", sqlTable.annotations),\n\t\t\t\t...ifDefined(\"checks\", sqlTable.checks),\n\t\t\t\tpolicies: policiesByTable.get(tableName) ?? [],\n\t\t\t\trlsEnabled: Object.hasOwn(ns.rls, tableName)\n\t\t\t});\n\t\t}\n\t\tfor (const [tableName, tablePolicies] of policiesByTable) {\n\t\t\tif (!(tableName in tables)) {\n\t\t\t\tconst policyName = tablePolicies[0]?.name ?? \"(unknown)\";\n\t\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `contract-to-postgres-database-schema-node: policy \"${policyName}\" references table \"${tableName}\" not present in namespace \"${ddlSchema}\"`, { meta: {\n\t\t\t\t\tpolicyName,\n\t\t\t\t\ttableName,\n\t\t\t\t\tnamespaceId: ddlSchema,\n\t\t\t\t\treason: \"table-missing\"\n\t\t\t\t} });\n\t\t\t}\n\t\t\tif (!Object.hasOwn(ns.rls, tableName)) {\n\t\t\t\tconst policyLabel = tablePolicies[0]?.prefix ?? tablePolicies[0]?.name ?? \"(unknown)\";\n\t\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `contract-to-postgres-database-schema-node: policy \"${policyLabel}\" targets table \"${tableName}\" in namespace \"${ddlSchema}\", which is not RLS-controlled. Mark the model with @@rls (entries.rls[\"${tableName}\"]) or remove the policy.`, { meta: {\n\t\t\t\t\tpolicyName: policyLabel,\n\t\t\t\t\ttableName,\n\t\t\t\t\tnamespaceId: ddlSchema,\n\t\t\t\t\treason: \"table-not-rls-controlled\"\n\t\t\t\t} });\n\t\t\t}\n\t\t}\n\t\tnamespaces[ddlSchema] = new PostgresNamespaceSchemaNode({\n\t\t\tschemaName: ddlSchema,\n\t\t\ttables,\n\t\t\tnativeEnums: Object.values(ns.entries.native_enum ?? {}).map((entity) => new PostgresNativeEnumSchemaNode({\n\t\t\t\ttypeName: entity.typeName,\n\t\t\t\tnamespaceId: ddlSchema,\n\t\t\t\tmembers: entity.members,\n\t\t\t\t...ifDefined(\"control\", entity.control)\n\t\t\t}))\n\t\t});\n\t}\n\treturn new PostgresDatabaseSchemaNode({\n\t\tnamespaces,\n\t\troles,\n\t\texistingSchemas: ownedSchemas,\n\t\tpgVersion: \"\"\n\t});\n}\n//#endregion\n//#region src/core/migrations/diff-database-schema.ts\n/**\n* Whether a diff issue's subject node is cluster-scoped — it carries its own\n* `namespaceId` field (only role and policy diff nodes do) and that\n* coordinate is the unbound sentinel, meaning the node is not owned by any\n* schema/namespace. A role node is always cluster-scoped (roles are\n* cluster-level objects); a policy node's `namespaceId` is always its\n* table's resolved DDL schema, never the sentinel. Namespace-ownership\n* scoping (which compares `issue.path[1]` against the set of DDL schemas\n* the contract owns) makes no sense for a cluster-scoped subject — its path\n* segment at that index is the object's own name, not a schema name — so\n* such an issue bypasses that scoping entirely.\n*/\nfunction isClusterScopedIssue(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\treturn node !== void 0 && nodeNamespaceId(node) === UNBOUND_NAMESPACE_ID;\n}\nfunction nodeNamespaceId(node) {\n\tif (!Object.hasOwn(node, \"namespaceId\")) return void 0;\n\treturn blindCast(node).namespaceId;\n}\nfunction ownedSchemaNames(expected) {\n\tconst policyNamespaces = Object.values(expected.namespaces).flatMap((ns) => Object.values(ns.tables).flatMap((t) => t.policies.map((p) => p.namespaceId)));\n\treturn /* @__PURE__ */ new Set([...policyNamespaces, ...expected.existingSchemas]);\n}\n/**\n* Drops contract namespaces that declare no tables from the verdict-diff\n* expected tree and the relational owned-schema set. The legacy relational\n* walk skipped a table-less namespace (e.g. an enums-only schema) before\n* pairing, so neither its DDL schema's absence nor that schema's live\n* relational contents ever reached the verdict — the pruned tree\n* reproduces that. The prune loses no expected policies: policies attach\n* to tables, so a table-less namespace carries none (the projection\n* throws on a policy referencing an absent table). Live policies in a\n* pruned schema remain governed via the full owned set (see\n* {@link diffPostgresSchema}).\n*/\nfunction pruneTableLessNamespaces(expected) {\n\tconst namespaces = Object.fromEntries(Object.entries(expected.namespaces).filter(([, ns]) => Object.keys(ns.tables).length > 0));\n\treturn new PostgresDatabaseSchemaNode({\n\t\tnamespaces,\n\t\troles: [...expected.roles],\n\t\texistingSchemas: expected.existingSchemas.filter((s) => namespaces[s] !== void 0),\n\t\tpgVersion: expected.pgVersion\n\t});\n}\n/**\n* Resolves a verdict-diff issue's subject's declared control policy directly\n* from the contract, by delegating to the same node-typed resolver\n* ({@link resolvePostgresNodeIssueControlPolicySubject}) the planner uses to\n* gate DDL calls. `undefined` when the issue resolves to no contract subject.\n*\n* A role issue resolves through that same resolver to `external`\n* unconditionally (see its role branch), regardless of the contract's own\n* default policy: a role is referenced by the contract but not owned, and\n* `external`'s existing semantics — a missing declared subject still fails,\n* every extra is suppressed — are exactly the wanted asymmetric grading for\n* a cluster object the framework does not own.\n*/\nfunction resolveControlPolicy(issue, contract) {\n\treturn resolvePostgresNodeIssueControlPolicySubject(blindCast(issue), contract)?.explicitNodeControlPolicy;\n}\n/**\n* The Postgres full-tree node diff for the family verify verdict: derive\n* the expected tree (resolved leaf values, FK schemas\n* resolved, table-less namespaces pruned), run the generic\n* differ over the trees as derived, and scope out `not-expected` findings under namespaces the\n* contract does not own. Ownership scoping bypasses cluster-scoped subjects\n* (roles today), mirroring the legacy decomposition: relational extras check\n* the PRUNED owned set (the legacy\n* per-namespace walk never visited a table-less namespace, so its live\n* relational contents are invisible), while `structural` extras (RLS\n* policies) check the FULL owned set (the legacy policy diff governed\n* every contract schema regardless of tables — RLS governance does not\n* shrink because a namespace declares no tables). The codec `verifyType`\n* hooks run once per contract namespace with tables against that\n* namespace's paired actual node (the hooks read namespace-scoped state\n* such as `nativeEnums`).\n*/\nfunction diffPostgresSchema(input) {\n\tconst postgresContract = blindCast(input.contract);\n\tPostgresDatabaseSchemaNode.assert(input.schema);\n\tconst actual = input.schema;\n\tconst types = sqlTypeLookupsOf(input.frameworkComponents);\n\tconst fullExpected = contractToPostgresDatabaseSchemaNode(postgresContract, {\n\t\tannotationNamespace: \"pg\",\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup,\n\t\tresolveDefault: postgresResolveDefault\n\t});\n\tconst expected = pruneTableLessNamespaces(fullExpected);\n\tconst relationalOwned = ownedSchemaNames(expected);\n\tconst structuralOwned = ownedSchemaNames(fullExpected);\n\treturn {\n\t\tissues: diffSchemas(expected, actual).filter((issue) => {\n\t\t\tif (issueOutcome(issue) !== \"not-expected\") return true;\n\t\t\tif (isClusterScopedIssue(issue)) return true;\n\t\t\tconst granularity = classifyDiffSubjectGranularity(issue, postgresDiffSubjectGranularity);\n\t\t\tconst namespaceSegment = issue.path[1];\n\t\t\tif (namespaceSegment === void 0) return true;\n\t\t\treturn (granularity === \"structural\" ? structuralOwned : relationalOwned).has(namespaceSegment);\n\t\t}),\n\t\tresolveControlPolicy: (issue) => resolveControlPolicy(issue, postgresContract),\n\t\tnamespacePairs: Object.values(expected.namespaces).map((ns) => ({ actual: actual.namespaces[ns.schemaName] }))\n\t};\n}\n/**\n* Adds an empty namespace node to the actual tree for every expected namespace\n* absent from it. The relational plan diff pairs on namespace: a contract\n* namespace whose live schema does not exist yet must surface each of its\n* tables as `not-found` (→ `CREATE TABLE`), NOT as a single namespace\n* `not-found` that subtree-coalescing would collapse (leaving `CREATE SCHEMA`\n* with no tables). Padding makes the namespaces pair, so only table/column/\n* policy drift surfaces; `CREATE SCHEMA` comes separately from the synthesized\n* namespace-presence stitch (`verifyPostgresNamespacePresence`), never from the\n* tree diff — matching the retired per-namespace-paired relational walk, which\n* paired a missing schema against an empty namespace node.\n*/\nfunction padActualNamespaces(expected, actual) {\n\tconst namespaces = { ...actual.namespaces };\n\tlet padded = false;\n\tfor (const schemaName of Object.keys(expected.namespaces)) if (namespaces[schemaName] === void 0) {\n\t\tnamespaces[schemaName] = new PostgresNamespaceSchemaNode({\n\t\t\tschemaName,\n\t\t\ttables: {}\n\t\t});\n\t\tpadded = true;\n\t}\n\tif (!padded) return actual;\n\treturn new PostgresDatabaseSchemaNode({\n\t\tnamespaces,\n\t\troles: [...actual.roles],\n\t\texistingSchemas: [...actual.existingSchemas],\n\t\tpgVersion: actual.pgVersion\n\t});\n}\n/**\n* The Postgres planner's diff input: the SAME tree-building\n* `diffPostgresSchema` uses (FK schemas resolved,\n* table-less namespaces pruned, cluster-scope-aware ownership filter) plus\n* actual namespace padding (so a missing\n* schema's tables surface as `not-found` instead of a swallowed namespace\n* `not-found`). One differ drives both verify and plan; this is the\n* plan-side derivation. The single issue list covers tables / columns /\n* constraints / indexes / defaults AND policies — the caller splits it\n* (relational → `mapNodeIssueToCall`; policy → RLS ops) and stitches in\n* `CREATE SCHEMA` separately.\n*/\nfunction buildPostgresPlanDiff(input) {\n\tconst postgresContract = blindCast(input.contract);\n\tPostgresDatabaseSchemaNode.assert(input.actualSchema);\n\tconst actual = input.actualSchema;\n\tconst types = sqlTypeLookupsOf(input.frameworkComponents);\n\tconst fullExpected = contractToPostgresDatabaseSchemaNode(postgresContract, {\n\t\tannotationNamespace: \"pg\",\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup,\n\t\tresolveDefault: postgresResolveDefault\n\t});\n\tconst expected = pruneTableLessNamespaces(fullExpected);\n\tconst paddedActual = padActualNamespaces(expected, actual);\n\tconst originSchemas = input.originSchemas ?? [];\n\tconst relationalOwned = /* @__PURE__ */ new Set([...ownedSchemaNames(expected), ...originSchemas]);\n\tconst structuralOwned = /* @__PURE__ */ new Set([...ownedSchemaNames(fullExpected), ...originSchemas]);\n\treturn {\n\t\texpected,\n\t\tactual: paddedActual,\n\t\tissues: blindCast(diffSchemas(expected, paddedActual)).filter((issue) => {\n\t\t\tif (issueOutcome(issue) !== \"not-expected\") return true;\n\t\t\tif (isClusterScopedIssue(issue)) return true;\n\t\t\tconst granularity = classifyDiffSubjectGranularity(issue, postgresDiffSubjectGranularity);\n\t\t\tconst namespaceSegment = issue.path[1];\n\t\t\tif (namespaceSegment === void 0) return true;\n\t\t\treturn (granularity === \"structural\" ? structuralOwned : relationalOwned).has(namespaceSegment);\n\t\t})\n\t};\n}\n//#endregion\nexport { diffPostgresSchema as n, contractToPostgresDatabaseSchemaNode as r, buildPostgresPlanDiff as t };\n\n//# sourceMappingURL=diff-database-schema-B1NfYBT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AS,MAAM;CACrB,MAAM,QAAQ,iBAAiB,MAAM,mBAAmB;CACxD,MAAM,eAAe,qCAAqC,kBAAkB;EAC3E,qBAAqB;EACrB,gBAAgB,MAAM;EACtB,aAAa,MAAM;EACnB,gBAAgB;CACjB,CAAC;CACD,MAAM,WAAW,yBAAyB,YAAY;CACtD,MAAM,eAAe,oBAAoB,UAAU,MAAM;CACzD,MAAM,gBAAgB,MAAM,iBAAiB,CAAC;CAC9C,MAAM,kCAAkC,IAAI,IAAI,CAAC,GAAG,iBAAiB,QAAQ,GAAG,GAAG,aAAa,CAAC;CACjG,MAAM,kCAAkC,IAAI,IAAI,CAAC,GAAG,iBAAiB,YAAY,GAAG,GAAG,aAAa,CAAC;CACrG,OAAO;EACN;EACA,QAAQ;EACR,QAAQ,UAAU,YAAY,UAAU,YAAY,CAAC,CAAC,CAAC,QAAQ,UAAU;GACxE,IAAI,aAAa,KAAK,MAAM,gBAAgB,OAAO;GACnD,IAAI,qBAAqB,KAAK,GAAG,OAAO;GACxC,MAAM,cAAc,+BAA+B,OAAO,8BAA8B;GACxF,MAAM,mBAAmB,MAAM,KAAK;GACpC,IAAI,qBAAqB,KAAK,GAAG,OAAO;GACxC,QAAQ,gBAAgB,eAAe,kBAAkB,gBAAA,CAAiB,IAAI,gBAAgB;EAC/F,CAAC;CACF;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-database-schema-DPZdkysF.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/diff-database-schema.d.mts"],"mappings":";;;;;;;;;;UASU;;WAEC,UAAU;;WAEV,QAAQ;;WAER,iBAAiB,gBAAgB;;;;;;;;;;;;;;iBAc3B,sBAAsB;WAC5B,UAAU,SAAS;WACnB,cAAc;WACd,qBAAqB,cAAc;;;;;WAKnC;IACP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors-BP-2V2_C.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/errors.d.mts"],"mappings":";;;;KAGK;iBACY,cAAc,MAAM,yBAAyB,iBAAiB,UAAU,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;iBAuBjG,mCAAmC,oBAAoB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors-BrhQYgdL-D_lIrddD.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/errors-BrhQYgdL.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\nimport { CliStructuredError } from \"@internal/errors/control\";\n//#region src/core/errors.ts\nfunction postgresError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n/**\n* A `PostgresMigration` operation that needs the materialized control adapter\n* — named by `operation` (e.g. `createTable`, `dropColumn`, `dataTransform`) —\n* was invoked, but the migration was constructed without a `ControlStack`.\n* Concrete authoring usage always goes through the migration CLI entrypoint,\n* which assembles a stack from the loaded `prisma.config.ts`; reaching this\n* error means a test fixture or ad-hoc consumer instantiated `PostgresMigration`\n* with the no-arg form (legal for `operations` / `describe` introspection only).\n*\n* The `operation` argument is required so every throw site names the operation\n* that actually failed; a new operation cannot inherit a misattributed message.\n*\n* Distinct from `MIGRATION.UNFILLED_PLACEHOLDER` (placeholder not filled)\n* and `MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH` (data-transform query\n* plan against wrong contract) because the missing input is the stack\n* itself, not the per-operation contract.\n*\n* Lives in `@internal/target-postgres/errors` rather than the shared\n* framework migration errors module because the failure is target-specific:\n* the contract it talks about (`PostgresMigration`, the Postgres control\n* adapter, the Postgres-target stack) only exists in this package.\n*/\nfunction errorPostgresMigrationStackMissing(operation) {\n\treturn new CliStructuredError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `PostgresMigration.${operation} requires a control adapter`, {\n\t\twhy: `PostgresMigration.${operation} was invoked on an instance constructed without a ControlStack, so the stored controlAdapter is undefined and the operation cannot lower its plan.`,\n\t\tfix: \"Construct the migration via the migration CLI entrypoint (which assembles a ControlStack from the loaded prisma.config.ts), or pass a ControlStack containing a Postgres adapter to the migration constructor in test fixtures.\",\n\t\tmeta: { operation }\n\t});\n}\nfunction errorTemporalUnavailable(codecId, operation) {\n\treturn postgresError(\"RUNTIME.TEMPORAL_UNAVAILABLE\", `Codec '${codecId}' cannot ${operation} a value because this runtime has no global Temporal implementation.`, {\n\t\twhy: \"Temporal-backed codecs read and write their values through the global Temporal API, which this runtime does not provide.\",\n\t\tfix: \"Run on a runtime with Temporal available, install a Temporal polyfill before creating the client, or author the column with its *String type to read and write PostgreSQL's own text instead.\",\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\toperation\n\t\t}\n\t});\n}\nfunction errorTemporalUnavailableForDefault(generatorId) {\n\treturn postgresError(\"RUNTIME.TEMPORAL_UNAVAILABLE\", `Mutation default generator '${generatorId}' cannot produce a value because this runtime has no global Temporal implementation.`, {\n\t\twhy: \"The generator answers a Temporal-backed column, so the value it produces is a Temporal.Instant, which this runtime cannot construct.\",\n\t\tfix: \"Run on a runtime with Temporal available, install a Temporal polyfill before creating the client, or author the column with `temporal.createdAtString()` / `temporal.updatedAtString()` to store PostgreSQL's own text instead.\",\n\t\tmeta: { generatorId }\n\t});\n}\nfunction errorTemporalUnrepresentable(options) {\n\tconst { codecId, operation, stringType, value, detail } = options;\n\treturn postgresError(operation === \"decode\" ? \"RUNTIME.DECODE_FAILED\" : \"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' cannot represent the value ${operation === \"decode\" ? \"PostgreSQL returned\" : \"the application supplied\"}: ${JSON.stringify(value)} — ${detail}. Use ${stringType} to carry this column as PostgreSQL's own text.`, {\n\t\twhy: `${detail}. Temporal is the authoritative parser and range check for this codec, so a value it cannot express has no representation on this column.`,\n\t\tfix: `Author the column as ${stringType} to read and write PostgreSQL's own text for it, which preserves every value the database accepts.`,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\toperation,\n\t\t\tvalue,\n\t\t\tstringType\n\t\t},\n\t\t...options.cause === void 0 ? {} : { cause: options.cause }\n\t});\n}\nfunction errorTemporalWrongType(codecId, temporalTag, stringType, received) {\n\treturn postgresError(\"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' encodes a ${temporalTag}, but received ${received}.`, {\n\t\twhy: \"The codec serializes through the Temporal value's own toString(). A different type reaches PostgreSQL in a spelling it does not accept, and the resulting error names the column rather than the codec.\",\n\t\tfix: `Pass a ${temporalTag}, or author the column with its ${stringType} type to write PostgreSQL text directly.`,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\ttemporalTag,\n\t\t\tstringType,\n\t\t\treceived\n\t\t}\n\t});\n}\n/** A string timestamp codec received something other than text, such as a `Date` from a contract emitted before its generator wrote text. */\nfunction errorTimestampTextWrongType(codecId, received) {\n\treturn postgresError(\"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' writes PostgreSQL's text for the value, but received ${received}.`, {\n\t\twhy: \"The codec sends its value to PostgreSQL unchanged. A Date would be sent in the process's local time zone, and a timestamp column without a time zone would store the wrong wall-clock time.\",\n\t\tfix: \"Pass the timestamp as text, such as \\\"2024-01-02 03:04:05.678\\\". If the value came from a generated default, emit the contract again: a contract emitted by an earlier version pairs this column with timestampNow, which generates a Date.\",\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\treceived\n\t\t}\n\t});\n}\nfunction errorTemporalNonIsoCalendar(codecId, calendarId) {\n\treturn postgresError(\"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' accepts only the iso8601 calendar, but the value carries '${calendarId}'.`, {\n\t\twhy: \"PostgreSQL stores no calendar alongside a date, so a non-ISO calendar would be discarded on write and the value would read back as a different date than the one authored.\",\n\t\tfix: \"Convert the value with .withCalendar(\\\"iso8601\\\") before writing if the ISO projection is what you mean to store.\",\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tcalendarId\n\t\t}\n\t});\n}\n//#endregion\nexport { errorTemporalUnrepresentable as a, postgresError as c, errorTemporalUnavailableForDefault as i, errorTemporalNonIsoCalendar as n, errorTemporalWrongType as o, errorTemporalUnavailable as r, errorTimestampTextWrongType as s, errorPostgresMigrationStackMissing as t };\n\n//# sourceMappingURL=errors-BrhQYgdL.mjs.map"],"mappings":";;;AAGA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAS,mCAAmC,WAAW;CACtD,OAAO,IAAI,mBAAmB,4CAA4C,qBAAqB,UAAU,8BAA8B;EACtI,KAAK,qBAAqB,UAAU;EACpC,KAAK;EACL,MAAM,EAAE,UAAU;CACnB,CAAC;AACF;AACA,SAAS,yBAAyB,SAAS,WAAW;CACrD,OAAO,cAAc,gCAAgC,UAAU,QAAQ,WAAW,UAAU,uEAAuE;EAClK,KAAK;EACL,KAAK;EACL,MAAM;GACL;GACA;EACD;CACD,CAAC;AACF;AACA,SAAS,mCAAmC,aAAa;CACxD,OAAO,cAAc,gCAAgC,+BAA+B,YAAY,uFAAuF;EACtL,KAAK;EACL,KAAK;EACL,MAAM,EAAE,YAAY;CACrB,CAAC;AACF;AACA,SAAS,6BAA6B,SAAS;CAC9C,MAAM,EAAE,SAAS,WAAW,YAAY,OAAO,WAAW;CAC1D,OAAO,cAAc,cAAc,WAAW,0BAA0B,yBAAyB,UAAU,QAAQ,+BAA+B,cAAc,WAAW,wBAAwB,2BAA2B,IAAI,KAAK,UAAU,KAAK,EAAE,KAAK,OAAO,QAAQ,WAAW,kDAAkD;EACxU,KAAK,GAAG,OAAO;EACf,KAAK,wBAAwB,WAAW;EACxC,MAAM;GACL;GACA;GACA;GACA;EACD;EACA,GAAG,QAAQ,UAAU,KAAK,IAAI,CAAC,IAAI,EAAE,OAAO,QAAQ,MAAM;CAC3D,CAAC;AACF;AACA,SAAS,uBAAuB,SAAS,aAAa,YAAY,UAAU;CAC3E,OAAO,cAAc,yBAAyB,UAAU,QAAQ,cAAc,YAAY,iBAAiB,SAAS,IAAI;EACvH,KAAK;EACL,KAAK,UAAU,YAAY,kCAAkC,WAAW;EACxE,MAAM;GACL;GACA;GACA;GACA;EACD;CACD,CAAC;AACF;;AAEA,SAAS,4BAA4B,SAAS,UAAU;CACvD,OAAO,cAAc,yBAAyB,UAAU,QAAQ,yDAAyD,SAAS,IAAI;EACrI,KAAK;EACL,KAAK;EACL,MAAM;GACL;GACA;EACD;CACD,CAAC;AACF;AACA,SAAS,4BAA4B,SAAS,YAAY;CACzD,OAAO,cAAc,yBAAyB,UAAU,QAAQ,8DAA8D,WAAW,KAAK;EAC7I,KAAK;EACL,KAAK;EACL,MAAM;GACL;GACA;EACD;CACD,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-8PmilGkW.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text.mjs"],"sourcesContent":["import { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport \"./full-text-index-definition-BPxQQBuC.mjs\";\nimport { c as FullTextDocument, i as websearchToTsquery, l as fullTextDocument, n as plaintoTsquery, o as languageLiteral, r as toTsquery, t as phrasetoTsquery } from \"./full-text-parsers-CFFxiOrp.mjs\";\n//#region src/core/tsquery-tag.ts\n/**\n* An empty term, `''`, is a `tsquery` syntax error; a single space parses as a term with no words,\n* as a stop word does.\n*/\nfunction quotedTerm(value) {\n\treturn value === \"\" ? \"' '\" : `'${value.replaceAll(\"\\\\\", \"\\\\\\\\\").replaceAll(\"'\", \"''\")}'`;\n}\nfunction literalPart(strings, index) {\n\tconst part = strings[index];\n\tif (part === void 0) throw postgresError(\"RUNTIME.ARGUMENT_INVALID\", `tsquery: literal part ${index} of the template has an invalid escape sequence.`, {\n\t\twhy: \"JavaScript gives a template tag no text for a literal part with an invalid escape such as \\\\u or \\\\x, so the tsquery syntax written there would be lost.\",\n\t\tfix: \"Write a literal backslash as \\\\\\\\, or remove the escape.\",\n\t\tmeta: {\n\t\t\thelper: \"tsquery\",\n\t\t\targument: `literal part ${index}`,\n\t\t\treceived: strings.raw[index]\n\t\t}\n\t});\n\treturn part;\n}\nfunction assemble(strings, values) {\n\treturn values.reduce((text, value, i) => `${text}${quotedTerm(value)}${literalPart(strings, i + 1)}`, literalPart(strings, 0));\n}\nfunction isTemplate(value) {\n\treturn Array.isArray(value);\n}\nfunction tsquery(first, ...values) {\n\tif (isTemplate(first)) return toTsquery(assemble(first, values));\n\tconst language = first.language ?? \"english\";\n\tlanguageLiteral(\"tsquery\", language);\n\treturn (strings, ...templateValues) => toTsquery(assemble(strings, templateValues), { language });\n}\n//#endregion\nexport { FullTextDocument, fullTextDocument, phrasetoTsquery, plaintoTsquery, toTsquery, tsquery, websearchToTsquery };\n\n//# sourceMappingURL=full-text.mjs.map"],"mappings":";;;;;;;AAQA,SAAS,WAAW,OAAO;CAC1B,OAAO,UAAU,KAAK,QAAQ,IAAI,MAAM,WAAW,MAAM,MAAM,CAAC,CAAC,WAAW,KAAK,IAAI,EAAE;AACxF;AACA,SAAS,YAAY,SAAS,OAAO;CACpC,MAAM,OAAO,QAAQ;CACrB,IAAI,SAAS,KAAK,GAAG,MAAM,cAAc,4BAA4B,yBAAyB,MAAM,mDAAmD;EACtJ,KAAK;EACL,KAAK;EACL,MAAM;GACL,QAAQ;GACR,UAAU,gBAAgB;GAC1B,UAAU,QAAQ,IAAI;EACvB;CACD,CAAC;CACD,OAAO;AACR;AACA,SAAS,SAAS,SAAS,QAAQ;CAClC,OAAO,OAAO,QAAQ,MAAM,OAAO,MAAM,GAAG,OAAO,WAAW,KAAK,IAAI,YAAY,SAAS,IAAI,CAAC,KAAK,YAAY,SAAS,CAAC,CAAC;AAC9H;AACA,SAAS,WAAW,OAAO;CAC1B,OAAO,MAAM,QAAQ,KAAK;AAC3B;AACA,SAAS,QAAQ,OAAO,GAAG,QAAQ;CAClC,IAAI,WAAW,KAAK,GAAG,OAAO,UAAU,SAAS,OAAO,MAAM,CAAC;CAC/D,MAAM,WAAW,MAAM,YAAY;CACnC,gBAAgB,WAAW,QAAQ;CACnC,QAAQ,SAAS,GAAG,mBAAmB,UAAU,SAAS,SAAS,cAAc,GAAG,EAAE,SAAS,CAAC;AACjG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-collection-method-BFd2u2cs-DcN_Vf7f.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-collection-method-BFd2u2cs.d.mts"],"mappings":";;;;;;;;KAOK,0BAA0B,gBAAgB,QAAQ;UAC7C;WACC,sBAAsB,OAAO;WAC7B;WACA;;KAEN,oBAAoB,cAAc,6BAA6B,iDAAiD,QAAQ,uBAAuB,0CAA0C,wBAAwB,6BAA6B;;UAEzO,gCAAgC;WAC/B,SAAS;;;YAGR;aACC,qBAAqB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-index-authoring-Ca6bWXyG.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-index-authoring.d.mts"],"mappings":";;;iBAGiB,sBAAsB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-index-definition-BPxQQBuC-BrpDsuJu.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-index-definition-BPxQQBuC.mjs"],"sourcesContent":["import { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport { type } from \"arktype\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/core/full-text-weight-groups.ts\n/** The weights Postgres's `setweight` takes, strongest first. Each weight group takes the next one. */\nconst FULL_TEXT_WEIGHTS = [\n\t\"A\",\n\t\"B\",\n\t\"C\",\n\t\"D\"\n];\nfunction weightGroupsOf(fields, isField) {\n\tif (isField(fields)) return [[fields]];\n\treturn fields.map((item) => isField(item) ? [item] : item);\n}\n//#endregion\n//#region src/core/text-search-languages.ts\n/**\n* The text-search configurations a stock PostgreSQL server ships with. The language reaches SQL as\n* an inline literal rather than a bound parameter, so only names on this list may be used.\n*/\nconst POSTGRES_TEXT_SEARCH_LANGUAGES = [\n\t\"simple\",\n\t\"arabic\",\n\t\"armenian\",\n\t\"basque\",\n\t\"catalan\",\n\t\"danish\",\n\t\"dutch\",\n\t\"english\",\n\t\"finnish\",\n\t\"french\",\n\t\"german\",\n\t\"greek\",\n\t\"hindi\",\n\t\"hungarian\",\n\t\"indonesian\",\n\t\"irish\",\n\t\"italian\",\n\t\"lithuanian\",\n\t\"nepali\",\n\t\"norwegian\",\n\t\"portuguese\",\n\t\"romanian\",\n\t\"russian\",\n\t\"serbian\",\n\t\"spanish\",\n\t\"swedish\",\n\t\"tamil\",\n\t\"turkish\",\n\t\"yiddish\"\n];\nconst DEFAULT_FULL_TEXT_SEARCH_LANGUAGE = \"english\";\nconst KNOWN_LANGUAGES = new Set(POSTGRES_TEXT_SEARCH_LANGUAGES);\nfunction isFullTextSearchLanguage(language) {\n\treturn KNOWN_LANGUAGES.has(language);\n}\n//#endregion\n//#region src/core/full-text-index-definition.ts\n/** The index type a full-text index is registered under. */\nconst FULL_TEXT_INDEX_TYPE = \"fullText\";\n/** The traits the codec of every column a full-text index covers must carry. */\nconst FULL_TEXT_COLUMN_TRAITS = [\"textual\"];\n/**\n* The rules of a full-text index, stated once: one to four weight groups, none empty, each field\n* once, text columns only, and not unique. Every site that checks a full-text index calls this.\n*/\nfunction fullTextIndexProblems(candidate) {\n\tconst { weightGroups } = candidate;\n\tconst problems = [];\n\tif (weightGroups.length === 0) problems.push({ kind: \"no-fields\" });\n\tif (weightGroups.length > FULL_TEXT_WEIGHTS.length) problems.push({\n\t\tkind: \"too-many-groups\",\n\t\tgroupCount: weightGroups.length\n\t});\n\tweightGroups.forEach((group, position) => {\n\t\tif (group.length === 0) problems.push({\n\t\t\tkind: \"empty-group\",\n\t\t\tposition\n\t\t});\n\t});\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const field of weightGroups.flat()) {\n\t\tif (seen.has(field)) problems.push({\n\t\t\tkind: \"duplicate-field\",\n\t\t\tfield\n\t\t});\n\t\tseen.add(field);\n\t}\n\tconst { codecs } = candidate;\n\tif (codecs !== void 0) for (const field of new Set(weightGroups.flat())) {\n\t\tconst codecId = codecs.codecIdOf(field);\n\t\tif (codecId === void 0 || !carriesFullTextTraits(codecs.traitsOf(codecId))) problems.push({\n\t\t\tkind: \"not-text\",\n\t\t\tfield,\n\t\t\tcodecId\n\t\t});\n\t}\n\tif (candidate.unique === true) problems.push({ kind: \"unique\" });\n\treturn problems;\n}\nfunction carriesFullTextTraits(traits) {\n\treturn traits !== void 0 && FULL_TEXT_COLUMN_TRAITS.every((trait) => traits.includes(trait));\n}\nfunction describeFullTextIndexProblem(subject, problem, fieldLabel = (field) => field) {\n\tswitch (problem.kind) {\n\t\tcase \"no-fields\": return `${subject} needs at least one field.`;\n\t\tcase \"too-many-groups\": return `${subject} takes at most ${FULL_TEXT_WEIGHTS.length} weight groups, one for each of the weights ${FULL_TEXT_WEIGHTS.join(\", \")}, but was given ${problem.groupCount}.`;\n\t\tcase \"empty-group\": return `${subject} has an empty weight group at position ${problem.position + 1}.`;\n\t\tcase \"duplicate-field\": return `${subject} names the field \"${fieldLabel(problem.field)}\" more than once.`;\n\t\tcase \"not-text\": return `${subject} indexes text columns, but \"${fieldLabel(problem.field)}\" is ${problem.codecId === void 0 ? \"not a stored scalar field\" : `stored as \\`${problem.codecId}\\``}.`;\n\t\tcase \"unique\": return `${subject} is unique, but Postgres builds no unique gin index.`;\n\t}\n}\n/** The options of a full-text index: its weight groups, as storage column names, and its language. */\nconst fullTextIndexOptions = type({\n\t\"+\": \"reject\",\n\tweightGroups: type(\"string > 0\").array().array().narrow((weightGroups, ctx) => {\n\t\tconst [problem] = fullTextIndexProblems({ weightGroups });\n\t\treturn problem === void 0 || ctx.reject({ message: describeFullTextIndexProblem(\"a full-text index\", problem) });\n\t}),\n\tlanguage: type.enumerated(...POSTGRES_TEXT_SEARCH_LANGUAGES)\n});\n/**\n* The registration of the full-text index type. Its options are the index's definition, not\n* storage parameters, and the target turns them into a `gin` index over the rendered search\n* document.\n*/\nconst fullTextIndexType = {\n\toptions: fullTextIndexOptions,\n\taccessMethod: \"gin\",\n\tcolumnTraits: FULL_TEXT_COLUMN_TRAITS\n};\n/**\n* The definition a full-text index carries, or `undefined` for an index of any other type. It\n* reads an index {@link assertFullTextIndexes} has accepted, as every loaded contract's has been.\n*/\nfunction fullTextIndexDefinitionOf(index) {\n\tif (index.type !== \"fullText\") return void 0;\n\tconst definition = fullTextIndexOptions(index.options ?? {});\n\tinvariant(!(definition instanceof type.errors), \"a full-text index is read only after its contract was checked\");\n\treturn definition;\n}\n/**\n* Refuses a table's full-text index the contract cannot carry: invalid options, a broken rule of\n* {@link fullTextIndexProblems}, `columns` that are not the fields of its weight groups, in order,\n* or a foreign key that names it as its backing index. The text-columns rule is checked only when\n* `traitsOf` is given.\n*/\nfunction assertFullTextIndexes(table, traitsOf) {\n\tconst codecs = traitsOf === void 0 ? void 0 : {\n\t\tcodecIdOf: (column) => table.columns[column]?.codecId,\n\t\ttraitsOf\n\t};\n\tfor (const index of table.indexes) assertFullTextIndex(index, codecs);\n\tfor (const foreignKey of table.foreignKeys) {\n\t\tconst backing = foreignKey.index;\n\t\tif (backing === void 0 || !(\"name\" in backing)) continue;\n\t\tconst index = table.indexes.find((candidate) => candidate.name === backing.name);\n\t\tif (index?.type !== \"fullText\") continue;\n\t\tthrow postgresError(\"CONTRACT.INDEX_INVALID\", `The foreign key on columns (${foreignKey.source.columns.join(\", \")}) is backed by full-text index \"${index.name}\".`, {\n\t\t\twhy: \"A full-text index is a gin index over a search document rendered from its weight groups, not over its columns, so it does not serve the foreign key's lookups.\",\n\t\t\tfix: \"Re-emit the contract from its source, where a relation cannot name a full-text index as its index.\",\n\t\t\tmeta: {\n\t\t\t\tindex: index.name,\n\t\t\t\tcolumns: foreignKey.source.columns\n\t\t\t}\n\t\t});\n\t}\n}\nfunction assertFullTextIndex(index, codecs) {\n\tif (index.type !== \"fullText\") return;\n\tconst definition = fullTextIndexOptions(index.options ?? {});\n\tif (definition instanceof type.errors) throw invalidFullTextIndex(index, `Full-text index \"${index.name}\" has invalid options: ${definition.summary}`, \"The options of a full-text index are its definition: its weight groups and its language.\");\n\tconst [problem] = fullTextIndexProblems({\n\t\tweightGroups: definition.weightGroups,\n\t\tunique: index.unique,\n\t\tcodecs\n\t});\n\tif (problem !== void 0) throw invalidFullTextIndex(index, describeFullTextIndexProblem(`Full-text index \"${index.name}\"`, problem), \"A full-text index is a gin index over text columns, in one to four weight groups that name each column once.\");\n\tconst fields = definition.weightGroups.flat();\n\tconst columns = index.columns ?? [];\n\tif (columns.length !== fields.length || columns.some((column, i) => column !== fields[i])) throw invalidFullTextIndex(index, `Full-text index \"${index.name}\" covers the columns [${columns.join(\", \")}], but its weight groups name [${fields.join(\", \")}].`, \"The columns of a full-text index are the fields of its weight groups, in order. Foreign-key backing and the printer read the columns; the search document is rendered from the groups, so the two must agree.\");\n}\nfunction invalidFullTextIndex(index, message, why) {\n\treturn postgresError(\"CONTRACT.INDEX_INVALID\", message, {\n\t\twhy,\n\t\tfix: \"Re-emit the contract from its `@@fullTextIndex` or `fullTextIndex` source rather than editing the index by hand.\",\n\t\tmeta: {\n\t\t\tindex: index.name,\n\t\t\tcolumns: index.columns,\n\t\t\toptions: index.options\n\t\t}\n\t});\n}\n//#endregion\nexport { fullTextIndexOptions as a, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE as c, FULL_TEXT_WEIGHTS as d, weightGroupsOf as f, fullTextIndexDefinitionOf as i, POSTGRES_TEXT_SEARCH_LANGUAGES as l, assertFullTextIndexes as n, fullTextIndexProblems as o, describeFullTextIndexProblem as r, fullTextIndexType as s, FULL_TEXT_INDEX_TYPE as t, isFullTextSearchLanguage as u };\n\n//# sourceMappingURL=full-text-index-definition-BPxQQBuC.mjs.map"],"mappings":";;;;;AAKA,MAAM,oBAAoB;CACzB;CACA;CACA;CACA;AACD;AACA,SAAS,eAAe,QAAQ,SAAS;CACxC,IAAI,QAAQ,MAAM,GAA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AAC;CAClC,IAAI,QAAQ,WAAW,OAAO,UAAU,QAAQ,MAAM,QAAQ,MAAM,WAAW,OAAO,EAAE,GAAG,MAAM,qBAAqB,OAAO,oBAAoB,MAAM,KAAK,wBAAwB,QAAQ,KAAK,IAAI,EAAE,iCAAiC,OAAO,KAAK,IAAI,EAAE,KAAK,+MAA+M;AAC/c;AACA,SAAS,qBAAqB,OAAO,SAAS,KAAK;CAClD,OAAO,cAAc,0BAA0B,SAAS;EACvD;EACA,KAAK;EACL,MAAM;GACL,OAAO,MAAM;GACb,SAAS,MAAM;GACf,SAAS,MAAM;EAChB;CACD,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-index-definition-D5iBWLss-FifKlctQ.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-index-definition-D5iBWLss.d.mts"],"mappings":";;;KAGK,qBAAqB,4BAA4B;;;;;KAKjD,oBAAoB,SAAS,kBAAkB,iBAAiB;iBACpD,eAAe,OAAO,QAAQ,oBAAoB,QAAQ,UAAU,mBAAmB,SAAS,QAAQ,qBAAqB;;;;;;;cAOhI;KACT,iCAAiC;cACxB;;;;cAIA;;UAEJ;;WAEC,cAAc;WACd,UAAU;;;UAGX;;WAEC,YAAY;;WAEZ,WAAW;;;UAGZ;WACC,cAAc;WACd;;WAEA,SAAS;;;KAGf;WACM;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA;WACA;;WAEA;;;;;;iBAMM,sBAAsB,WAAW,kCAAkC;iBACnE,6BAA6B,iBAAiB,SAAS,sBAAsB,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-parsers-CFFxiOrp-BmiwdZ21.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-parsers-CFFxiOrp.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, j as PG_TSQUERY_CODEC_ID } from \"./codec-ids-BMhEpFwv.mjs\";\nimport { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport { d as FULL_TEXT_WEIGHTS, f as weightGroupsOf, l as POSTGRES_TEXT_SEARCH_LANGUAGES, o as fullTextIndexProblems, r as describeFullTextIndexProblem, u as isFullTextSearchLanguage } from \"./full-text-index-definition-BPxQQBuC.mjs\";\nimport { LiteralExpr } from \"@internal/sql-relational-core/ast\";\nimport { buildOperation, toExpr } from \"@internal/sql-relational-core/expression\";\n//#region src/core/full-text-document.ts\n/**\n* A search document built from columns in weight groups, for `fullTextMatches` and `fullTextRank`\n* to search without a full-text index. Postgres uses an index only for a query over the same\n* document, so to search an index, pass the index from the table's `indexes` instead.\n*/\nvar FullTextDocument = class FullTextDocument {\n\tweightGroups;\n\tconstructor(weightGroups) {\n\t\tthis.weightGroups = weightGroups;\n\t\tObject.freeze(this);\n\t}\n\tstatic of(groups) {\n\t\tconst weightGroups = weightGroupsOf(groups, (item) => !Array.isArray(item));\n\t\tlet position = 0;\n\t\tconst [problem] = fullTextIndexProblems({ weightGroups: weightGroups.map((group) => group.map(() => String(position++))) });\n\t\tif (problem !== void 0) throw postgresError(\"RUNTIME.ARGUMENT_INVALID\", describeFullTextIndexProblem(\"fullTextDocument: the document\", problem), {\n\t\t\twhy: `Each weight group takes one of the weights Postgres has, ${FULL_TEXT_WEIGHTS.join(\", \")}.`,\n\t\t\tfix: \"Pass one to four weight groups, none of them empty.\",\n\t\t\tmeta: {\n\t\t\t\thelper: \"fullTextDocument\",\n\t\t\t\targument: \"groups\",\n\t\t\t\treceived: weightGroups.length\n\t\t\t}\n\t\t});\n\t\treturn new FullTextDocument(weightGroups);\n\t}\n};\n/**\n* The search document of columns in weight groups, strongest first: `fullTextDocument([[f.title,\n* f.subtitle], [f.body]])`. Each group takes the next weight, `A` to `D`; a column named twice is\n* not refused, because column expressions have no name to compare.\n*/\nfunction fullTextDocument(groups) {\n\treturn FullTextDocument.of(groups);\n}\n//#endregion\n//#region src/core/full-text-options.ts\n/**\n* Options for the Postgres full-text operations, and the checks each one goes through.\n*\n* Every option here reaches the SQL as an inline literal rather than a bound parameter, because\n* Postgres accepts no parameter in these positions. Each is therefore validated before a statement\n* exists; anything unrecognized throws `RUNTIME.ARGUMENT_INVALID`.\n*\n* The headline markers are the only free text among them, and `checkMarker` restricts their\n* characters precisely so that the literal path never carries a quote or a backslash for\n* `escapeLiteral` to have to reason about.\n*/\nfunction invalid(method, argument, received, why, fix) {\n\treturn postgresError(\"RUNTIME.ARGUMENT_INVALID\", `${method}: ${why}`, {\n\t\twhy: \"The option is written into the SQL as an inline literal, not a bound parameter, so it is checked before the statement is built.\",\n\t\tfix,\n\t\tmeta: {\n\t\t\thelper: method,\n\t\t\targument,\n\t\t\treceived\n\t\t}\n\t});\n}\nfunction languageLiteral(method, language) {\n\tif (!isFullTextSearchLanguage(language)) throw invalid(method, \"language\", language, `'${language}' is not a PostgreSQL text-search configuration Prisma recognizes.`, `Pass one of: ${POSTGRES_TEXT_SEARCH_LANGUAGES.join(\", \")}.`);\n\treturn LiteralExpr.of(language);\n}\nfunction normalizationLiteral(method, normalization) {\n\tif (!Number.isInteger(normalization) || normalization < 0 || normalization > 63) throw invalid(method, \"normalization\", normalization, `normalization must be an integer between 0 and 63, received ${normalization}.`, \"Combine the flags documented for ts_rank, e.g. 32 to divide the rank by itself plus one.\");\n\treturn LiteralExpr.of(normalization);\n}\nfunction checkWordCount(method, argument, value) {\n\tif (!Number.isInteger(value) || value < 1) throw invalid(method, argument, value, `${argument} must be a positive integer, received ${value}.`, \"Pass a whole number of words, one or more.\");\n}\n/** Non-empty, and none of `\"` `,` `=` `\\` or whitespace. */\nconst MARKER = /^[^\"=,\\\\\\s]+$/;\nfunction checkMarker(method, argument, value) {\n\tif (!MARKER.test(value)) throw invalid(method, argument, value, `${argument} must be non-empty and free of \" , = \\\\ and whitespace, received ${JSON.stringify(value)}.`, \"ts_headline parses its options as a quoted, comma-separated list of Key=Value pairs, and the whole list reaches SQL as one literal, so a marker carrying those characters cannot survive either step. Use markup such as <mark> or <b>.\");\n}\n/**\n* The fourth `ts_headline` argument: one text literal of `Key=Value` pairs. Returns `undefined` when\n* nothing but the language was given, so the common call keeps rendering the three-argument form.\n*/\nfunction headlineOptionsLiteral(method, options) {\n\tconst pairs = [];\n\tif (options.startSel !== void 0) {\n\t\tcheckMarker(method, \"startSel\", options.startSel);\n\t\tpairs.push(`StartSel=${options.startSel}`);\n\t}\n\tif (options.stopSel !== void 0) {\n\t\tcheckMarker(method, \"stopSel\", options.stopSel);\n\t\tpairs.push(`StopSel=${options.stopSel}`);\n\t}\n\tif (options.maxWords !== void 0) {\n\t\tcheckWordCount(method, \"maxWords\", options.maxWords);\n\t\tpairs.push(`MaxWords=${options.maxWords}`);\n\t}\n\tif (options.minWords !== void 0) {\n\t\tcheckWordCount(method, \"minWords\", options.minWords);\n\t\tif (options.maxWords !== void 0 && options.minWords >= options.maxWords) throw invalid(method, \"minWords\", options.minWords, `minWords (${options.minWords}) must be below maxWords (${options.maxWords}).`, \"Postgres requires MinWords strictly below MaxWords. Lower minWords, or raise maxWords.\");\n\t\tpairs.push(`MinWords=${options.minWords}`);\n\t}\n\tif (options.highlightAll !== void 0) {\n\t\tif (typeof options.highlightAll !== \"boolean\") throw invalid(method, \"highlightAll\", options.highlightAll, `highlightAll must be a boolean, received ${JSON.stringify(options.highlightAll)}.`, \"Pass true to mark up the whole document, or false to extract fragments.\");\n\t\tpairs.push(`HighlightAll=${options.highlightAll}`);\n\t}\n\treturn pairs.length === 0 ? void 0 : LiteralExpr.of(pairs.join(\", \"));\n}\n//#endregion\n//#region src/core/full-text-parsers.ts\nconst TEXT_REF = { codecId: PG_TEXT_CODEC_ID };\nfunction parser(method, fn) {\n\treturn (text, options = {}) => buildOperation({\n\t\tmethod,\n\t\targs: [toExpr(text, TEXT_REF), languageLiteral(method, options.language ?? \"english\")],\n\t\treturns: {\n\t\t\tcodecId: PG_TSQUERY_CODEC_ID,\n\t\t\tnullable: false\n\t\t},\n\t\tlowering: {\n\t\t\ttargetFamily: \"sql\",\n\t\t\ttemplate: `${fn}({{arg0}}, {{self}})`\n\t\t}\n\t});\n}\n/** Postgres `websearch_to_tsquery`: search-box syntax with quotes, `or` and `-`. Never errors. */\nconst websearchToTsquery = parser(\"websearchToTsquery\", \"websearch_to_tsquery\");\n/**\n* Postgres `to_tsquery`: operator syntax (`'zebra' & !'graze'`, `zeb:*`), each word normalized.\n* Malformed input fails at execution, so pass only text the application wrote, never user input;\n* `tsquery` interpolates user input safely.\n*/\nconst toTsquery = parser(\"toTsquery\", \"to_tsquery\");\n/** Postgres `plainto_tsquery`: every word must match. */\nconst plaintoTsquery = parser(\"plaintoTsquery\", \"plainto_tsquery\");\n/** Postgres `phraseto_tsquery`: the words must match in order. */\nconst phrasetoTsquery = parser(\"phrasetoTsquery\", \"phraseto_tsquery\");\n//#endregion\nexport { headlineOptionsLiteral as a, FullTextDocument as c, websearchToTsquery as i, fullTextDocument as l, plaintoTsquery as n, languageLiteral as o, toTsquery as r, normalizationLiteral as s, phrasetoTsquery as t };\n\n//# sourceMappingURL=full-text-parsers-CFFxiOrp.mjs.map"],"mappings":";;;;;;;;;;;AAWA,IAAI,mBAAmB,MAAM,iBAAiB;CAC7C;CACA,YAAY,cAAc;EACzB,KAAK,eAAe;EACpB,OAAO,OAAO,IAAI;CACnB;CACA,OAAO,GAAG,QAAQ;EACjB,MAAM,eAAe,eAAe,SAAS,SAAS,CAAC,MAAM,QAAQ,IAAI,CAAC;EAC1E,IAAI,WAAW;EACf,MAAM,CAAC,WAAW,sBAAsB,EAAE,cAAc,aAAa,KAAK,UAAU,MAAM,UAAU,OAAO,UAAU,CAAC,CAAC,EAAE,CAAC;EAC1H,IAAI,YAAY,KAAK,GAAG,MAAM,cAAc,4BAA4B,6BAA6B,kCAAkC,OAAO,GAAG;GAChJ,KAAK,4DAA4D,kBAAkB,KAAK,IAAI,EAAE;GAC9F,KAAK;GACL,MAAM;IACL,QAAQ;IACR,UAAU;IACV,UAAU,aA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;;AAM9E,MAAM,YAAY,OAAO,aAAa,YAAY;;AAElD,MAAM,iBAAiB,OAAO,kBAAkB,iBAAiB;;AAEjE,MAAM,kBAAkB,OAAO,mBAAmB,kBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-r2wMygYZ.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text.d.mts"],"mappings":";;;;KAGK,cAAc,SAAS,yBAAyB,qBAAqB;;;;;;;;;;;;;;;;;iBAiBzD,QAAQ,SAAS,uBAAuB;iBACxC,QAAQ,SAAS,yBAAyB,mBAAmB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"full-text-search-document-Doy5TF7c-DezgYsP-.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/full-text-search-document-Doy5TF7c.mjs"],"sourcesContent":["import { c as postgresError } from \"./errors-BrhQYgdL.mjs\";\nimport { i as quoteIdentifier } from \"./sql-utils-Bnw3JbWf.mjs\";\nimport { d as FULL_TEXT_WEIGHTS, o as fullTextIndexProblems, r as describeFullTextIndexProblem } from \"./full-text-index-definition-BPxQQBuC.mjs\";\nimport { assertDefined } from \"@internal/utils/assertions\";\n//#region src/core/full-text-search-document.ts\n/**\n* The search document of a full-text index: the expression the index is built over and the one\n* `fullTextMatches` and `fullTextRank` search. Postgres uses an expression index only when the\n* query carries the same expression, so the index DDL, the schema node and the query operations\n* all render it here, from weight groups their callers have already checked.\n*\n* One field alone is `to_tsvector(language, field)`. With more fields, each gets its own\n* `to_tsvector`, wrapped in `coalesce(field, '')` since one null would make the whole document\n* null, and they are joined with `||`. With more than one group, each field is weighted with its\n* group's weight, `A` for the first. The document depends on the groups and the language only, so\n* a column's nullability never changes it.\n*/\nfunction renderFullTextDocument(groups, writer) {\n\tconst fieldCount = groups.reduce((count, group) => count + group.length, 0);\n\tconst weighted = groups.length > 1;\n\tconst vectors = groups.flatMap((group, position) => group.map((field) => {\n\t\tconst column = writer.column(field);\n\t\tconst text = fieldCount > 1 ? `coalesce(${column}, '')` : column;\n\t\tconst vector = `to_tsvector(${writer.language}, ${text})`;\n\t\tif (!weighted) return vector;\n\t\tconst weight = FULL_TEXT_WEIGHTS[position];\n\t\tassertDefined(weight, `a full-text document has no weight for group ${position + 1}`);\n\t\treturn `setweight(${vector}, '${weight}')`;\n\t}));\n\tconst [only] = vectors;\n\tassertDefined(only, \"a full-text document has at least one field\");\n\treturn vectors.length === 1 ? only : `(${vectors.join(\" || \")})`;\n}\n/**\n* The search document over storage columns, as the index DDL and the schema node carry it. A\n* definition that breaks a rule of a full-text index is refused.\n*/\nfunction renderFullTextIndexDocument(definition) {\n\tconst { weightGroups } = definition;\n\tconst [problem] = fullTextIndexProblems({ weightGroups });\n\tif (problem !== void 0) throw postgresError(\"CONTRACT.INDEX_INVALID\", describeFullTextIndexProblem(\"The full-text index definition\", problem), {\n\t\twhy: \"Each field of a search document is weighted by the position of its group, so the document is rendered only from weight groups that follow the rules of a full-text index.\",\n\t\tfix: \"Pass one to four non-empty weight groups that name each column once.\",\n\t\tmeta: { weightGroups }\n\t});\n\treturn renderFullTextDocument(weightGroups, {\n\t\tcolumn: quoteIdentifier,\n\t\tlanguage: `'${definition.language}'`\n\t});\n}\n//#endregion\nexport { renderFullTextIndexDocument as n, renderFullTextDocument as t };\n\n//# sourceMappingURL=full-text-search-document-Doy5TF7c.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAS,uBAAuB,QAAQ,QAAQ;CAC/C,MAAM,aAAa,OAAO,QAAQ,OAAO,UAAU,QAAQ,MAAM,QAAQ,CAAC;CAC1E,MAAM,WAAW,OAAO,SAAS;CACjC,MAAM,UAAU,OAAO,SAAS,OAAO,aAAa,MAAM,KAAK,UAAU;EACxE,MAAM,SAAS,OAAO,OAAO,KAAK;EAClC,MAAM,OAAO,aAAa,IAAI,YAAY,OAAO,SAAS;EAC1D,MAAM,SAAS,eAAe,OAAO,SAAS,IAAI,KAAK;EACvD,IAAI,CAAC,UAAU,OAAO;EACtB,MAAM,SAAS,kBAAkB;EACjC,cAAc,QAAQ,gDAAgD,WAAW,GAAG;EACpF,OAAO,aAAa,OAAO,KAAK,OAAO;CACxC,CAAC,CAAC;CACF,MAAM,CAAC,QAAQ;CACf,cAAc,MAAM,6CAA6C;CACjE,OAAO,QAAQ,WAAW,IAAI,OAAO,IAAI,QAAQ,KAAK,MAAM,EAAE;AAC/D;;;;;AAKA,SAAS,4BAA4B,YAAY;CAChD,MAAM,EAAE,iBAAiB;CACzB,MAAM,CAAC,WAAW,sBAAsB,EAAE,aAAa,CAAC;CACxD,IAAI,YAAY,KAAK,GAAG,MAAM,cAAc,0BAA0B,6BAA6B,kCAAkC,OAAO,GAAG;EAC9I,KAAK;EACL,KAAK;EACL,MAAM,EAAE,aAAa;CACtB,CAAC;CACD,OAAO,uBAAuB,cAAc;EAC3C,QAAQ;EACR,UAAU,IAAI,WAAW,SAAS;CACnC,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-types-BihjrAAq-ktkeKE97.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/index-types-BihjrAAq.mjs"],"sourcesContent":["import { s as fullTextIndexType, t as FULL_TEXT_INDEX_TYPE } from \"./full-text-index-definition-BPxQQBuC.mjs\";\nimport { type } from \"arktype\";\nimport { accessMethodOf, defineIndexTypes } from \"@internal/sql-contract/index-types\";\n//#region src/core/index-types.ts\nconst postgresIndexTypes = defineIndexTypes().add(\"btree\", { options: type(\"object\") }).add(\"hash\", { options: type(\"object\") }).add(\"gin\", { options: type(\"object\") }).add(\"gist\", { options: type(\"object\") }).add(\"spgist\", { options: type(\"object\") }).add(\"brin\", { options: type(\"object\") }).add(FULL_TEXT_INDEX_TYPE, fullTextIndexType);\n/** The access method an index of this type is created with; a type Postgres does not register is its own. */\nfunction postgresAccessMethodOf(typeLiteral) {\n\tconst entry = postgresIndexTypes.entries.find((candidate) => candidate.type === typeLiteral);\n\treturn entry === void 0 ? typeLiteral : accessMethodOf(entry);\n}\n//#endregion\nexport { postgresIndexTypes as n, postgresAccessMethodOf as t };\n\n//# sourceMappingURL=index-types-BihjrAAq.mjs.map"],"mappings":";;;;AAIA,MAAM,qBAAqB,iBAAiB,CAAC,CAAC,IAAI,SAAS,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,sBAAsB,iBAAiB;;AAEjV,SAAS,uBAAuB,aAAa;CAC5C,MAAM,QAAQ,mBAAmB,QAAQ,MAAM,cAAc,UAAU,SAAS,WAAW;CAC3F,OAAO,UAAU,KAAK,IAAI,cAAc,eAAe,KAAK;AAC7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"indexes-BYf6nXVv-DznOOzlT.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/indexes-BYf6nXVv.d.mts"],"mappings":";;;;;;;;;UAWU;WACC;WACA;;WAEA;;;;KAIN,KAAK,0BAA0B;;;;;;UAM1B;WACC;WACA;WACA;aACE;aACA;aACA;;WAEF,WAAW;WACX,WAAW;;;;;;;;KAQjB;;;KAGA;;;UAGK;WACC;WACA,UAAU;;;;;;WAMV;WACA"}
|