@prisma/orm-target-postgres 0.16.0-dev.36

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.
Files changed (279) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +23 -0
  3. package/dist/adapter-CWvVo0PV.d.mts +22 -0
  4. package/dist/adapter-CWvVo0PV.d.mts.map +1 -0
  5. package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs +70 -0
  6. package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs.map +1 -0
  7. package/dist/adapter.d.mts +12 -0
  8. package/dist/adapter.mjs +7 -0
  9. package/dist/adapter__adapter.d.mts +2 -0
  10. package/dist/adapter__adapter.mjs +2 -0
  11. package/dist/adapter__column-types.d.mts +2 -0
  12. package/dist/adapter__column-types.mjs +2 -0
  13. package/dist/adapter__control.d.mts +5 -0
  14. package/dist/adapter__control.mjs +441 -0
  15. package/dist/adapter__control.mjs.map +1 -0
  16. package/dist/adapter__operation-types.d.mts +2 -0
  17. package/dist/adapter__operation-types.mjs +1 -0
  18. package/dist/adapter__runtime.d.mts +2 -0
  19. package/dist/adapter__runtime.mjs +38 -0
  20. package/dist/adapter__runtime.mjs.map +1 -0
  21. package/dist/adapter__types.d.mts +4 -0
  22. package/dist/adapter__types.mjs +1 -0
  23. package/dist/authoring-03FwIL2k-kPjZAp3s.mjs +757 -0
  24. package/dist/authoring-03FwIL2k-kPjZAp3s.mjs.map +1 -0
  25. package/dist/canonicalize-CQlxSR4D-MnrT5gtW.d.mts +34 -0
  26. package/dist/canonicalize-CQlxSR4D-MnrT5gtW.d.mts.map +1 -0
  27. package/dist/canonicalize-CrN3u_xM-D4MrOqcB.mjs +59 -0
  28. package/dist/canonicalize-CrN3u_xM-D4MrOqcB.mjs.map +1 -0
  29. package/dist/codec-descriptor-Bec_zukr-BfvtUqhm.d.mts +37 -0
  30. package/dist/codec-descriptor-Bec_zukr-BfvtUqhm.d.mts.map +1 -0
  31. package/dist/codec-descriptor-Bg-_412t.d.mts +1 -0
  32. package/dist/codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs +135 -0
  33. package/dist/codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs.map +1 -0
  34. package/dist/codec-ids-CsOU3xDv-mPI0INiF.d.mts +33 -0
  35. package/dist/codec-ids-CsOU3xDv-mPI0INiF.d.mts.map +1 -0
  36. package/dist/codec-ids-fgafMLR7.d.mts +1 -0
  37. package/dist/codec-ids-tX7Svtz--BuOfRaVU.mjs +33 -0
  38. package/dist/codec-ids-tX7Svtz--BuOfRaVU.mjs.map +1 -0
  39. package/dist/codec-types-BHwY9Ff-.d.mts +2 -0
  40. package/dist/codec-types-mWhnDEAf-CAQzGFnF.d.mts +82 -0
  41. package/dist/codec-types-mWhnDEAf-CAQzGFnF.d.mts.map +1 -0
  42. package/dist/codecs-CBl0nD44-CaWPc1bd.mjs +1486 -0
  43. package/dist/codecs-CBl0nD44-CaWPc1bd.mjs.map +1 -0
  44. package/dist/codecs-CHIVTNZs.mjs +15 -0
  45. package/dist/codecs-CHIVTNZs.mjs.map +1 -0
  46. package/dist/codecs-Cvqvb9pV-Cdc51FKY.d.mts +589 -0
  47. package/dist/codecs-Cvqvb9pV-Cdc51FKY.d.mts.map +1 -0
  48. package/dist/codecs-DBn-uIv-.d.mts +15 -0
  49. package/dist/codecs-DBn-uIv-.d.mts.map +1 -0
  50. package/dist/column-types-BH-MU6uU.d.mts +108 -0
  51. package/dist/column-types-BH-MU6uU.d.mts.map +1 -0
  52. package/dist/column-types-CwAyCgp2.mjs +126 -0
  53. package/dist/column-types-CwAyCgp2.mjs.map +1 -0
  54. package/dist/contract-free-BZUS18FU.mjs +118 -0
  55. package/dist/contract-free-BZUS18FU.mjs.map +1 -0
  56. package/dist/contract-free-DzpGxLfb.d.mts +258 -0
  57. package/dist/contract-free-DzpGxLfb.d.mts.map +1 -0
  58. package/dist/control-2F195jJk.d.mts +11 -0
  59. package/dist/control-2F195jJk.d.mts.map +1 -0
  60. package/dist/control-6WFTtLAM.mjs +60 -0
  61. package/dist/control-6WFTtLAM.mjs.map +1 -0
  62. package/dist/control-B-FTbEnE.d.mts +22 -0
  63. package/dist/control-B-FTbEnE.d.mts.map +1 -0
  64. package/dist/control-D85zv_aY.d.mts +199 -0
  65. package/dist/control-D85zv_aY.d.mts.map +1 -0
  66. package/dist/control-DRMWptiJ.mjs +1355 -0
  67. package/dist/control-DRMWptiJ.mjs.map +1 -0
  68. package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs +1901 -0
  69. package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs.map +1 -0
  70. package/dist/control-policy-Cl3RRSPg-CT3QGpR3.mjs +1257 -0
  71. package/dist/control-policy-Cl3RRSPg-CT3QGpR3.mjs.map +1 -0
  72. package/dist/data-transform-BSM7TQpE.d.mts +1 -0
  73. package/dist/data-transform-ChZzy2dP-CxVCat_8.mjs +53 -0
  74. package/dist/data-transform-ChZzy2dP-CxVCat_8.mjs.map +1 -0
  75. package/dist/data-transform-Ck5FbyNO-BNE7QlAo.d.mts +38 -0
  76. package/dist/data-transform-Ck5FbyNO-BNE7QlAo.d.mts.map +1 -0
  77. package/dist/ddl-B4Rh8ntj.d.mts +1 -0
  78. package/dist/ddl-BdP4q3KY-Duef4uHw.mjs +395 -0
  79. package/dist/ddl-BdP4q3KY-Duef4uHw.mjs.map +1 -0
  80. package/dist/default-normalizer-B36TOul4.d.mts +31 -0
  81. package/dist/default-normalizer-B36TOul4.d.mts.map +1 -0
  82. package/dist/default-normalizer-Ba5ZebHM-isV86rjy.mjs +253 -0
  83. package/dist/default-normalizer-Ba5ZebHM-isV86rjy.mjs.map +1 -0
  84. package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs +351 -0
  85. package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs.map +1 -0
  86. package/dist/descriptor-meta-DnHabAS3-C53XXPQw.mjs +28 -0
  87. package/dist/descriptor-meta-DnHabAS3-C53XXPQw.mjs.map +1 -0
  88. package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs +13 -0
  89. package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs.map +1 -0
  90. package/dist/diff-database-schema-BfRs2vrG-D2o4KII0.mjs +390 -0
  91. package/dist/diff-database-schema-BfRs2vrG-D2o4KII0.mjs.map +1 -0
  92. package/dist/diff-database-schema-DsoNznGC.d.mts +38 -0
  93. package/dist/diff-database-schema-DsoNznGC.d.mts.map +1 -0
  94. package/dist/driver.d.mts +3 -0
  95. package/dist/driver.mjs +2 -0
  96. package/dist/driver__control.d.mts +2 -0
  97. package/dist/driver__control.mjs +2 -0
  98. package/dist/driver__runtime.d.mts +2 -0
  99. package/dist/driver__runtime.mjs +597 -0
  100. package/dist/driver__runtime.mjs.map +1 -0
  101. package/dist/errors-DCcVX4j1.d.mts +32 -0
  102. package/dist/errors-DCcVX4j1.d.mts.map +1 -0
  103. package/dist/errors-kYxOQjdD-D4T3rbVp.mjs +39 -0
  104. package/dist/errors-kYxOQjdD-D4T3rbVp.mjs.map +1 -0
  105. package/dist/issue-planner-jkY6p-Ca.d.mts +105 -0
  106. package/dist/issue-planner-jkY6p-Ca.d.mts.map +1 -0
  107. package/dist/migration-CBSAPE8S.d.mts +25 -0
  108. package/dist/migration-CBSAPE8S.d.mts.map +1 -0
  109. package/dist/migration-PTHAY9Cv.mjs +21 -0
  110. package/dist/migration-PTHAY9Cv.mjs.map +1 -0
  111. package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs +7 -0
  112. package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs.map +1 -0
  113. package/dist/native-type-normalizer-DqJlOTeX.d.mts +19 -0
  114. package/dist/native-type-normalizer-DqJlOTeX.d.mts.map +1 -0
  115. package/dist/native-type-normalizer-yvd3tqv-.mjs +38 -0
  116. package/dist/native-type-normalizer-yvd3tqv-.mjs.map +1 -0
  117. package/dist/nodes-BU-V-aZA-RqwPH68u.d.mts +235 -0
  118. package/dist/nodes-BU-V-aZA-RqwPH68u.d.mts.map +1 -0
  119. package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs +255 -0
  120. package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs.map +1 -0
  121. package/dist/normalize-error-CNjgVO71-CLlZ3CuJ.mjs +121 -0
  122. package/dist/normalize-error-CNjgVO71-CLlZ3CuJ.mjs.map +1 -0
  123. package/dist/op-factory-call-DifL68KT-Bo6pxs-R.mjs +2009 -0
  124. package/dist/op-factory-call-DifL68KT-Bo6pxs-R.mjs.map +1 -0
  125. package/dist/op-factory-call-FEA5mnWH.d.mts +1 -0
  126. package/dist/op-factory-call-jd4cgfjA-CyNT4YVn.d.mts +521 -0
  127. package/dist/op-factory-call-jd4cgfjA-CyNT4YVn.d.mts.map +1 -0
  128. package/dist/operation-types-BfRocNI8.d.mts +22 -0
  129. package/dist/operation-types-BfRocNI8.d.mts.map +1 -0
  130. package/dist/pack-DFM4tmob.d.mts +610 -0
  131. package/dist/pack-DFM4tmob.d.mts.map +1 -0
  132. package/dist/planner-Bmje9ii8-B99fEsNM.mjs +588 -0
  133. package/dist/planner-Bmje9ii8-B99fEsNM.mjs.map +1 -0
  134. package/dist/planner-DL4Bh5Nk.d.mts +163 -0
  135. package/dist/planner-DL4Bh5Nk.d.mts.map +1 -0
  136. package/dist/planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs +102 -0
  137. package/dist/planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs.map +1 -0
  138. package/dist/planner-ddl-builders-ijp60-JO.d.mts +19 -0
  139. package/dist/planner-ddl-builders-ijp60-JO.d.mts.map +1 -0
  140. package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs +90 -0
  141. package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs.map +1 -0
  142. package/dist/planner-identity-values-TfEhnoWa.d.mts +25 -0
  143. package/dist/planner-identity-values-TfEhnoWa.d.mts.map +1 -0
  144. package/dist/planner-produced-postgres-migration-B0PQLLUb-qsS6cQqX.d.mts +25 -0
  145. package/dist/planner-produced-postgres-migration-B0PQLLUb-qsS6cQqX.d.mts.map +1 -0
  146. package/dist/planner-produced-postgres-migration-C3GPZWeC.d.mts +1 -0
  147. package/dist/planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs +47 -0
  148. package/dist/planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs.map +1 -0
  149. package/dist/planner-schema-lookup-C4DHAddq.d.mts +21 -0
  150. package/dist/planner-schema-lookup-C4DHAddq.d.mts.map +1 -0
  151. package/dist/planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs +57 -0
  152. package/dist/planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs.map +1 -0
  153. package/dist/planner-sql-checks-CFgbRTJw.d.mts +20 -0
  154. package/dist/planner-sql-checks-CFgbRTJw.d.mts.map +1 -0
  155. package/dist/planner-sql-checks-DRc_78n8-C9nHOrvU.mjs +152 -0
  156. package/dist/planner-sql-checks-DRc_78n8-C9nHOrvU.mjs.map +1 -0
  157. package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts +12 -0
  158. package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts.map +1 -0
  159. package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs +15 -0
  160. package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs.map +1 -0
  161. package/dist/postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts +36 -0
  162. package/dist/postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts.map +1 -0
  163. package/dist/postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs +144 -0
  164. package/dist/postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs.map +1 -0
  165. package/dist/postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts +285 -0
  166. package/dist/postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts.map +1 -0
  167. package/dist/postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts +260 -0
  168. package/dist/postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts.map +1 -0
  169. package/dist/postgres-migration-CJshdIZn-DYYjgdD0.mjs +201 -0
  170. package/dist/postgres-migration-CJshdIZn-DYYjgdD0.mjs.map +1 -0
  171. package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs +45 -0
  172. package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs.map +1 -0
  173. package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts +61 -0
  174. package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts.map +1 -0
  175. package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs +204 -0
  176. package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs.map +1 -0
  177. package/dist/postgres-schema-KSzLDONj-CsXGoY8b.mjs +421 -0
  178. package/dist/postgres-schema-KSzLDONj-CsXGoY8b.mjs.map +1 -0
  179. package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts +269 -0
  180. package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts.map +1 -0
  181. package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs +212 -0
  182. package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs.map +1 -0
  183. package/dist/render-ops-DPwhZt2W.d.mts +11 -0
  184. package/dist/render-ops-DPwhZt2W.d.mts.map +1 -0
  185. package/dist/render-ops-DxzTxSsv-Bz85uUHk.mjs +34 -0
  186. package/dist/render-ops-DxzTxSsv-Bz85uUHk.mjs.map +1 -0
  187. package/dist/render-typescript-6sCFvMBh.d.mts +21 -0
  188. package/dist/render-typescript-6sCFvMBh.d.mts.map +1 -0
  189. package/dist/render-typescript-Cw3lFO28-Cx0lXWmv.mjs +117 -0
  190. package/dist/render-typescript-Cw3lFO28-Cx0lXWmv.mjs.map +1 -0
  191. package/dist/resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs +22 -0
  192. package/dist/resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs.map +1 -0
  193. package/dist/runtime-BbSRVwdd.d.mts +12 -0
  194. package/dist/runtime-BbSRVwdd.d.mts.map +1 -0
  195. package/dist/runtime-CDewySU9.d.mts +55 -0
  196. package/dist/runtime-CDewySU9.d.mts.map +1 -0
  197. package/dist/runtime-_TfO66h5.d.mts +32 -0
  198. package/dist/runtime-_TfO66h5.d.mts.map +1 -0
  199. package/dist/schema-ir-annotations-DuuYh0gl.d.mts +15 -0
  200. package/dist/schema-ir-annotations-DuuYh0gl.d.mts.map +1 -0
  201. package/dist/schema-node-kinds-qlnURWJy-Bo30pwTM.d.mts +30 -0
  202. package/dist/schema-node-kinds-qlnURWJy-Bo30pwTM.d.mts.map +1 -0
  203. package/dist/sql-utils-BnBlQxyh-DaX9Nb7Z.mjs +90 -0
  204. package/dist/sql-utils-BnBlQxyh-DaX9Nb7Z.mjs.map +1 -0
  205. package/dist/sql-utils-DW6fkczF.d.mts +62 -0
  206. package/dist/sql-utils-DW6fkczF.d.mts.map +1 -0
  207. package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts +15 -0
  208. package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts.map +1 -0
  209. package/dist/target.d.mts +47 -0
  210. package/dist/target.mjs +34 -0
  211. package/dist/target__codec-descriptor.d.mts +3 -0
  212. package/dist/target__codec-descriptor.mjs +2 -0
  213. package/dist/target__codec-ids.d.mts +3 -0
  214. package/dist/target__codec-ids.mjs +2 -0
  215. package/dist/target__codec-types.d.mts +4 -0
  216. package/dist/target__codec-types.mjs +1 -0
  217. package/dist/target__codecs.d.mts +3 -0
  218. package/dist/target__codecs.mjs +3 -0
  219. package/dist/target__contract-free.d.mts +3 -0
  220. package/dist/target__contract-free.mjs +4 -0
  221. package/dist/target__control.d.mts +2 -0
  222. package/dist/target__control.mjs +2 -0
  223. package/dist/target__data-transform.d.mts +3 -0
  224. package/dist/target__data-transform.mjs +2 -0
  225. package/dist/target__ddl.d.mts +4 -0
  226. package/dist/target__ddl.mjs +2 -0
  227. package/dist/target__default-normalizer.d.mts +2 -0
  228. package/dist/target__default-normalizer.mjs +2 -0
  229. package/dist/target__diff-database-schema.d.mts +2 -0
  230. package/dist/target__diff-database-schema.mjs +2 -0
  231. package/dist/target__errors.d.mts +2 -0
  232. package/dist/target__errors.mjs +2 -0
  233. package/dist/target__issue-planner.d.mts +2 -0
  234. package/dist/target__issue-planner.mjs +2 -0
  235. package/dist/target__migration.d.mts +4 -0
  236. package/dist/target__migration.mjs +5 -0
  237. package/dist/target__native-type-normalizer.d.mts +2 -0
  238. package/dist/target__native-type-normalizer.mjs +2 -0
  239. package/dist/target__op-factory-call.d.mts +3 -0
  240. package/dist/target__op-factory-call.mjs +2 -0
  241. package/dist/target__pack.d.mts +2 -0
  242. package/dist/target__pack.mjs +2 -0
  243. package/dist/target__planner-ddl-builders.d.mts +2 -0
  244. package/dist/target__planner-ddl-builders.mjs +2 -0
  245. package/dist/target__planner-identity-values.d.mts +2 -0
  246. package/dist/target__planner-identity-values.mjs +2 -0
  247. package/dist/target__planner-produced-postgres-migration.d.mts +3 -0
  248. package/dist/target__planner-produced-postgres-migration.mjs +2 -0
  249. package/dist/target__planner-schema-lookup.d.mts +2 -0
  250. package/dist/target__planner-schema-lookup.mjs +2 -0
  251. package/dist/target__planner-sql-checks.d.mts +2 -0
  252. package/dist/target__planner-sql-checks.mjs +2 -0
  253. package/dist/target__planner-target-details.d.mts +2 -0
  254. package/dist/target__planner-target-details.mjs +1 -0
  255. package/dist/target__planner.d.mts +2 -0
  256. package/dist/target__planner.mjs +3 -0
  257. package/dist/target__render-ops.d.mts +2 -0
  258. package/dist/target__render-ops.mjs +2 -0
  259. package/dist/target__render-typescript.d.mts +2 -0
  260. package/dist/target__render-typescript.mjs +2 -0
  261. package/dist/target__rls-canonicalize.d.mts +2 -0
  262. package/dist/target__rls-canonicalize.mjs +2 -0
  263. package/dist/target__runtime.d.mts +3 -0
  264. package/dist/target__runtime.mjs +23 -0
  265. package/dist/target__runtime.mjs.map +1 -0
  266. package/dist/target__schema-ir-annotations.d.mts +2 -0
  267. package/dist/target__schema-ir-annotations.mjs +2 -0
  268. package/dist/target__sql-utils.d.mts +2 -0
  269. package/dist/target__sql-utils.mjs +2 -0
  270. package/dist/target__types.d.mts +7 -0
  271. package/dist/target__types.mjs +5 -0
  272. package/dist/types-CkryN1AS-6MNZLjLY.d.mts +27 -0
  273. package/dist/types-CkryN1AS-6MNZLjLY.d.mts.map +1 -0
  274. package/dist/types-Cp_Jf2tk.d.mts +1 -0
  275. package/dist/types-ue6jkJyF-BQJzjx1P.d.mts +10 -0
  276. package/dist/types-ue6jkJyF-BQJzjx1P.d.mts.map +1 -0
  277. package/dist/types-xa86TkcV.d.mts +32 -0
  278. package/dist/types-xa86TkcV.d.mts.map +1 -0
  279. package/package.json +95 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authoring-03FwIL2k-kPjZAp3s.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/authoring-03FwIL2k.mjs"],"sourcesContent":["import { o as PG_ENUM_CODEC_ID } from \"./codec-ids-tX7Svtz-.mjs\";\nimport { n as postgresError } from \"./errors-kYxOQjdD.mjs\";\nimport { t as PostgresNativeEnum } from \"./postgres-native-enum-CdP3b_-R.mjs\";\nimport { _ as PostgresRlsPolicy, d as PostgresNativeEnumSchema, f as PostgresRlsEnablementSchema, h as PostgresRole, m as PostgresRoleSchema, p as PostgresRlsPolicySchema, v as PostgresRlsEnablement } from \"./postgres-schema-KSzLDONj.mjs\";\nimport { n as computeContentHash, t as POLICY_OPERATION_PREDICATES } from \"./canonicalize-CrN3u_xM.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { temporalAuthoringPresets, temporalCodecPresetWithPrecision } from \"@internal/family-sql/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { modelAttribute } from \"@internal/psl-parser\";\nimport { exactNameBodyWarning } from \"@internal/sql-contract/index-naming\";\nimport { assertWireNamePrefixLength, normalizeSqlBody } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined } from \"@internal/utils/assertions\";\n//#region src/core/authoring.ts\nconst PSL_RLS_PREDICATE_NOT_FOR_OPERATION = \"PSL_RLS_PREDICATE_NOT_FOR_OPERATION\";\nconst PSL_POLICY_INVALID_MAP = \"PSL_POLICY_INVALID_MAP\";\nconst PSL_NATIVE_ENUM_INVALID_MAP = \"PSL_NATIVE_ENUM_INVALID_MAP\";\nconst PSL_NATIVE_ENUM_BARE_MEMBER = \"PSL_NATIVE_ENUM_BARE_MEMBER\";\nconst PSL_EXTENSION_INVALID_VALUE = \"PSL_EXTENSION_INVALID_VALUE\";\nconst PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE = \"PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE\";\nconst PSL_NATIVE_ENUM_MISSING_MEMBERS = \"PSL_NATIVE_ENUM_MISSING_MEMBERS\";\nconst PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE = \"PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE\";\n/**\n* `pg.enum(<ref>)` registers as an ordinary type constructor whose sole\n* positional argument names a `native_enum` entity instead of carrying a\n* literal value. The interpreter resolves the ref to the `native_enum`\n* entity generically (driven by `entityRefArg`); the `pg/enum@1` codec\n* descriptor's `columnFromEntity` hook (see `codecs.ts`) converts that\n* entity into the column's `typeParams` and native type.\n*/\nconst postgresAuthoringTypes = { pg: { enum: {\n\tkind: \"typeConstructor\",\n\tentityRefArg: {\n\t\tindex: 0,\n\t\tentityKind: \"native_enum\"\n\t},\n\toutput: { codecId: PG_ENUM_CODEC_ID }\n} } };\n/**\n* Maps a `policy_<op>` keyword to the RLS operation it authors. The keyword\n* IS the operation (per the project's rejection of a `policy { operation = … }`\n* conditional block).\n*/\nconst POLICY_KEYWORD_OPERATION = {\n\tpolicy_select: \"select\",\n\tpolicy_insert: \"insert\",\n\tpolicy_update: \"update\",\n\tpolicy_delete: \"delete\",\n\tpolicy_all: \"all\"\n};\nfunction readValueParam(block, key) {\n\tconst param = block.parameters[key];\n\treturn param?.kind === \"value\" ? param.raw : void 0;\n}\nfunction readListRefParams(block, key) {\n\tconst param = block.parameters[key];\n\tif (param?.kind !== \"list\") return [];\n\treturn param.items.flatMap((item) => item.kind === \"ref\" ? [item.identifier] : []);\n}\n/**\n* Unwraps a quoted PSL string argument, inverting the printer's\n* `escapePslString` escapes (`\\\\`, `\\\"`, `\\n`, `\\r`). An unknown escape\n* sequence is kept verbatim, matching the printer-side `unescapePslString`\n* convention.\n*/\nfunction unwrapQuotedString(raw) {\n\tif (!(raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\") && raw.length >= 2)) return raw;\n\tconst inner = raw.slice(1, -1);\n\tlet result = \"\";\n\tfor (let i = 0; i < inner.length; i++) {\n\t\tif (inner[i] !== \"\\\\\" || i + 1 >= inner.length) {\n\t\t\tresult += inner[i];\n\t\t\tcontinue;\n\t\t}\n\t\tconst next = inner[i + 1];\n\t\tif (next === \"\\\\\" || next === \"\\\"\") result += next;\n\t\telse if (next === \"n\") result += \"\\n\";\n\t\telse if (next === \"r\") result += \"\\r\";\n\t\telse {\n\t\t\tresult += \"\\\\\";\n\t\t\tresult += next;\n\t\t}\n\t\ti++;\n\t}\n\treturn result;\n}\n/**\n* Assembles a {@link PostgresRlsPolicy} from lowered inputs: normalizes the\n* predicates, computes the content-hash wire name, and constructs the frozen\n* entity. The single hash-assembly body shared by the PSL block lowering\n* ({@link lowerRlsPolicyFromBlock}) and the TS entity-handle lowering\n* ({@link postgresLowerEntityHandles}) so the two surfaces cannot drift.\n*/\nfunction buildRlsPolicyEntity(input) {\n\tconst permissive = input.permissive ?? true;\n\tconst wireHash = computeContentHash({\n\t\t...ifDefined(\"using\", input.using !== void 0 ? normalizeSqlBody(input.using) : void 0),\n\t\t...ifDefined(\"withCheck\", input.withCheck !== void 0 ? normalizeSqlBody(input.withCheck) : void 0),\n\t\troles: input.roles,\n\t\toperation: input.operation,\n\t\tpermissive\n\t});\n\treturn new PostgresRlsPolicy({\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix: input.prefix,\n\t\t\thash: wireHash\n\t\t},\n\t\ttableName: input.tableName,\n\t\tnamespaceId: input.namespaceId,\n\t\toperation: input.operation,\n\t\troles: input.roles,\n\t\tusing: input.using,\n\t\twithCheck: input.withCheck,\n\t\tpermissive\n\t});\n}\nfunction lowerRlsPolicyFromBlock(block, ctx) {\n\tconst prefix = block.name;\n\tconst operation = POLICY_KEYWORD_OPERATION[block.keyword] ?? \"select\";\n\tconst tableName = block.resolvedModelRefs?.[\"target\"]?.tableName;\n\tassertDefined(tableName, `lowerRlsPolicyFromBlock: policy \"${block.name}\" reached the factory without a resolved \\`target\\` ref; the interpreter resolves same-namespace model refs before invoking entity factories.`);\n\tconst roles = [...readListRefParams(block, \"roles\")].sort();\n\tconst usingRaw = readValueParam(block, \"using\");\n\tconst withCheckRaw = readValueParam(block, \"withCheck\");\n\tconst support = POLICY_OPERATION_PREDICATES[operation];\n\tconst rejectPredicate = (predicate) => {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_RLS_PREDICATE_NOT_FOR_OPERATION,\n\t\t\tmessage: `\\`${block.keyword}\\` policy \"${block.name}\" does not take a \\`${predicate}\\` predicate; the ${operation.toUpperCase()} operation uses ${support.using ? \"`using`\" : \"`withCheck`\"}${support.using && support.withCheck ? \" and `withCheck`\" : \" only\"}.`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.parameters[predicate]?.span ?? block.span\n\t\t});\n\t};\n\tif (usingRaw !== void 0 && !support.using) return rejectPredicate(\"using\");\n\tif (withCheckRaw !== void 0 && !support.withCheck) return rejectPredicate(\"withCheck\");\n\tconst using = usingRaw !== void 0 ? unwrapQuotedString(usingRaw) : void 0;\n\tconst withCheck = withCheckRaw !== void 0 ? unwrapQuotedString(withCheckRaw) : void 0;\n\tconst permissiveRaw = readValueParam(block, \"permissive\");\n\tif (permissiveRaw !== void 0 && permissiveRaw !== \"true\" && permissiveRaw !== \"false\") {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_EXTENSION_INVALID_VALUE,\n\t\t\tmessage: `\\`${block.keyword}\\` policy \"${block.name}\" \\`permissive\\` must be \\`true\\` or \\`false\\`, got ${permissiveRaw}.`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.parameters[\"permissive\"]?.span ?? block.span\n\t\t});\n\t\treturn;\n\t}\n\tconst permissive = permissiveRaw !== \"false\";\n\tconst mapAttr = block.blockAttributes.find((a) => a.name === \"map\");\n\tif (mapAttr) {\n\t\tconst rawArg = mapAttr.args[0]?.value;\n\t\tconst exactName = rawArg?.startsWith(\"\\\"\") && rawArg.endsWith(\"\\\"\") && rawArg.length >= 2 ? unwrapQuotedString(rawArg) : void 0;\n\t\tif (exactName === void 0 || exactName === \"\") {\n\t\t\tctx.diagnostics?.push({\n\t\t\t\tcode: PSL_POLICY_INVALID_MAP,\n\t\t\t\tmessage: `\\`${block.keyword}\\` policy \"${block.name}\" @@map attribute must have a quoted, non-empty policy-name argument`,\n\t\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\t\tspan: mapAttr.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tctx.warnings?.push(exactNameBodyWarning(\"policy\", exactName));\n\t\treturn new PostgresRlsPolicy({\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: exactName\n\t\t\t},\n\t\t\ttableName,\n\t\t\tnamespaceId: block.namespaceId,\n\t\t\toperation,\n\t\t\troles,\n\t\t\tusing,\n\t\t\twithCheck,\n\t\t\tpermissive\n\t\t});\n\t}\n\treturn buildRlsPolicyEntity({\n\t\tprefix,\n\t\ttableName,\n\t\tnamespaceId: block.namespaceId,\n\t\toperation,\n\t\troles,\n\t\t...ifDefined(\"using\", using),\n\t\t...ifDefined(\"withCheck\", withCheck),\n\t\tpermissive\n\t});\n}\n/**\n* Lowers a `native_enum { memberName = \"value\" … @@map(\"type_name\") }` block\n* into a {@link PostgresNativeEnum}. Members must be authored as explicit\n* `key = \"value\"` pairs — a bare (value-less) member is a diagnostic, not\n* accepted (authoring-design.md §2.1). The parsed `memberName` is only used\n* to duplicate-check and report diagnostics; the lowered entity carries just\n* the member values (a native enum is value-only — the member \"name\" isn't\n* a separate authoring concept from the value). `typeName` comes from\n* `@@map` or defaults to the block name verbatim.\n*/\nfunction lowerNativeEnumFromBlock(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst diagnostics = ctx.diagnostics;\n\tconst mapAttr = block.blockAttributes.find((a) => a.name === \"map\");\n\tlet typeName = block.name;\n\tif (mapAttr) {\n\t\tconst rawArg = mapAttr.args[0]?.value;\n\t\tconst mapped = rawArg !== void 0 ? unwrapQuotedString(rawArg) : void 0;\n\t\tif (mapped === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_INVALID_MAP,\n\t\t\t\tmessage: `native_enum \"${block.name}\" @@map attribute must have a quoted type-name argument`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: mapAttr.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\ttypeName = mapped;\n\t}\n\tlet memberError = false;\n\tconst seenValues = /* @__PURE__ */ new Set();\n\tconst members = [];\n\tfor (const [memberName, paramValue] of Object.entries(block.parameters)) {\n\t\tif (paramValue.kind === \"bare\") {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_BARE_MEMBER,\n\t\t\t\tmessage: `native_enum \"${block.name}\" member \"${memberName}\" has no value; members must be authored as \"${memberName} = \\\\\"value\\\\\"\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: paramValue.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (paramValue.kind !== \"value\") continue;\n\t\tlet jsonValue;\n\t\ttry {\n\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t} catch {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_EXTENSION_INVALID_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\" member \"${memberName}\" value \"${paramValue.raw}\" is not valid JSON`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: paramValue.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof jsonValue !== \"string\") {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_EXTENSION_INVALID_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\" member \"${memberName}\" value must be a string`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: paramValue.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (seenValues.has(jsonValue)) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: PSL_NATIVE_ENUM_DUPLICATE_MEMBER_VALUE,\n\t\t\t\tmessage: `native_enum \"${block.name}\": duplicate member value \"${jsonValue}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: paramValue.span\n\t\t\t});\n\t\t\tmemberError = true;\n\t\t\tcontinue;\n\t\t}\n\t\tseenValues.add(jsonValue);\n\t\tmembers.push(jsonValue);\n\t}\n\tif (memberError) return void 0;\n\tif (members.length === 0) {\n\t\tdiagnostics?.push({\n\t\t\tcode: PSL_NATIVE_ENUM_MISSING_MEMBERS,\n\t\t\tmessage: `native_enum \"${block.name}\" must have at least one member`,\n\t\t\tsourceId,\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresNativeEnum({\n\t\ttypeName,\n\t\tmembers\n\t});\n}\n/**\n* `native_enum`'s entity-type factory output, checked separately from the assembled\n* `postgresAuthoringEntityTypes` map below: `deriveValueSet` is SQL-family surface\n* ({@link SqlValueSetDerivingEntityTypeOutput}), not part of the framework\n* `AuthoringEntityTypeFactoryOutput` shape, so folding it directly into the map's single\n* `satisfies AuthoringEntityTypeNamespace` check would trip an excess-property error. Checking it\n* here against the intersection of both shapes keeps it structurally valid against each without\n* widening the map's own check.\n*/\nconst nativeEnumEntityTypeOutput = {\n\tfactory: lowerNativeEnumFromBlock,\n\tderiveValueSet: (entity) => ({\n\t\tkind: \"valueSet\",\n\t\tvalues: [...entity.members]\n\t})\n};\n/**\n* Lowers a `role <name> {}` block into a {@link PostgresRole}. Roles are\n* cluster-scoped in Postgres, so the block must be declared inside\n* `namespace unbound { … }` — any other lexical namespace (a named schema,\n* or the default bucket top-level declarations resolve to) is a load-time\n* diagnostic. The lowered entity carries the unbound coordinate.\n*/\nfunction lowerRoleFromBlock(block, ctx) {\n\tif (block.namespaceId !== UNBOUND_NAMESPACE_ID) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: PSL_ROLE_BLOCK_OUTSIDE_UNBOUND_NAMESPACE,\n\t\t\tmessage: `\\`role\\` block \"${block.name}\" must be declared inside \\`namespace unbound { }\\`, not in namespace \"${block.namespaceId}\"`,\n\t\t\tsourceId: ctx.sourceId ?? \"unknown\",\n\t\t\tspan: block.span\n\t\t});\n\t\treturn;\n\t}\n\treturn new PostgresRole({\n\t\tname: block.name,\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t});\n}\nconst postgresAuthoringEntityTypes = {\n\trole: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"role\",\n\t\tvalidatorSchema: PostgresRoleSchema,\n\t\toutput: { factory: lowerRoleFromBlock }\n\t},\n\trls: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"rls\",\n\t\tvalidatorSchema: PostgresRlsEnablementSchema,\n\t\toutput: { factory: (input) => new PostgresRlsEnablement(input) }\n\t},\n\tpolicy: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"policy\",\n\t\tvalidatorSchema: PostgresRlsPolicySchema,\n\t\toutput: { factory: lowerRlsPolicyFromBlock }\n\t},\n\tnative_enum: {\n\t\tkind: \"entity\",\n\t\tdiscriminator: \"native_enum\",\n\t\tvalidatorSchema: PostgresNativeEnumSchema,\n\t\toutput: nativeEnumEntityTypeOutput\n\t}\n};\n/**\n* Field presets contributed by the Postgres target pack.\n*\n* These mirror the PSL scalar-to-codec mapping used by the Postgres adapter\n* (see `createPostgresPslScalarTypeDescriptors`), so that authoring a field\n* via the TS callback surface (e.g. `field.int()`) and via the PSL scalar\n* surface (e.g. `Int`) lowers to byte-identical contracts.\n*\n* The `uuidNative` / `id.uuidv4Native` / `id.uuidv7Native` presets use the\n* native Postgres `uuid` type (codecId `pg/uuid@1`). For cross-target\n* portability use `uuidString` / `id.uuidv4String` / `id.uuidv7String` from\n* the family pack instead.\n*/\n/**\n* Shared parameter descriptors for the five `policy_<op>` PSL block\n* keywords. All five share the `policy` discriminator — the parser\n* dispatches by keyword (see the framework's PSL-block SPI), and every\n* keyword's factory lowers to `PostgresRlsPolicy` via `lowerRlsPolicyFromBlock`.\n*\n* The `roles` list uses `scope:'cross-space'` because same-namespace\n* role ref resolution requires PSL namespace entries keyed by `refKind`\n* (i.e. `'role'`), which in turn requires the role block discriminator to\n* equal `'role'`. Aligning discriminator with refKind is tracked for\n* slice 4 (cross-space roles). Until then cross-space passes validation\n* unconditionally and the authored role names flow through unchanged.\n*/\nconst policyTargetParam = {\n\tkind: \"ref\",\n\trefKind: \"model\",\n\tscope: \"same-namespace\",\n\trequired: true\n};\nconst policyRolesParam = {\n\tkind: \"list\",\n\tof: {\n\t\tkind: \"ref\",\n\t\trefKind: \"role\",\n\t\tscope: \"cross-space\"\n\t}\n};\nconst policyPredicateParam = {\n\tkind: \"value\",\n\tcodecId: \"pg/text@1\",\n\trequired: true\n};\nconst policyPermissiveParam = {\n\tkind: \"value\",\n\tcodecId: \"pg/bool@1\"\n};\nconst policyRequiresRls = {\n\tparameter: \"target\",\n\tattribute: \"rls\"\n};\nconst postgresAuthoringPslBlockDescriptors = {\n\tpolicy_select: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"policy_select\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tparameters: {\n\t\t\ttarget: policyTargetParam,\n\t\t\troles: policyRolesParam,\n\t\t\tusing: policyPredicateParam,\n\t\t\tpermissive: policyPermissiveParam\n\t\t},\n\t\trequiresModelAttribute: policyRequiresRls\n\t},\n\tpolicy_delete: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"policy_delete\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tparameters: {\n\t\t\ttarget: policyTargetParam,\n\t\t\troles: policyRolesParam,\n\t\t\tusing: policyPredicateParam,\n\t\t\tpermissive: policyPermissiveParam\n\t\t},\n\t\trequiresModelAttribute: policyRequiresRls\n\t},\n\tpolicy_insert: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"policy_insert\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tparameters: {\n\t\t\ttarget: policyTargetParam,\n\t\t\troles: policyRolesParam,\n\t\t\twithCheck: policyPredicateParam,\n\t\t\tpermissive: policyPermissiveParam\n\t\t},\n\t\trequiresModelAttribute: policyRequiresRls\n\t},\n\tpolicy_update: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"policy_update\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tparameters: {\n\t\t\ttarget: policyTargetParam,\n\t\t\troles: policyRolesParam,\n\t\t\tusing: policyPredicateParam,\n\t\t\twithCheck: policyPredicateParam,\n\t\t\tpermissive: policyPermissiveParam\n\t\t},\n\t\trequiresModelAttribute: policyRequiresRls\n\t},\n\tpolicy_all: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"policy_all\",\n\t\tdiscriminator: \"policy\",\n\t\tname: { required: true },\n\t\tparameters: {\n\t\t\ttarget: policyTargetParam,\n\t\t\troles: policyRolesParam,\n\t\t\tusing: policyPredicateParam,\n\t\t\twithCheck: policyPredicateParam,\n\t\t\tpermissive: policyPermissiveParam\n\t\t},\n\t\trequiresModelAttribute: policyRequiresRls\n\t},\n\t/**\n\t* PSL block descriptor for `native_enum`.\n\t*\n\t* Reuses the existing variadic-block mechanism (the same shape the SQL\n\t* family's `enum` block ships): the body is an open `memberName = \"value\"`\n\t* list. `variadicParameters: true` opens the block to arbitrary keys\n\t* beyond the declared (empty) `parameters` set — the lowering factory\n\t* (`lowerNativeEnumFromBlock`) turns the variadic entries into ordered\n\t* members and rejects a bare (value-less) member.\n\t*/\n\tnative_enum: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"native_enum\",\n\t\tdiscriminator: \"native_enum\",\n\t\tname: { required: true },\n\t\tparameters: {},\n\t\tvariadicParameters: true\n\t},\n\t/**\n\t* PSL block descriptor for `role` (e.g. `role anon {}`). Name-only, no\n\t* parameters and no body content. Declared inside `namespace unbound { }`\n\t* — see {@link lowerRoleFromBlock} for the placement check and the\n\t* coordinate the lowered entity carries.\n\t*/\n\trole: {\n\t\tkind: \"pslBlock\",\n\t\tkeyword: \"role\",\n\t\tdiscriminator: \"role\",\n\t\tname: { required: true },\n\t\tparameters: {}\n\t}\n};\n/**\n* `@@` model attributes contributed by the Postgres target pack.\n*\n* `@@rls` is argument-less: presence marks the model's table\n* RLS-controlled. It lowers to a {@link PostgresRlsEnablement} marker in\n* the namespace's `entries.rls`, keyed by the model's table name — the\n* marker (never the policy set) is what drives\n* `ENABLE`/`DISABLE ROW LEVEL SECURITY` planning.\n*/\nconst postgresAuthoringModelAttributes = { rls: {\n\tkind: \"modelAttribute\",\n\tattribute: \"rls\",\n\tspec: modelAttribute(\"rls\", {}),\n\tlower: (_parsed, ctx) => ({\n\t\tkey: ctx.storageName,\n\t\tentity: new PostgresRlsEnablement({\n\t\t\ttableName: ctx.storageName,\n\t\t\tnamespaceId: ctx.namespaceId\n\t\t})\n\t})\n} };\nconst postgresAuthoringFieldPresets = {\n\ttext: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/text@1\",\n\t\t\tnativeType: \"text\"\n\t\t}\n\t},\n\tint: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/int4@1\",\n\t\t\tnativeType: \"int4\"\n\t\t}\n\t},\n\tbigint: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/int8@1\",\n\t\t\tnativeType: \"int8\"\n\t\t}\n\t},\n\tfloat: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/float8@1\",\n\t\t\tnativeType: \"float8\"\n\t\t}\n\t},\n\tdecimal: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/numeric@1\",\n\t\t\tnativeType: \"numeric\"\n\t\t}\n\t},\n\tboolean: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/bool@1\",\n\t\t\tnativeType: \"bool\"\n\t\t}\n\t},\n\tjson: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/jsonb@1\",\n\t\t\tnativeType: \"jsonb\"\n\t\t}\n\t},\n\tbytes: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/bytea@1\",\n\t\t\tnativeType: \"bytea\"\n\t\t}\n\t},\n\tdateTime: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/timestamptz@1\",\n\t\t\tnativeType: \"timestamptz\"\n\t\t}\n\t},\n\ttemporal: {\n\t\t.../* @__PURE__ */ temporalAuthoringPresets({\n\t\t\tcodecId: \"pg/timestamptz@1\",\n\t\t\tnativeType: \"timestamptz\"\n\t\t}),\n\t\ttimestamp: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: \"pg/timestamp@1\",\n\t\t\tnativeType: \"timestamp\"\n\t\t}),\n\t\ttimestamptz: /* @__PURE__ */ temporalCodecPresetWithPrecision({\n\t\t\tcodecId: \"pg/timestamptz@1\",\n\t\t\tnativeType: \"timestamptz\"\n\t\t})\n\t},\n\tuuidNative: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\tnativeType: \"uuid\"\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4Native: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\t\tnativeType: \"uuid\",\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7Native: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: \"pg/uuid@1\",\n\t\t\t\tnativeType: \"uuid\",\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n* Resolves an entity handle's `target` ref to a table coordinate of this\n* contract, or throws the load-time diagnostic naming the handle: a\n* cross-space target is rejected (you cannot CREATE POLICY on a table\n* another space owns) and an unresolved target names the model.\n*/\nfunction requireLocalTarget(refs, subject) {\n\tconst target = refs[\"target\"];\n\tif (target !== void 0 && target.kind === \"resolved\") return {\n\t\tnamespaceId: target.namespaceId,\n\t\ttableName: target.tableName\n\t};\n\tif (target !== void 0 && target.kind === \"cross-space\") throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: ${subject} targets model \"${target.modelName ?? target.tableName}\", which lives in another contract space. Policies and rlsEnabled entries must target a model declared in this contract.`, { meta: {\n\t\tmodel: target.modelName ?? target.tableName,\n\t\treason: \"cross-space-target\"\n\t} });\n\tthrow postgresError(\"CONTRACT.MODEL_UNKNOWN\", `defineContract: ${subject} targets model \"${target?.modelName ?? \"<anonymous>\"}\", which is not in the contract's models. Add the model to \\`models\\`.`, { meta: { model: target?.modelName ?? \"<anonymous>\" } });\n}\n/**\n* The SQL-family entity-handle batch lowering hook for the Postgres pack\n* (`SqlEntityHandleLoweringContribution`). Receives every `entities` handle\n* whose kind this pack registered — batch, so the cross-entity diagnostics\n* (duplicate prefix, policy without rlsEnabled, duplicate role) can see\n* sibling handles — and lowers them with the same keying and hash assembly\n* as the PSL path: `policy` keyed by prefix (wire name via\n* {@link buildRlsPolicyEntity}), `rls` keyed by table name, `role` keyed by\n* name and filed under the default namespace (roles are declared\n* contract-wide; PSL has no role block to set a precedent).\n*/\nfunction postgresLowerEntityHandles(input) {\n\tconst enablements = /* @__PURE__ */ new Map();\n\tconst roles = /* @__PURE__ */ new Map();\n\tconst policies = [];\n\tconst coordinateKey = (coordinate) => `${coordinate.namespaceId} ${coordinate.tableName}`;\n\tfor (const { handle, refs } of input.handles) switch (handle.entityKind) {\n\t\tcase \"rls\": {\n\t\t\tconst coordinate = requireLocalTarget(refs, \"an rlsEnabled entry\");\n\t\t\tconst key = coordinateKey(coordinate);\n\t\t\tif (!enablements.has(key)) enablements.set(key, {\n\t\t\t\tcoordinate,\n\t\t\t\tentity: new PostgresRlsEnablement({\n\t\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\t\tnamespaceId: coordinate.namespaceId\n\t\t\t\t})\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"role\": {\n\t\t\tconst roleHandle = blindCast(handle);\n\t\t\tif (roles.has(roleHandle.name)) throw postgresError(\"CONTRACT.ROLE_INVALID\", `defineContract: role \"${roleHandle.name}\" is declared more than once in the entities list.`, { meta: {\n\t\t\t\trole: roleHandle.name,\n\t\t\t\treason: \"duplicate\"\n\t\t\t} });\n\t\t\troles.set(roleHandle.name, new PostgresRole({\n\t\t\t\tname: roleHandle.name,\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t\t\t}));\n\t\t\tbreak;\n\t\t}\n\t\tcase \"policy\": {\n\t\t\tconst policyHandle = blindCast(handle);\n\t\t\tpolicies.push({\n\t\t\t\thandle: policyHandle,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tdefault: throw postgresError(\"CONTRACT.ENTITY_KIND_INVALID\", `defineContract: the postgres pack does not lower \"${handle.entityKind}\" handles from the entities list.`, { meta: { entityKind: handle.entityKind } });\n\t}\n\tconst rows = [];\n\tconst seenPrefixes = /* @__PURE__ */ new Set();\n\tfor (const { handle: policy, refs } of policies) {\n\t\tconst prefix = policy.name;\n\t\tassertWireNamePrefixLength(prefix, \"defineContract: policy prefix\");\n\t\tconst coordinate = requireLocalTarget(refs, `policy \"${prefix}\"`);\n\t\tif (!enablements.has(coordinateKey(coordinate))) {\n\t\t\tconst target = refs[\"target\"];\n\t\t\tthrow postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy \"${prefix}\" targets model \"${target?.modelName ?? coordinate.tableName}\", whose table is not RLS-enabled. Add rlsEnabled(<model>) to the entities list.`, { meta: {\n\t\t\t\tprefix,\n\t\t\t\tmodel: target?.modelName ?? coordinate.tableName,\n\t\t\t\treason: \"target-not-rls-enabled\"\n\t\t\t} });\n\t\t}\n\t\tconst prefixKey = `${coordinate.namespaceId} ${prefix}`;\n\t\tif (seenPrefixes.has(prefixKey)) throw postgresError(\"CONTRACT.POLICY_INVALID\", `defineContract: policy prefix \"${prefix}\" is declared more than once in namespace \"${coordinate.namespaceId}\". Policy prefixes must be unique per namespace.`, { meta: {\n\t\t\tprefix,\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\treason: \"duplicate-prefix\"\n\t\t} });\n\t\tseenPrefixes.add(prefixKey);\n\t\tconst roleNames = [...new Set(policy.roles.map((roleHandle) => roleHandle.name))].sort();\n\t\trows.push({\n\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\tentityKind: \"policy\",\n\t\t\tkey: prefix,\n\t\t\tentity: buildRlsPolicyEntity({\n\t\t\t\tprefix,\n\t\t\t\ttableName: coordinate.tableName,\n\t\t\t\tnamespaceId: coordinate.namespaceId,\n\t\t\t\toperation: policy.operation,\n\t\t\t\troles: roleNames,\n\t\t\t\t...ifDefined(\"using\", policy.using),\n\t\t\t\t...ifDefined(\"withCheck\", policy.withCheck)\n\t\t\t})\n\t\t});\n\t}\n\tfor (const { coordinate, entity } of enablements.values()) rows.push({\n\t\tnamespaceId: coordinate.namespaceId,\n\t\tentityKind: \"rls\",\n\t\tkey: coordinate.tableName,\n\t\tentity\n\t});\n\tfor (const [name, entity] of roles) rows.push({\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\tentityKind: \"role\",\n\t\tkey: name,\n\t\tentity\n\t});\n\treturn rows;\n}\n//#endregion\nexport { postgresAuthoringTypes as a, postgresAuthoringPslBlockDescriptors as i, postgresAuthoringFieldPresets as n, postgresLowerEntityHandles as o, postgresAuthoringModelAttributes as r, postgresAuthoringEntityTypes as t };\n\n//# sourceMappingURL=authoring-03FwIL2k.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,sCAAsC;AAC5C,MAAM,yBAAyB;AAC/B,MAAM,8BAA8B;AACpC,MAAM,8BAA8B;AACpC,MAAM,8BAA8B;AACpC,MAAM,yCAAyC;AAC/C,MAAM,kCAAkC;AACxC,MAAM,2CAA2C;;;;;;;;;AASjD,MAAM,yBAAyB,EAAE,IAAI,EAAE,MAAM;CAC5C,MAAM;CACN,cAAc;EACb,OAAO;EACP,YAAY;CACb;CACA,QAAQ,EAAE,SAAS,iBAAiB;AACrC,EAAE,EAAE;;;;;;AAMJ,MAAM,2BAA2B;CAChC,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,YAAY;AACb;AACA,SAAS,eAAe,OAAO,KAAK;CACnC,MAAM,QAAQ,MAAM,WAAW;CAC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;CACF;CACA,KAAK,MAAM,EAAE,YAAY,YAAY,YAAY,OAAO,GAAG,KAAK,KAAK;EACpE,aAAa,WAAW;EACxB,YAAY;EACZ,KAAK,WAAW;EAChB;CACD,CAAC;CACD,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,KAAK,KAAK;EAC7C,aAAa;EACb,YAAY;EACZ,KAAK;EACL;CACD,CAAC;CACD,OAAO;AACR"}
