@prisma/orm-target-sqlite 8.0.0-rc.2-dev.2 → 8.0.0-rc.20-dev.1

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 (289) hide show
  1. package/README.md +1 -5
  2. package/dist/{adapter-CUTKlFpX-CW0J0Qs4.mjs → adapter-7m8HU4rt-DN15_Cn8.mjs} +178 -107
  3. package/dist/adapter-7m8HU4rt-DN15_Cn8.mjs.map +1 -0
  4. package/dist/adapter-C3hrAasJ.d.mts +197 -0
  5. package/dist/adapter-C3hrAasJ.d.mts.map +1 -0
  6. package/dist/{adapter-DEYUC-KO-DO_abhIq.d.mts → adapter-xFPDhkod-BsdLsy9N.d.mts} +12 -9
  7. package/dist/adapter-xFPDhkod-BsdLsy9N.d.mts.map +1 -0
  8. package/dist/adapter.d.mts +14 -15
  9. package/dist/adapter.mjs +7 -6
  10. package/dist/adapter__adapter.d.mts +4 -4
  11. package/dist/adapter__adapter.mjs +3 -2
  12. package/dist/adapter__codec-types.d.mts +3 -3
  13. package/dist/adapter__column-types.d.mts +2 -2
  14. package/dist/adapter__column-types.mjs +2 -2
  15. package/dist/adapter__control.d.mts +5 -5
  16. package/dist/adapter__control.mjs +12 -247
  17. package/dist/adapter__control.mjs.map +1 -1
  18. package/dist/adapter__runtime.d.mts +1 -1
  19. package/dist/adapter__runtime.mjs +11 -6
  20. package/dist/adapter__runtime.mjs.map +1 -1
  21. package/dist/adapter__sql-renderer.d.mts +2 -2
  22. package/dist/adapter__sql-renderer.mjs +1 -1
  23. package/dist/adapter__types.d.mts +3 -2
  24. package/dist/{aggregates-DWyPO7t6.mjs → aggregates-D5fuFVMC.mjs} +33 -20
  25. package/dist/aggregates-D5fuFVMC.mjs.map +1 -0
  26. package/dist/aggregates-UBmpuURb.d.mts +164 -0
  27. package/dist/aggregates-UBmpuURb.d.mts.map +1 -0
  28. package/dist/codec-descriptor-3oN7rtrW-Cc_u7U5-.d.mts +1 -0
  29. package/dist/codec-descriptor-C16gQAdS.d.mts +2 -0
  30. package/dist/{codec-descriptor-B9ru99aI-DTkdKFU5.mjs → codec-descriptor-DRmF-crq-BALI5Jtz.mjs} +11 -15
  31. package/dist/codec-descriptor-DRmF-crq-BALI5Jtz.mjs.map +1 -0
  32. package/dist/codec-descriptor-DuW-d9ef-BBRBN0Ri.d.mts +45 -0
  33. package/dist/codec-descriptor-DuW-d9ef-BBRBN0Ri.d.mts.map +1 -0
  34. package/dist/codec-ids-CMbhYIsa.d.mts +1 -0
  35. package/dist/{codec-ids-CzeDyMWW-BZAcI50I.d.mts → codec-ids-DuJYssXV-BPKbFNRL.d.mts} +4 -4
  36. package/dist/codec-ids-DuJYssXV-BPKbFNRL.d.mts.map +1 -0
  37. package/dist/{codec-ids-KMliSCRp-BhTbmbGr.mjs → codec-ids-wgEvkCkg-WltuexMR.mjs} +4 -4
  38. package/dist/codec-ids-wgEvkCkg-WltuexMR.mjs.map +1 -0
  39. package/dist/{codec-types-D7uWRvQ1-DPnvquS8.d.mts → codec-types-COh75Bop-CUehAexc.d.mts} +6 -5
  40. package/dist/codec-types-COh75Bop-CUehAexc.d.mts.map +1 -0
  41. package/dist/codec-types-ELHfd82J.d.mts +2 -0
  42. package/dist/codec-types-PONhVn74.d.mts +1 -0
  43. package/dist/{codecs-BQWqLgCl-CdB8t7HI.d.mts → codecs-BJYruC-a-BKDGae3k.d.mts} +86 -62
  44. package/dist/codecs-BJYruC-a-BKDGae3k.d.mts.map +1 -0
  45. package/dist/codecs-Dn0xoCuf.d.mts +1 -0
  46. package/dist/codecs-g-YI3BtK.mjs +49 -0
  47. package/dist/codecs-g-YI3BtK.mjs.map +1 -0
  48. package/dist/codecs-yZoH21Yj-lQXtGlEq.mjs +618 -0
  49. package/dist/codecs-yZoH21Yj-lQXtGlEq.mjs.map +1 -0
  50. package/dist/column-types-DcbNOYVb.mjs +22 -0
  51. package/dist/column-types-DcbNOYVb.mjs.map +1 -0
  52. package/dist/column-types-Dxm0BpPv.d.mts +36 -0
  53. package/dist/column-types-Dxm0BpPv.d.mts.map +1 -0
  54. package/dist/contract-contributions-wweWdXMK-CN-d35Rj.mjs +24 -0
  55. package/dist/contract-contributions-wweWdXMK-CN-d35Rj.mjs.map +1 -0
  56. package/dist/{contract-free-CCLAXZV2.d.mts → contract-free-BJwIJN6x.d.mts} +3 -3
  57. package/dist/contract-free-BJwIJN6x.d.mts.map +1 -0
  58. package/dist/{contract-free-D5cZrgNl.mjs → contract-free-DetowcoS.mjs} +8 -7
  59. package/dist/contract-free-DetowcoS.mjs.map +1 -0
  60. package/dist/{control-CLirKz11.d.mts → control-BbJiKI2r.d.mts} +24 -29
  61. package/dist/control-BbJiKI2r.d.mts.map +1 -0
  62. package/dist/{control-B16T9OoX.mjs → control-BxbKU2xs.mjs} +15 -6
  63. package/dist/control-BxbKU2xs.mjs.map +1 -0
  64. package/dist/{control-D9vMRRgU.d.mts → control-C2TjacST.d.mts} +3 -3
  65. package/dist/control-C2TjacST.d.mts.map +1 -0
  66. package/dist/{control--wMueaTg.d.mts → control-CmDsxEqb.d.mts} +75 -6
  67. package/dist/control-CmDsxEqb.d.mts.map +1 -0
  68. package/dist/{control-tables-Dua-YcJL.d.mts → control-tables-DKXLHvMU.d.mts} +2 -2
  69. package/dist/control-tables-DKXLHvMU.d.mts.map +1 -0
  70. package/dist/{control-tables-D_o8dKRB-BXi43noL.mjs → control-tables-D_o8dKRB-n_QqsXcm.mjs} +2 -2
  71. package/dist/control-tables-D_o8dKRB-n_QqsXcm.mjs.map +1 -0
  72. package/dist/data-type-entries-yQ-qYugg-C_NnX5WO.mjs +76 -0
  73. package/dist/data-type-entries-yQ-qYugg-C_NnX5WO.mjs.map +1 -0
  74. package/dist/data-types-Dx3rHsbF.d.mts +40 -0
  75. package/dist/data-types-Dx3rHsbF.d.mts.map +1 -0
  76. package/dist/data-types-coQrCWfS-yMCe4F52.mjs +140 -0
  77. package/dist/data-types-coQrCWfS-yMCe4F52.mjs.map +1 -0
  78. package/dist/datetime-text-Bniwehv--BSQhnrdE.mjs +9 -0
  79. package/dist/datetime-text-Bniwehv--BSQhnrdE.mjs.map +1 -0
  80. package/dist/ddl-31OBcTco.d.mts +1 -0
  81. package/dist/{ddl-CXduXyOT-nlDP6DGx.mjs → ddl-CX4tAZ-y-Bng-4PWC.mjs} +42 -5
  82. package/dist/ddl-CX4tAZ-y-Bng-4PWC.mjs.map +1 -0
  83. package/dist/default-normalizer-CkHy3JYk.d.mts +25 -0
  84. package/dist/default-normalizer-CkHy3JYk.d.mts.map +1 -0
  85. package/dist/default-normalizer-DGMXypHg-CPf7oyZA.mjs +112 -0
  86. package/dist/default-normalizer-DGMXypHg-CPf7oyZA.mjs.map +1 -0
  87. package/dist/descriptor-meta-COSGM3xb-Ct_5RPcm.mjs +110 -0
  88. package/dist/descriptor-meta-COSGM3xb-Ct_5RPcm.mjs.map +1 -0
  89. package/dist/descriptor-meta-DrNwC4vO-D7vuA6QK.mjs +26 -0
  90. package/dist/descriptor-meta-DrNwC4vO-D7vuA6QK.mjs.map +1 -0
  91. package/dist/{descriptor-meta-vjJkUDsn-Hz3rnAnk.mjs → descriptor-meta-cwy5CXTT-CLOhiryX.mjs} +17 -3
  92. package/dist/descriptor-meta-cwy5CXTT-CLOhiryX.mjs.map +1 -0
  93. package/dist/descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs +15 -0
  94. package/dist/descriptor-meta-runtime-DX2JfHWF-Dbsh5NP8.mjs.map +1 -0
  95. package/dist/driver.d.mts +2 -2
  96. package/dist/driver.mjs +1 -1
  97. package/dist/driver__control.d.mts +1 -1
  98. package/dist/driver__control.mjs +1 -1
  99. package/dist/driver__runtime.d.mts +1 -1
  100. package/dist/driver__runtime.mjs +5 -8
  101. package/dist/driver__runtime.mjs.map +1 -1
  102. package/dist/{errors-DnR-sMHS-KkMLIP2U.mjs → errors-DnR-sMHS-D_gh214a.mjs} +2 -2
  103. package/dist/errors-DnR-sMHS-D_gh214a.mjs.map +1 -0
  104. package/dist/{migration-uylRe5MP.d.mts → migration-WJlUQmsn.d.mts} +6 -5
  105. package/dist/migration-WJlUQmsn.d.mts.map +1 -0
  106. package/dist/{migration-DOKPHtxn.mjs → migration-nqIDkjRz.mjs} +6 -5
  107. package/dist/migration-nqIDkjRz.mjs.map +1 -0
  108. package/dist/{nodes-D8EC1yCx-rpfpuJ4T.d.mts → nodes-D8EC1yCx-BS-fKla6.d.mts} +2 -2
  109. package/dist/nodes-D8EC1yCx-BS-fKla6.d.mts.map +1 -0
  110. package/dist/{nodes-DUZSdX86-BBEEaxXY.mjs → nodes-DUZSdX86-DWyLY3OW.mjs} +2 -2
  111. package/dist/nodes-DUZSdX86-DWyLY3OW.mjs.map +1 -0
  112. package/dist/{op-factory-call-DoHN7Q7L.d.mts → op-factory-call-De6MX7Yp.d.mts} +83 -19
  113. package/dist/op-factory-call-De6MX7Yp.d.mts.map +1 -0
  114. package/dist/op-factory-call-emj9Xp05-BFLkxrAK.mjs +1414 -0
  115. package/dist/op-factory-call-emj9Xp05-BFLkxrAK.mjs.map +1 -0
  116. package/dist/pack-DR0n9vHJ.d.mts +1179 -0
  117. package/dist/pack-DR0n9vHJ.d.mts.map +1 -0
  118. package/dist/planner-BvwYScnt-9H9LIJFn.mjs +362 -0
  119. package/dist/planner-BvwYScnt-9H9LIJFn.mjs.map +1 -0
  120. package/dist/{planner-Bxdi7jZF.d.mts → planner-CjMq9oEt.d.mts} +21 -10
  121. package/dist/planner-CjMq9oEt.d.mts.map +1 -0
  122. package/dist/{planner-produced-sqlite-migration-C9uVDKrJ-CWbxSANn.mjs → planner-produced-sqlite-migration-D2jtaItv-ZFZhPfGE.mjs} +4 -4
  123. package/dist/planner-produced-sqlite-migration-D2jtaItv-ZFZhPfGE.mjs.map +1 -0
  124. package/dist/{planner-produced-sqlite-migration-BuJysRxx-CaDUbNVx.d.mts → planner-produced-sqlite-migration-DuM9c3YI-Dacb6zQZ.d.mts} +4 -4
  125. package/dist/planner-produced-sqlite-migration-DuM9c3YI-Dacb6zQZ.d.mts.map +1 -0
  126. package/dist/planner-produced-sqlite-migration-GDP1M36D.d.mts +1 -0
  127. package/dist/{planner-target-details-CIQ789Gc-C5U4yVY9.mjs → planner-target-details-CIQ789Gc-Cug2V5g5.mjs} +2 -2
  128. package/dist/planner-target-details-CIQ789Gc-Cug2V5g5.mjs.map +1 -0
  129. package/dist/{planner-target-details-xR6UfIcz-CMahymzq.d.mts → planner-target-details-xR6UfIcz-BrBPQGOS.d.mts} +2 -2
  130. package/dist/planner-target-details-xR6UfIcz-BrBPQGOS.d.mts.map +1 -0
  131. package/dist/render-ops-BPLkHR-y-CPoXG5Ap.mjs +34 -0
  132. package/dist/render-ops-BPLkHR-y-CPoXG5Ap.mjs.map +1 -0
  133. package/dist/{render-ops-B10yqmdG.d.mts → render-ops-Ntl2jBJe.d.mts} +3 -3
  134. package/dist/render-ops-Ntl2jBJe.d.mts.map +1 -0
  135. package/dist/{runtime-B1coahKC.d.mts → runtime-BvMPuBrJ.d.mts} +3 -3
  136. package/dist/runtime-BvMPuBrJ.d.mts.map +1 -0
  137. package/dist/{runtime-B99c4n56.d.mts → runtime-CjIoI3sa.d.mts} +4 -4
  138. package/dist/runtime-CjIoI3sa.d.mts.map +1 -0
  139. package/dist/{runtime-C5J9fusd.d.mts → runtime-YfPIbtO6.d.mts} +4 -4
  140. package/dist/runtime-YfPIbtO6.d.mts.map +1 -0
  141. package/dist/sql-renderer-brQ96quu.d.mts +1 -0
  142. package/dist/{sql-utils-0SJZOd7Q.d.mts → sql-utils-BqHka8P6.d.mts} +2 -2
  143. package/dist/sql-utils-BqHka8P6.d.mts.map +1 -0
  144. package/dist/{sql-utils-C2O4zVkP-Dz3Hb85I.mjs → sql-utils-XGT5Esi2-Zr2mqJf8.mjs} +31 -4
  145. package/dist/sql-utils-XGT5Esi2-Zr2mqJf8.mjs.map +1 -0
  146. package/dist/{sqlite-contract-view-BpNMaU2m-COMDaGaq.d.mts → sqlite-contract-view-BDw8T5Cp-BfFajhe4.d.mts} +5 -4
  147. package/dist/sqlite-contract-view-BDw8T5Cp-BfFajhe4.d.mts.map +1 -0
  148. package/dist/{sqlite-contract-view-BYR10usg-BteDAUZr.mjs → sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs} +9 -6
  149. package/dist/sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs.map +1 -0
  150. package/dist/sqlite-migration-BAdSmooi-iWFVQgGV.mjs +1295 -0
  151. package/dist/sqlite-migration-BAdSmooi-iWFVQgGV.mjs.map +1 -0
  152. package/dist/{sqlite-migration-o23JHwzY-CwNJcqwl.d.mts → sqlite-migration-CLIMaHLy-5ZjJDdDP.d.mts} +61 -13
  153. package/dist/sqlite-migration-CLIMaHLy-5ZjJDdDP.d.mts.map +1 -0
  154. package/dist/{shared-BYAX0FaQ--VvRXVRC.d.mts → tables-C6oejIsc-CzK00Kwl.d.mts} +38 -10
  155. package/dist/tables-C6oejIsc-CzK00Kwl.d.mts.map +1 -0
  156. package/dist/target.d.mts +29 -29
  157. package/dist/target.mjs +24 -20
  158. package/dist/target__aggregates.d.mts +1 -1
  159. package/dist/target__aggregates.mjs +1 -1
  160. package/dist/target__codec-descriptor.d.mts +2 -2
  161. package/dist/target__codec-descriptor.mjs +1 -1
  162. package/dist/target__codec-ids.d.mts +3 -3
  163. package/dist/target__codec-ids.mjs +2 -2
  164. package/dist/target__codec-types.d.mts +3 -3
  165. package/dist/target__codecs.d.mts +3 -3
  166. package/dist/target__codecs.mjs +4 -2
  167. package/dist/target__contract-free.d.mts +1 -1
  168. package/dist/target__contract-free.mjs +2 -2
  169. package/dist/target__control-tables.d.mts +1 -1
  170. package/dist/target__control-tables.mjs +1 -1
  171. package/dist/target__control.d.mts +3 -3
  172. package/dist/target__control.mjs +168 -72
  173. package/dist/target__control.mjs.map +1 -1
  174. package/dist/target__data-types.d.mts +2 -0
  175. package/dist/target__data-types.mjs +3 -0
  176. package/dist/target__ddl.d.mts +2 -2
  177. package/dist/target__ddl.mjs +1 -1
  178. package/dist/target__default-normalizer.d.mts +2 -2
  179. package/dist/target__default-normalizer.mjs +2 -2
  180. package/dist/target__migration.d.mts +3 -3
  181. package/dist/target__migration.mjs +3 -3
  182. package/dist/target__op-factory-call.d.mts +2 -2
  183. package/dist/target__op-factory-call.mjs +2 -2
  184. package/dist/target__pack.d.mts +1 -1
  185. package/dist/target__pack.mjs +1 -1
  186. package/dist/target__planner-produced-sqlite-migration.d.mts +2 -2
  187. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  188. package/dist/target__planner-target-details.d.mts +1 -1
  189. package/dist/target__planner-target-details.mjs +1 -1
  190. package/dist/target__planner.d.mts +1 -1
  191. package/dist/target__planner.mjs +1 -1
  192. package/dist/target__render-ops.d.mts +1 -1
  193. package/dist/target__render-ops.mjs +1 -1
  194. package/dist/target__runtime.d.mts +2 -2
  195. package/dist/target__runtime.mjs +3 -3
  196. package/dist/target__runtime.mjs.map +1 -1
  197. package/dist/target__sql-utils.d.mts +1 -1
  198. package/dist/target__sql-utils.mjs +1 -1
  199. package/dist/{types-C5FSREvo-CwUlKK34.d.mts → types-RJMd2PlL-BTGAJrBQ.d.mts} +5 -7
  200. package/dist/types-RJMd2PlL-BTGAJrBQ.d.mts.map +1 -0
  201. package/dist/types-y5JlAv97.d.mts +2 -0
  202. package/package.json +12 -12
  203. package/dist/adapter-CUTKlFpX-CW0J0Qs4.mjs.map +0 -1
  204. package/dist/adapter-D7zw14p5.d.mts +0 -2
  205. package/dist/adapter-DEYUC-KO-DO_abhIq.d.mts.map +0 -1
  206. package/dist/aggregates-BGuKJwfI.d.mts +0 -10
  207. package/dist/aggregates-BGuKJwfI.d.mts.map +0 -1
  208. package/dist/aggregates-DWyPO7t6.mjs.map +0 -1
  209. package/dist/codec-descriptor-B9ru99aI-DTkdKFU5.mjs.map +0 -1
  210. package/dist/codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts +0 -31
  211. package/dist/codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts.map +0 -1
  212. package/dist/codec-descriptor-rFuZ9DzY-CKRIRxah.d.mts +0 -1
  213. package/dist/codec-descriptor-vwfD3BMy.d.mts +0 -2
  214. package/dist/codec-ids-7WqtUuda.d.mts +0 -1
  215. package/dist/codec-ids-CzeDyMWW-BZAcI50I.d.mts.map +0 -1
  216. package/dist/codec-ids-KMliSCRp-BhTbmbGr.mjs.map +0 -1
  217. package/dist/codec-types-B-TDcvQc.d.mts +0 -1
  218. package/dist/codec-types-CS0bD1kX.d.mts +0 -2
  219. package/dist/codec-types-D7uWRvQ1-DPnvquS8.d.mts.map +0 -1
  220. package/dist/codecs-BDdR6FbY.mjs +0 -504
  221. package/dist/codecs-BDdR6FbY.mjs.map +0 -1
  222. package/dist/codecs-BQWqLgCl-CdB8t7HI.d.mts.map +0 -1
  223. package/dist/codecs-BTv6fRXv.d.mts +0 -1
  224. package/dist/column-types-NVxgsjFA.mjs +0 -34
  225. package/dist/column-types-NVxgsjFA.mjs.map +0 -1
  226. package/dist/column-types-iWGuW-0W.d.mts +0 -33
  227. package/dist/column-types-iWGuW-0W.d.mts.map +0 -1
  228. package/dist/contract-free-CCLAXZV2.d.mts.map +0 -1
  229. package/dist/contract-free-D5cZrgNl.mjs.map +0 -1
  230. package/dist/control--wMueaTg.d.mts.map +0 -1
  231. package/dist/control-B16T9OoX.mjs.map +0 -1
  232. package/dist/control-CLirKz11.d.mts.map +0 -1
  233. package/dist/control-D9vMRRgU.d.mts.map +0 -1
  234. package/dist/control-tables-D_o8dKRB-BXi43noL.mjs.map +0 -1
  235. package/dist/control-tables-Dua-YcJL.d.mts.map +0 -1
  236. package/dist/ddl-CXduXyOT-nlDP6DGx.mjs.map +0 -1
  237. package/dist/ddl-CfSqNT0M.d.mts +0 -1
  238. package/dist/default-normalizer-B9V7TY5u.d.mts +0 -7
  239. package/dist/default-normalizer-B9V7TY5u.d.mts.map +0 -1
  240. package/dist/default-normalizer-DuoHj9-O-DsK7lJZn.mjs +0 -69
  241. package/dist/default-normalizer-DuoHj9-O-DsK7lJZn.mjs.map +0 -1
  242. package/dist/descriptor-meta-DjKgG4z5-D_0obUB8.mjs +0 -34
  243. package/dist/descriptor-meta-DjKgG4z5-D_0obUB8.mjs.map +0 -1
  244. package/dist/descriptor-meta-nORSZfmr-Cw-pzAJr.mjs +0 -33
  245. package/dist/descriptor-meta-nORSZfmr-Cw-pzAJr.mjs.map +0 -1
  246. package/dist/descriptor-meta-runtime-BkXK3OjD-CxZdKHCw.mjs +0 -13
  247. package/dist/descriptor-meta-runtime-BkXK3OjD-CxZdKHCw.mjs.map +0 -1
  248. package/dist/descriptor-meta-vjJkUDsn-Hz3rnAnk.mjs.map +0 -1
  249. package/dist/errors-DnR-sMHS-KkMLIP2U.mjs.map +0 -1
  250. package/dist/migration-DOKPHtxn.mjs.map +0 -1
  251. package/dist/migration-uylRe5MP.d.mts.map +0 -1
  252. package/dist/native-type-normalizer-CO2wKGL6.d.mts +0 -12
  253. package/dist/native-type-normalizer-CO2wKGL6.d.mts.map +0 -1
  254. package/dist/native-type-normalizer-GpQMEyN5.mjs +0 -14
  255. package/dist/native-type-normalizer-GpQMEyN5.mjs.map +0 -1
  256. package/dist/nodes-D8EC1yCx-rpfpuJ4T.d.mts.map +0 -1
  257. package/dist/nodes-DUZSdX86-BBEEaxXY.mjs.map +0 -1
  258. package/dist/op-factory-call-DoHN7Q7L.d.mts.map +0 -1
  259. package/dist/op-factory-call-gc26GqyA-Db5Fasef.mjs +0 -829
  260. package/dist/op-factory-call-gc26GqyA-Db5Fasef.mjs.map +0 -1
  261. package/dist/pack-DIbefoZF.d.mts +0 -102
  262. package/dist/pack-DIbefoZF.d.mts.map +0 -1
  263. package/dist/planner-Bxdi7jZF.d.mts.map +0 -1
  264. package/dist/planner-Cqjr2usR-4wg3FB78.mjs +0 -824
  265. package/dist/planner-Cqjr2usR-4wg3FB78.mjs.map +0 -1
  266. package/dist/planner-produced-sqlite-migration-BuJysRxx-CaDUbNVx.d.mts.map +0 -1
  267. package/dist/planner-produced-sqlite-migration-C9uVDKrJ-CWbxSANn.mjs.map +0 -1
  268. package/dist/planner-produced-sqlite-migration-uySoqJO-.d.mts +0 -1
  269. package/dist/planner-target-details-CIQ789Gc-C5U4yVY9.mjs.map +0 -1
  270. package/dist/planner-target-details-xR6UfIcz-CMahymzq.d.mts.map +0 -1
  271. package/dist/render-ops-B10yqmdG.d.mts.map +0 -1
  272. package/dist/render-ops-KxAmAz6d-W2xyvA5y.mjs +0 -27
  273. package/dist/render-ops-KxAmAz6d-W2xyvA5y.mjs.map +0 -1
  274. package/dist/runtime-B1coahKC.d.mts.map +0 -1
  275. package/dist/runtime-B99c4n56.d.mts.map +0 -1
  276. package/dist/runtime-C5J9fusd.d.mts.map +0 -1
  277. package/dist/shared-BYAX0FaQ--VvRXVRC.d.mts.map +0 -1
  278. package/dist/sql-renderer-KX6hn_tg.d.mts +0 -1
  279. package/dist/sql-utils-0SJZOd7Q.d.mts.map +0 -1
  280. package/dist/sql-utils-C2O4zVkP-Dz3Hb85I.mjs.map +0 -1
  281. package/dist/sqlite-contract-view-BYR10usg-BteDAUZr.mjs.map +0 -1
  282. package/dist/sqlite-contract-view-BpNMaU2m-COMDaGaq.d.mts.map +0 -1
  283. package/dist/sqlite-migration-CjMkH4Id-c6dM9w61.mjs +0 -94
  284. package/dist/sqlite-migration-CjMkH4Id-c6dM9w61.mjs.map +0 -1
  285. package/dist/sqlite-migration-o23JHwzY-CwNJcqwl.d.mts.map +0 -1
  286. package/dist/target__native-type-normalizer.d.mts +0 -2
  287. package/dist/target__native-type-normalizer.mjs +0 -2
  288. package/dist/types-B7e2QVEx.d.mts +0 -1
  289. package/dist/types-C5FSREvo-CwUlKK34.d.mts.map +0 -1
