@prisma/orm-target-mysql 8.0.0-rc.24-dev.27 → 8.0.0-rc.24-dev.29

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 (201) hide show
  1. package/dist/adapter-D4QpAe2i.d.mts +374 -0
  2. package/dist/adapter-D4QpAe2i.d.mts.map +1 -0
  3. package/dist/adapter.d.mts +8 -6
  4. package/dist/adapter.mjs +5 -3
  5. package/dist/adapter__adapter.d.mts +1 -1
  6. package/dist/adapter__adapter.mjs +1 -1
  7. package/dist/adapter__codec-types.d.mts +2 -2
  8. package/dist/adapter__control.d.mts +1 -1
  9. package/dist/adapter__control.mjs +1 -1
  10. package/dist/adapter__runtime.d.mts +2 -2
  11. package/dist/adapter__runtime.mjs +2 -501
  12. package/dist/adapter__sql-renderer.d.mts +3 -0
  13. package/dist/adapter__sql-renderer.mjs +2 -0
  14. package/dist/aggregates-BK8qyA2x.d.mts +164 -0
  15. package/dist/aggregates-BK8qyA2x.d.mts.map +1 -0
  16. package/dist/aggregates-Bk6CCgQ-.mjs +145 -0
  17. package/dist/aggregates-Bk6CCgQ-.mjs.map +1 -0
  18. package/dist/codec-descriptor-B1fMmxOK-D59zKJws.d.mts +1 -0
  19. package/dist/{codec-descriptor-3xp1XvVH-DfPKpYeP.mjs → codec-descriptor-ByN7iIha-48yW7oDN.mjs} +23 -16
  20. package/dist/codec-descriptor-ByN7iIha-48yW7oDN.mjs.map +1 -0
  21. package/dist/codec-descriptor-CqM_hQjY.d.mts +2 -0
  22. package/dist/{codec-descriptor-DXyubAS6-XDBj6Yet.d.mts → codec-descriptor-DXsJwUng-D4abEAFs.d.mts} +10 -5
  23. package/dist/codec-descriptor-DXsJwUng-D4abEAFs.d.mts.map +1 -0
  24. package/dist/codec-ids-DHeJ2SMJ-Uz1FAFmQ.d.mts +26 -0
  25. package/dist/codec-ids-DHeJ2SMJ-Uz1FAFmQ.d.mts.map +1 -0
  26. package/dist/codec-ids-DuWt4aOn-DiyLf9dW.mjs +26 -0
  27. package/dist/codec-ids-DuWt4aOn-DiyLf9dW.mjs.map +1 -0
  28. package/dist/codec-types-BQBBUlf_.d.mts +1 -0
  29. package/dist/{codec-types-Bai_CFkk-DmZ74URd.d.mts → codec-types-C4Q_JJgX-CUPkvPDx.d.mts} +11 -5
  30. package/dist/codec-types-C4Q_JJgX-CUPkvPDx.d.mts.map +1 -0
  31. package/dist/codec-types-DxSSgcpB.d.mts +1 -0
  32. package/dist/{codecs-BMidk26M-B_iWNti6.d.mts → codecs-D35fqdXJ-BZwilYUu.d.mts} +115 -7
  33. package/dist/codecs-D35fqdXJ-BZwilYUu.d.mts.map +1 -0
  34. package/dist/{codecs-CIJRyUd3.d.mts → codecs-DTfUoamS.d.mts} +3 -3
  35. package/dist/{codecs-CIJRyUd3.d.mts.map → codecs-DTfUoamS.d.mts.map} +1 -1
  36. package/dist/{codecs-wVJlFapM.mjs → codecs-DVX-3El1.mjs} +429 -12
  37. package/dist/codecs-DVX-3El1.mjs.map +1 -0
  38. package/dist/{control-Dj8nIA1M.d.mts → control-B7v7zc3l.d.mts} +272 -13
  39. package/dist/control-B7v7zc3l.d.mts.map +1 -0
  40. package/dist/{control-D7_IpeiU.d.mts → control-BFe8NrSk.d.mts} +22 -5
  41. package/dist/control-BFe8NrSk.d.mts.map +1 -0
  42. package/dist/{control-BiZaCqna.mjs → control-BTolgwH5.mjs} +28 -13
  43. package/dist/control-BTolgwH5.mjs.map +1 -0
  44. package/dist/{control-CTfV1Zag.mjs → control-CZSBblPm.mjs} +26 -19
  45. package/dist/control-CZSBblPm.mjs.map +1 -0
  46. package/dist/{control-WNuLF2Wh.d.mts → control-DqJJGh-5.d.mts} +3 -3
  47. package/dist/control-DqJJGh-5.d.mts.map +1 -0
  48. package/dist/{control-RYDTbndD.mjs → control-DtXS4WsY.mjs} +9 -14
  49. package/dist/control-DtXS4WsY.mjs.map +1 -0
  50. package/dist/data-type-entries-DlbQ1Bvl-BFkHeHVz.mjs +108 -0
  51. package/dist/data-type-entries-DlbQ1Bvl-BFkHeHVz.mjs.map +1 -0
  52. package/dist/{data-types-65iVc7q1.d.mts → data-types-COQT9bVG.d.mts} +2 -2
  53. package/dist/data-types-COQT9bVG.d.mts.map +1 -0
  54. package/dist/data-types-CU_43cNv-CQ8eHx3H.mjs +461 -0
  55. package/dist/data-types-CU_43cNv-CQ8eHx3H.mjs.map +1 -0
  56. package/dist/{data-types-D2HAT-Qf-CSdDz1Pk.d.mts → data-types-C_vInIbm-Gt1XINav.d.mts} +58 -4
  57. package/dist/data-types-C_vInIbm-Gt1XINav.d.mts.map +1 -0
  58. package/dist/{date-time-now-generators-BKakW3gd-CIFPuRdM.mjs → date-time-now-generators-Cx_aQTSw-ay1tlvw6.mjs} +4 -15
  59. package/dist/date-time-now-generators-Cx_aQTSw-ay1tlvw6.mjs.map +1 -0
  60. package/dist/default-normalizer-C9c043DP-DPhwJOC4.mjs +175 -0
  61. package/dist/default-normalizer-C9c043DP-DPhwJOC4.mjs.map +1 -0
  62. package/dist/default-normalizer-zXWtDBp_.d.mts +31 -0
  63. package/dist/default-normalizer-zXWtDBp_.d.mts.map +1 -0
  64. package/dist/{descriptor-meta-e29H69KN-t-S8_DYh.mjs → descriptor-meta-BFQUMwkh-Bc3o-ZMV.mjs} +19 -12
  65. package/dist/descriptor-meta-BFQUMwkh-Bc3o-ZMV.mjs.map +1 -0
  66. package/dist/{descriptor-meta-BF6YvSag-ChHHvlHc.mjs → descriptor-meta-BHSEcFWR-41BcRcOy.mjs} +219 -25
  67. package/dist/descriptor-meta-BHSEcFWR-41BcRcOy.mjs.map +1 -0
  68. package/dist/descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs +17 -0
  69. package/dist/descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs.map +1 -0
  70. package/dist/descriptor-meta-runtime-DEKunXiL.d.mts +22 -0
  71. package/dist/descriptor-meta-runtime-DEKunXiL.d.mts.map +1 -0
  72. package/dist/driver.d.mts +3 -3
  73. package/dist/driver.mjs +2 -2
  74. package/dist/driver__control.d.mts +2 -2
  75. package/dist/driver__control.mjs +1 -1
  76. package/dist/driver__runtime.d.mts +2 -2
  77. package/dist/driver__runtime.mjs +1 -1
  78. package/dist/{errors-DjCkC9IM.d.mts → errors-B81Qeu5_.d.mts} +3 -2
  79. package/dist/errors-B81Qeu5_.d.mts.map +1 -0
  80. package/dist/{errors-Cng94tYg-DTH51xWG.mjs → errors-CWtFTnst-xBLJ-9Lp.mjs} +43 -17
  81. package/dist/errors-CWtFTnst-xBLJ-9Lp.mjs.map +1 -0
  82. package/dist/{marker-lock-Bwew7cAs-ElLxlCQp.mjs → marker-lock-B7CyXf2F-CakjZnQP.mjs} +3 -3
  83. package/dist/{marker-lock-Bwew7cAs-ElLxlCQp.mjs.map → marker-lock-B7CyXf2F-CakjZnQP.mjs.map} +1 -1
  84. package/dist/{marker-read-D1hp62hF-3-4fEgDD.mjs → marker-read-D1hp62hF-BSXs2TVo.mjs} +3 -3
  85. package/dist/{marker-read-D1hp62hF-3-4fEgDD.mjs.map → marker-read-D1hp62hF-BSXs2TVo.mjs.map} +1 -1
  86. package/dist/{migration-DILkj7kB.d.mts → migration-O-3NHVlW.d.mts} +2 -5
  87. package/dist/migration-O-3NHVlW.d.mts.map +1 -0
  88. package/dist/{mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs → mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs} +4 -4
  89. package/dist/{mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs.map → mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs.map} +1 -1
  90. package/dist/{mysql-database-CHl9-oSL-B1arvq6Q.mjs → mysql-database-ByniOtau-BKBIGgSm.mjs} +45 -17
  91. package/dist/mysql-database-ByniOtau-BKBIGgSm.mjs.map +1 -0
  92. package/dist/{now-expression-DVD18CUc-DJqdZY96.mjs → now-expression-DDHpZL6o-Ixs-vg-B.mjs} +3 -3
  93. package/dist/{now-expression-DVD18CUc-DJqdZY96.mjs.map → now-expression-DDHpZL6o-Ixs-vg-B.mjs.map} +1 -1
  94. package/dist/{pack-CqULIal0.d.mts → pack-C5_g-3YX.d.mts} +272 -11
  95. package/dist/{pack-CqULIal0.d.mts.map → pack-C5_g-3YX.d.mts.map} +1 -1
  96. package/dist/{require-temporal-DeDQhbTn-CdpjEWCB.mjs → require-temporal-DDdrgVtL-VOKxTqhD.mjs} +3 -3
  97. package/dist/{require-temporal-DeDQhbTn-CdpjEWCB.mjs.map → require-temporal-DDdrgVtL-VOKxTqhD.mjs.map} +1 -1
  98. package/dist/{runner-DEKKxDyw-Cdo1Ysod.mjs → runner-IjNtlp_v-DLCqpSh5.mjs} +68 -72
  99. package/dist/runner-IjNtlp_v-DLCqpSh5.mjs.map +1 -0
  100. package/dist/runtime-Bw6vKz9t.mjs +96 -0
  101. package/dist/runtime-Bw6vKz9t.mjs.map +1 -0
  102. package/dist/{runtime-DB0w8R7i.mjs → runtime-CHWztV6c.mjs} +66 -46
  103. package/dist/runtime-CHWztV6c.mjs.map +1 -0
  104. package/dist/{runtime-DN20lWEg.d.mts → runtime-CQ1V-8Yh.d.mts} +11 -4
  105. package/dist/runtime-CQ1V-8Yh.d.mts.map +1 -0
  106. package/dist/{runtime-CbqytTbM.d.mts → runtime-Ci3hPz1j.d.mts} +16 -5
  107. package/dist/runtime-Ci3hPz1j.d.mts.map +1 -0
  108. package/dist/{runtime-DUDdsFyy.mjs → runtime-_c_DZuYR.mjs} +18 -13
  109. package/dist/runtime-_c_DZuYR.mjs.map +1 -0
  110. package/dist/runtime-dn4-kzZV.d.mts +43 -0
  111. package/dist/runtime-dn4-kzZV.d.mts.map +1 -0
  112. package/dist/sql-renderer-CrnJ8cCo.d.mts +1 -0
  113. package/dist/sql-renderer-DfPaqPkD-DFaweHvr.mjs +501 -0
  114. package/dist/sql-renderer-DfPaqPkD-DFaweHvr.mjs.map +1 -0
  115. package/dist/sql-renderer-fnDhRUHs-CcsyIaZ4.d.mts +95 -0
  116. package/dist/sql-renderer-fnDhRUHs-CcsyIaZ4.d.mts.map +1 -0
  117. package/dist/{sql-utils-Cmv_TVa8-CNW3UmfQ.mjs → sql-utils-CveZhawQ-B2QmUlY0.mjs} +3 -3
  118. package/dist/{sql-utils-Cmv_TVa8-CNW3UmfQ.mjs.map → sql-utils-CveZhawQ-B2QmUlY0.mjs.map} +1 -1
  119. package/dist/{sql-utils-BE8tDXHs.mjs → sql-utils-DVH8boEI.mjs} +3 -6
  120. package/dist/sql-utils-DVH8boEI.mjs.map +1 -0
  121. package/dist/{statement-CT5tB4uX-CHqHFM3z.mjs → statement-a2Eekpu6-BDJa255m.mjs} +73 -67
  122. package/dist/statement-a2Eekpu6-BDJa255m.mjs.map +1 -0
  123. package/dist/target.d.mts +18 -16
  124. package/dist/target.mjs +21 -19
  125. package/dist/target__aggregates.d.mts +2 -0
  126. package/dist/target__aggregates.mjs +2 -0
  127. package/dist/target__codec-descriptor.d.mts +2 -2
  128. package/dist/target__codec-descriptor.mjs +1 -1
  129. package/dist/target__codec-ids.d.mts +2 -2
  130. package/dist/target__codec-ids.mjs +2 -2
  131. package/dist/target__codec-types.d.mts +2 -2
  132. package/dist/target__codecs.d.mts +2 -2
  133. package/dist/target__codecs.mjs +2 -2
  134. package/dist/target__control.d.mts +1 -1
  135. package/dist/target__control.mjs +2 -2
  136. package/dist/target__data-types.d.mts +3 -3
  137. package/dist/target__data-types.mjs +3 -3
  138. package/dist/target__default-normalizer.d.mts +2 -2
  139. package/dist/target__default-normalizer.mjs +2 -2
  140. package/dist/target__descriptor-meta-runtime.d.mts +2 -0
  141. package/dist/target__descriptor-meta-runtime.mjs +2 -0
  142. package/dist/target__errors.d.mts +1 -1
  143. package/dist/target__errors.mjs +1 -1
  144. package/dist/target__marker-lock.mjs +1 -1
  145. package/dist/target__migration.d.mts +1 -1
  146. package/dist/target__migration.mjs +1 -1
  147. package/dist/target__pack.d.mts +1 -1
  148. package/dist/target__pack.mjs +1 -1
  149. package/dist/target__runtime.d.mts +2 -2
  150. package/dist/target__runtime.mjs +4 -4
  151. package/dist/target__sql-utils.mjs +2 -2
  152. package/dist/target__types.mjs +1 -1
  153. package/package.json +13 -10
  154. package/dist/adapter-1Kd67Gfa.d.mts +0 -66
  155. package/dist/adapter-1Kd67Gfa.d.mts.map +0 -1
  156. package/dist/adapter__runtime.mjs.map +0 -1
  157. package/dist/codec-descriptor-3xp1XvVH-DfPKpYeP.mjs.map +0 -1
  158. package/dist/codec-descriptor-BRcKIX3h.d.mts +0 -2
  159. package/dist/codec-descriptor-DXyubAS6-XDBj6Yet.d.mts.map +0 -1
  160. package/dist/codec-descriptor-J3TP08l8-BmdgkIU6.d.mts +0 -1
  161. package/dist/codec-ids-CrR9Xi7r-CjbGCS3o.mjs +0 -20
  162. package/dist/codec-ids-CrR9Xi7r-CjbGCS3o.mjs.map +0 -1
  163. package/dist/codec-ids-Dgh5IpML-DGXIq6j8.d.mts +0 -20
  164. package/dist/codec-ids-Dgh5IpML-DGXIq6j8.d.mts.map +0 -1
  165. package/dist/codec-types-BS-lWfda.d.mts +0 -1
  166. package/dist/codec-types-Bai_CFkk-DmZ74URd.d.mts.map +0 -1
  167. package/dist/codec-types-Dk2h5dBB.d.mts +0 -1
  168. package/dist/codecs-BMidk26M-B_iWNti6.d.mts.map +0 -1
  169. package/dist/codecs-wVJlFapM.mjs.map +0 -1
  170. package/dist/control-BiZaCqna.mjs.map +0 -1
  171. package/dist/control-CTfV1Zag.mjs.map +0 -1
  172. package/dist/control-D7_IpeiU.d.mts.map +0 -1
  173. package/dist/control-Dj8nIA1M.d.mts.map +0 -1
  174. package/dist/control-RYDTbndD.mjs.map +0 -1
  175. package/dist/control-WNuLF2Wh.d.mts.map +0 -1
  176. package/dist/data-type-entries-C7VH2IHc-DM6TbTaz.mjs +0 -59
  177. package/dist/data-type-entries-C7VH2IHc-DM6TbTaz.mjs.map +0 -1
  178. package/dist/data-types-65iVc7q1.d.mts.map +0 -1
  179. package/dist/data-types-D2HAT-Qf-CSdDz1Pk.d.mts.map +0 -1
  180. package/dist/data-types-DOaaPS93-lycGybNk.mjs +0 -289
  181. package/dist/data-types-DOaaPS93-lycGybNk.mjs.map +0 -1
  182. package/dist/date-time-now-generators-BKakW3gd-CIFPuRdM.mjs.map +0 -1
  183. package/dist/default-normalizer-C8pc7SbL-BXd70q02.mjs +0 -100
  184. package/dist/default-normalizer-C8pc7SbL-BXd70q02.mjs.map +0 -1
  185. package/dist/default-normalizer-D-8Ii0df.d.mts +0 -27
  186. package/dist/default-normalizer-D-8Ii0df.d.mts.map +0 -1
  187. package/dist/descriptor-meta-BF6YvSag-ChHHvlHc.mjs.map +0 -1
  188. package/dist/descriptor-meta-e29H69KN-t-S8_DYh.mjs.map +0 -1
  189. package/dist/errors-Cng94tYg-DTH51xWG.mjs.map +0 -1
  190. package/dist/errors-DjCkC9IM.d.mts.map +0 -1
  191. package/dist/migration-DILkj7kB.d.mts.map +0 -1
  192. package/dist/mysql-database-CHl9-oSL-B1arvq6Q.mjs.map +0 -1
  193. package/dist/runner-DEKKxDyw-Cdo1Ysod.mjs.map +0 -1
  194. package/dist/runtime-CbqytTbM.d.mts.map +0 -1
  195. package/dist/runtime-Cm-T3hbP.d.mts +0 -29
  196. package/dist/runtime-Cm-T3hbP.d.mts.map +0 -1
  197. package/dist/runtime-DB0w8R7i.mjs.map +0 -1
  198. package/dist/runtime-DN20lWEg.d.mts.map +0 -1
  199. package/dist/runtime-DUDdsFyy.mjs.map +0 -1
  200. package/dist/sql-utils-BE8tDXHs.mjs.map +0 -1
  201. package/dist/statement-CT5tB4uX-CHqHFM3z.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codecs-DVX-3El1.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/codecs.mjs"],"sourcesContent":["import { _ as MYSQL_TIMESTAMP_DATE_CODEC_ID, a as MYSQL_DATETIME_STRING_CODEC_ID, b as MYSQL_TIME_STRING_CODEC_ID, c as MYSQL_DATE_TEMPORAL_CODEC_ID, d as MYSQL_DURATION_STRING_CODEC_ID, f as MYSQL_ENUM_CODEC_ID, g as MYSQL_TEXT_CODEC_ID, h as MYSQL_LONGBLOB_CODEC_ID, i as MYSQL_DATETIME_CODEC_ID, l as MYSQL_DECIMAL_CODEC_ID, m as MYSQL_JSON_CODEC_ID, n as MYSQL_BIGINT_NUMBER_CODEC_ID, o as MYSQL_DATETIME_TEMPORAL_CODEC_ID, p as MYSQL_INT_CODEC_ID, r as MYSQL_BOOLEAN_CODEC_ID, s as MYSQL_DATE_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_DOUBLE_CODEC_ID, v as MYSQL_TIMESTAMP_STRING_CODEC_ID, x as MYSQL_TIME_TEMPORAL_CODEC_ID, y as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID } from \"./codec-ids-DuWt4aOn.mjs\";\nimport { a as errorTemporalNonIsoCalendar, c as errorTemporalWrongType, i as errorDateTimeUnwritable, l as mysqlError, n as errorColumnUnwritable, r as errorDateTimeUnreadable, t as errorColumnUnreadable } from \"./errors-CWtFTnst.mjs\";\nimport { A as mysqlLongblob, C as mysqlDuration, D as mysqlEnumParams, E as mysqlEnum, F as mysqlTimeText, I as mysqlTimestamp, L as mysqlTimestampText, M as mysqlText, O as mysqlInt, P as mysqlTime, R as mysqlVarchar, S as mysqlDouble, T as mysqlDurationText, _ as mysqlDecimal, a as decimalTextDigits, b as mysqlDecimalParams, c as mysqlBoolean, f as mysqlDate, g as mysqlDatetimeText, h as mysqlDatetimeParams, i as decimalColumnHolds, k as mysqlJson, l as mysqlChar, m as mysqlDatetime, o as decimalTextInColumn, p as mysqlDateText, r as MYSQL_WIDEST_DECIMAL, s as mysqlBigint, v as mysqlDecimalColumnAsCreated, w as mysqlDurationParams, y as mysqlDecimalColumnOfReference } from \"./data-types-CU_43cNv.mjs\";\nimport { a as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, r as identityJsonProjection, t as MysqlCodecDescriptor } from \"./codec-descriptor-ByN7iIha.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-DDdrgVtL.mjs\";\nimport { a as mysqlNowExpression, i as mysqlCurrentValueFor, n as MYSQL_INSTANT_NOW, r as MYSQL_TIME_NOW, t as MYSQL_DATE_NOW } from \"./now-expression-DDHpZL6o.mjs\";\nimport { CodecImpl, SAFE_INTEGER_BIGINT_RANGE, dateTimeStoredText, decimalTextBigintLiteral, decimalTextNumberLiteral, floatNumberLiteral, readJsonIntegerText, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { CastExpr, FunctionCallExpr, SqlCharCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { isDecimalText, printedDecimalText } from \"@internal/type-implementations/decimal\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { booleanFromInteger, integerFromBoolean } from \"@internal/type-implementations/boolean\";\nimport { hasDigitsBelow, hasDigitsBelowAMillisecond, isValidDate } from \"@internal/type-implementations/date\";\nimport { describeValue, temporalFromText, temporalToText, withoutUtcDesignator } from \"@internal/type-implementations/temporal-text\";\nimport { findNonJsonValue } from \"@internal/type-implementations/json\";\nimport { extractCodecLookup } from \"@internal/framework-components/control\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/boolean-codec.ts\nfunction booleanToWrite(value, ctx) {\n\tif (typeof value === \"boolean\") return value;\n\tthrow errorColumnUnwritable({\n\t\tcodecId: MYSQL_BOOLEAN_CODEC_ID,\n\t\treceived: JSON.stringify(value) ?? String(value),\n\t\tcolumn: ctx.column,\n\t\tholds: \"true or false, stored as 1 or 0\",\n\t\tfix: \"Write true or false.\"\n\t});\n}\n/** A row carries the stored integer as decimal text, and an include's JSON as a number. */\nvar MysqlBooleanCodec = class extends CodecImpl {\n\tasync toWire(value, ctx) {\n\t\treturn integerFromBoolean(booleanToWrite(value, ctx));\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tconst value = booleanFromInteger(wire);\n\t\tif (value !== void 0) return value;\n\t\tthrow errorColumnUnreadable({\n\t\t\tcodecId: MYSQL_BOOLEAN_CODEC_ID,\n\t\t\treceived: String(wire),\n\t\t\tcolumn: ctx.column,\n\t\t\tnotA: \"0 or 1\",\n\t\t\treads: \"0 as false and 1 as true\",\n\t\t\tfix: \"Rewrite the value as 0 or 1. MySQL and MariaDB store any tinyint in the column, but only 1 equals TRUE.\"\n\t\t});\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(booleanToWrite(input, {}));\n\t}\n};\nvar MysqlBooleanDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlBoolean.id;\n\tcodecId = MYSQL_BOOLEAN_CODEC_ID;\n\ttraits = [\"equality\", \"boolean\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\t/** The stored integer as a JSON number, which the codec checks as it checks a row. */\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlBooleanCodec(this, mysqlBoolean);\n\t}\n};\nconst mysqlBooleanDescriptor = new MysqlBooleanDescriptor();\n//#endregion\n//#region src/core/date-time-values.ts\nfunction messageOf(cause) {\n\treturn cause instanceof Error ? cause.message : String(cause);\n}\n/** The text MySQL reads for a stored date and time, `2024-01-02 03:04:05.5`. */\nfunction mysqlWireText(stored) {\n\treturn stored.replace(\"T\", \" \");\n}\n/** The UTC date and time without an offset that ISO 8601 text with a UTC offset names, in the form `stored` writes. Throws when the text names no instant, or one `stored` refuses. */\nfunction utcDateTimeOfInstantText(codecId, text, stored) {\n\treturn stored(withoutUtcDesignator(dateTimeStoredText(text, {\n\t\tshape: \"instant\",\n\t\townerId: codecId\n\t})));\n}\n/** The stored form `stored` writes for a value an application wrote; a value it refuses is refused as `RUNTIME.ENCODE_FAILED`. */\nfunction storedTextForWrite(codecId, value, stored) {\n\tif (typeof value !== \"string\") throw errorDateTimeUnwritable({\n\t\tcodecId,\n\t\treceived: describeValue(value),\n\t\tdetail: \"It writes ISO 8601 text.\"\n\t});\n\ttry {\n\t\treturn stored(value);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnwritable({\n\t\t\tcodecId,\n\t\t\treceived: JSON.stringify(value),\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The stored form of the text MySQL returned for a row, as `stored` reads it; text `stored` refuses is refused as `RUNTIME.DECODE_FAILED`. */\nfunction storedTextFromWire(codecId, wire, stored) {\n\tif (typeof wire !== \"string\") throw errorDateTimeUnreadable({\n\t\tcodecId,\n\t\tvalue: String(wire),\n\t\tdetail: `The database returned ${describeValue(wire)}, not text.`\n\t});\n\ttry {\n\t\treturn stored(wire);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnreadable({\n\t\t\tcodecId,\n\t\t\tvalue: wire,\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The Temporal value that stored text names, read with `parse`. */\nfunction temporalFromStoredText(identity, text, parse) {\n\tconst read = temporalFromText(requireTemporal({\n\t\tcodecId: identity.codecId,\n\t\toperation: \"decode\"\n\t}), text, parse);\n\tif (read.kind === \"unreadable\") throw errorDateTimeUnreadable({\n\t\tcodecId: identity.codecId,\n\t\tvalue: text,\n\t\tdetail: `${identity.temporalTag} cannot hold it: ${read.detail}. Use ${identity.stringType} to read the column as text.`,\n\t\tcause: read.cause\n\t});\n\treturn read.value;\n}\n/** The stored form of a Temporal value, as `stored` writes its ISO text. A value of another kind, in a calendar other than ISO 8601, or with digits below a microsecond, which MySQL does not hold, is refused. */\nfunction storedTextOfTemporal(identity, value, stored) {\n\tconst encoded = temporalToText(value, identity.temporalTag);\n\tswitch (encoded.kind) {\n\t\tcase \"wrong-type\": throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, encoded.received);\n\t\tcase \"non-iso-calendar\": throw errorTemporalNonIsoCalendar(identity.codecId, encoded.calendarId);\n\t\tcase \"text\":\n\t\t\tif (hasDigitsBelow(encoded.text, 6)) throw errorDateTimeUnwritable({\n\t\t\t\tcodecId: identity.codecId,\n\t\t\t\treceived: `the ${identity.temporalTag} ${encoded.text}`,\n\t\t\t\tdetail: \"It has digits below a microsecond, and MySQL and MariaDB hold microseconds at most. Round it first, as in value.round({ smallestUnit: 'microsecond', roundingMode: 'trunc' }).\"\n\t\t\t});\n\t\t\treturn storedTextForWrite(identity.codecId, encoded.text, stored);\n\t}\n}\nconst WIRE_DATE_TIME = /^(\\d{4}-\\d{2}-\\d{2})[ T](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)$/;\n/** The instant the text MySQL sends for a `datetime` or a `timestamp` names in UTC: every session runs in UTC, so the text holds no time zone of its own. */\nfunction dateOfWireText(codecId, wire) {\n\tconst match = WIRE_DATE_TIME.exec(wire);\n\tconst date = match === null ? void 0 : /* @__PURE__ */ new Date(`${match[1]}T${match[2]}Z`);\n\tif (date === void 0 || !isValidDate(date)) throw mysqlError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be a date and time as MySQL and MariaDB print it`, { meta: {\n\t\tcodecId,\n\t\treceived: String(wire)\n\t} });\n\treturn date;\n}\n/** The text MySQL reads for a `Date` in UTC, with millisecond digits. An Invalid Date, and an instant `stored` refuses, are refused. */\nfunction wireTextOfDate(codecId, value, stored) {\n\tif (!isValidDate(value)) throw mysqlError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a valid Date`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\tconst text = value.toISOString();\n\tstoredTextForWrite(codecId, text, (instant) => utcDateTimeOfInstantText(codecId, instant, stored));\n\treturn mysqlWireText(withoutUtcDesignator(text));\n}\n/** The fraction digits a column with `params` holds: its `precision`, or 0, which MySQL holds when none is written. */\nfunction precisionOf(params) {\n\tconst precision = params[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 0;\n}\n/** `stored`, a contract value of a column with `params`; a value with more fraction digits than the column holds, which MySQL would round, is refused. */\nfunction storedWithinPrecision(codecId, stored, params) {\n\tconst precision = precisionOf(params);\n\tif (!hasDigitsBelow(stored, precision)) return stored;\n\treturn refuseJsonValue(codecId, `a value with at most ${precision} ${precision === 1 ? \"fraction digit\" : \"fraction digits\"} of a second, which precision ${precision} holds without rounding`, stored);\n}\n/** Wire text with its fraction cut to the digits the column's `precision` holds: MySQL rounds a value to its column, which could carry it to the next second, day or past the column's range. A codec reference that names no precision, as a raw parameter writes, describes no column, so its value is written whole. */\nfunction roundedDownToPrecision(text, params) {\n\tconst precision = params[\"precision\"];\n\tif (typeof precision !== \"number\") return text;\n\treturn text.replace(/\\.(\\d+)$/, (_fraction, digits) => precision === 0 ? \"\" : `.${digits.slice(0, precision)}`);\n}\n//#endregion\n//#region src/core/date-time-codecs.ts\n/** The stored form of an instant written as ISO 8601 text with a UTC offset: its UTC date and time, in the form `stored` writes. */\nconst instantIn = (codecId, stored) => (text) => utcDateTimeOfInstantText(codecId, text, stored);\n/** Reads the text MySQL returns for a row in any year: a column's range is refused on write only. */\nconst anyYear = (ownerId, shape) => (text) => dateTimeStoredText(text, {\n\tshape,\n\townerId\n});\nconst datetimeRow = anyYear(mysqlDatetime.id, \"dateTime\");\nconst timestampRow = anyYear(mysqlTimestamp.id, \"dateTime\");\nconst dateRow = anyYear(mysqlDate.id, \"date\");\nconst DATETIME_TEMPORAL = {\n\tcodecId: MYSQL_DATETIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.Instant\",\n\tstringType: \"DatetimeString\"\n};\nconst TIMESTAMP_TEMPORAL = {\n\tcodecId: MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.Instant\",\n\tstringType: \"TimestampString\"\n};\nconst DATE_TEMPORAL = {\n\tcodecId: MYSQL_DATE_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainDate\",\n\tstringType: \"DateString\"\n};\nconst TIME_TEMPORAL = {\n\tcodecId: MYSQL_TIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainTime\",\n\tstringType: \"TimeString\"\n};\nconst instantOf = (identity, stored) => temporalFromStoredText(identity, `${stored}Z`, (temporal, text) => temporal.Instant.from(text));\n/** A MySQL `timestamp` as a JavaScript `Date`, read and written in UTC. */\nvar MysqlTimestampDateCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(wireTextOfDate(this.id, value, mysqlTimestampText), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn dateOfWireText(this.id, wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\tconst stored = storedWithinPrecision(this.id, value.value, this.dataTypeParams);\n\t\tif (hasDigitsBelowAMillisecond(stored)) return refuseJsonValue(this.id, `a timestamp with no digits below a millisecond, which a Date drops: ${JSON.stringify(value.value)} has them`, value.value);\n\t\treturn /* @__PURE__ */ new Date(`${stored}Z`);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input.toISOString().replace(\"Z\", \"\"));\n\t}\n};\nvar MysqlTimestampDateDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTimestamp.id;\n\tcodecId = MYSQL_TIMESTAMP_DATE_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimestampDateCodec(this, mysqlTimestamp, params);\n\t}\n};\nconst mysqlTimestampDateDescriptor = new MysqlTimestampDateDescriptor();\n/** An instant read as `Temporal.Instant` from a `datetime` that holds it in UTC. */\nvar MysqlDatetimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(this.stored(value)), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn instantOf(DATETIME_TEMPORAL, storedTextFromWire(this.id, wire, datetimeRow));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn instantOf(DATETIME_TEMPORAL, storedWithinPrecision(this.id, value.value, this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(this.stored(input));\n\t}\n\tstored(value) {\n\t\treturn storedTextOfTemporal(DATETIME_TEMPORAL, value, instantIn(this.id, mysqlDatetimeText));\n\t}\n};\nvar MysqlDatetimeTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDatetime.id;\n\tcodecId = MYSQL_DATETIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDatetimeTemporalCodec(this, mysqlDatetime, params);\n\t}\n};\nconst mysqlDatetimeTemporalDescriptor = new MysqlDatetimeTemporalDescriptor();\n/** An instant read as `Temporal.Instant` from a `timestamp`. */\nvar MysqlTimestampTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(this.stored(value)), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn instantOf(TIMESTAMP_TEMPORAL, storedTextFromWire(this.id, wire, timestampRow));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn instantOf(TIMESTAMP_TEMPORAL, storedWithinPrecision(this.id, value.value, this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(this.stored(input));\n\t}\n\tstored(value) {\n\t\treturn storedTextOfTemporal(TIMESTAMP_TEMPORAL, value, instantIn(this.id, mysqlTimestampText));\n\t}\n};\nvar MysqlTimestampTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTimestamp.id;\n\tcodecId = MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimestampTemporalCodec(this, mysqlTimestamp, params);\n\t}\n};\nconst mysqlTimestampTemporalDescriptor = new MysqlTimestampTemporalDescriptor();\n/** The literal of the instant text a string codec reads from a stored date and time, which has no offset. */\nfunction renderInstantTextLiteral(value) {\n\treturn typeof value === \"string\" ? renderTsLiteral(`${value}Z`) : void 0;\n}\n/** An instant read as ISO 8601 text in UTC, `2024-01-01T00:00:00.5Z`, from a `datetime`. A write takes ISO 8601 text with any UTC offset. */\nvar MysqlDatetimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(storedTextForWrite(this.id, value, instantIn(this.id, mysqlDatetimeText))), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn `${storedTextFromWire(this.id, wire, datetimeRow)}Z`;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn `${storedWithinPrecision(this.id, value.value, this.dataTypeParams)}Z`;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(instantIn(this.id, mysqlDatetimeText)(input));\n\t}\n};\nvar MysqlDatetimeStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDatetime.id;\n\tcodecId = MYSQL_DATETIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\trenderValueLiteral(value) {\n\t\treturn renderInstantTextLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDatetimeStringCodec(this, mysqlDatetime, params);\n\t}\n};\nconst mysqlDatetimeStringDescriptor = new MysqlDatetimeStringDescriptor();\n/** An instant read as ISO 8601 text in UTC, `2024-01-01T00:00:00.5Z`, from a `timestamp`. A write takes ISO 8601 text with any UTC offset. */\nvar MysqlTimestampStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(storedTextForWrite(this.id, value, instantIn(this.id, mysqlTimestampText))), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn `${storedTextFromWire(this.id, wire, timestampRow)}Z`;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn `${storedWithinPrecision(this.id, value.value, this.dataTypeParams)}Z`;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(instantIn(this.id, mysqlTimestampText)(input));\n\t}\n};\nvar MysqlTimestampStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTimestamp.id;\n\tcodecId = MYSQL_TIMESTAMP_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\trenderValueLiteral(value) {\n\t\treturn renderInstantTextLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimestampStringCodec(this, mysqlTimestamp, params);\n\t}\n};\nconst mysqlTimestampStringDescriptor = new MysqlTimestampStringDescriptor();\n/** A calendar date read as ISO 8601 text, `2024-02-29`. */\nvar MysqlDateStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, mysqlDateText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, dateRow);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar MysqlDateStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDate.id;\n\tcodecId = MYSQL_DATE_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlDateStringCodec(this, mysqlDate);\n\t}\n};\nconst mysqlDateStringDescriptor = new MysqlDateStringDescriptor();\n/** A calendar date read as `Temporal.PlainDate`. */\nvar MysqlDateTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextOfTemporal(DATE_TEMPORAL, value, mysqlDateText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn this.plainDateOf(storedTextFromWire(this.id, wire, dateRow));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn this.plainDateOf(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(storedTextOfTemporal(DATE_TEMPORAL, input, mysqlDateText));\n\t}\n\tplainDateOf(stored) {\n\t\treturn temporalFromStoredText(DATE_TEMPORAL, stored, (temporal, text) => temporal.PlainDate.from(text));\n\t}\n};\nvar MysqlDateTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDate.id;\n\tcodecId = MYSQL_DATE_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlDateTemporalCodec(this, mysqlDate);\n\t}\n};\nconst mysqlDateTemporalDescriptor = new MysqlDateTemporalDescriptor();\n/** A time of day read as ISO 8601 text, `09:30:00.5`. A MySQL `time` outside 00:00:00 to 23:59:59.999999 is no time of day, so it is refused on read and on write. */\nvar MysqlTimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(storedTextForWrite(this.id, value, mysqlTimeText), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, mysqlTimeText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn storedWithinPrecision(this.id, value.value, this.dataTypeParams);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar MysqlTimeStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTime.id;\n\tcodecId = MYSQL_TIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimeStringCodec(this, mysqlTime, params);\n\t}\n};\nconst mysqlTimeStringDescriptor = new MysqlTimeStringDescriptor();\n/** A time of day read as `Temporal.PlainTime`. */\nvar MysqlTimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(storedTextOfTemporal(TIME_TEMPORAL, value, mysqlTimeText), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn this.plainTimeOf(storedTextFromWire(this.id, wire, mysqlTimeText));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn this.plainTimeOf(storedWithinPrecision(this.id, value.value, this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(storedTextOfTemporal(TIME_TEMPORAL, input, mysqlTimeText));\n\t}\n\tplainTimeOf(stored) {\n\t\treturn temporalFromStoredText(TIME_TEMPORAL, stored, (temporal, text) => temporal.PlainTime.from(text));\n\t}\n};\nvar MysqlTimeTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTime.id;\n\tcodecId = MYSQL_TIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimeTemporalCodec(this, mysqlTime, params);\n\t}\n};\nconst mysqlTimeTemporalDescriptor = new MysqlTimeTemporalDescriptor();\n/** A length of time read as the ISO 8601 duration it was written as, `PT1H30M`, stored in a `varchar` column. Its text does not sort in the order of the durations, so it offers no order. */\nvar MysqlDurationStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, mysqlDurationText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, mysqlDurationText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar MysqlDurationStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDuration.id;\n\tcodecId = MYSQL_DURATION_STRING_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = mysqlDurationParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(_params) {\n\t\treturn () => new MysqlDurationStringCodec(this, mysqlDuration);\n\t}\n};\nconst mysqlDurationStringDescriptor = new MysqlDurationStringDescriptor();\n//#endregion\n//#region src/core/decimal-codec.ts\n/**\n* `mysql/decimal@1`: an exact decimal number read as the text MySQL and MariaDB print for it, padded to the column's scale.\n*\n* Both servers compare a text parameter with a `decimal` column as a decimal only when the column stands alone beside `=`, `<` or `>`; inside `IN`, beside an expression, and in MariaDB's `BETWEEN`, they compare it as a double. So every parameter of this codec is cast to a `DECIMAL(65, s)` that holds every value of its column, which compares exactly in every form. The cast rounds text with more digits after the point than `s` and clamps text with more before it than `65 - s`, so the codec refuses to write such text.\n*/\n/** The digits before and after the point of the `DECIMAL(65, fraction)` a parameter of a column with `params` is cast to: 30 after the point, the most MySQL allows, unless the column needs more than 35 before it. Parameters without a precision are of no column, and are cast to the widest decimal, `DECIMAL(65,30)`. */\nfunction decimalParameterDigits(params) {\n\tconst { precision: widest, scale: finest } = MYSQL_WIDEST_DECIMAL;\n\tconst column = mysqlDecimalColumnOfReference(params) ?? MYSQL_WIDEST_DECIMAL;\n\tconst fraction = Math.min(finest, widest - (column.precision - column.scale));\n\treturn {\n\t\tinteger: widest - fraction,\n\t\tfraction\n\t};\n}\n/** The type a parameter of a column with `params` is cast to. */\nfunction decimalParameterType(params) {\n\treturn `DECIMAL(${MYSQL_WIDEST_DECIMAL.precision},${decimalParameterDigits(params).fraction})`;\n}\nconst EXAMPLE = \"decimal text, such as \\\"12.50\\\"\";\nfunction describeReceived$1(value) {\n\treturn typeof value === \"string\" ? JSON.stringify(value) : String(value);\n}\nfunction digits(count) {\n\treturn `${count} ${count === 1 ? \"digit\" : \"digits\"}`;\n}\n/** The refusal of decimal text the parameter's cast would round or clamp: it says what the column holds and, separately, what can be sent for it. A value declared without a precision has no column, so it says what can be sent and how to send more: a prepared parameter declares its column's precision and scale, and raw SQL casts text itself. */\nfunction errorDecimalUnsendable(received, params, ctx) {\n\tconst { integer, fraction } = decimalParameterDigits(params);\n\tconst sendable = `at most ${integer} digits before the point and ${fraction === 0 ? \"none\" : fraction} after it`;\n\tconst target = ctx.column === void 0 ? `a ${MYSQL_DECIMAL_CODEC_ID} value` : `column \"${ctx.column.table}\".\"${ctx.column.name}\"`;\n\tconst round = fraction === 0 ? `Round the value to a whole number of at most ${digits(integer)}` : `Round the value to at most ${digits(fraction)} after the point and keep at most ${digits(integer)} before it`;\n\tconst meta = {\n\t\tcodecId: MYSQL_DECIMAL_CODEC_ID,\n\t\t...ctx.column === void 0 ? {} : {\n\t\t\ttable: ctx.column.table,\n\t\t\tcolumn: ctx.column.name\n\t\t},\n\t\treceived: received.slice(0, 100)\n\t};\n\tconst column = mysqlDecimalColumnOfReference(params);\n\tif (column === void 0) return mysqlError(\"RUNTIME.ENCODE_FAILED\", `Cannot write ${received} to ${target} declared without a precision: a value sent for it can have ${sendable}.`, {\n\t\tfix: `${round}. In a prepared statement, declare the parameter with the precision and scale of the column it is compared with or written to, as in { codecId: '${MYSQL_DECIMAL_CODEC_ID}', typeParams: { precision: 65, scale: 0 } }. In raw SQL, pass the value as text without param() and cast it in the SQL to the type of the column it is compared with or written to, as in CAST(\\${value} AS DECIMAL(65,0)) for a decimal(65,0) column.`,\n\t\tmeta\n\t});\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", `Cannot write ${received} to ${target}: a decimal(${column.precision},${column.scale}) column holds ${decimalColumnHolds(column)}, and a value sent for it can have ${sendable}.`, {\n\t\tfix: `${round}.`,\n\t\tmeta\n\t});\n}\n/** The text the codec sends for an application value: decimal text without leading zeros or a minus sign on zero, which the parameter's cast holds exactly. */\nfunction parameterText(value, params, ctx) {\n\tif (typeof value !== \"string\" || !isDecimalText(value)) throw errorColumnUnwritable({\n\t\tcodecId: MYSQL_DECIMAL_CODEC_ID,\n\t\treceived: describeReceived$1(value),\n\t\tcolumn: ctx.column,\n\t\tholds: EXAMPLE,\n\t\tfix: \"Pass the value as decimal text: an optional minus sign, digits, and an optional point and digits after it, with no exponent.\"\n\t});\n\tconst printed = printedDecimalText(value);\n\tconst digits = decimalTextDigits(printed);\n\tconst { integer, fraction } = decimalParameterDigits(params);\n\tif (digits.integer > integer || digits.fraction > fraction) throw errorDecimalUnsendable(describeReceived$1(value), params, ctx);\n\treturn printed;\n}\nvar MysqlDecimalCodec = class extends CodecImpl {\n\tasync toWire(value, ctx) {\n\t\treturn parameterText(value, this.dataTypeParams, ctx);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tif (typeof wire === \"string\" && isDecimalText(wire)) return wire;\n\t\tthrow errorColumnUnreadable({\n\t\t\tcodecId: MYSQL_DECIMAL_CODEC_ID,\n\t\t\treceived: describeReceived$1(wire),\n\t\t\tcolumn: ctx.column,\n\t\t\tnotA: \"decimal text\",\n\t\t\treads: EXAMPLE,\n\t\t\tfix: \"Read the column with a type that holds its value, or rewrite the row with a decimal number.\"\n\t\t});\n\t}\n\t/** The value, refused unless the column holds it. A default is checked before the target writes the parameters the server gives a column written without them, so parameters without a precision are checked as the `decimal(10,0)` the server makes. */\n\tfromDataTypeValue(value) {\n\t\treturn decimalTextInColumn(value.value, mysqlDecimalColumnAsCreated(this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlDecimalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDecimal.id;\n\tcodecId = MYSQL_DECIMAL_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tkeepsWrittenForm = true;\n\tparamsSchema = mysqlDecimalParams;\n\twrappedParameter(parameter, params) {\n\t\treturn CastExpr.as(parameter, decimalParameterType(params ?? {}));\n\t}\n\t/** The decimal text: a JSON number would lose every digit past a double's precision when the include is parsed. */\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"CHAR\");\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDecimalCodec(this, mysqlDecimal, params ?? {});\n\t}\n};\nconst mysqlDecimalDescriptor = new MysqlDecimalDescriptor();\n//#endregion\n//#region src/core/json-codec.ts\nfunction documentToWrite(value, ctx) {\n\tconst found = findNonJsonValue(value);\n\tif (found === void 0) return value;\n\tconst path = found.path === \"\" ? \"the root\" : found.path;\n\tconst target = ctx.column === void 0 ? `a ${MYSQL_JSON_CODEC_ID} value` : `column \"${ctx.column.table}\".\"${ctx.column.name}\"`;\n\tthrow mysqlError(\"RUNTIME.ENCODE_FAILED\", `Cannot write ${found.received} at ${path} to ${target}, which holds a JSON document.`, {\n\t\tfix: \"Pass a plain JSON value: objects, arrays, strings, finite numbers, booleans and null. Write a date as an ISO 8601 string, a bigint as a number or decimal text, and leave out a key whose value is undefined.\",\n\t\tmeta: {\n\t\t\tcodecId: MYSQL_JSON_CODEC_ID,\n\t\t\t...ctx.column === void 0 ? {} : {\n\t\t\t\ttable: ctx.column.table,\n\t\t\t\tcolumn: ctx.column.name\n\t\t\t},\n\t\t\treceived: found.received,\n\t\t\tvaluePath: found.path\n\t\t}\n\t});\n}\nfunction documentOfText(text, ctx) {\n\ttry {\n\t\treturn blindCast(JSON.parse(text));\n\t} catch {\n\t\tthrow errorColumnUnreadable({\n\t\t\tcodecId: MYSQL_JSON_CODEC_ID,\n\t\t\treceived: JSON.stringify(text),\n\t\t\tcolumn: ctx.column,\n\t\t\tnotA: \"JSON text\",\n\t\t\treads: \"JSON text as the document it holds\",\n\t\t\tfix: \"Rewrite the value as JSON text, or read the column as String(storage: text).\"\n\t\t});\n\t}\n}\nvar MysqlJsonCodec = class extends CodecImpl {\n\tasync toWire(value, ctx) {\n\t\treturn JSON.stringify(documentToWrite(value, ctx));\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn documentOfText(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(documentToWrite(input, {}));\n\t}\n};\nvar MysqlJsonDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlJson.id;\n\tcodecId = MYSQL_JSON_CODEC_ID;\n\ttraits = [];\n\tparamsSchema = void 0;\n\t/** The document's JSON text, which the codec reads as it reads a row. Nested as a document, a JSON string such as `\"12\"` would reach the codec as the text `12`, which it could not tell from a row's number. */\n\tjsonProjection(expression) {\n\t\treturn CastExpr.as(expression, \"CHAR\");\n\t}\n\tfactory() {\n\t\treturn () => new MysqlJsonCodec(this, mysqlJson);\n\t}\n};\nconst mysqlJsonDescriptor = new MysqlJsonDescriptor();\n//#endregion\n//#region src/core/longblob-codec.ts\n/**\n* `mysql/longblob@1`: bytes stored as `longblob`, read and written as a `Uint8Array`. A row carries the bytes. MySQL writes a blob into JSON as `\"base64:type251:…\"` and MariaDB as raw bytes, so an include projects the column as `TO_BASE64(v)`, which both servers write as plain base64 with a line break after every 76 characters, and the codec decodes it.\n*/\nconst LINE_BREAKS = /\\r?\\n/g;\nconst BASE64_CHARACTERS = /^[A-Za-z0-9+/]*={0,2}$/;\nfunction isBase64(text) {\n\treturn text.length % 4 === 0 && BASE64_CHARACTERS.test(text);\n}\nfunction describeReceived(value) {\n\treturn typeof value === \"string\" ? JSON.stringify(value) : String(value);\n}\nfunction bytesToWrite(value, ctx) {\n\tif (value instanceof Uint8Array) return value;\n\tthrow errorColumnUnwritable({\n\t\tcodecId: MYSQL_LONGBLOB_CODEC_ID,\n\t\treceived: describeReceived(value),\n\t\tcolumn: ctx.column,\n\t\tholds: \"bytes, written as a Uint8Array\",\n\t\tfix: \"Pass the bytes as a Uint8Array, such as new TextEncoder().encode(text) for the UTF-8 bytes of text.\"\n\t});\n}\n/** A `Uint8Array` that is not a subclass such as Node's `Buffer`, over the same memory. */\nfunction plainBytes(bytes) {\n\treturn bytes.constructor === Uint8Array ? bytes : new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n}\nfunction bytesOfBase64(text, ctx) {\n\tconst base64 = text.replace(LINE_BREAKS, \"\");\n\tif (isBase64(base64)) return plainBytes(Buffer.from(base64, \"base64\"));\n\tthrow errorColumnUnreadable({\n\t\tcodecId: MYSQL_LONGBLOB_CODEC_ID,\n\t\treceived: describeReceived(text),\n\t\tcolumn: ctx.column,\n\t\tnotA: \"base64 text\",\n\t\treads: \"a row's bytes, and in an include the base64 text TO_BASE64 writes\",\n\t\tfix: \"Read the column with its own query.\"\n\t});\n}\nvar MysqlLongblobCodec = class extends CodecImpl {\n\tasync toWire(value, ctx) {\n\t\treturn bytesToWrite(value, ctx);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\treturn wire instanceof Uint8Array ? plainBytes(wire) : bytesOfBase64(wire, ctx);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn plainBytes(Buffer.from(value.value, \"hex\"));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(Buffer.from(bytesToWrite(input, {})).toString(\"hex\").toUpperCase());\n\t}\n};\nvar MysqlLongblobDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlLongblob.id;\n\tcodecId = MYSQL_LONGBLOB_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tjsonProjection(expression) {\n\t\treturn FunctionCallExpr.of(\"TO_BASE64\", [expression]);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlLongblobCodec(this, mysqlLongblob);\n\t}\n};\nconst mysqlLongblobDescriptor = new MysqlLongblobDescriptor();\n//#endregion\n//#region src/core/codecs.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** A double as MySQL and MariaDB print it: `1.5`, `-2`, `9.007199254740992e15`. */\nconst DOUBLE_TEXT = /^-?\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?$/i;\nconst BIGINT_MIN = -(2n ** 63n);\nconst BIGINT_MAX = 2n ** 63n - 1n;\n/** Projects a bigint as its decimal text: a JSON number past 2^53 would lose digits when JavaScript parses the include. */\nconst textJsonProjection = (expression) => CastExpr.as(expression, \"CHAR\");\nfunction decodeFailed(codecId, expected, received) {\n\tthrow mysqlError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be ${expected}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(received)\n\t} });\n}\nfunction encodeFailed(codecId, expected, received) {\n\tthrow mysqlError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be ${expected}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(received)\n\t} });\n}\nconst mysqlSqlCharDescriptor = mysqlCodec(sqlCharDescriptor, {\n\tdataType: mysqlChar,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlCharCodec(descriptor, dataType, params)\n});\nconst mysqlSqlVarcharDescriptor = mysqlCodec(sqlVarcharDescriptor, {\n\tdataType: mysqlVarchar,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlVarcharCodec(descriptor, dataType, params)\n});\nconst mysqlSqlRawDescriptor = mysqlCodec(sqlRawDescriptor, {\n\tdataType: sqlRawDataType,\n\tjsonProjection: () => {\n\t\tthrow mysqlError(\"RUNTIME.AST_UNSUPPORTED\", \"Reading a raw column inside an include is not yet supported on MySQL and MariaDB.\", {\n\t\t\twhy: \"An include reads its rows as JSON, and Prisma cannot yet write a raw column's value into that JSON on MySQL and MariaDB.\",\n\t\t\tfix: \"Leave the raw column out of the include's select, and read it with its own query.\",\n\t\t\tmeta: { feature: \"Reading a raw column inside an include\" }\n\t\t});\n\t},\n\tfactory: (descriptor, dataType, params) => () => new SqlRawCodec(descriptor, dataType, params)\n});\nvar MysqlTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlTextDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlText.id;\n\tcodecId = MYSQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlTextCodec(this, mysqlText);\n\t}\n};\nconst mysqlTextDescriptor = new MysqlTextDescriptor();\n/** A MySQL `int` as a JavaScript number. A row carries it as decimal text, and an include's JSON as a number. */\nvar MysqlIntCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\tif (!Number.isSafeInteger(value)) return encodeFailed(MYSQL_INT_CODEC_ID, \"an integer\", value);\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\tif (typeof wire === \"number\") return wire;\n\t\tif (!DECIMAL_INTEGER.test(wire)) return decodeFailed(MYSQL_INT_CODEC_ID, \"the decimal text of an integer\", wire);\n\t\treturn Number(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlIntDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlInt.id;\n\tcodecId = MYSQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlIntCodec(this, mysqlInt);\n\t}\n};\nconst mysqlIntDescriptor = new MysqlIntDescriptor();\n/** A MySQL `bigint` as a JavaScript bigint. A row, an include's JSON and a parameter carry it as decimal text, as the Postgres `int8` codec does; MySQL reads a text parameter beside a `bigint` column exactly. */\nvar MysqlBigintCodec = class extends CodecImpl {\n\t/** The bigint itself: the driver writes it as bare digits, which MySQL reads as an exact integer even beside an expression, where it compares quoted text as a double. */\n\tasync toWire(value, _ctx) {\n\t\tif (typeof value !== \"bigint\" || value < BIGINT_MIN || value > BIGINT_MAX) return encodeFailed(MYSQL_BIGINT_CODEC_ID, `a bigint from ${BIGINT_MIN} to ${BIGINT_MAX}`, value);\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\tif (typeof wire === \"bigint\") return wire;\n\t\tif (!DECIMAL_INTEGER.test(wire)) return decodeFailed(MYSQL_BIGINT_CODEC_ID, \"the decimal text of an integer\", wire);\n\t\treturn BigInt(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn BigInt(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input.toString());\n\t}\n};\nvar MysqlBigintDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlBigint.id;\n\tcodecId = MYSQL_BIGINT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn textJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlBigintCodec(this, mysqlBigint);\n\t}\n};\nconst mysqlBigintDescriptor = new MysqlBigintDescriptor();\nconst SAFE_INTEGER_FIX = \"Read the column as BigInt, which reads a JavaScript bigint, or keep its values within ±(2^53 − 1).\";\n/** A value read without a column is an aggregate's result, an aggregate in an include, a computed projection or a raw query's column; the codec cannot tell which, so the fix names each. */\nconst SAFE_INTEGER_RESULT_FIX = \"The value does not fit a JavaScript number. Use an aggregate's BigInt form, such as sumBigInt or countBigInt; for a column's value, such as its min or max, declare the field BigInt, or read it as mysql/bigint@1 in a raw query.\";\nfunction safeIntegerToWrite(value, ctx) {\n\tif (typeof value === \"number\" && Number.isSafeInteger(value)) return value;\n\tthrow errorColumnUnwritable({\n\t\tcodecId: MYSQL_BIGINT_NUMBER_CODEC_ID,\n\t\treceived: String(value),\n\t\tcolumn: ctx.column,\n\t\tholds: \"integers read as JavaScript numbers, within ±(2^53 − 1)\",\n\t\tfix: SAFE_INTEGER_FIX\n\t});\n}\nfunction unreadableSafeInteger(wire, ctx) {\n\tthrow errorColumnUnreadable({\n\t\tcodecId: MYSQL_BIGINT_NUMBER_CODEC_ID,\n\t\treceived: String(wire),\n\t\tcolumn: ctx.column,\n\t\tnotA: \"an integer within the safe integer range\",\n\t\treads: \"a JavaScript number, an integer within ±(2^53 − 1)\",\n\t\tfix: ctx.column === void 0 ? SAFE_INTEGER_RESULT_FIX : SAFE_INTEGER_FIX\n\t});\n}\n/** A MySQL `bigint`, or an integral `DECIMAL` such as a `SUM` of integers, as a JavaScript number. Both directions refuse a value outside ±(2^53 − 1) rather than round it, naming the column where the read knows it. A row and an include's JSON carry it as decimal text, so the range is checked before any digit is lost. */\nvar MysqlBigintNumberCodec = class extends CodecImpl {\n\tasync toWire(value, ctx) {\n\t\treturn safeIntegerToWrite(value, ctx);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tif (typeof wire === \"number\") return Number.isSafeInteger(wire) ? wire : unreadableSafeInteger(wire, ctx);\n\t\tif (!DECIMAL_INTEGER.test(wire)) return unreadableSafeInteger(wire, ctx);\n\t\tconst value = BigInt(wire);\n\t\tif (value < SAFE_INTEGER_BIGINT_RANGE.min || value > SAFE_INTEGER_BIGINT_RANGE.max) return unreadableSafeInteger(wire, ctx);\n\t\treturn Number(value);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn Number(readJsonIntegerText(MYSQL_BIGINT_NUMBER_CODEC_ID, value.value, SAFE_INTEGER_BIGINT_RANGE));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(String(safeIntegerToWrite(input, {})));\n\t}\n};\nvar MysqlBigintNumberDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlBigint.id;\n\tcodecId = MYSQL_BIGINT_NUMBER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextNumberLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn textJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlBigintNumberCodec(this, mysqlBigint);\n\t}\n};\nconst mysqlBigintNumberDescriptor = new MysqlBigintNumberDescriptor();\nfunction finiteDoubleToWrite(value, ctx) {\n\tif (typeof value === \"number\" && Number.isFinite(value)) return value;\n\tthrow errorColumnUnwritable({\n\t\tcodecId: MYSQL_DOUBLE_CODEC_ID,\n\t\treceived: String(value),\n\t\tcolumn: ctx.column,\n\t\tholds: \"finite numbers only: MySQL and MariaDB store no NaN or infinity\",\n\t\tfix: \"Write a finite number, or store NaN and infinity in another column, such as a nullable one left NULL.\"\n\t});\n}\n/** A MySQL `double` as a JavaScript number. A row carries it as the text MySQL prints, `1.5` or `9.007199254740992e15`, and an include's JSON as a number. MySQL and MariaDB hold no NaN or infinity, so the codec refuses to write one. */\nvar MysqlDoubleCodec = class extends CodecImpl {\n\tasync toWire(value, ctx) {\n\t\treturn finiteDoubleToWrite(value, ctx);\n\t}\n\tasync fromWire(wire, ctx) {\n\t\tconst value = typeof wire === \"number\" ? wire : DOUBLE_TEXT.test(wire) ? Number(wire) : NaN;\n\t\tif (Number.isFinite(value)) return value;\n\t\tthrow errorColumnUnreadable({\n\t\t\tcodecId: MYSQL_DOUBLE_CODEC_ID,\n\t\t\treceived: typeof wire === \"string\" ? JSON.stringify(wire) : String(wire),\n\t\t\tcolumn: ctx.column,\n\t\t\tnotA: \"a finite number\",\n\t\t\treads: \"the text MySQL and MariaDB print for a double, such as 1.5 or 9.007199254740992e15\",\n\t\t\tfix: \"Read the column with a type that holds its value.\"\n\t\t});\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(finiteDoubleToWrite(input, {}));\n\t}\n};\nvar MysqlDoubleDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDouble.id;\n\tcodecId = MYSQL_DOUBLE_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn floatNumberLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlDoubleCodec(this, mysqlDouble);\n\t}\n};\nconst mysqlDoubleDescriptor = new MysqlDoubleDescriptor();\n/**\n* Reads the text MySQL sends for a `datetime` as the instant it names in UTC: the codec writes every value in UTC, so the column holds no time zone of its own.\n*/\nfunction decodeMysqlDatetime(wire) {\n\treturn dateOfWireText(MYSQL_DATETIME_CODEC_ID, wire);\n}\n/** The text MySQL reads for an instant in UTC, with millisecond digits. A `Date` outside the years a `datetime` holds is refused. */\nfunction encodeMysqlDatetime(value) {\n\treturn wireTextOfDate(MYSQL_DATETIME_CODEC_ID, value, mysqlDatetimeText);\n}\n/** A MySQL `datetime` as a JavaScript `Date`, read and written in UTC. */\nvar MysqlDatetimeCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(encodeMysqlDatetime(value), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn decodeMysqlDatetime(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\tconst stored = storedWithinPrecision(this.id, value.value, this.dataTypeParams);\n\t\tif (hasDigitsBelowAMillisecond(stored)) return refuseJsonValue(this.id, `a datetime with no digits below a millisecond, which a Date drops: ${JSON.stringify(value.value)} has them`, value.value);\n\t\treturn /* @__PURE__ */ new Date(`${stored}Z`);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input.toISOString().replace(\"Z\", \"\"));\n\t}\n};\nvar MysqlDatetimeDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDatetime.id;\n\tcodecId = MYSQL_DATETIME_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDatetimeCodec(this, mysqlDatetime, params);\n\t}\n};\nconst mysqlDatetimeDescriptor = new MysqlDatetimeDescriptor();\n/** A native MySQL enum column, whose value is the member's text. */\nvar MysqlEnumCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlEnumDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlEnum.id;\n\tcodecId = MYSQL_ENUM_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = mysqlEnumParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlEnumCodec(this, mysqlEnum, params);\n\t}\n};\n/** Every codec descriptor this target ships. */\nconst codecDescriptors = [\n\tmysqlSqlCharDescriptor,\n\tmysqlSqlVarcharDescriptor,\n\tmysqlSqlRawDescriptor,\n\tmysqlTextDescriptor,\n\tmysqlIntDescriptor,\n\tmysqlBigintDescriptor,\n\tmysqlBigintNumberDescriptor,\n\tmysqlDoubleDescriptor,\n\tmysqlDecimalDescriptor,\n\tmysqlBooleanDescriptor,\n\tmysqlLongblobDescriptor,\n\tmysqlJsonDescriptor,\n\tmysqlDatetimeDescriptor,\n\tmysqlDatetimeTemporalDescriptor,\n\tmysqlDatetimeStringDescriptor,\n\tmysqlTimestampDateDescriptor,\n\tmysqlTimestampTemporalDescriptor,\n\tmysqlTimestampStringDescriptor,\n\tmysqlDateStringDescriptor,\n\tmysqlDateTemporalDescriptor,\n\tmysqlTimeStringDescriptor,\n\tmysqlTimeTemporalDescriptor,\n\tmysqlDurationStringDescriptor,\n\tnew MysqlEnumDescriptor()\n];\n//#endregion\n//#region src/core/registry.ts\n/** Every codec descriptor `@internal/target-mysql` ships, for consumers that enumerate or look up a MySQL codec by id. ADR 208. */\nconst mysqlCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst mysqlCodecDescriptorRegistry = buildMysqlCodecDescriptorRegistry(codecDescriptors);\n//#endregion\n//#region src/core/codec-registry.ts\nfunction descriptorsFrom(contributors) {\n\treturn contributors.flatMap((contributor) => contributor.types?.codecTypes?.codecDescriptors ?? []);\n}\nfunction buildMysqlCodecRegistry(descriptors) {\n\tconst descriptorRegistry = buildMysqlCodecDescriptorRegistry(descriptors);\n\tconst registry = {\n\t\t...extractCodecLookup([{\n\t\t\tid: \"mysql-codecs\",\n\t\t\ttypes: { codecTypes: { codecDescriptors: Array.from(descriptorRegistry.values()) } }\n\t\t}]),\n\t\tdescriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),\n\t\tvalues: () => descriptorRegistry.values()\n\t};\n\treturn Object.freeze(registry);\n}\n/** The codec registry of a MySQL stack: the target's built-in codecs and those its extensions contribute. */\nfunction assembleMysqlCodecRegistry(target, extensions) {\n\treturn buildMysqlCodecRegistry([\n\t\t...descriptorsFrom([target]),\n\t\t...mysqlCodecDescriptorRegistry.values(),\n\t\t...descriptorsFrom(extensions)\n\t]);\n}\n/** A codec registry of the MySQL built-in codecs only. */\nfunction createMysqlBuiltinCodecLookup() {\n\treturn buildMysqlCodecRegistry([...mysqlCodecDescriptorRegistry.values()]);\n}\n//#endregion\nexport { MYSQL_DATE_NOW, MYSQL_INSTANT_NOW, MYSQL_TIME_NOW, assembleMysqlCodecRegistry, createMysqlBuiltinCodecLookup, decodeMysqlDatetime, encodeMysqlDatetime, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCurrentValueFor, mysqlNowExpression };\n\n//# sourceMappingURL=codecs.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAS,eAAe,OAAO,KAAK;CACnC,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,MAAM,sBAAsB;EAC3B,SAAS;EACT,UAAU,KAAK,UAAU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AAoB;AACzB;;AAIA,MAAM,qBAAqB,6BAA6B,gBAAgB;AACxE,MAAM,+BAA+B,kCAAkC,gBAAgB;AAGvF,SAAS,gBAAgB,cAAc;CACtC,OAAO,aAAa,SAAS,gBAAgB,YAAY,OAAO,YAAY,oBAAoB,CAAC,CAAC;AACnG;AACA,SAAS,wBAAwB,aAAa;CAC7C,MAAM,qBAAqB,kCAAkC,WAAW;CACxE,MAAM,WAAW;EAChB,GAAG,mBAAmB,CAAC;GACtB,IAAI;GACJ,OAAO,EAAE,YAAY,EAAE,kBAAkB,MAAM,KAAK,mBAAmB,OAAO,CAAC,EAAE,EAAE;EACpF,CAAC,CAAC;EACF,gBAAgB,YAAY,mBAAmB,cAAc,OAAO;EACpE,cAAc,mBAAmB,OAAO;CACzC;CACA,OAAO,OAAO,OAAO,QAAQ;AAC9B;;AAEA,SAAS,2BAA2B,QAAQ,YAAY;CACvD,OAAO,wBAAwB;EAC9B,GAAG,gBAAgB,CAAC,MAAM,CAAC;EAC3B,GAAG,6BAA6B,OAAO;EACvC,GAAG,gBAAgB,UAAU;CAC9B,CAAC;AACF;;AAEA,SAAS,gCAAgC;CACxC,OAAO,wBAAwB,CAAC,GAAG,6BAA6B,OAAO,CAAC,CAAC;AAC1E"}
@@ -5,11 +5,9 @@ import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  //#region ../../../3-targets/mysql/1-mysql/1-target/dist/control.d.mts
6
6
  //#region src/core/migrations/control-target.d.ts
7
7
  /** The keys of the control target that MySQL builds itself, which a target that extends MySQL does not supply. */
8
- type ControlTargetKeysMysqlBuilds = 'contractSerializer' | 'schemaVerifier' | 'diffSchema' | 'classifySubjectGranularity' | 'classifyEntityKind' | 'migrations' | 'create' | 'createPlanner' | 'createRunner';
9
- /** What a target that extends MySQL gives the control target factory: its descriptor meta, which carries its target id and session settings, and the facade module its `migration.ts` files import from. */
8
+ type ControlTargetKeysMysqlBuilds = 'contractSerializer' | 'schemaVerifier' | 'diffSchema' | 'classifySubjectGranularity' | 'classifyEntityKind' | 'accessChangesOf' | 'migrations' | 'create' | 'createPlanner' | 'createRunner';
10
9
  interface MysqlControlTargetOptions<TargetId extends string> {
11
10
  readonly descriptorMeta: Omit<SqlControlTargetDescriptor<TargetId, MysqlPlanTargetDetails>, ControlTargetKeysMysqlBuilds>;
12
- readonly migrationModule: string;
13
11
  }
14
12
  /** The control target of MySQL, or of a target that extends it, which reuses MySQL's planner, runner, schema verifier and contract serializer under its own target id. */
15
13
  declare function createMysqlControlTargetDescriptor<TargetId extends string = 'mysql'>(options: MysqlControlTargetOptions<TargetId>): SqlControlTargetDescriptor<TargetId, MysqlPlanTargetDetails>;
@@ -17,7 +15,7 @@ declare const mysqlControlTargetDescriptor: SqlControlTargetDescriptor<"mysql",
17
15
  //#endregion
18
16
  //#region src/core/type-constructors.d.ts
19
17
  /**
20
- * The base scalars, the explicit date and time types and the convenience date and time types as type constructors. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.
18
+ * The explicit and convenience scalar types, the explicit date and time types and the convenience date and time types. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.
21
19
  */
22
20
  declare const mysqlScalarTypeConstructors: {
23
21
  readonly DateTime: {
@@ -373,17 +371,183 @@ declare const mysqlScalarTypeConstructors: {
373
371
  };
374
372
  };
375
373
  };
374
+ readonly Int: {
375
+ readonly kind: "typeChoice";
376
+ readonly documentation: "An integer read as a JavaScript number, stored as MySQL int, a signed 32-bit integer.";
377
+ readonly args: readonly [{
378
+ readonly kind: "option";
379
+ readonly name: "storage";
380
+ readonly values: readonly ["int"];
381
+ readonly default: "int";
382
+ readonly optional: true;
383
+ }];
384
+ readonly choices: readonly [{
385
+ readonly when: {
386
+ readonly storage: "int";
387
+ };
388
+ readonly type: "Int4";
389
+ }];
390
+ };
391
+ readonly BigInt: {
392
+ readonly kind: "typeChoice";
393
+ readonly documentation: "A signed 64-bit integer, stored as MySQL bigint. `as` is what the application reads: bigint, or number within the safe integer range.";
394
+ readonly args: readonly [{
395
+ readonly kind: "option";
396
+ readonly name: "as";
397
+ readonly values: readonly ["bigint", "number"];
398
+ readonly default: "bigint";
399
+ readonly optional: true;
400
+ }, {
401
+ readonly kind: "option";
402
+ readonly name: "storage";
403
+ readonly values: readonly ["bigint"];
404
+ readonly default: "bigint";
405
+ readonly optional: true;
406
+ }];
407
+ readonly choices: readonly [{
408
+ readonly when: {
409
+ readonly as: "bigint";
410
+ readonly storage: "bigint";
411
+ };
412
+ readonly type: "Int8BigInt";
413
+ }, {
414
+ readonly when: {
415
+ readonly as: "number";
416
+ readonly storage: "bigint";
417
+ };
418
+ readonly type: "Int8Number";
419
+ }];
420
+ };
421
+ readonly Float: {
422
+ readonly kind: "typeChoice";
423
+ readonly documentation: "A floating-point number, stored as MySQL double, a double-precision float, which holds every JavaScript number but NaN and the infinities; -0 is written as 0.";
424
+ readonly args: readonly [{
425
+ readonly kind: "option";
426
+ readonly name: "storage";
427
+ readonly values: readonly ["double"];
428
+ readonly default: "double";
429
+ readonly optional: true;
430
+ }];
431
+ readonly choices: readonly [{
432
+ readonly when: {
433
+ readonly storage: "double";
434
+ };
435
+ readonly type: "Float8";
436
+ }];
437
+ };
438
+ readonly Decimal: {
439
+ readonly kind: "typeChoice";
440
+ readonly documentation: "An exact decimal number, read as decimal text with every digit the column holds after the point, such as \"12.50\" in a decimal(10,2). `storage` is decimal, of `precision` digits, `scale` of them after the point: decimal(65,30) unless written.";
441
+ readonly args: readonly [{
442
+ readonly kind: "option";
443
+ readonly name: "storage";
444
+ readonly values: readonly ["decimal"];
445
+ readonly default: "decimal";
446
+ readonly optional: true;
447
+ }, {
448
+ readonly kind: "value";
449
+ readonly dataType: "mysql/int";
450
+ readonly name: "precision";
451
+ readonly optional: true;
452
+ }, {
453
+ readonly kind: "value";
454
+ readonly dataType: "mysql/int";
455
+ readonly name: "scale";
456
+ readonly optional: true;
457
+ }];
458
+ readonly choices: readonly [{
459
+ readonly when: {
460
+ readonly storage: "decimal";
461
+ };
462
+ readonly type: "NumericString";
463
+ readonly defaults: {
464
+ readonly precision: 65;
465
+ readonly scale: 30;
466
+ };
467
+ }];
468
+ };
376
469
  readonly String: {
377
- readonly kind: "typeConstructor";
378
- readonly documentation: "Text of at most 191 characters, stored as MySQL varchar(191) so that it can be indexed.";
379
- readonly output: {
380
- readonly codecId: "sql/varchar@1";
381
- readonly typeParams: {
470
+ readonly kind: "typeChoice";
471
+ readonly documentation: "Text. `storage` is varchar, of at most `length` characters, 191 unless written, so that it can be indexed; or text, of up to 65,535 bytes, which cannot be indexed without a prefix length.";
472
+ readonly args: readonly [{
473
+ readonly kind: "option";
474
+ readonly name: "storage";
475
+ readonly values: readonly ["varchar", "text"];
476
+ readonly default: "varchar";
477
+ readonly optional: true;
478
+ }, {
479
+ readonly optional: true;
480
+ readonly kind: "value";
481
+ readonly dataType: "mysql/int";
482
+ readonly name: "length";
483
+ }];
484
+ readonly choices: readonly [{
485
+ readonly when: {
486
+ readonly storage: "varchar";
487
+ };
488
+ readonly type: "Varchar";
489
+ readonly defaults: {
382
490
  readonly length: 191;
383
491
  };
384
- };
492
+ }, {
493
+ readonly when: {
494
+ readonly storage: "text";
495
+ };
496
+ readonly type: "Text";
497
+ }];
385
498
  };
386
- readonly Int: {
499
+ readonly Boolean: {
500
+ readonly kind: "typeChoice";
501
+ readonly documentation: "A boolean, stored as MySQL tinyint(1) holding 0 or 1, which is what MySQL writes for TRUE and FALSE.";
502
+ readonly args: readonly [{
503
+ readonly kind: "option";
504
+ readonly name: "storage";
505
+ readonly values: readonly ["tinyint"];
506
+ readonly default: "tinyint";
507
+ readonly optional: true;
508
+ }];
509
+ readonly choices: readonly [{
510
+ readonly when: {
511
+ readonly storage: "tinyint";
512
+ };
513
+ readonly type: "Bool";
514
+ }];
515
+ };
516
+ readonly Bytes: {
517
+ readonly kind: "typeChoice";
518
+ readonly documentation: "Bytes, read as a Uint8Array, stored as MySQL longblob, which holds up to 4 GB and cannot be indexed without a prefix length.";
519
+ readonly args: readonly [{
520
+ readonly kind: "option";
521
+ readonly name: "storage";
522
+ readonly values: readonly ["longblob"];
523
+ readonly default: "longblob";
524
+ readonly optional: true;
525
+ }];
526
+ readonly choices: readonly [{
527
+ readonly when: {
528
+ readonly storage: "longblob";
529
+ };
530
+ readonly type: "Longblob";
531
+ }];
532
+ };
533
+ readonly Json: {
534
+ readonly kind: "typeChoice";
535
+ readonly documentation: "A JSON document, read as the JSON value it holds, stored as MySQL json. It has no equality filter and no ordering. MySQL sorts the keys of a stored object; MariaDB keeps the text as written.";
536
+ readonly args: readonly [{
537
+ readonly kind: "option";
538
+ readonly name: "storage";
539
+ readonly values: readonly ["json"];
540
+ readonly default: "json";
541
+ readonly optional: true;
542
+ }];
543
+ readonly choices: readonly [{
544
+ readonly when: {
545
+ readonly storage: "json";
546
+ };
547
+ readonly type: "PlainJson";
548
+ }];
549
+ };
550
+ readonly Int4: {
387
551
  readonly kind: "typeConstructor";
388
552
  readonly inferred: true;
389
553
  readonly documentation: "A signed 32-bit integer stored as MySQL int and represented as a JavaScript number.";
@@ -391,7 +555,7 @@ declare const mysqlScalarTypeConstructors: {
391
555
  readonly codecId: "mysql/int@1";
392
556
  };
393
557
  };
394
- readonly BigInt: {
558
+ readonly Int8BigInt: {
395
559
  readonly kind: "typeConstructor";
396
560
  readonly inferred: true;
397
561
  readonly documentation: "A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript bigint.";
@@ -399,7 +563,102 @@ declare const mysqlScalarTypeConstructors: {
399
563
  readonly codecId: "mysql/bigint@1";
400
564
  };
401
565
  };
566
+ readonly Int8Number: {
567
+ readonly kind: "typeConstructor";
568
+ readonly documentation: "A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript number within its safe integer range.";
569
+ readonly output: {
570
+ readonly codecId: "mysql/bigintnumber@1";
571
+ };
572
+ };
573
+ readonly Float8: {
574
+ readonly kind: "typeConstructor";
575
+ readonly inferred: true;
576
+ readonly documentation: "A double-precision floating-point number stored as MySQL double and represented as a JavaScript number.";
577
+ readonly output: {
578
+ readonly codecId: "mysql/double@1";
579
+ };
580
+ };
581
+ readonly NumericString: {
582
+ readonly kind: "typeConstructor";
583
+ readonly inferred: true;
584
+ readonly documentation: "An exact decimal number stored as MySQL decimal and represented as decimal text, with every digit the column holds after the point: 1.5 in a decimal(10,2) reads \"1.50\". `precision` is the digits the column holds, at most 65, and `scale` the digits after the point, at most 30; MySQL holds decimal(10,0) when neither is written.";
585
+ readonly args: readonly [{
586
+ readonly kind: "value";
587
+ readonly dataType: "mysql/int";
588
+ readonly name: "precision";
589
+ readonly optional: true;
590
+ }, {
591
+ readonly kind: "value";
592
+ readonly dataType: "mysql/int";
593
+ readonly name: "scale";
594
+ readonly optional: true;
595
+ }];
596
+ readonly output: {
597
+ readonly codecId: "mysql/decimal@1";
598
+ readonly typeParams: {
599
+ readonly precision: {
600
+ readonly kind: "arg";
601
+ readonly index: 0;
602
+ };
603
+ readonly scale: {
604
+ readonly kind: "arg";
605
+ readonly index: 1;
606
+ };
607
+ };
608
+ };
609
+ };
610
+ readonly Varchar: {
611
+ readonly kind: "typeConstructor";
612
+ readonly inferred: true;
613
+ readonly documentation: "Text of at most `length` characters, stored as MySQL varchar. A column of at most 191 characters can be indexed.";
614
+ readonly args: readonly [{
615
+ readonly kind: "value";
616
+ readonly dataType: "mysql/int";
617
+ readonly name: "length";
618
+ }];
619
+ readonly output: {
620
+ readonly codecId: "sql/varchar@1";
621
+ readonly typeParams: {
622
+ readonly length: {
623
+ readonly kind: "arg";
624
+ readonly index: 0;
625
+ };
626
+ };
627
+ };
628
+ };
629
+ readonly Text: {
630
+ readonly kind: "typeConstructor";
631
+ readonly inferred: true;
632
+ readonly documentation: "Text of up to 65,535 bytes, stored as MySQL text. MySQL cannot index a text column without a prefix length.";
633
+ readonly output: {
634
+ readonly codecId: "mysql/text@1";
635
+ };
636
+ };
637
+ readonly Bool: {
638
+ readonly kind: "typeConstructor";
639
+ readonly inferred: true;
640
+ readonly documentation: "A boolean stored as MySQL tinyint(1) holding 0 or 1 and represented as a JavaScript boolean. A stored value other than 0 or 1 fails to read.";
641
+ readonly output: {
642
+ readonly codecId: "mysql/boolean@1";
643
+ };
644
+ };
645
+ readonly Longblob: {
646
+ readonly kind: "typeConstructor";
647
+ readonly inferred: true;
648
+ readonly documentation: "Bytes stored as MySQL longblob and represented as a Uint8Array. MySQL cannot index a longblob column without a prefix length.";
649
+ readonly output: {
650
+ readonly codecId: "mysql/longblob@1";
651
+ };
652
+ };
653
+ readonly PlainJson: {
654
+ readonly kind: "typeConstructor";
655
+ readonly inferred: true;
656
+ readonly documentation: "A JSON document stored as MySQL json, which MariaDB stores as longtext with a json_valid check, and represented as the JSON value. A json column has no equality filter and no ordering.";
657
+ readonly output: {
658
+ readonly codecId: "mysql/json@1";
659
+ };
660
+ };
402
661
  };
403
662
  //#endregion
404
663
  export { mysqlScalarTypeConstructors as i, createMysqlControlTargetDescriptor as n, mysqlControlTargetDescriptor as r, MysqlControlTargetOptions as t };
405
- //# sourceMappingURL=control-Dj8nIA1M.d.mts.map
664
+ //# sourceMappingURL=control-B7v7zc3l.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-B7v7zc3l.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/control.d.mts"],"mappings":";;;;;;;KAMK;UACK,0BAA0B;WACzB,gBAAgB,KAAK,2BAA2B,UAAU,yBAAyB;;;iBAG7E,mCAAmC,mCAAmC,SAAS,0BAA0B,YAAY,2BAA2B,UAAU;cAC7J,8BAA8B,oCAAoC,wBAAwB,SAAS;;;;;;cAMnG;WACH;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;aAEF;eACE;iBACE;iBACA;;eAEF;eACA;iBACE;;;eAGF;iBACE;iBACA;;eAEF;eACA;iBACE;;;eAGF;iBACE;iBACA;;eAEF;eACA;iBACE;;;eAGF;iBACE;iBACA;;eAEF;eACA;iBACE;;;eAGF;iBACE;iBACA;;eAEF;eACA;iBACE;;;eAGF;iBACE;iBACA;;eAEF;eACA;iBACE;;;;WAIN;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;iBACA;;eAEF;;eAEA;iBACE;iBACA;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;aAEF;eACE;iBACE;iBACA;;eAEF;eACA;iBACE;;;eAGF;iBACE;iBACA;;eAEF;eACA;iBACE;;;;WAIN;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;iBACA;;eAEF;;;WAGJ;aACE;aACA;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;aACA;eACE;eACA;iBACE;;;;WAIN;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;iBACA;;eAEF;;eAEA;iBACE;iBACA;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;eACA;iBACE;iBACA;;;;WAIN;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;eACA;iBACE;;;eAGF;iBACE;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;eACA;;aAEF;eACE;iBACE;;eAEF;;;WAGJ;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE;eACA;eACA;eACA;;eAEA;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;iBAEF;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;aACA;eACE;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;aACA;eACE"}
@@ -1,6 +1,16 @@
1
+ import { a as MysqlRuntimeTargetMeta } from "./runtime-Ci3hPz1j.mjs";
1
2
  import { ControlDriverDescriptor } from "@prisma/orm-framework/components/control";
2
3
  import { SqlControlDriverInstance } from "@prisma/orm-family-sql/contract/types";
3
4
  import { Connection } from "mariadb";
5
+ //#region ../../../3-targets/mysql/1-mysql/3-driver/dist/normalize-error-Ct32Enpq.d.mts
6
+ //#region src/core/normalize-error.d.ts
7
+ /** The database a driver runs on, as its errors describe it. */
8
+ interface MysqlServer {
9
+ readonly displayName: string;
10
+ /** The error numbers it reports a failed CHECK constraint with. MySQL and MariaDB share their error numbers below 1900 and number the rest apart, so the same number means something else on the other. */
11
+ readonly checkViolationErrors: readonly number[];
12
+ }
13
+ //#endregion
4
14
  //#region ../../../3-targets/mysql/1-mysql/3-driver/dist/control.d.mts
5
15
  //#region src/core/migrations/control-driver.d.ts
6
16
  /**
@@ -10,8 +20,9 @@ declare class MysqlControlDriverFor<TargetId extends string> implements SqlContr
10
20
  #private;
11
21
  private readonly connection;
12
22
  readonly targetId: TargetId;
23
+ private readonly server;
13
24
  readonly familyId: "sql";
14
- constructor(connection: Connection, targetId: TargetId);
25
+ constructor(connection: Connection, targetId: TargetId, server: MysqlServer);
15
26
  /** Runs `sql` and returns its rows, every column as text and a binary column as bytes. */
16
27
  query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
17
28
  readonly rows: Row[];
@@ -23,9 +34,15 @@ declare class MysqlControlDriverFor<TargetId extends string> implements SqlContr
23
34
  declare class MysqlControlDriver extends MysqlControlDriverFor<'mysql'> {
24
35
  constructor(connection: Connection);
25
36
  }
26
- /** The control driver descriptor of MySQL, or of a target that extends it, whose drivers carry `targetId`. */
27
- declare function createMysqlControlDriverDescriptor<TargetId extends string>(targetId: TargetId): ControlDriverDescriptor<'sql', TargetId, SqlControlDriverInstance<TargetId>>;
37
+ interface MysqlControlDriverOptions<TargetId extends string> {
38
+ /** The target's runtime metadata: its drivers carry its id and name it by its display name in their errors. */
39
+ readonly target: Pick<MysqlRuntimeTargetMeta<TargetId>, 'targetId' | 'displayName'>;
40
+ /** The error numbers the database reports a failed CHECK constraint with, which its drivers report with Postgres's SQLSTATE 23514. */
41
+ readonly checkViolationErrors: readonly number[];
42
+ }
43
+ /** The control driver descriptor of MySQL, or of a target that extends it. */
44
+ declare function createMysqlControlDriverDescriptor<TargetId extends string>(options: MysqlControlDriverOptions<TargetId>): ControlDriverDescriptor<'sql', TargetId, SqlControlDriverInstance<TargetId>>;
28
45
  declare const mysqlDriverDescriptor: ControlDriverDescriptor<'sql', 'mysql', MysqlControlDriver>;
29
46
  //#endregion
30
- export { createMysqlControlDriverDescriptor as n, mysqlDriverDescriptor as r, MysqlControlDriver as t };
31
- //# sourceMappingURL=control-D7_IpeiU.d.mts.map
47
+ export { mysqlDriverDescriptor as i, MysqlControlDriverOptions as n, createMysqlControlDriverDescriptor as r, MysqlControlDriver as t };
48
+ //# sourceMappingURL=control-BFe8NrSk.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-BFe8NrSk.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/3-driver/dist/normalize-error-Ct32Enpq.d.mts","../../../../3-targets/mysql/1-mysql/3-driver/dist/control.d.mts"],"mappings":";;;;;;;UAGU;WACC;;WAEA;;;;;;;;cCGG,sBAAsB,oCAAoC,yBAAyB;;mBAE9E;WACR,UAAU;mBACF;WACR;EACT,YAAY,YAAY,YAAY,UAAU,UAAU,QAAQ;;EAEhE,MAAM,MAAM,yBAAyB,aAAa,8BAA8B;aACrE,MAAM;;EAEjB,gBAAgB;EAChB,SAAS;;;cAGG,2BAA2B;EACvC,YAAY,YAAY;;UAEhB,0BAA0B;;WAEzB,QAAQ,KAAK,uBAAuB;;WAEpC;;;iBAGM,mCAAmC,yBAAyB,SAAS,0BAA0B,YAAY,+BAA+B,UAAU,yBAAyB;cAChL,uBAAuB,wCAAwC"}