@@ -0,0 +1,34 @@
1
+ //#region ../../../3-targets/3-targets/postgres/dist/canonicalize-CQlxSR4D.d.mts
2
+ //#region src/core/rls/canonicalize.d.ts
3
+ type RlsPolicyOperation = 'select' | 'insert' | 'update' | 'delete' | 'all';
4
+ /**
5
+ * Which predicate each RLS operation admits, mirroring Postgres: SELECT and
6
+ * DELETE decide row visibility/eligibility with `USING` only; INSERT
7
+ * validates the new row with `WITH CHECK` only; UPDATE and ALL take either
8
+ * or both. Single-homed here so the PSL lowering and the TS handle
9
+ * constructors enforce the same matrix.
10
+ */
11
+ declare const POLICY_OPERATION_PREDICATES: Readonly<Record<RlsPolicyOperation, {
12
+ readonly using: boolean;
13
+ readonly withCheck: boolean;
14
+ }>>;
15
+ interface ContentHashParts {
16
+ readonly using?: string;
17
+ readonly withCheck?: string;
18
+ readonly roles: readonly string[];
19
+ readonly operation: RlsPolicyOperation;
20
+ readonly permissive: boolean;
21
+ }
22
+ /**
23
+ * Returns the first 8 lowercase hex characters of the SHA-256 digest over the
24
+ * canonical content tuple for an RLS policy:
25
+ *
26
+ * [normalizeSqlBody(using), normalizeSqlBody(withCheck), sortedRoles, operation, permissive]
27
+ *
28
+ * Schema and table are excluded (they are orthogonal to policy equivalence).
29
+ * Uses `JSON.stringify` for a deterministic encoding.
30
+ */
31
+ declare function computeContentHash(parts: ContentHashParts): string;
32
+ //#endregion
33
+ export { computeContentHash as i, POLICY_OPERATION_PREDICATES as n, RlsPolicyOperation as r, ContentHashParts as t };
34
+ //# sourceMappingURL=canonicalize-CQlxSR4D-MnrT5gtW.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalize-CQlxSR4D-MnrT5gtW.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/canonicalize-CQlxSR4D.d.mts"],"mappings":";;KACK;;;;;;;;cAQS,6BAA6B,SAAS,OAAO;WAChD;WACA;;UAED;WACC;WACA;WACA;WACA,WAAW;WACX;;;;;;;;;;;iBAWM,mBAAmB,OAAO"}
@@ -0,0 +1,59 @@
1
+ import { normalizeSqlBody } from "@prisma/orm-family-sql/schema-ir/naming";
2
+ import { createHash } from "node:crypto";
3
+ //#region ../../../3-targets/3-targets/postgres/dist/canonicalize-CrN3u_xM.mjs
4
+ /**
5
+ * Which predicate each RLS operation admits, mirroring Postgres: SELECT and
6
+ * DELETE decide row visibility/eligibility with `USING` only; INSERT
7
+ * validates the new row with `WITH CHECK` only; UPDATE and ALL take either
8
+ * or both. Single-homed here so the PSL lowering and the TS handle
9
+ * constructors enforce the same matrix.
10
+ */
11
+ const POLICY_OPERATION_PREDICATES = {
12
+ select: {
13
+ using: true,
14
+ withCheck: false
15
+ },
16
+ insert: {
17
+ using: false,
18
+ withCheck: true
19
+ },
20
+ update: {
21
+ using: true,
22
+ withCheck: true
23
+ },
24
+ delete: {
25
+ using: true,
26
+ withCheck: false
27
+ },
28
+ all: {
29
+ using: true,
30
+ withCheck: true
31
+ }
32
+ };
33
+ /**
34
+ * Returns the first 8 lowercase hex characters of the SHA-256 digest over the
35
+ * canonical content tuple for an RLS policy:
36
+ *
37
+ * [normalizeSqlBody(using), normalizeSqlBody(withCheck), sortedRoles, operation, permissive]
38
+ *
39
+ * Schema and table are excluded (they are orthogonal to policy equivalence).
40
+ * Uses `JSON.stringify` for a deterministic encoding.
41
+ */
42
+ function computeContentHash(parts) {
43
+ const using = normalizeSqlBody(parts.using ?? "");
44
+ const withCheck = normalizeSqlBody(parts.withCheck ?? "");
45
+ const roles = [...new Set(parts.roles)].sort();
46
+ const permissive = parts.permissive ? "permissive" : "restrictive";
47
+ const tuple = JSON.stringify([
48
+ using,
49
+ withCheck,
50
+ roles,
51
+ parts.operation,
52
+ permissive
53
+ ]);
54
+ return createHash("sha256").update(tuple).digest("hex").slice(0, 8);
55
+ }
56
+ //#endregion
57
+ export { computeContentHash as n, POLICY_OPERATION_PREDICATES as t };
58
+
59
+ //# sourceMappingURL=canonicalize-CrN3u_xM-D4MrOqcB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalize-CrN3u_xM-D4MrOqcB.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/canonicalize-CrN3u_xM.mjs"],"sourcesContent":["import { normalizeSqlBody } from \"@internal/sql-schema-ir/naming\";\nimport { createHash } from \"node:crypto\";\n//#region src/core/rls/canonicalize.ts\n/**\n* Which predicate each RLS operation admits, mirroring Postgres: SELECT and\n* DELETE decide row visibility/eligibility with `USING` only; INSERT\n* validates the new row with `WITH CHECK` only; UPDATE and ALL take either\n* or both. Single-homed here so the PSL lowering and the TS handle\n* constructors enforce the same matrix.\n*/\nconst POLICY_OPERATION_PREDICATES = {\n\tselect: {\n\t\tusing: true,\n\t\twithCheck: false\n\t},\n\tinsert: {\n\t\tusing: false,\n\t\twithCheck: true\n\t},\n\tupdate: {\n\t\tusing: true,\n\t\twithCheck: true\n\t},\n\tdelete: {\n\t\tusing: true,\n\t\twithCheck: false\n\t},\n\tall: {\n\t\tusing: true,\n\t\twithCheck: true\n\t}\n};\n/**\n* Returns the first 8 lowercase hex characters of the SHA-256 digest over the\n* canonical content tuple for an RLS policy:\n*\n* [normalizeSqlBody(using), normalizeSqlBody(withCheck), sortedRoles, operation, permissive]\n*\n* Schema and table are excluded (they are orthogonal to policy equivalence).\n* Uses `JSON.stringify` for a deterministic encoding.\n*/\nfunction computeContentHash(parts) {\n\tconst using = normalizeSqlBody(parts.using ?? \"\");\n\tconst withCheck = normalizeSqlBody(parts.withCheck ?? \"\");\n\tconst roles = [...new Set(parts.roles)].sort();\n\tconst permissive = parts.permissive ? \"permissive\" : \"restrictive\";\n\tconst tuple = JSON.stringify([\n\t\tusing,\n\t\twithCheck,\n\t\troles,\n\t\tparts.operation,\n\t\tpermissive\n\t]);\n\treturn createHash(\"sha256\").update(tuple).digest(\"hex\").slice(0, 8);\n}\n//#endregion\nexport { computeContentHash as n, POLICY_OPERATION_PREDICATES as t };\n\n//# sourceMappingURL=canonicalize-CrN3u_xM.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,8BAA8B;CACnC,QAAQ;EACP,OAAO;EACP,WAAW;CACZ;CACA,QAAQ;EACP,OAAO;EACP,WAAW;CACZ;CACA,QAAQ;EACP,OAAO;EACP,WAAW;CACZ;CACA,QAAQ;EACP,OAAO;EACP,WAAW;CACZ;CACA,KAAK;EACJ,OAAO;EACP,WAAW;CACZ;AACD;;;;;;;;;;AAUA,SAAS,mBAAmB,OAAO;CAClC,MAAM,QAAQ,iBAAiB,MAAM,SAAS,EAAE;CAChD,MAAM,YAAY,iBAAiB,MAAM,aAAa,EAAE;CACxD,MAAM,QAAQ,CAAC,GAAG,IAAI,IAAI,MAAM,KAAK,CAAC,CAAC,CAAC,KAAK;CAC7C,MAAM,aAAa,MAAM,aAAa,eAAe;CACrD,MAAM,QAAQ,KAAK,UAAU;EAC5B;EACA;EACA;EACA,MAAM;EACN;CACD,CAAC;CACD,OAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;AACnE"}
@@ -0,0 +1,37 @@
1
+ import { ProjectionExpr } from "@prisma/orm-family-sql/relational-core/ast";
2
+ import { AnyCodecDescriptor, CodecDescriptor, CodecDescriptorImpl, CodecRef } from "@prisma/orm-framework/components/codec";
3
+ //#region ../../../3-targets/3-targets/postgres/dist/codec-descriptor-Bec_zukr.d.mts
4
+ //#region src/core/codec-descriptor.d.ts
5
+ declare const POSTGRES_CODEC_DESCRIPTOR_KIND: "postgres-codec";
6
+ interface AnyPostgresCodecDescriptor extends AnyCodecDescriptor {
7
+ readonly descriptorKind: typeof POSTGRES_CODEC_DESCRIPTOR_KIND;
8
+ nativeTypeFor(ref: CodecRef): string;
9
+ projectJson(expression: ProjectionExpr, ref: CodecRef): ProjectionExpr;
10
+ }
11
+ declare abstract class PostgresCodecDescriptor<P = void> extends CodecDescriptorImpl<P> implements AnyPostgresCodecDescriptor {
12
+ readonly descriptorKind: "postgres-codec";
13
+ protected abstract nativeType(params: P): string;
14
+ protected abstract jsonProjection(expression: ProjectionExpr, params: P): ProjectionExpr;
15
+ protected jsonArrayProjection(expression: ProjectionExpr, params: P): ProjectionExpr;
16
+ nativeTypeFor(ref: CodecRef): string;
17
+ projectJson(expression: ProjectionExpr, ref: CodecRef): ProjectionExpr;
18
+ private validateParams;
19
+ }
20
+ type DescriptorParams<D extends AnyCodecDescriptor> = D extends CodecDescriptor<infer P> ? P : never;
21
+ interface PostgresCodecOptions<P> {
22
+ readonly nativeType: (params: P) => string;
23
+ readonly jsonProjection: (expression: ProjectionExpr, params: P) => ProjectionExpr;
24
+ readonly jsonArrayProjection?: (expression: ProjectionExpr, params: P) => ProjectionExpr;
25
+ }
26
+ type AdaptedPostgresCodecDescriptor<D extends AnyCodecDescriptor> = Pick<D, keyof CodecDescriptor<DescriptorParams<D>>> & Pick<AnyPostgresCodecDescriptor, 'descriptorKind' | 'nativeTypeFor' | 'projectJson'>;
27
+ declare function postgresCodec<D extends AnyCodecDescriptor>(descriptor: D, options: PostgresCodecOptions<DescriptorParams<D>>): AdaptedPostgresCodecDescriptor<D>;
28
+ declare function definePostgresCodecs<const Descriptors extends readonly AnyPostgresCodecDescriptor[]>(descriptors: Descriptors): Descriptors;
29
+ declare function isPostgresCodecDescriptor(value: unknown): value is AnyPostgresCodecDescriptor;
30
+ interface PostgresCodecDescriptorRegistry {
31
+ descriptorFor(codecId: string): AnyPostgresCodecDescriptor | undefined;
32
+ values(): IterableIterator<AnyPostgresCodecDescriptor>;
33
+ }
34
+ declare function buildPostgresCodecDescriptorRegistry(descriptors: ReadonlyArray<unknown>): PostgresCodecDescriptorRegistry;
35
+ //#endregion
36
+ export { PostgresCodecOptions as a, isPostgresCodecDescriptor as c, PostgresCodecDescriptorRegistry as i, postgresCodec as l, AnyPostgresCodecDescriptor as n, buildPostgresCodecDescriptorRegistry as o, PostgresCodecDescriptor as r, definePostgresCodecs as s, AdaptedPostgresCodecDescriptor as t };
37
+ //# sourceMappingURL=codec-descriptor-Bec_zukr-BfvtUqhm.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-descriptor-Bec_zukr-BfvtUqhm.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-descriptor-Bec_zukr.d.mts"],"mappings":";;;;cAGc;UACJ,mCAAmC;WAClC,uBAAuB;EAChC,cAAc,KAAK;EACnB,YAAY,YAAY,gBAAgB,KAAK,WAAW;;uBAEnC,wBAAwB,kBAAkB,oBAAoB,cAAc;WACxF;qBACU,WAAW,QAAQ;qBACnB,eAAe,YAAY,gBAAgB,QAAQ,IAAI;YAChE,oBAAoB,YAAY,gBAAgB,QAAQ,IAAI;EACtE,cAAc,KAAK;EACnB,YAAY,YAAY,gBAAgB,KAAK,WAAW;UAChD;;KAEL,iBAAiB,UAAU,sBAAsB,UAAU,sBAAsB,KAAK;UACjF,qBAAqB;WACpB,aAAa,QAAQ;WACrB,iBAAiB,YAAY,gBAAgB,QAAQ,MAAM;WAC3D,uBAAuB,YAAY,gBAAgB,QAAQ,MAAM;;KAEvE,+BAA+B,UAAU,sBAAsB,KAAK,SAAS,gBAAgB,iBAAiB,OAAO,KAAK;iBAC9G,cAAc,UAAU,oBAAoB,YAAY,GAAG,SAAS,qBAAqB,iBAAiB,MAAM,+BAA+B;iBAC/I,2BAA2B,6BAA6B,8BAA8B,aAAa,cAAc;iBACjH,0BAA0B,iBAAiB,SAAS;UAC3D;EACR,cAAc,kBAAkB;EAChC,UAAU,iBAAiB;;iBAEZ,qCAAqC,aAAa,yBAAyB"}
@@ -0,0 +1 @@
1
+ import "./codec-descriptor-Bec_zukr-BfvtUqhm.mjs";
@@ -0,0 +1,135 @@
1
+ import { CaseExpr, ColumnRef, DerivedTableSource, FunctionSource, JsonArrayAggExpr, LiteralExpr, NativeJsonValueProjection, NullCheckExpr, OrderByItem, ProjectionItem, SelectAst, SubqueryExpr } from "@prisma/orm-family-sql/relational-core/ast";
2
+ import { CodecDescriptorImpl, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
3
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
4
+ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
5
+ //#region ../../../3-targets/3-targets/postgres/dist/codec-descriptor-CB6x0xEu.mjs
6
+ const POSTGRES_CODEC_DESCRIPTOR_KIND = "postgres-codec";
7
+ const ARRAY_INPUT_ALIAS = "array_input";
8
+ const ARRAY_ELEMENT_ALIAS = "array_element";
9
+ const ARRAY_VALUE_COLUMN = "value";
10
+ const ARRAY_ORDINALITY_COLUMN = "ordinality";
11
+ var PostgresCodecDescriptor = class extends CodecDescriptorImpl {
12
+ descriptorKind = POSTGRES_CODEC_DESCRIPTOR_KIND;
13
+ jsonArrayProjection(expression, params) {
14
+ const boundArray = ColumnRef.of(ARRAY_INPUT_ALIAS, ARRAY_VALUE_COLUMN);
15
+ const element = ColumnRef.of(ARRAY_ELEMENT_ALIAS, ARRAY_VALUE_COLUMN);
16
+ const ordinality = ColumnRef.of(ARRAY_ELEMENT_ALIAS, ARRAY_ORDINALITY_COLUMN);
17
+ const projectedElement = CaseExpr.of([{
18
+ condition: NullCheckExpr.isNull(element),
19
+ value: LiteralExpr.of(null)
20
+ }], this.jsonProjection(element, params));
21
+ const aggregate = JsonArrayAggExpr.of(new NativeJsonValueProjection(projectedElement), "emptyArray", [OrderByItem.asc(ordinality)]);
22
+ const aggregateQuery = SelectAst.from(FunctionSource.of("unnest", [boundArray], {
23
+ alias: ARRAY_ELEMENT_ALIAS,
24
+ columnAliases: [ARRAY_VALUE_COLUMN, ARRAY_ORDINALITY_COLUMN]
25
+ }).withOrdinality()).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, aggregate)]);
26
+ const arrayResult = CaseExpr.of([{
27
+ condition: NullCheckExpr.isNull(boundArray),
28
+ value: LiteralExpr.of(null)
29
+ }], SubqueryExpr.of(aggregateQuery));
30
+ const inputBinding = SelectAst.noFrom().withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, expression)]);
31
+ return SubqueryExpr.of(SelectAst.from(DerivedTableSource.as(ARRAY_INPUT_ALIAS, inputBinding)).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, arrayResult)]));
32
+ }
33
+ nativeTypeFor(ref) {
34
+ return this.nativeType(this.validateParams(ref));
35
+ }
36
+ projectJson(expression, ref) {
37
+ const params = this.validateParams(ref);
38
+ return ref.many === true ? this.jsonArrayProjection(expression, params) : this.jsonProjection(expression, params);
39
+ }
40
+ validateParams(ref) {
41
+ return blindCast(validateCodecTypeParams(this, ref));
42
+ }
43
+ };
44
+ var PostgresCodecDescriptorAdapter = class extends PostgresCodecDescriptor {
45
+ descriptor;
46
+ options;
47
+ codecId;
48
+ traits;
49
+ targetTypes;
50
+ paramsSchema;
51
+ renderOutputType;
52
+ renderInputType;
53
+ renderValueLiteral;
54
+ factory;
55
+ constructor(descriptor, options) {
56
+ super();
57
+ this.descriptor = descriptor;
58
+ this.options = options;
59
+ this.codecId = descriptor.codecId;
60
+ this.traits = descriptor.traits;
61
+ this.targetTypes = descriptor.targetTypes;
62
+ this.paramsSchema = descriptor.paramsSchema;
63
+ this.factory = (params) => descriptor.factory(params);
64
+ const renderOutputType = descriptor.renderOutputType;
65
+ if (renderOutputType !== void 0) this.renderOutputType = (params) => renderOutputType.call(descriptor, params);
66
+ const renderInputType = descriptor.renderInputType;
67
+ if (renderInputType !== void 0) this.renderInputType = (params) => renderInputType.call(descriptor, params);
68
+ const renderValueLiteral = descriptor.renderValueLiteral;
69
+ if (renderValueLiteral !== void 0) this.renderValueLiteral = (value, side) => renderValueLiteral.call(descriptor, value, side);
70
+ }
71
+ get isParameterized() {
72
+ return this.descriptor.isParameterized;
73
+ }
74
+ nativeType(params) {
75
+ return this.options.nativeType(params);
76
+ }
77
+ jsonProjection(expression, params) {
78
+ return this.options.jsonProjection(expression, params);
79
+ }
80
+ jsonArrayProjection(expression, params) {
81
+ return this.options.jsonArrayProjection === void 0 ? super.jsonArrayProjection(expression, params) : this.options.jsonArrayProjection(expression, params);
82
+ }
83
+ };
84
+ function postgresCodec(descriptor, options) {
85
+ return blindCast(new PostgresCodecDescriptorAdapter(descriptor, options));
86
+ }
87
+ function definePostgresCodecs(descriptors) {
88
+ return descriptors;
89
+ }
90
+ function isPostgresCodecDescriptor(value) {
91
+ return typeof value === "object" && value !== null && "descriptorKind" in value && value.descriptorKind === POSTGRES_CODEC_DESCRIPTOR_KIND && "codecId" in value && typeof value.codecId === "string" && "traits" in value && Array.isArray(value.traits) && "targetTypes" in value && Array.isArray(value.targetTypes) && value.targetTypes.every((targetType) => typeof targetType === "string") && "paramsSchema" in value && isObjectLike(value.paramsSchema) && "~standard" in value.paramsSchema && isObjectLike(value.paramsSchema["~standard"]) && "validate" in value.paramsSchema["~standard"] && typeof value.paramsSchema["~standard"].validate === "function" && "isParameterized" in value && typeof value.isParameterized === "boolean" && "factory" in value && typeof value.factory === "function" && "nativeTypeFor" in value && typeof value.nativeTypeFor === "function" && "projectJson" in value && typeof value.projectJson === "function";
92
+ }
93
+ function isObjectLike(value) {
94
+ return typeof value === "object" && value !== null || typeof value === "function";
95
+ }
96
+ var PostgresCodecDescriptorRegistryImpl = class {
97
+ #descriptors;
98
+ constructor(descriptors) {
99
+ this.#descriptors = descriptors;
100
+ Object.freeze(this);
101
+ }
102
+ descriptorFor(codecId) {
103
+ return this.#descriptors.get(codecId);
104
+ }
105
+ *values() {
106
+ yield* this.#descriptors.values();
107
+ }
108
+ };
109
+ function buildPostgresCodecDescriptorRegistry(descriptors) {
110
+ const byId = /* @__PURE__ */ new Map();
111
+ for (const descriptor of descriptors) {
112
+ if (!isPostgresCodecDescriptor(descriptor)) {
113
+ const codecId = candidateCodecId(descriptor);
114
+ throw structuredError("POSTGRES.CODEC_DESCRIPTOR_INVALID", `Codec descriptor '${codecId}' is not a valid PostgreSQL codec descriptor.`, {
115
+ why: "PostgreSQL codec registries require the postgres-codec discriminant and complete target descriptor methods.",
116
+ fix: "Extend PostgresCodecDescriptor or adapt a generic descriptor with postgresCodec().",
117
+ meta: { codecId }
118
+ });
119
+ }
120
+ if (byId.has(descriptor.codecId)) throw structuredError("POSTGRES.CODEC_DESCRIPTOR_DUPLICATE", `Duplicate PostgreSQL codec descriptor id '${descriptor.codecId}'.`, {
121
+ why: "Each codecId must resolve to exactly one PostgreSQL descriptor during registry composition.",
122
+ fix: "Remove the duplicate target, adapter, or extension contribution.",
123
+ meta: { codecId: descriptor.codecId }
124
+ });
125
+ byId.set(descriptor.codecId, descriptor);
126
+ }
127
+ return new PostgresCodecDescriptorRegistryImpl(byId);
128
+ }
129
+ function candidateCodecId(value) {
130
+ return typeof value === "object" && value !== null && "codecId" in value && typeof value.codecId === "string" ? value.codecId : "<unknown>";
131
+ }
132
+ //#endregion
133
+ export { postgresCodec as a, isPostgresCodecDescriptor as i, buildPostgresCodecDescriptorRegistry as n, definePostgresCodecs as r, PostgresCodecDescriptor as t };
134
+
135
+ //# sourceMappingURL=codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs","names":["#descriptors"],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-descriptor-CB6x0xEu.mjs"],"sourcesContent":["import { CaseExpr, ColumnRef, DerivedTableSource, FunctionSource, JsonArrayAggExpr, LiteralExpr, NativeJsonValueProjection, NullCheckExpr, OrderByItem, ProjectionItem, SelectAst, SubqueryExpr } from \"@internal/sql-relational-core/ast\";\nimport { CodecDescriptorImpl, validateCodecTypeParams } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/codec-descriptor.ts\nconst POSTGRES_CODEC_DESCRIPTOR_KIND = \"postgres-codec\";\nconst ARRAY_INPUT_ALIAS = \"array_input\";\nconst ARRAY_ELEMENT_ALIAS = \"array_element\";\nconst ARRAY_VALUE_COLUMN = \"value\";\nconst ARRAY_ORDINALITY_COLUMN = \"ordinality\";\nvar PostgresCodecDescriptor = class extends CodecDescriptorImpl {\n\tdescriptorKind = POSTGRES_CODEC_DESCRIPTOR_KIND;\n\tjsonArrayProjection(expression, params) {\n\t\tconst boundArray = ColumnRef.of(ARRAY_INPUT_ALIAS, ARRAY_VALUE_COLUMN);\n\t\tconst element = ColumnRef.of(ARRAY_ELEMENT_ALIAS, ARRAY_VALUE_COLUMN);\n\t\tconst ordinality = ColumnRef.of(ARRAY_ELEMENT_ALIAS, ARRAY_ORDINALITY_COLUMN);\n\t\tconst projectedElement = CaseExpr.of([{\n\t\t\tcondition: NullCheckExpr.isNull(element),\n\t\t\tvalue: LiteralExpr.of(null)\n\t\t}], this.jsonProjection(element, params));\n\t\tconst aggregate = JsonArrayAggExpr.of(new NativeJsonValueProjection(projectedElement), \"emptyArray\", [OrderByItem.asc(ordinality)]);\n\t\tconst aggregateQuery = SelectAst.from(FunctionSource.of(\"unnest\", [boundArray], {\n\t\t\talias: ARRAY_ELEMENT_ALIAS,\n\t\t\tcolumnAliases: [ARRAY_VALUE_COLUMN, ARRAY_ORDINALITY_COLUMN]\n\t\t}).withOrdinality()).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, aggregate)]);\n\t\tconst arrayResult = CaseExpr.of([{\n\t\t\tcondition: NullCheckExpr.isNull(boundArray),\n\t\t\tvalue: LiteralExpr.of(null)\n\t\t}], SubqueryExpr.of(aggregateQuery));\n\t\tconst inputBinding = SelectAst.noFrom().withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, expression)]);\n\t\treturn SubqueryExpr.of(SelectAst.from(DerivedTableSource.as(ARRAY_INPUT_ALIAS, inputBinding)).withProjection([ProjectionItem.of(ARRAY_VALUE_COLUMN, arrayResult)]));\n\t}\n\tnativeTypeFor(ref) {\n\t\treturn this.nativeType(this.validateParams(ref));\n\t}\n\tprojectJson(expression, ref) {\n\t\tconst params = this.validateParams(ref);\n\t\treturn ref.many === true ? this.jsonArrayProjection(expression, params) : this.jsonProjection(expression, params);\n\t}\n\tvalidateParams(ref) {\n\t\treturn blindCast(validateCodecTypeParams(this, ref));\n\t}\n};\nvar PostgresCodecDescriptorAdapter = class extends PostgresCodecDescriptor {\n\tdescriptor;\n\toptions;\n\tcodecId;\n\ttraits;\n\ttargetTypes;\n\tparamsSchema;\n\trenderOutputType;\n\trenderInputType;\n\trenderValueLiteral;\n\tfactory;\n\tconstructor(descriptor, options) {\n\t\tsuper();\n\t\tthis.descriptor = descriptor;\n\t\tthis.options = options;\n\t\tthis.codecId = descriptor.codecId;\n\t\tthis.traits = descriptor.traits;\n\t\tthis.targetTypes = descriptor.targetTypes;\n\t\tthis.paramsSchema = descriptor.paramsSchema;\n\t\tthis.factory = (params) => descriptor.factory(params);\n\t\tconst renderOutputType = descriptor.renderOutputType;\n\t\tif (renderOutputType !== void 0) this.renderOutputType = (params) => renderOutputType.call(descriptor, params);\n\t\tconst renderInputType = descriptor.renderInputType;\n\t\tif (renderInputType !== void 0) this.renderInputType = (params) => renderInputType.call(descriptor, params);\n\t\tconst renderValueLiteral = descriptor.renderValueLiteral;\n\t\tif (renderValueLiteral !== void 0) this.renderValueLiteral = (value, side) => renderValueLiteral.call(descriptor, value, side);\n\t}\n\tget isParameterized() {\n\t\treturn this.descriptor.isParameterized;\n\t}\n\tnativeType(params) {\n\t\treturn this.options.nativeType(params);\n\t}\n\tjsonProjection(expression, params) {\n\t\treturn this.options.jsonProjection(expression, params);\n\t}\n\tjsonArrayProjection(expression, params) {\n\t\treturn this.options.jsonArrayProjection === void 0 ? super.jsonArrayProjection(expression, params) : this.options.jsonArrayProjection(expression, params);\n\t}\n};\nfunction postgresCodec(descriptor, options) {\n\treturn blindCast(new PostgresCodecDescriptorAdapter(descriptor, options));\n}\nfunction definePostgresCodecs(descriptors) {\n\treturn descriptors;\n}\nfunction isPostgresCodecDescriptor(value) {\n\treturn typeof value === \"object\" && value !== null && \"descriptorKind\" in value && value.descriptorKind === POSTGRES_CODEC_DESCRIPTOR_KIND && \"codecId\" in value && typeof value.codecId === \"string\" && \"traits\" in value && Array.isArray(value.traits) && \"targetTypes\" in value && Array.isArray(value.targetTypes) && value.targetTypes.every((targetType) => typeof targetType === \"string\") && \"paramsSchema\" in value && isObjectLike(value.paramsSchema) && \"~standard\" in value.paramsSchema && isObjectLike(value.paramsSchema[\"~standard\"]) && \"validate\" in value.paramsSchema[\"~standard\"] && typeof value.paramsSchema[\"~standard\"].validate === \"function\" && \"isParameterized\" in value && typeof value.isParameterized === \"boolean\" && \"factory\" in value && typeof value.factory === \"function\" && \"nativeTypeFor\" in value && typeof value.nativeTypeFor === \"function\" && \"projectJson\" in value && typeof value.projectJson === \"function\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null || typeof value === \"function\";\n}\nvar PostgresCodecDescriptorRegistryImpl = class {\n\t#descriptors;\n\tconstructor(descriptors) {\n\t\tthis.#descriptors = descriptors;\n\t\tObject.freeze(this);\n\t}\n\tdescriptorFor(codecId) {\n\t\treturn this.#descriptors.get(codecId);\n\t}\n\t*values() {\n\t\tyield* this.#descriptors.values();\n\t}\n};\nfunction buildPostgresCodecDescriptorRegistry(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (!isPostgresCodecDescriptor(descriptor)) {\n\t\t\tconst codecId = candidateCodecId(descriptor);\n\t\t\tthrow structuredError(\"POSTGRES.CODEC_DESCRIPTOR_INVALID\", `Codec descriptor '${codecId}' is not a valid PostgreSQL codec descriptor.`, {\n\t\t\t\twhy: \"PostgreSQL codec registries require the postgres-codec discriminant and complete target descriptor methods.\",\n\t\t\t\tfix: \"Extend PostgresCodecDescriptor or adapt a generic descriptor with postgresCodec().\",\n\t\t\t\tmeta: { codecId }\n\t\t\t});\n\t\t}\n\t\tif (byId.has(descriptor.codecId)) throw structuredError(\"POSTGRES.CODEC_DESCRIPTOR_DUPLICATE\", `Duplicate PostgreSQL codec descriptor id '${descriptor.codecId}'.`, {\n\t\t\twhy: \"Each codecId must resolve to exactly one PostgreSQL descriptor during registry composition.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: { codecId: descriptor.codecId }\n\t\t});\n\t\tbyId.set(descriptor.codecId, descriptor);\n\t}\n\treturn new PostgresCodecDescriptorRegistryImpl(byId);\n}\nfunction candidateCodecId(value) {\n\treturn typeof value === \"object\" && value !== null && \"codecId\" in value && typeof value.codecId === \"string\" ? value.codecId : \"<unknown>\";\n}\n//#endregion\nexport { postgresCodec as a, isPostgresCodecDescriptor as i, buildPostgresCodecDescriptorRegistry as n, definePostgresCodecs as r, PostgresCodecDescriptor as t };\n\n//# sourceMappingURL=codec-descriptor-CB6x0xEu.mjs.map"],"mappings":";;;;;AAKA,MAAM,iCAAiC;AACvC,MAAM,oBAAoB;AAC1B,MAAM,sBAAsB;AAC5B,MAAM,qBAAqB;AAC3B,MAAM,0BAA0B;AAChC,IAAI,0BAA0B,cAAc,oBAAoB;CAC/D,iBAAiB;CACjB,oBAAoB,YAAY,QAAQ;EACvC,MAAM,aAAa,UAAU,GAAG,mBAAmB,kBAAkB;EACrE,MAAM,UAAU,UAAU,GAAG,qBAAqB,kBAAkB;EACpE,MAAM,aAAa,UAAU,GAAG,qBAAqB,uBAAuB;EAC5E,MAAM,mBAAmB,SAAS,GAAG,CAAC;GACrC,WAAW,cAAc,OAAO,OAAO;GACvC,OAAO,YAAY,GAAG,IAAI;EAC3B,CAAC,GAAG,KAAK,eAAe,SAAS,MAAM,CAAC;EACxC,MAAM,YAAY,iB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CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID } from "@prisma/orm-family-sql/relational-core/ast";
2
+ //#region ../../../3-targets/3-targets/postgres/dist/codec-ids-CsOU3xDv.d.mts
3
+ //#region src/core/codec-ids.d.ts
4
+ declare const PG_TEXT_CODEC_ID: "pg/text@1";
5
+ declare const PG_TEXT_ARRAY_CODEC_ID: "pg/text-array@1";
6
+ declare const PG_ENUM_CODEC_ID: "pg/enum@1";
7
+ declare const PG_CHAR_CODEC_ID: "pg/char@1";
8
+ declare const PG_VARCHAR_CODEC_ID: "pg/varchar@1";
9
+ declare const PG_INT_CODEC_ID: "pg/int@1";
10
+ declare const PG_INT2_CODEC_ID: "pg/int2@1";
11
+ declare const PG_INT4_CODEC_ID: "pg/int4@1";
12
+ declare const PG_INT8_CODEC_ID: "pg/int8@1";
13
+ declare const PG_FLOAT_CODEC_ID: "pg/float@1";
14
+ declare const PG_FLOAT4_CODEC_ID: "pg/float4@1";
15
+ declare const PG_FLOAT8_CODEC_ID: "pg/float8@1";
16
+ declare const PG_NUMERIC_CODEC_ID: "pg/numeric@1";
17
+ declare const PG_BOOL_CODEC_ID: "pg/bool@1";
18
+ declare const PG_BIT_CODEC_ID: "pg/bit@1";
19
+ declare const PG_VARBIT_CODEC_ID: "pg/varbit@1";
20
+ declare const PG_DATE_CODEC_ID: "pg/date@1";
21
+ declare const PG_TIMESTAMP_CODEC_ID: "pg/timestamp@1";
22
+ declare const PG_TIMESTAMPTZ_CODEC_ID: "pg/timestamptz@1";
23
+ declare const PG_TIME_CODEC_ID: "pg/time@1";
24
+ declare const PG_TIMETZ_CODEC_ID: "pg/timetz@1";
25
+ declare const PG_INTERVAL_CODEC_ID: "pg/interval@1";
26
+ declare const PG_JSON_CODEC_ID: "pg/json@1";
27
+ declare const PG_JSONB_CODEC_ID: "pg/jsonb@1";
28
+ declare const PG_BYTEA_CODEC_ID: "pg/bytea@1";
29
+ declare const PG_UUID_CODEC_ID: "pg/uuid@1";
30
+ declare const PG_INET_CODEC_ID: "pg/inet@1";
31
+ //#endregion
32
+ export { SQL_INT_CODEC_ID as A, PG_TIMETZ_CODEC_ID as C, PG_VARCHAR_CODEC_ID as D, PG_VARBIT_CODEC_ID as E, SQL_TIMESTAMP_CODEC_ID as M, SQL_VARCHAR_CODEC_ID as N, SQL_CHAR_CODEC_ID as O, PG_TIMESTAMP_CODEC_ID as S, PG_UUID_CODEC_ID as T, PG_JSON_CODEC_ID as _, PG_DATE_CODEC_ID as a, PG_TEXT_CODEC_ID as b, PG_FLOAT8_CODEC_ID as c, PG_INT2_CODEC_ID as d, PG_INT4_CODEC_ID as f, PG_JSONB_CODEC_ID as g, PG_INT_CODEC_ID as h, PG_CHAR_CODEC_ID as i, SQL_TEXT_CODEC_ID as j, SQL_FLOAT_CODEC_ID as k, PG_FLOAT_CODEC_ID as l, PG_INTERVAL_CODEC_ID as m, PG_BOOL_CODEC_ID as n, PG_ENUM_CODEC_ID as o, PG_INT8_CODEC_ID as p, PG_BYTEA_CODEC_ID as r, PG_FLOAT4_CODEC_ID as s, PG_BIT_CODEC_ID as t, PG_INET_CODEC_ID as u, PG_NUMERIC_CODEC_ID as v, PG_TIME_CODEC_ID as w, PG_TIMESTAMPTZ_CODEC_ID as x, PG_TEXT_ARRAY_CODEC_ID as y };
33
+ //# sourceMappingURL=codec-ids-CsOU3xDv-mPI0INiF.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-ids-CsOU3xDv-mPI0INiF.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-ids-CsOU3xDv.d.mts"],"mappings":";;;cAEc;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA"}
@@ -0,0 +1 @@
1
+ import "./codec-ids-CsOU3xDv-mPI0INiF.mjs";
@@ -0,0 +1,33 @@
1
+ import { SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID } from "@prisma/orm-family-sql/relational-core/ast";
2
+ //#region ../../../3-targets/3-targets/postgres/dist/codec-ids-tX7Svtz-.mjs
3
+ const PG_TEXT_CODEC_ID = "pg/text@1";
4
+ const PG_TEXT_ARRAY_CODEC_ID = "pg/text-array@1";
5
+ const PG_ENUM_CODEC_ID = "pg/enum@1";
6
+ const PG_CHAR_CODEC_ID = "pg/char@1";
7
+ const PG_VARCHAR_CODEC_ID = "pg/varchar@1";
8
+ const PG_INT_CODEC_ID = "pg/int@1";
9
+ const PG_INT2_CODEC_ID = "pg/int2@1";
10
+ const PG_INT4_CODEC_ID = "pg/int4@1";
11
+ const PG_INT8_CODEC_ID = "pg/int8@1";
12
+ const PG_FLOAT_CODEC_ID = "pg/float@1";
13
+ const PG_FLOAT4_CODEC_ID = "pg/float4@1";
14
+ const PG_FLOAT8_CODEC_ID = "pg/float8@1";
15
+ const PG_NUMERIC_CODEC_ID = "pg/numeric@1";
16
+ const PG_BOOL_CODEC_ID = "pg/bool@1";
17
+ const PG_BIT_CODEC_ID = "pg/bit@1";
18
+ const PG_VARBIT_CODEC_ID = "pg/varbit@1";
19
+ const PG_DATE_CODEC_ID = "pg/date@1";
20
+ const PG_TIMESTAMP_CODEC_ID = "pg/timestamp@1";
21
+ const PG_TIMESTAMPTZ_CODEC_ID = "pg/timestamptz@1";
22
+ const PG_TIME_CODEC_ID = "pg/time@1";
23
+ const PG_TIMETZ_CODEC_ID = "pg/timetz@1";
24
+ const PG_INTERVAL_CODEC_ID = "pg/interval@1";
25
+ const PG_JSON_CODEC_ID = "pg/json@1";
26
+ const PG_JSONB_CODEC_ID = "pg/jsonb@1";
27
+ const PG_BYTEA_CODEC_ID = "pg/bytea@1";
28
+ const PG_UUID_CODEC_ID = "pg/uuid@1";
29
+ const PG_INET_CODEC_ID = "pg/inet@1";
30
+ //#endregion
31
+ export { SQL_INT_CODEC_ID as A, PG_TIMETZ_CODEC_ID as C, PG_VARCHAR_CODEC_ID as D, PG_VARBIT_CODEC_ID as E, SQL_TIMESTAMP_CODEC_ID as M, SQL_VARCHAR_CODEC_ID as N, SQL_CHAR_CODEC_ID as O, PG_TIMESTAMP_CODEC_ID as S, PG_UUID_CODEC_ID as T, PG_JSON_CODEC_ID as _, PG_DATE_CODEC_ID as a, PG_TEXT_CODEC_ID as b, PG_FLOAT8_CODEC_ID as c, PG_INT2_CODEC_ID as d, PG_INT4_CODEC_ID as f, PG_JSONB_CODEC_ID as g, PG_INT_CODEC_ID as h, PG_CHAR_CODEC_ID as i, SQL_TEXT_CODEC_ID as j, SQL_FLOAT_CODEC_ID as k, PG_FLOAT_CODEC_ID as l, PG_INTERVAL_CODEC_ID as m, PG_BOOL_CODEC_ID as n, PG_ENUM_CODEC_ID as o, PG_INT8_CODEC_ID as p, PG_BYTEA_CODEC_ID as r, PG_FLOAT4_CODEC_ID as s, PG_BIT_CODEC_ID as t, PG_INET_CODEC_ID as u, PG_NUMERIC_CODEC_ID as v, PG_TIME_CODEC_ID as w, PG_TIMESTAMPTZ_CODEC_ID as x, PG_TEXT_ARRAY_CODEC_ID as y };
32
+
33
+ //# sourceMappingURL=codec-ids-tX7Svtz--BuOfRaVU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-ids-tX7Svtz--BuOfRaVU.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-ids-tX7Svtz-.mjs"],"sourcesContent":["import { SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\n//#region src/core/codec-ids.ts\nconst PG_TEXT_CODEC_ID = \"pg/text@1\";\nconst PG_TEXT_ARRAY_CODEC_ID = \"pg/text-array@1\";\nconst PG_ENUM_CODEC_ID = \"pg/enum@1\";\nconst PG_CHAR_CODEC_ID = \"pg/char@1\";\nconst PG_VARCHAR_CODEC_ID = \"pg/varchar@1\";\nconst PG_INT_CODEC_ID = \"pg/int@1\";\nconst PG_INT2_CODEC_ID = \"pg/int2@1\";\nconst PG_INT4_CODEC_ID = \"pg/int4@1\";\nconst PG_INT8_CODEC_ID = \"pg/int8@1\";\nconst PG_FLOAT_CODEC_ID = \"pg/float@1\";\nconst PG_FLOAT4_CODEC_ID = \"pg/float4@1\";\nconst PG_FLOAT8_CODEC_ID = \"pg/float8@1\";\nconst PG_NUMERIC_CODEC_ID = \"pg/numeric@1\";\nconst PG_BOOL_CODEC_ID = \"pg/bool@1\";\nconst PG_BIT_CODEC_ID = \"pg/bit@1\";\nconst PG_VARBIT_CODEC_ID = \"pg/varbit@1\";\nconst PG_DATE_CODEC_ID = \"pg/date@1\";\nconst PG_TIMESTAMP_CODEC_ID = \"pg/timestamp@1\";\nconst PG_TIMESTAMPTZ_CODEC_ID = \"pg/timestamptz@1\";\nconst PG_TIME_CODEC_ID = \"pg/time@1\";\nconst PG_TIMETZ_CODEC_ID = \"pg/timetz@1\";\nconst PG_INTERVAL_CODEC_ID = \"pg/interval@1\";\nconst PG_JSON_CODEC_ID = \"pg/json@1\";\nconst PG_JSONB_CODEC_ID = \"pg/jsonb@1\";\nconst PG_BYTEA_CODEC_ID = \"pg/bytea@1\";\nconst PG_UUID_CODEC_ID = \"pg/uuid@1\";\nconst PG_INET_CODEC_ID = \"pg/inet@1\";\n//#endregion\nexport { SQL_INT_CODEC_ID as A, PG_TIMETZ_CODEC_ID as C, PG_VARCHAR_CODEC_ID as D, PG_VARBIT_CODEC_ID as E, SQL_TIMESTAMP_CODEC_ID as M, SQL_VARCHAR_CODEC_ID as N, SQL_CHAR_CODEC_ID as O, PG_TIMESTAMP_CODEC_ID as S, PG_UUID_CODEC_ID as T, PG_JSON_CODEC_ID as _, PG_DATE_CODEC_ID as a, PG_TEXT_CODEC_ID as b, PG_FLOAT8_CODEC_ID as c, PG_INT2_CODEC_ID as d, PG_INT4_CODEC_ID as f, PG_JSONB_CODEC_ID as g, PG_INT_CODEC_ID as h, PG_CHAR_CODEC_ID as i, SQL_TEXT_CODEC_ID as j, SQL_FLOAT_CODEC_ID as k, PG_FLOAT_CODEC_ID as l, PG_INTERVAL_CODEC_ID as m, PG_BOOL_CODEC_ID as n, PG_ENUM_CODEC_ID as o, PG_INT8_CODEC_ID as p, PG_BYTEA_CODEC_ID as r, PG_FLOAT4_CODEC_ID as s, PG_BIT_CODEC_ID as t, PG_INET_CODEC_ID as u, PG_NUMERIC_CODEC_ID as v, PG_TIME_CODEC_ID as w, PG_TIMESTAMPTZ_CODEC_ID as x, PG_TEXT_ARRAY_CODEC_ID as y };\n\n//# sourceMappingURL=codec-ids-tX7Svtz-.mjs.map"],"mappings":";;AAEA,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AAC/B,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,mBAAmB;AACzB,MAAM,wBAAwB;AAC9B,MAAM,0BAA0B;AAChC,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;AAC3B,MAAM,uBAAuB;AAC7B,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,oBAAoB;AAC1B,MAAM,mBAAmB;AACzB,MAAM,mBAAmB"}
@@ -0,0 +1,2 @@
1
+ import "./codecs-Cvqvb9pV-Cdc51FKY.mjs";
2
+ import "./codec-types-mWhnDEAf-CAQzGFnF.mjs";
@@ -0,0 +1,82 @@
1
+ import { t as AdaptedPostgresCodecDescriptor } from "./codec-descriptor-Bec_zukr-BfvtUqhm.mjs";
2
+ import { C as PgTimeDescriptor, D as PgUuidDescriptor, E as PgTimetzDescriptor, O as PgVarbitDescriptor, S as PgTextDescriptor, T as PgTimestamptzDescriptor, a as PgDateDescriptor, b as PgJsonbDescriptor, d as PgFloatDescriptor, f as PgInetDescriptor, g as PgIntDescriptor, h as PgInt8Descriptor, i as PgCharDescriptor, k as PgVarcharDescriptor, l as PgFloat4Descriptor, m as PgInt4Descriptor, n as PgBoolDescriptor, p as PgInt2Descriptor, r as PgByteaDescriptor, s as PgEnumDescriptor, t as PgBitDescriptor, u as PgFloat8Descriptor, v as PgIntervalDescriptor, w as PgTimestampDescriptor, x as PgNumericDescriptor, y as PgJsonDescriptor } from "./codecs-Cvqvb9pV-Cdc51FKY.mjs";
3
+ import { ExtractCodecTypes } from "@prisma/orm-family-sql/relational-core/ast";
4
+ import { JsonValue as JsonValue$1 } from "@prisma/orm-framework/contract/types";
5
+ //#region ../../../3-targets/3-targets/postgres/dist/codec-types-mWhnDEAf.d.mts
6
+ //#region src/core/codec-type-map.d.ts
7
+ declare const codecDescriptorMap: {
8
+ readonly char: AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlCharDescriptor>;
9
+ readonly varchar: AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlVarcharDescriptor>;
10
+ readonly int: AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlIntDescriptor>;
11
+ readonly float: AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlFloatDescriptor>;
12
+ readonly 'sql-text': AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlTextDescriptor>;
13
+ readonly 'sql-timestamp': AdaptedPostgresCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlTimestampDescriptor>;
14
+ readonly text: PgTextDescriptor;
15
+ readonly enum: PgEnumDescriptor;
16
+ readonly character: PgCharDescriptor;
17
+ readonly 'character varying': PgVarcharDescriptor;
18
+ readonly integer: PgIntDescriptor;
19
+ readonly 'double precision': PgFloatDescriptor;
20
+ readonly int4: PgInt4Descriptor;
21
+ readonly int2: PgInt2Descriptor;
22
+ readonly int8: PgInt8Descriptor;
23
+ readonly float4: PgFloat4Descriptor;
24
+ readonly float8: PgFloat8Descriptor;
25
+ readonly numeric: PgNumericDescriptor;
26
+ readonly date: PgDateDescriptor;
27
+ readonly timestamp: PgTimestampDescriptor;
28
+ readonly timestamptz: PgTimestamptzDescriptor;
29
+ readonly time: PgTimeDescriptor;
30
+ readonly timetz: PgTimetzDescriptor;
31
+ readonly bool: PgBoolDescriptor;
32
+ readonly bit: PgBitDescriptor;
33
+ readonly 'bit varying': PgVarbitDescriptor;
34
+ readonly bytea: PgByteaDescriptor;
35
+ readonly uuid: PgUuidDescriptor;
36
+ readonly inet: PgInetDescriptor;
37
+ readonly interval: PgIntervalDescriptor;
38
+ readonly json: PgJsonDescriptor;
39
+ readonly jsonb: PgJsonbDescriptor;
40
+ };
41
+ type Resolve<T> = { readonly [K in keyof T]: { readonly [P in keyof T[K]]: T[K][P]; }; };
42
+ type CodecDescriptorMap = typeof codecDescriptorMap;
43
+ type ExtractedCodecTypes = ExtractCodecTypes<CodecDescriptorMap>;
44
+ //#endregion
45
+ //#region src/exports/codec-types.d.ts
46
+ type CodecTypes = Resolve<ExtractedCodecTypes>;
47
+ type Branded<T, Shape extends Record<string, unknown>> = T & { readonly [K in keyof Shape]: Shape[K]; };
48
+ type BrandedString<Shape extends Record<string, unknown>> = Branded<string, Shape>;
49
+ type Char<N extends number> = BrandedString<{
50
+ __charLength: N;
51
+ }>;
52
+ type Varchar<N extends number> = BrandedString<{
53
+ __varcharLength: N;
54
+ }>;
55
+ type Numeric<P extends number, S extends number | undefined = undefined> = BrandedString<{
56
+ __numericPrecision: P;
57
+ __numericScale: S;
58
+ }>;
59
+ type Bit<N extends number> = BrandedString<{
60
+ __bitLength: N;
61
+ }>;
62
+ type VarBit<N extends number> = BrandedString<{
63
+ __varbitLength: N;
64
+ }>;
65
+ type Timestamp<P extends number | undefined = undefined> = BrandedString<{
66
+ __timestampPrecision: P;
67
+ }>;
68
+ type Timestamptz<P extends number | undefined = undefined> = BrandedString<{
69
+ __timestamptzPrecision: P;
70
+ }>;
71
+ type Time<P extends number | undefined = undefined> = BrandedString<{
72
+ __timePrecision: P;
73
+ }>;
74
+ type Timetz<P extends number | undefined = undefined> = BrandedString<{
75
+ __timetzPrecision: P;
76
+ }>;
77
+ type Interval<P extends number | undefined = undefined> = BrandedString<{
78
+ __intervalPrecision: P;
79
+ }>;
80
+ //#endregion
81
+ export { JsonValue$1 as a, Timestamp as c, VarBit as d, Varchar as f, Interval as i, Timestamptz as l, Char as n, Numeric as o, CodecTypes as r, Time as s, Bit as t, Timetz as u };
82
+ //# sourceMappingURL=codec-types-mWhnDEAf-CAQzGFnF.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-types-mWhnDEAf-CAQzGFnF.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/codec-types-mWhnDEAf.d.mts"],"mappings":";;;;;;cAKc;WACH,MAAM,2EAA2E;WACjF,SAAS,2EAA2E;WACpF,KAAK,2EAA2E;WAChF,OAAO,2EAA2E;WAClF,YAAY,2EAA2E;WACvF,iBAAiB,2EAA2E;WAC5F,MAAM;WACN,MAAM;WACN,WAAW;WACX,qBAAqB;WACrB,SAAS;WACT,oBAAoB;WACpB,MAAM;WACN,MAAM;WACN,MAAM;WACN,QAAQ;WACR,QAAQ;WACR,SAAS;WACT,MAAM;WACN,WAAW;WACX,aAAa;WACb,MAAM;WACN,QAAQ;WACR,MAAM;WACN,KAAK;WACL,eAAe;WACf,OAAO;WACP,MAAM;WACN,MAAM;WACN,UAAU;WACV,MAAM;WACN,OAAO;;KAEb,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,4BAA4B;KAC5B,sBAAsB,kBAAkB;;;KAGxC,aAAa,QAAQ;KACrB,QAAQ,GAAG,cAAc,2BAA2B,gBAAgB,WAAW,QAAQ,MAAM;KAC7F,cAAc,cAAc,2BAA2B,gBAAgB;KACvE,KAAK,oBAAoB;EAC5B,cAAc;;KAEX,QAAQ,oBAAoB;EAC/B,iBAAiB;;KAEd,QAAQ,kBAAkB,4CAA4C;EACzE,oBAAoB;EACpB,gBAAgB;;KAEb,IAAI,oBAAoB;EAC3B,aAAa;;KAEV,OAAO,oBAAoB;EAC9B,gBAAgB;;KAEb,UAAU,4CAA4C;EACzD,sBAAsB;;KAEnB,YAAY,4CAA4C;EAC3D,wBAAwB;;KAErB,KAAK,4CAA4C;EACpD,iBAAiB;;KAEd,OAAO,4CAA4C;EACtD,mBAAmB;;KAEhB,SAAS,4CAA4C;EACxD,qBAAqB"}