@@ -1,261 +1,26 @@
1
- import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-KMliSCRp-BhTbmbGr.mjs";
2
- import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-C2O4zVkP-Dz3Hb85I.mjs";
3
- import { t as parseSqliteDefault } from "./default-normalizer-DuoHj9-O-DsK7lJZn.mjs";
4
- import { t as normalizeSqliteNativeType } from "./native-type-normalizer-GpQMEyN5.mjs";
5
- import { a as createSqliteBuiltinCodecLookup, n as assembleSqliteCodecRegistry, o as createSqliteCodecRegistryWithBuiltins, t as SqliteControlAdapter } from "./adapter-CUTKlFpX-CW0J0Qs4.mjs";
6
- import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DjKgG4z5-D_0obUB8.mjs";
7
- import { timestampNowControlDescriptor } from "@prisma/orm-family-sql/family/control";
8
- import { builtinGeneratorRegistryMetadata } from "@prisma/orm-framework/ids";
9
- import { int, num, oneOf, optional, str } from "@prisma/orm-framework/psl-parser";
10
- //#region ../../../3-targets/6-adapters/sqlite/dist/control.mjs
11
- function invalidArgumentDiagnostic(input) {
12
- return {
13
- ok: false,
14
- diagnostic: {
15
- code: "PSL_INVALID_DEFAULT_FUNCTION_ARGUMENT",
16
- message: input.message,
17
- sourceId: input.context.sourceId,
18
- span: input.span
19
- }
20
- };
21
- }
22
- function executionGenerator(id, params) {
23
- return {
24
- ok: true,
25
- value: {
26
- kind: "execution",
27
- generated: {
28
- kind: "generator",
29
- id,
30
- ...params ? { params } : {}
31
- }
32
- }
33
- };
34
- }
35
- /**
36
- * SQLite spellings that all denote the same wall-clock-now value. Anything
37
- * matching this set when passed through `dbgenerated("...")` is rewritten
38
- * to the canonical `now()` form before entering the contract — symmetric
39
- * with `parseSqliteDefault` on the introspection side, so the verifier
40
- * compares canonical-vs-canonical and a contract using
41
- * `dbgenerated("CURRENT_TIMESTAMP")` doesn't drift against the schema it
42
- * just produced.
43
- */
44
- const NOW_SYNONYMS = /* @__PURE__ */ new Set([
45
- "current_timestamp",
46
- "datetime('now')",
47
- "datetime(\"now\")",
48
- "now()"
49
- ]);
50
- function lowerAutoincrement() {
51
- return {
52
- ok: true,
53
- value: {
54
- kind: "storage",
55
- defaultValue: {
56
- kind: "function",
57
- expression: "autoincrement()"
58
- }
59
- }
60
- };
61
- }
62
- function lowerNow() {
63
- return {
64
- ok: true,
65
- value: {
66
- kind: "storage",
67
- defaultValue: {
68
- kind: "function",
69
- expression: "now()"
70
- }
71
- }
72
- };
73
- }
74
- function lowerUlid() {
75
- return executionGenerator("ulid");
76
- }
77
- function lowerUuid(input) {
78
- return input.call.args["version"] === 7 ? executionGenerator("uuidv7") : executionGenerator("uuidv4");
79
- }
80
- function lowerCuid() {
81
- return executionGenerator("cuid2");
82
- }
83
- function lowerNanoid(input) {
84
- const size = input.call.args["size"];
85
- return typeof size === "number" ? executionGenerator("nanoid", { size }) : executionGenerator("nanoid");
86
- }
87
- function lowerDbgenerated(input) {
88
- const raw = input.call.args["expression"];
89
- if (typeof raw !== "string" || raw.trim().length === 0) return invalidArgumentDiagnostic({
90
- context: input.context,
91
- span: input.call.span,
92
- message: "Default function \"dbgenerated\" argument cannot be empty."
93
- });
94
- const trimmed = raw.trim();
95
- return {
96
- ok: true,
97
- value: {
98
- kind: "storage",
99
- defaultValue: {
100
- kind: "function",
101
- expression: NOW_SYNONYMS.has(trimmed.toLowerCase()) ? "now()" : trimmed
102
- }
103
- }
104
- };
105
- }
106
- const nowSig = {};
107
- const autoincrementSig = {};
108
- const ulidSig = {};
109
- const uuidSig = { positional: [{
110
- key: "version",
111
- type: optional(oneOf(num(4), num(7)))
112
- }] };
113
- const cuidSig = { positional: [{
114
- key: "version",
115
- type: num(2)
116
- }] };
117
- const nanoidSig = { positional: [{
118
- key: "size",
119
- type: optional(int({
120
- min: 2,
121
- max: 255
122
- }))
123
- }] };
124
- const dbgeneratedSig = { positional: [{
125
- key: "expression",
126
- type: str()
127
- }] };
128
- const sqliteDefaultFunctionRegistryEntries = [
129
- ["autoincrement", {
130
- signature: autoincrementSig,
131
- lower: lowerAutoincrement,
132
- usageSignatures: ["autoincrement()"]
133
- }],
134
- ["now", {
135
- signature: nowSig,
136
- lower: lowerNow,
137
- usageSignatures: ["now()"]
138
- }],
139
- ["uuid", {
140
- signature: uuidSig,
141
- lower: lowerUuid,
142
- usageSignatures: [
143
- "uuid()",
144
- "uuid(4)",
145
- "uuid(7)"
146
- ]
147
- }],
148
- ["cuid", {
149
- signature: cuidSig,
150
- lower: lowerCuid,
151
- usageSignatures: ["cuid(2)"]
152
- }],
153
- ["ulid", {
154
- signature: ulidSig,
155
- lower: lowerUlid,
156
- usageSignatures: ["ulid()"]
157
- }],
158
- ["nanoid", {
159
- signature: nanoidSig,
160
- lower: lowerNanoid,
161
- usageSignatures: ["nanoid()", "nanoid(<2-255>)"]
162
- }],
163
- ["dbgenerated", {
164
- signature: dbgeneratedSig,
165
- lower: lowerDbgenerated,
166
- usageSignatures: ["dbgenerated(\"...\")"]
167
- }]
168
- ];
169
- /**
170
- * The base PSL scalars as zero-arg type constructors in the unified authoring
171
- * channel, with explicit `nativeType` values pinned to the codec manifests
172
- * (`codecLookup.targetTypesFor(codecId)[0]`).
173
- *
174
- * The type position is the only storage decider: a mutation-default generator
175
- * (`@default(uuid())`) never re-picks a column's storage.
176
- */
177
- const sqliteScalarAuthoringTypes = {
178
- String: {
179
- kind: "typeConstructor",
180
- output: {
181
- codecId: SQLITE_TEXT_CODEC_ID,
182
- nativeType: "text"
183
- }
184
- },
185
- Int: {
186
- kind: "typeConstructor",
187
- output: {
188
- codecId: SQLITE_INTEGER_CODEC_ID,
189
- nativeType: "integer"
190
- }
191
- },
192
- BigInt: {
193
- kind: "typeConstructor",
194
- output: {
195
- codecId: SQLITE_BIGINT_CODEC_ID,
196
- nativeType: "integer"
197
- }
198
- },
199
- Float: {
200
- kind: "typeConstructor",
201
- output: {
202
- codecId: SQLITE_REAL_CODEC_ID,
203
- nativeType: "real"
204
- }
205
- },
206
- Decimal: {
207
- kind: "typeConstructor",
208
- output: {
209
- codecId: SQLITE_TEXT_CODEC_ID,
210
- nativeType: "text"
211
- }
212
- },
213
- DateTime: {
214
- kind: "typeConstructor",
215
- output: {
216
- codecId: SQLITE_DATETIME_CODEC_ID,
217
- nativeType: "text"
218
- }
219
- },
220
- Json: {
221
- kind: "typeConstructor",
222
- output: {
223
- codecId: SQLITE_JSON_CODEC_ID,
224
- nativeType: "text"
225
- }
226
- },
227
- Bytes: {
228
- kind: "typeConstructor",
229
- output: {
230
- codecId: SQLITE_BLOB_CODEC_ID,
231
- nativeType: "blob"
232
- }
233
- }
234
- };
1
+ import { n as createSqliteBuiltinCodecLookup, r as createSqliteCodecRegistryWithBuiltins, t as assembleSqliteCodecRegistry } from "./codecs-g-YI3BtK.mjs";
2
+ import { n as escapeLiteral, r as quoteIdentifier } from "./sql-utils-XGT5Esi2-Zr2mqJf8.mjs";
3
+ import { t as readSqliteDefault } from "./default-normalizer-DGMXypHg-CPf7oyZA.mjs";
4
+ import { t as SqliteControlAdapter } from "./adapter-7m8HU4rt-DN15_Cn8.mjs";
5
+ import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DrNwC4vO-D7vuA6QK.mjs";
6
+ import { sqlDefaultFunctions } from "@prisma/orm-family-sql/family/control";
7
+ //#region ../../../3-targets/sqlite/2-adapter/dist/control.mjs
8
+ const sqliteDefaultFunctionRegistryEntries = Object.entries(sqlDefaultFunctions());
235
9
  function createSqliteDefaultFunctionRegistry() {
236
10
  return new Map(sqliteDefaultFunctionRegistryEntries);
237
11
  }
238
- function createSqliteMutationDefaultGeneratorDescriptors() {
239
- return [...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({
240
- id,
241
- applicableCodecIds
242
- })), timestampNowControlDescriptor()];
243
- }
244
12
  const sqliteAdapterDescriptor = {
245
13
  ...sqliteAdapterDescriptorMeta,
246
- authoring: {
247
- type: sqliteScalarAuthoringTypes,
248
- valueObjectStorageType: "Json"
249
- },
14
+ authoring: { valueObjectStorageType: "Json" },
250
15
  controlMutationDefaults: {
251
16
  defaultFunctionRegistry: createSqliteDefaultFunctionRegistry(),
252
- generatorDescriptors: createSqliteMutationDefaultGeneratorDescriptors()
17
+ generatorDescriptors: []
253
18
  },
254
19
  create(stack) {
255
- return new SqliteControlAdapter(assembleSqliteCodecRegistry(stack.target, stack.extensions));
20
+ return new SqliteControlAdapter(assembleSqliteCodecRegistry(stack.target, stack.extensions), stack.declaredDataTypes.map(({ type }) => type));
256
21
  }
257
22
  };
258
23
  //#endregion
259
- export { SqliteControlAdapter, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, sqliteAdapterDescriptor as default, escapeLiteral, normalizeSqliteNativeType, parseSqliteDefault, quoteIdentifier };
24
+ export { SqliteControlAdapter, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, sqliteAdapterDescriptor as default, escapeLiteral, quoteIdentifier, readSqliteDefault };
260
25
 
261
26
  //# sourceMappingURL=adapter__control.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/control.mjs"],"sourcesContent":["import { a as SqliteControlAdapter, c as createSqliteCodecRegistryWithBuiltins, o as assembleSqliteCodecRegistry, s as createSqliteBuiltinCodecLookup } from \"./adapter-CUTKlFpX.mjs\";\nimport { t as sqliteAdapterDescriptorMeta } from \"./descriptor-meta-DjKgG4z5.mjs\";\nimport { escapeLiteral, quoteIdentifier } from \"@internal/target-sqlite/sql-utils\";\nimport { parseSqliteDefault } from \"@internal/target-sqlite/default-normalizer\";\nimport { normalizeSqliteNativeType } from \"@internal/target-sqlite/native-type-normalizer\";\nimport { SQLITE_BIGINT_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID } from \"@internal/target-sqlite/codec-ids\";\nimport { timestampNowControlDescriptor } from \"@internal/family-sql/control\";\nimport { builtinGeneratorRegistryMetadata } from \"@internal/ids\";\nimport { int, num, oneOf, optional, str } from \"@internal/psl-parser\";\n//#region src/core/control-mutation-defaults.ts\nfunction invalidArgumentDiagnostic(input) {\n\treturn {\n\t\tok: false,\n\t\tdiagnostic: {\n\t\t\tcode: \"PSL_INVALID_DEFAULT_FUNCTION_ARGUMENT\",\n\t\t\tmessage: input.message,\n\t\t\tsourceId: input.context.sourceId,\n\t\t\tspan: input.span\n\t\t}\n\t};\n}\nfunction executionGenerator(id, params) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"execution\",\n\t\t\tgenerated: {\n\t\t\t\tkind: \"generator\",\n\t\t\t\tid,\n\t\t\t\t...params ? { params } : {}\n\t\t\t}\n\t\t}\n\t};\n}\n/**\n* SQLite spellings that all denote the same wall-clock-now value. Anything\n* matching this set when passed through `dbgenerated(\"...\")` is rewritten\n* to the canonical `now()` form before entering the contract — symmetric\n* with `parseSqliteDefault` on the introspection side, so the verifier\n* compares canonical-vs-canonical and a contract using\n* `dbgenerated(\"CURRENT_TIMESTAMP\")` doesn't drift against the schema it\n* just produced.\n*/\nconst NOW_SYNONYMS = /* @__PURE__ */ new Set([\n\t\"current_timestamp\",\n\t\"datetime('now')\",\n\t\"datetime(\\\"now\\\")\",\n\t\"now()\"\n]);\nfunction lowerAutoincrement() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"autoincrement()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerNow() {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: \"now()\"\n\t\t\t}\n\t\t}\n\t};\n}\nfunction lowerUlid() {\n\treturn executionGenerator(\"ulid\");\n}\nfunction lowerUuid(input) {\n\treturn input.call.args[\"version\"] === 7 ? executionGenerator(\"uuidv7\") : executionGenerator(\"uuidv4\");\n}\nfunction lowerCuid() {\n\treturn executionGenerator(\"cuid2\");\n}\nfunction lowerNanoid(input) {\n\tconst size = input.call.args[\"size\"];\n\treturn typeof size === \"number\" ? executionGenerator(\"nanoid\", { size }) : executionGenerator(\"nanoid\");\n}\nfunction lowerDbgenerated(input) {\n\tconst raw = input.call.args[\"expression\"];\n\tif (typeof raw !== \"string\" || raw.trim().length === 0) return invalidArgumentDiagnostic({\n\t\tcontext: input.context,\n\t\tspan: input.call.span,\n\t\tmessage: \"Default function \\\"dbgenerated\\\" argument cannot be empty.\"\n\t});\n\tconst trimmed = raw.trim();\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression: NOW_SYNONYMS.has(trimmed.toLowerCase()) ? \"now()\" : trimmed\n\t\t\t}\n\t\t}\n\t};\n}\nconst nowSig = {};\nconst autoincrementSig = {};\nconst ulidSig = {};\nconst uuidSig = { positional: [{\n\tkey: \"version\",\n\ttype: optional(oneOf(num(4), num(7)))\n}] };\nconst cuidSig = { positional: [{\n\tkey: \"version\",\n\ttype: num(2)\n}] };\nconst nanoidSig = { positional: [{\n\tkey: \"size\",\n\ttype: optional(int({\n\t\tmin: 2,\n\t\tmax: 255\n\t}))\n}] };\nconst dbgeneratedSig = { positional: [{\n\tkey: \"expression\",\n\ttype: str()\n}] };\nconst sqliteDefaultFunctionRegistryEntries = [\n\t[\"autoincrement\", {\n\t\tsignature: autoincrementSig,\n\t\tlower: lowerAutoincrement,\n\t\tusageSignatures: [\"autoincrement()\"]\n\t}],\n\t[\"now\", {\n\t\tsignature: nowSig,\n\t\tlower: lowerNow,\n\t\tusageSignatures: [\"now()\"]\n\t}],\n\t[\"uuid\", {\n\t\tsignature: uuidSig,\n\t\tlower: lowerUuid,\n\t\tusageSignatures: [\n\t\t\t\"uuid()\",\n\t\t\t\"uuid(4)\",\n\t\t\t\"uuid(7)\"\n\t\t]\n\t}],\n\t[\"cuid\", {\n\t\tsignature: cuidSig,\n\t\tlower: lowerCuid,\n\t\tusageSignatures: [\"cuid(2)\"]\n\t}],\n\t[\"ulid\", {\n\t\tsignature: ulidSig,\n\t\tlower: lowerUlid,\n\t\tusageSignatures: [\"ulid()\"]\n\t}],\n\t[\"nanoid\", {\n\t\tsignature: nanoidSig,\n\t\tlower: lowerNanoid,\n\t\tusageSignatures: [\"nanoid()\", \"nanoid(<2-255>)\"]\n\t}],\n\t[\"dbgenerated\", {\n\t\tsignature: dbgeneratedSig,\n\t\tlower: lowerDbgenerated,\n\t\tusageSignatures: [\"dbgenerated(\\\"...\\\")\"]\n\t}]\n];\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel, with explicit `nativeType` values pinned to the codec manifests\n* (`codecLookup.targetTypesFor(codecId)[0]`).\n*\n* The type position is the only storage decider: a mutation-default generator\n* (`@default(uuid())`) never re-picks a column's storage.\n*/\nconst sqliteScalarAuthoringTypes = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_TEXT_CODEC_ID,\n\t\t\tnativeType: \"text\"\n\t\t}\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_INTEGER_CODEC_ID,\n\t\t\tnativeType: \"integer\"\n\t\t}\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\tnativeType: \"integer\"\n\t\t}\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\t\tnativeType: \"real\"\n\t\t}\n\t},\n\tDecimal: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_TEXT_CODEC_ID,\n\t\t\tnativeType: \"text\"\n\t\t}\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\tnativeType: \"text\"\n\t\t}\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_JSON_CODEC_ID,\n\t\t\tnativeType: \"text\"\n\t\t}\n\t},\n\tBytes: {\n\t\tkind: \"typeConstructor\",\n\t\toutput: {\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\tnativeType: \"blob\"\n\t\t}\n\t}\n};\nfunction createSqliteDefaultFunctionRegistry() {\n\treturn new Map(sqliteDefaultFunctionRegistryEntries);\n}\nfunction createSqliteMutationDefaultGeneratorDescriptors() {\n\treturn [...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({\n\t\tid,\n\t\tapplicableCodecIds\n\t})), timestampNowControlDescriptor()];\n}\n//#endregion\n//#region src/exports/control.ts\nconst sqliteAdapterDescriptor = {\n\t...sqliteAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: sqliteScalarAuthoringTypes,\n\t\tvalueObjectStorageType: \"Json\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createSqliteDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: createSqliteMutationDefaultGeneratorDescriptors()\n\t},\n\tcreate(stack) {\n\t\treturn new SqliteControlAdapter(assembleSqliteCodecRegistry(stack.target, stack.extensions));\n\t}\n};\n//#endregion\nexport { SqliteControlAdapter, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, sqliteAdapterDescriptor as default, escapeLiteral, normalizeSqliteNativeType, parseSqliteDefault, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":"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"}
1
+ {"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/sqlite/2-adapter/dist/control.mjs"],"sourcesContent":["import { a as SqliteControlAdapter } from \"./adapter-7m8HU4rt.mjs\";\nimport { t as sqliteAdapterDescriptorMeta } from \"./descriptor-meta-DrNwC4vO.mjs\";\nimport { assembleSqliteCodecRegistry, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins } from \"@internal/target-sqlite/codecs\";\nimport { escapeLiteral, quoteIdentifier } from \"@internal/target-sqlite/sql-utils\";\nimport { sqlDefaultFunctions } from \"@internal/family-sql/control\";\nimport { readSqliteDefault } from \"@internal/target-sqlite/default-normalizer\";\n//#region src/core/migrations/control-mutation-defaults.ts\nconst sqliteDefaultFunctionRegistryEntries = Object.entries(sqlDefaultFunctions());\nfunction createSqliteDefaultFunctionRegistry() {\n\treturn new Map(sqliteDefaultFunctionRegistryEntries);\n}\n//#endregion\n//#region src/exports/control.ts\nconst sqliteAdapterDescriptor = {\n\t...sqliteAdapterDescriptorMeta,\n\tauthoring: { valueObjectStorageType: \"Json\" },\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createSqliteDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: []\n\t},\n\tcreate(stack) {\n\t\treturn new SqliteControlAdapter(assembleSqliteCodecRegistry(stack.target, stack.extensions), stack.declaredDataTypes.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { SqliteControlAdapter, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, sqliteAdapterDescriptor as default, escapeLiteral, quoteIdentifier, readSqliteDefault };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,uCAAuC,OAAO,QAAQ,oBAAoB,CAAC;AACjF,SAAS,sCAAsC;CAC9C,OAAO,IAAI,IAAI,oCAAoC;AACpD;AAGA,MAAM,0BAA0B;CAC/B,GAAG;CACH,WAAW,EAAE,wBAAwB,OAAO;CAC5C,yBAAyB;EACxB,yBAAyB,oCAAoC;EAC7D,sBAAsB,CAAC;CACxB;CACA,OAAO,OAAO;EACb,OAAO,IAAI,qBAAqB,4BAA4B,MAAM,QAAQ,MAAM,UAAU,GAAG,MAAM,kBAAkB,KAAK,EAAE,WAAW,IAAI,CAAC;CAC7I;AACD"}
@@ -1,2 +1,2 @@
1
- import { n as sqliteRuntimeAdapterDescriptor, t as SqliteRuntimeAdapterInstance } from "./runtime-C5J9fusd.mjs";
1
+ import { n as sqliteRuntimeAdapterDescriptor, t as SqliteRuntimeAdapterInstance } from "./runtime-YfPIbtO6.mjs";
2
2
  export { type SqliteRuntimeAdapterInstance, sqliteRuntimeAdapterDescriptor as default };
@@ -1,10 +1,11 @@
1
- import { a as sqliteCodecDescriptorRegistry } from "./codecs-BDdR6FbY.mjs";
2
- import { c as sqliteRawCodecInferer, i as createSqliteAdapterWithCodecRegistry, n as assembleSqliteCodecRegistry } from "./adapter-CUTKlFpX-CW0J0Qs4.mjs";
3
- import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DjKgG4z5-D_0obUB8.mjs";
4
- import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
1
+ import { i as sqliteCodecDescriptorRegistry, t as assembleSqliteCodecRegistry } from "./codecs-g-YI3BtK.mjs";
2
+ import { a as sqliteRawCodecInferer, r as createSqliteAdapterWithCodecRegistry } from "./adapter-7m8HU4rt-DN15_Cn8.mjs";
3
+ import { t as sqliteAdapterDescriptorMeta } from "./descriptor-meta-DrNwC4vO-D7vuA6QK.mjs";
4
+ import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
5
5
  import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
6
+ import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
6
7
  import { generateId } from "@prisma/orm-framework/ids/runtime";
7
- //#region ../../../3-targets/6-adapters/sqlite/dist/runtime.mjs
8
+ //#region ../../../3-targets/sqlite/2-adapter/dist/runtime.mjs
8
9
  function createSqliteMutationDefaultGenerators() {
9
10
  return [...builtinGeneratorIds.map((id) => ({
10
11
  id,
@@ -23,7 +24,11 @@ const sqliteRuntimeAdapterDescriptor = {
23
24
  mutationDefaultGenerators: createSqliteMutationDefaultGenerators,
24
25
  rawCodecInferer: sqliteRawCodecInferer,
25
26
  create(stack) {
26
- return createSqliteAdapterWithCodecRegistry(assembleSqliteCodecRegistry(stack.target, stack.extensions));
27
+ return createSqliteAdapterWithCodecRegistry(assembleSqliteCodecRegistry(stack.target, stack.extensions), assembleDataTypes([
28
+ stack.target,
29
+ stack.adapter,
30
+ ...stack.extensions
31
+ ]).declared.map(({ type }) => type));
27
32
  }
28
33
  };
29
34
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/runtime.mjs"],"sourcesContent":["import { i as sqliteRawCodecInferer, n as createSqliteAdapterWithCodecRegistry, o as assembleSqliteCodecRegistry } from \"./adapter-CUTKlFpX.mjs\";\nimport { t as sqliteAdapterDescriptorMeta } from \"./descriptor-meta-DjKgG4z5.mjs\";\nimport { sqliteCodecDescriptorRegistry } from \"@internal/target-sqlite/codecs\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { generateId } from \"@internal/ids/runtime\";\n//#region src/core/runtime-adapter.ts\nfunction createSqliteMutationDefaultGenerators() {\n\treturn [...builtinGeneratorIds.map((id) => ({\n\t\tid,\n\t\tgenerate: (params) => {\n\t\t\treturn generateId(params ? {\n\t\t\t\tid,\n\t\t\t\tparams\n\t\t\t} : { id });\n\t\t},\n\t\tstability: \"field\"\n\t})), timestampNowRuntimeGenerator()];\n}\nconst sqliteRuntimeAdapterDescriptor = {\n\t...sqliteAdapterDescriptorMeta,\n\tcodecs: () => Array.from(sqliteCodecDescriptorRegistry.values()),\n\tmutationDefaultGenerators: createSqliteMutationDefaultGenerators,\n\trawCodecInferer: sqliteRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createSqliteAdapterWithCodecRegistry(assembleSqliteCodecRegistry(stack.target, stack.extensions));\n\t}\n};\n//#endregion\nexport { sqliteRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,wCAAwC;CAChD,OAAO,CAAC,GAAG,oBAAoB,KAAK,QAAQ;EAC3C;EACA,WAAW,WAAW;GACrB,OAAO,WAAW,SAAS;IAC1B;IACA;GACD,IAAI,EAAE,GAAG,CAAC;EACX;EACA,WAAW;CACZ,EAAE,GAAG,6BAA6B,CAAC;AACpC;AACA,MAAM,iCAAiC;CACtC,GAAG;CACH,cAAc,MAAM,KAAK,8BAA8B,OAAO,CAAC;CAC/D,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,qCAAqC,4BAA4B,MAAM,QAAQ,MAAM,UAAU,CAAC;CACxG;AACD"}
1
+ {"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/sqlite/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { i as sqliteRawCodecInferer, n as createSqliteAdapterWithCodecRegistry } from \"./adapter-7m8HU4rt.mjs\";\nimport { t as sqliteAdapterDescriptorMeta } from \"./descriptor-meta-DrNwC4vO.mjs\";\nimport { assembleSqliteCodecRegistry, sqliteCodecDescriptorRegistry } from \"@internal/target-sqlite/codecs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { generateId } from \"@internal/ids/runtime\";\n//#region src/core/runtime/runtime-adapter.ts\nfunction createSqliteMutationDefaultGenerators() {\n\treturn [...builtinGeneratorIds.map((id) => ({\n\t\tid,\n\t\tgenerate: (params) => {\n\t\t\treturn generateId(params ? {\n\t\t\t\tid,\n\t\t\t\tparams\n\t\t\t} : { id });\n\t\t},\n\t\tstability: \"field\"\n\t})), timestampNowRuntimeGenerator()];\n}\nconst sqliteRuntimeAdapterDescriptor = {\n\t...sqliteAdapterDescriptorMeta,\n\tcodecs: () => Array.from(sqliteCodecDescriptorRegistry.values()),\n\tmutationDefaultGenerators: createSqliteMutationDefaultGenerators,\n\trawCodecInferer: sqliteRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createSqliteAdapterWithCodecRegistry(assembleSqliteCodecRegistry(stack.target, stack.extensions), assembleDataTypes([\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t]).declared.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { sqliteRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,wCAAwC;CAChD,OAAO,CAAC,GAAG,oBAAoB,KAAK,QAAQ;EAC3C;EACA,WAAW,WAAW;GACrB,OAAO,WAAW,SAAS;IAC1B;IACA;GACD,IAAI,EAAE,GAAG,CAAC;EACX;EACA,WAAW;CACZ,EAAE,GAAG,6BAA6B,CAAC;AACpC;AACA,MAAM,iCAAiC;CACtC,GAAG;CACH,cAAc,MAAM,KAAK,8BAA8B,OAAO,CAAC;CAC/D,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,qCAAqC,4BAA4B,MAAM,QAAQ,MAAM,UAAU,GAAG,kBAAkB;GAC1H,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,WAAW,IAAI,CAAC;CACpC;AACD"}
@@ -1,3 +1,3 @@
1
- import { r as renderLoweredSql } from "./adapter-DEYUC-KO-DO_abhIq.mjs";
2
- import "./sql-renderer-KX6hn_tg.mjs";
1
+ import { r as renderLoweredSql } from "./adapter-xFPDhkod-BsdLsy9N.mjs";
2
+ import "./sql-renderer-brQ96quu.mjs";
3
3
  export { renderLoweredSql };
@@ -1,2 +1,2 @@
1
- import { s as renderLoweredSql } from "./adapter-CUTKlFpX-CW0J0Qs4.mjs";
1
+ import { i as renderLoweredSql } from "./adapter-7m8HU4rt-DN15_Cn8.mjs";
2
2
  export { renderLoweredSql };
@@ -1,3 +1,4 @@
1
- import { i as SqliteLoweredStatement, n as SqliteCodecRegistry, r as SqliteContract, t as SqliteAdapterOptions } from "./types-C5FSREvo-CwUlKK34.mjs";
2
- import "./types-B7e2QVEx.mjs";
1
+ import { n as SqliteContract, r as SqliteLoweredStatement, t as SqliteAdapterOptions } from "./types-RJMd2PlL-BTGAJrBQ.mjs";
2
+ import { o as SqliteCodecRegistry } from "./codecs-BJYruC-a-BKDGae3k.mjs";
3
+ import "./types-y5JlAv97.mjs";
3
4
  export type { SqliteAdapterOptions, SqliteCodecRegistry, SqliteContract, SqliteLoweredStatement };
@@ -1,15 +1,7 @@
1
- import { a as SQLITE_INTEGER_CODEC_ID, d as SQL_INT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_FLOAT_CODEC_ID } from "./codec-ids-KMliSCRp-BhTbmbGr.mjs";
1
+ import { a as SQLITE_INTEGER_CODEC_ID, d as SQL_INT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_FLOAT_CODEC_ID } from "./codec-ids-wgEvkCkg-WltuexMR.mjs";
2
2
  import { AggregateExpr, CastExpr } from "@prisma/orm-family-sql/relational-core/ast";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
- //#region ../../../3-targets/3-targets/sqlite/dist/aggregates.mjs
5
- const overCodec = (codecId) => ({
6
- kind: "codec",
7
- codecId
8
- });
9
- const overTrait = (trait) => ({
10
- kind: "trait",
11
- trait
12
- });
4
+ //#region ../../../3-targets/sqlite/1-target/dist/aggregates.mjs
13
5
  /** An aggregate whose result is one of the input values, so it carries the input's codec. */
14
6
  const preservesInput = (operation, input) => ({
15
7
  operation,
@@ -74,9 +66,18 @@ const MIN_MAX_PRESERVING_CODECS = [
74
66
  SQLITE_BLOB_CODEC_ID
75
67
  ];
76
68
  const orderingDescriptors = (operation) => [
77
- preservesInput(operation, overTrait("numeric")),
78
- preservesInput(operation, overTrait("textual")),
79
- ...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, overCodec(codecId))),
69
+ preservesInput(operation, {
70
+ kind: "trait",
71
+ trait: "numeric"
72
+ }),
73
+ preservesInput(operation, {
74
+ kind: "trait",
75
+ trait: "textual"
76
+ }),
77
+ ...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, {
78
+ kind: "codec",
79
+ codecId
80
+ })),
80
81
  {
81
82
  operation,
82
83
  input: {
@@ -100,7 +101,7 @@ const sqliteAggregateDescriptors = [
100
101
  codecId: SQLITE_BIGINT_NUMBER_CODEC_ID
101
102
  },
102
103
  nullable: false,
103
- emptyResultJson: 0,
104
+ emptyResultWire: "0",
104
105
  lower: castResultToText("count")
105
106
  },
106
107
  {
@@ -111,17 +112,29 @@ const sqliteAggregateDescriptors = [
111
112
  codecId: SQLITE_BIGINT_CODEC_ID
112
113
  },
113
114
  nullable: false,
114
- emptyResultJson: "0",
115
+ emptyResultWire: "0",
115
116
  lower: castResultToText("count")
116
117
  },
117
- ...INTEGER_CODECS.map((codecId) => produces("sum", overCodec(codecId), SQLITE_BIGINT_NUMBER_CODEC_ID)),
118
- ...INTEGER_CODECS.map((codecId) => producesVia("sumBigInt", overCodec(codecId), SQLITE_BIGINT_CODEC_ID, castResultToText("sum"))),
119
- ...REAL_CODECS.map((codecId) => produces("sum", overCodec(codecId), SQLITE_REAL_CODEC_ID)),
120
- ...[...INTEGER_CODECS, ...REAL_CODECS].map((codecId) => produces("avg", overCodec(codecId), SQLITE_REAL_CODEC_ID)),
118
+ ...INTEGER_CODECS.map((codecId) => produces("sum", {
119
+ kind: "codec",
120
+ codecId
121
+ }, SQLITE_BIGINT_NUMBER_CODEC_ID)),
122
+ ...INTEGER_CODECS.map((codecId) => producesVia("sumBigInt", {
123
+ kind: "codec",
124
+ codecId
125
+ }, SQLITE_BIGINT_CODEC_ID, castResultToText("sum"))),
126
+ ...REAL_CODECS.map((codecId) => produces("sum", {
127
+ kind: "codec",
128
+ codecId
129
+ }, SQLITE_REAL_CODEC_ID)),
130
+ ...[...INTEGER_CODECS, ...REAL_CODECS].map((codecId) => produces("avg", {
131
+ kind: "codec",
132
+ codecId
133
+ }, SQLITE_REAL_CODEC_ID)),
121
134
  ...orderingDescriptors("min"),
122
135
  ...orderingDescriptors("max")
123
136
  ];
124
137
  //#endregion
125
138
  export { sqliteAggregateDescriptors as t };
126
139
 
127
- //# sourceMappingURL=aggregates-DWyPO7t6.mjs.map
140
+ //# sourceMappingURL=aggregates-D5fuFVMC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregates-D5fuFVMC.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/aggregates.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, d as SQL_INT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_FLOAT_CODEC_ID } from \"./codec-ids-wgEvkCkg.mjs\";\nimport { AggregateExpr, CastExpr } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/core/aggregates.ts\n/** An aggregate whose result is one of the input values, so it carries the input's codec. */\nconst preservesInput = (operation, input) => ({\n\toperation,\n\tinput,\n\toutput: { kind: \"self\" },\n\tnullable: true\n});\n/**\n* Render the aggregate as text.\n*\n* SQLite computes an aggregate into an INTEGER, and the driver reads an integer\n* no JS number can hold as an error rather than a value — so an aggregate whose\n* result is a wide integer leaves the database through this cast, which is the\n* form both integer codecs read anyway. The hook builds the expression and\n* nothing else: which codec the result carries is the descriptor's `output` to\n* declare, not this function's to choose.\n*\n* The `operation` it names is the SQL aggregate the row computes with — its own\n* name for a bare operation, its bare namesake's for a lossless variant, whose\n* name the database does not know.\n*/\nconst castResultToText = (operation) => ({ expr }) => CastExpr.as(new AggregateExpr(operation, expr), \"text\");\n/** The integer results wider than the driver's numeric reads: one read exactly, one read as a `number` and guarded against the safe range. Both leave the database as text. */\nconst WIDE_INTEGER_CODECS = [SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID];\n/** An aggregate whose result is a new value, named by codec and without the input's type parameters. */\nconst produces = (operation, input, codecId) => ({\n\toperation,\n\tinput,\n\toutput: {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t},\n\tnullable: true,\n\t...ifDefined(\"lower\", WIDE_INTEGER_CODECS.includes(codecId) ? castResultToText(operation) : void 0)\n});\n/** The same, for a lossless variant: an operation whose name the SQL alphabet does not carry, so its lowering names the aggregate it computes with. */\nconst producesVia = (operation, input, codecId, lower) => ({\n\toperation,\n\tinput,\n\toutput: {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t},\n\tnullable: true,\n\tlower\n});\n/** Codecs stored as SQLite integers. Their `sum` is an integer of up to 64 bits — past `sqlite/integer@1`'s range, and past the safe-integer range too, since a total of safe-range values is free to leave it. The bare form therefore guards and the lossless one carries. */\nconst INTEGER_CODECS = [\n\tSQLITE_INTEGER_CODEC_ID,\n\tSQLITE_BIGINT_CODEC_ID,\n\tSQLITE_BIGINT_NUMBER_CODEC_ID,\n\tSQL_INT_CODEC_ID\n];\n/** Codecs stored as SQLite reals. Their `sum` stays real. */\nconst REAL_CODECS = [SQLITE_REAL_CODEC_ID, SQL_FLOAT_CODEC_ID];\n/**\n* Codecs whose `min`/`max` returns the input value and whose traits do not already say so: SQLite compares blobs bytewise and text by its collation, so a datetime, a JSON document, and a blob each have a well-defined least and greatest — unlike the numeric and textual codecs, whose traits carry them.\n*/\nconst MIN_MAX_PRESERVING_CODECS = [\n\tSQLITE_DATETIME_CODEC_ID,\n\tSQLITE_JSON_CODEC_ID,\n\tSQLITE_BLOB_CODEC_ID\n];\nconst orderingDescriptors = (operation) => [\n\tpreservesInput(operation, {\n\t\tkind: \"trait\",\n\t\ttrait: \"numeric\"\n\t}),\n\tpreservesInput(operation, {\n\t\tkind: \"trait\",\n\t\ttrait: \"textual\"\n\t}),\n\t...MIN_MAX_PRESERVING_CODECS.map((codecId) => preservesInput(operation, {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t})),\n\t{\n\t\toperation,\n\t\tinput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID\n\t\t},\n\t\toutput: { kind: \"self\" },\n\t\tnullable: true,\n\t\tlower: castResultToText(operation)\n\t}\n];\n/**\n* Every aggregate overload the SQLite target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.\n*/\nconst sqliteAggregateDescriptors = [\n\t{\n\t\toperation: \"count\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: SQLITE_BIGINT_NUMBER_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultWire: \"0\",\n\t\tlower: castResultToText(\"count\")\n\t},\n\t{\n\t\toperation: \"countBigInt\",\n\t\tinput: { kind: \"any\" },\n\t\toutput: {\n\t\t\tkind: \"codec\",\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID\n\t\t},\n\t\tnullable: false,\n\t\temptyResultWire: \"0\",\n\t\tlower: castResultToText(\"count\")\n\t},\n\t...INTEGER_CODECS.map((codecId) => produces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, SQLITE_BIGINT_NUMBER_CODEC_ID)),\n\t...INTEGER_CODECS.map((codecId) => producesVia(\"sumBigInt\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, SQLITE_BIGINT_CODEC_ID, castResultToText(\"sum\"))),\n\t...REAL_CODECS.map((codecId) => produces(\"sum\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, SQLITE_REAL_CODEC_ID)),\n\t...[...INTEGER_CODECS, ...REAL_CODECS].map((codecId) => produces(\"avg\", {\n\t\tkind: \"codec\",\n\t\tcodecId\n\t}, SQLITE_REAL_CODEC_ID)),\n\t...orderingDescriptors(\"min\"),\n\t...orderingDescriptors(\"max\")\n];\n//#endregion\nexport { sqliteAggregateDescriptors };\n\n//# sourceMappingURL=aggregates.mjs.map"],"mappings":";;;;;AAKA,MAAM,kBAAkB,WAAW,WAAW;CAC7C;CACA;CACA,QAAQ,EAAE,MAAM,OAAO;CACvB,UAAU;AACX;;;;;;;;;;;;;;;AAeA,MAAM,oBAAoB,eAAe,EAAE,WAAW,SAAS,GAAG,IAAI,cAAc,WAAW,IAAI,GAAG,MAAM;;AAE5G,MAAM,sBAAsB,CAAC,wBAAwB,6BAA6B;;AAElF,MAAM,YAAY,WAAW,OAAO,aAAa;CAChD;CACA;CACA,QAAQ;EACP,MAAM;EACN;CACD;CACA,UAAU;CACV,GAAG,UAAU,SAAS,oBAAoB,SAAS,OAAO,IAAI,iBAAiB,SAAS,IAAI,KAAK,CAAC;AACnG;;AAEA,MAAM,eAAe,WAAW,OAAO,SAAS,WAAW;CAC1D;CACA;CACA,QAAQ;EACP,MAAM;EACN;CACD;CACA,UAAU;CACV;AACD;;AAEA,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;AACD;;AAEA,MAAM,cAAc,CAAC,sBAAsB,kBAAkB;;;;AAI7D,MAAM,4BAA4B;CACjC;CACA;CACA;AACD;AACA,MAAM,uBAAuB,cAAc;CAC1C,eAAe,WAAW;EACzB,MAAM;EACN,OAAO;CACR,CAAC;CACD,eAAe,WAAW;EACzB,MAAM;EACN,OAAO;CACR,CAAC;CACD,GAAG,0BAA0B,KAAK,YAAY,eAAe,WAAW;EACvE,MAAM;EACN;CACD,CAAC,CAAC;CACF;EACC;EACA,OAAO;GACN,MAAM;GACN,SAAS;EACV;EACA,QAAQ,EAAE,MAAM,OAAO;EACvB,UAAU;EACV,OAAO,iBAAiB,SAAS;CAClC;AACD;;;;AAIA,MAAM,6BAA6B;CAClC;EACC,WAAW;EACX,OAAO,EAAE,MAAM,MAAM;EACrB,QAAQ;GACP,MAAM;GACN,SAAS;EACV;EACA,UAAU;EACV,iBAAiB;EACjB,OAAO,iBAAiB,OAAO;CAChC;CACA;EACC,WAAW;EACX,OAAO,EAAE,MAAM,MAAM;EACrB,QAAQ;GACP,MAAM;GACN,SAAS;EACV;EACA,UAAU;EACV,iBAAiB;EACjB,OAAO,iBAAiB,OAAO;CAChC;CACA,GAAG,eAAe,KAAK,YAAY,SAAS,OAAO;EAClD,MAAM;EACN;CACD,GAAG,6BAA6B,CAAC;CACjC,GAAG,eAAe,KAAK,YAAY,YAAY,aAAa;EAC3D,MAAM;EACN;CACD,GAAG,wBAAwB,iBAAiB,KAAK,CAAC,CAAC;CACnD,GAAG,YAAY,KAAK,YAAY,SAAS,OAAO;EAC/C,MAAM;EACN;CACD,GAAG,oBAAoB,CAAC;CACxB,GAAG,CAAC,GAAG,gBAAgB,GAAG,WAAW,CAAC,CAAC,KAAK,YAAY,SAAS,OAAO;EACvE,MAAM;EACN;CACD,GAAG,oBAAoB,CAAC;CACxB,GAAG,oBAAoB,KAAK;CAC5B,GAAG,oBAAoB,KAAK;AAC7B"}
@@ -0,0 +1,164 @@
1
+ import { SqlAggregateLowering } from "@prisma/orm-family-sql/relational-core/aggregate-descriptor-registry";
2
+ //#region ../../../3-targets/sqlite/1-target/dist/aggregates.d.mts
3
+ //#region src/core/aggregates.d.ts
4
+ /**
5
+ * Every aggregate overload the SQLite target contributes. The adapter lists these on `types.aggregateDescriptors`, from where emission derives result types and the runtime builds its resolution registry.
6
+ */
7
+ declare const sqliteAggregateDescriptors: readonly [{
8
+ readonly operation: "count";
9
+ readonly input: {
10
+ readonly kind: "any";
11
+ };
12
+ readonly output: {
13
+ readonly kind: "codec";
14
+ readonly codecId: "sqlite/bigintnumber@1";
15
+ };
16
+ readonly nullable: false;
17
+ readonly emptyResultWire: "0";
18
+ readonly lower: SqlAggregateLowering;
19
+ }, {
20
+ readonly operation: "countBigInt";
21
+ readonly input: {
22
+ readonly kind: "any";
23
+ };
24
+ readonly output: {
25
+ readonly kind: "codec";
26
+ readonly codecId: "sqlite/bigint@1";
27
+ };
28
+ readonly nullable: false;
29
+ readonly emptyResultWire: "0";
30
+ readonly lower: SqlAggregateLowering;
31
+ }, ...({
32
+ readonly lower?: SqlAggregateLowering;
33
+ readonly operation: "sum";
34
+ readonly input: {
35
+ readonly kind: "codec";
36
+ readonly codecId: "sql/int@1" | "sqlite/bigintnumber@1" | "sqlite/bigint@1" | "sqlite/integer@1";
37
+ };
38
+ readonly output: {
39
+ readonly kind: "codec";
40
+ readonly codecId: "sqlite/bigintnumber@1";
41
+ };
42
+ readonly nullable: true;
43
+ } | {
44
+ readonly operation: "sumBigInt";
45
+ readonly input: {
46
+ readonly kind: "codec";
47
+ readonly codecId: "sql/int@1" | "sqlite/bigintnumber@1" | "sqlite/bigint@1" | "sqlite/integer@1";
48
+ };
49
+ readonly output: {
50
+ readonly kind: "codec";
51
+ readonly codecId: "sqlite/bigint@1";
52
+ };
53
+ readonly nullable: true;
54
+ readonly lower: SqlAggregateLowering;
55
+ } | {
56
+ readonly lower?: SqlAggregateLowering;
57
+ readonly operation: "sum";
58
+ readonly input: {
59
+ readonly kind: "codec";
60
+ readonly codecId: "sql/float@1" | "sqlite/real@1";
61
+ };
62
+ readonly output: {
63
+ readonly kind: "codec";
64
+ readonly codecId: "sqlite/real@1";
65
+ };
66
+ readonly nullable: true;
67
+ } | {
68
+ readonly lower?: SqlAggregateLowering;
69
+ readonly operation: "avg";
70
+ readonly input: {
71
+ readonly kind: "codec";
72
+ readonly codecId: "sql/int@1" | "sql/float@1" | "sqlite/bigintnumber@1" | "sqlite/bigint@1" | "sqlite/integer@1" | "sqlite/real@1";
73
+ };
74
+ readonly output: {
75
+ readonly kind: "codec";
76
+ readonly codecId: "sqlite/real@1";
77
+ };
78
+ readonly nullable: true;
79
+ } | {
80
+ readonly operation: "min";
81
+ readonly input: {
82
+ readonly kind: "trait";
83
+ readonly trait: "numeric";
84
+ };
85
+ readonly output: {
86
+ readonly kind: "self";
87
+ };
88
+ readonly nullable: true;
89
+ } | {
90
+ readonly operation: "min";
91
+ readonly input: {
92
+ readonly kind: "trait";
93
+ readonly trait: "textual";
94
+ };
95
+ readonly output: {
96
+ readonly kind: "self";
97
+ };
98
+ readonly nullable: true;
99
+ } | {
100
+ readonly operation: "min";
101
+ readonly input: {
102
+ readonly kind: "codec";
103
+ readonly codecId: "sqlite/datetime@1" | "sqlite/json@1" | "sqlite/blob@1";
104
+ };
105
+ readonly output: {
106
+ readonly kind: "self";
107
+ };
108
+ readonly nullable: true;
109
+ } | {
110
+ readonly operation: "min";
111
+ readonly input: {
112
+ readonly kind: "codec";
113
+ readonly codecId: "sqlite/bigint@1";
114
+ };
115
+ readonly output: {
116
+ readonly kind: "self";
117
+ };
118
+ readonly nullable: true;
119
+ readonly lower: SqlAggregateLowering;
120
+ } | {
121
+ readonly operation: "max";
122
+ readonly input: {
123
+ readonly kind: "trait";
124
+ readonly trait: "numeric";
125
+ };
126
+ readonly output: {
127
+ readonly kind: "self";
128
+ };
129
+ readonly nullable: true;
130
+ } | {
131
+ readonly operation: "max";
132
+ readonly input: {
133
+ readonly kind: "trait";
134
+ readonly trait: "textual";
135
+ };
136
+ readonly output: {
137
+ readonly kind: "self";
138
+ };
139
+ readonly nullable: true;
140
+ } | {
141
+ readonly operation: "max";
142
+ readonly input: {
143
+ readonly kind: "codec";
144
+ readonly codecId: "sqlite/datetime@1" | "sqlite/json@1" | "sqlite/blob@1";
145
+ };
146
+ readonly output: {
147
+ readonly kind: "self";
148
+ };
149
+ readonly nullable: true;
150
+ })[], {
151
+ readonly operation: "max";
152
+ readonly input: {
153
+ readonly kind: "codec";
154
+ readonly codecId: "sqlite/bigint@1";
155
+ };
156
+ readonly output: {
157
+ readonly kind: "self";
158
+ };
159
+ readonly nullable: true;
160
+ readonly lower: SqlAggregateLowering;
161
+ }];
162
+ //#endregion
163
+ export { sqliteAggregateDescriptors as t };
164
+ //# sourceMappingURL=aggregates-UBmpuURb.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregates-UBmpuURb.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc;WACH;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP,QAAQ;WACR;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA,OAAO;;WAEP,QAAQ;WACR;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,QAAQ;WACR;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;WACA,OAAO;;WAEP;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;WACA,OAAO"}
@@ -0,0 +1 @@
1
+ import "./codec-descriptor-DuW-d9ef-BBRBN0Ri.mjs";
@@ -0,0 +1,2 @@
1
+ import "./codec-descriptor-DuW-d9ef-BBRBN0Ri.mjs";
2
+ import "./codec-descriptor-3oN7rtrW-Cc_u7U5-.mjs";