@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
@@ -1,13 +1,13 @@
1
- import { s as mysqlError } from "./errors-Cng94tYg-DTH51xWG.mjs";
2
- import { n as quoteIdentifier } from "./sql-utils-Cmv_TVa8-CNW3UmfQ.mjs";
3
- import { t as tokenizeMysqlSql } from "./sql-utils-BE8tDXHs.mjs";
4
- import { structuredError } from "@prisma/orm-framework/utils/structured-error";
1
+ import { l as mysqlError } from "./errors-CWtFTnst-xBLJ-9Lp.mjs";
2
+ import { n as quoteIdentifier } from "./sql-utils-CveZhawQ-B2QmUlY0.mjs";
3
+ import { t as tokenizeMysqlSql } from "./sql-utils-DVH8boEI.mjs";
5
4
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
5
+ import { structuredError } from "@prisma/orm-framework/utils/structured-error";
6
6
  import { type } from "arktype";
7
7
  import { readFileSync } from "node:fs";
8
8
  import { SqlConnectionError, SqlQueryError } from "@prisma/orm-family-sql/errors";
9
9
  import { assertDefined } from "@prisma/orm-framework/utils/assertions";
10
- //#region ../../../3-targets/mysql/1-mysql/3-driver/dist/statement-CT5tB4uX.mjs
10
+ //#region ../../../3-targets/mysql/1-mysql/3-driver/dist/statement-a2Eekpu6.mjs
11
11
  var AsyncMutex = class {
12
12
  #queue = Promise.resolve();
13
13
  async lock() {
@@ -130,46 +130,46 @@ const FIXED_OPTIONS = {
130
130
  typeCast: readTextOrBytes
131
131
  };
132
132
  /** Refuses the URL. `parameters` names the parameters at fault; no value from the URL goes into the error, because a URL carries the password. */
133
- function invalidBinding(reason, parameters) {
134
- return structuredError("RUNTIME.BINDING_INVALID", `MySQL connection URL: ${reason}`, { meta: {
133
+ function invalidBinding(displayName, reason, parameters) {
134
+ return structuredError("RUNTIME.BINDING_INVALID", `${displayName} connection URL: ${reason}`, { meta: {
135
135
  received: parameters.join(", "),
136
136
  reason
137
137
  } });
138
138
  }
139
139
  /** Parses `url` as the Postgres facade does, refusing it without the parser's error, which carries the whole URL. */
140
- function parseUrl(url) {
140
+ function parseUrl(url, displayName) {
141
141
  try {
142
142
  return new URL(url);
143
143
  } catch {
144
- throw invalidBinding("the URL cannot be parsed", []);
144
+ throw invalidBinding(displayName, "the URL cannot be parsed", []);
145
145
  }
146
146
  }
147
- function readUrl(url) {
148
- const parsed = parseUrl(url);
149
- if (parsed.searchParams.has("charset")) throw invalidBinding("the driver always uses utf8mb4, because it reads each statement as utf8mb4 to find its placeholders; remove the charset parameter", ["charset"]);
147
+ function readUrl(url, displayName) {
148
+ const parsed = parseUrl(url, displayName);
149
+ if (parsed.searchParams.has("charset")) throw invalidBinding(displayName, "the driver always uses utf8mb4, because it reads each statement as utf8mb4 to find its placeholders; remove the charset parameter", ["charset"]);
150
150
  const names = [...new Set(parsed.searchParams.keys())].filter(isParameterName);
151
151
  const parameters = urlParameters(Object.fromEntries([...parsed.searchParams].filter(([name]) => isParameterName(name))));
152
152
  if (parameters instanceof type.errors) {
153
153
  const invalid = names.filter((name) => parameters.some((error) => error.path[0] === name));
154
- throw invalidBinding(invalid.map((name) => `${name} must be ${PARAMETER_FORMS[name]}`).join("; "), invalid);
154
+ throw invalidBinding(displayName, invalid.map((name) => `${name} must be ${PARAMETER_FORMS[name]}`).join("; "), invalid);
155
155
  }
156
- if (parameters.sslcert !== void 0 && parameters.sslkey === void 0) throw invalidBinding("sslcert names the client's certificate and needs sslkey; to check the server's certificate against a CA file, as sslcert did in Prisma 7, use sslrootcert", ["sslcert"]);
156
+ if (parameters.sslcert !== void 0 && parameters.sslkey === void 0) throw invalidBinding(displayName, "sslcert names the client's certificate and needs sslkey; to check the server's certificate against a CA file, as sslcert did in Prisma 7, use sslrootcert", ["sslcert"]);
157
157
  return {
158
158
  parsed,
159
159
  parameters
160
160
  };
161
161
  }
162
- function readPem(parameter, path) {
162
+ function readPem(displayName, parameter, path) {
163
163
  try {
164
164
  return readFileSync(path, "utf8");
165
165
  } catch {
166
- throw invalidBinding(`the file ${parameter} names cannot be read`, [parameter]);
166
+ throw invalidBinding(displayName, `the file ${parameter} names cannot be read`, [parameter]);
167
167
  }
168
168
  }
169
169
  /**
170
170
  * The TLS settings the URL gives, read as `pg-connection-string` reads them for the Postgres driver: `ssl=true` turns TLS on and `ssl=false` off; `sslcert`, `sslkey`, `sslrootcert` or `sslmode` turn it on, with the certificate, key and CA read from the files they name. `sslmode=disable` turns it off; `no-verify` accepts any server certificate; every other mode verifies the certificate and the host name, as `verify-full` does.
171
171
  */
172
- function tlsOptions(parameters) {
172
+ function tlsOptions(parameters, displayName) {
173
173
  const { sslcert, sslkey, sslrootcert, sslmode } = parameters;
174
174
  if ([
175
175
  sslcert,
@@ -179,30 +179,30 @@ function tlsOptions(parameters) {
179
179
  ].every((value) => value === void 0)) return parameters.ssl;
180
180
  if (sslmode === "disable") return false;
181
181
  return {
182
- ...ifDefined("cert", sslcert === void 0 ? void 0 : readPem("sslcert", sslcert)),
183
- ...ifDefined("key", sslkey === void 0 ? void 0 : readPem("sslkey", sslkey)),
184
- ...ifDefined("ca", sslrootcert === void 0 ? void 0 : readPem("sslrootcert", sslrootcert)),
182
+ ...ifDefined("cert", sslcert === void 0 ? void 0 : readPem(displayName, "sslcert", sslcert)),
183
+ ...ifDefined("key", sslkey === void 0 ? void 0 : readPem(displayName, "sslkey", sslkey)),
184
+ ...ifDefined("ca", sslrootcert === void 0 ? void 0 : readPem(displayName, "sslrootcert", sslrootcert)),
185
185
  ...sslmode === "no-verify" ? { rejectUnauthorized: false } : {}
186
186
  };
187
187
  }
188
- function connectionOptions(parsed, parameters, connectTimeoutMs) {
188
+ function connectionOptions(parsed, parameters, connectTimeoutMs, displayName) {
189
189
  return {
190
190
  host: decodeURIComponent(parsed.hostname).replace(/^\[(.*)\]$/, "$1"),
191
191
  ...ifDefined("port", parsed.port === "" ? void 0 : Number(parsed.port)),
192
192
  user: decodeURIComponent(parsed.username),
193
193
  password: decodeURIComponent(parsed.password),
194
194
  database: decodeURIComponent(parsed.pathname.slice(1)),
195
- ...ifDefined("ssl", tlsOptions(parameters)),
195
+ ...ifDefined("ssl", tlsOptions(parameters, displayName)),
196
196
  allowPublicKeyRetrieval: parameters.allowPublicKeyRetrieval ?? false,
197
197
  connectTimeout: connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MILLIS,
198
198
  initSql: [...SESSION_SETUP],
199
199
  ...FIXED_OPTIONS
200
200
  };
201
201
  }
202
- /** The `mariadb` options for one connection to the server a `mysql://` URL names. Ignores a URL parameter the driver does not read, as `pg` does, and refuses a charset. */
202
+ /** The `mariadb` options for one connection to the server a URL names. Ignores a URL parameter the driver does not read, as `pg` does, and refuses a charset. A refusal names the database as `displayName`. */
203
203
  function mysqlConnectionOptions(url, settings) {
204
- const { parsed, parameters } = readUrl(url);
205
- return connectionOptions(parsed, parameters, settings?.connectTimeoutMs);
204
+ const { parsed, parameters } = readUrl(url, settings.displayName);
205
+ return connectionOptions(parsed, parameters, settings.connectTimeoutMs, settings.displayName);
206
206
  }
207
207
  /** How long a connection may stay idle before the pool, and the driver's cancel connection, close it. */
208
208
  function mysqlPoolIdleTimeoutMillis(poolOptions) {
@@ -211,11 +211,11 @@ function mysqlPoolIdleTimeoutMillis(poolOptions) {
211
211
  /**
212
212
  * The `mariadb` pool options for a `mysql://` URL, sized and timed as the Postgres driver's `pg.Pool`: it opens a connection only when one is needed (`minimumIdle: 0`), closes one idle for `idleTimeoutMillis`, and waits `connectionTimeoutMillis` both to open a connection and for a pooled one to come free.
213
213
  */
214
- function mysqlPoolOptions(url, poolOptions) {
215
- const { parsed, parameters } = readUrl(url);
214
+ function mysqlPoolOptions(url, displayName, poolOptions) {
215
+ const { parsed, parameters } = readUrl(url, displayName);
216
216
  const timeoutMs = poolOptions?.connectionTimeoutMillis ?? DEFAULT_CONNECT_TIMEOUT_MILLIS;
217
217
  return {
218
- ...connectionOptions(parsed, parameters, timeoutMs),
218
+ ...connectionOptions(parsed, parameters, timeoutMs, displayName),
219
219
  acquireTimeout: timeoutMs,
220
220
  minimumIdle: 0,
221
221
  idleTimeout: Math.ceil(mysqlPoolIdleTimeoutMillis(poolOptions) / 1e3),
@@ -281,7 +281,11 @@ function connectingCannotSucceed(error) {
281
281
  }
282
282
  const UNIQUE_VIOLATION = "23505";
283
283
  const FOREIGN_KEY_VIOLATION = "23503";
284
- /** The SQLSTATE Postgres sends for each constraint MySQL reports under a shared SQLSTATE, as the SQLite driver maps its own codes, so a consumer such as `isUniqueConstraintViolation` reads them alike. */
284
+ const NOT_NULL_VIOLATION = "23502";
285
+ const CHECK_VIOLATION = "23514";
286
+ /** MySQL's error for a failed CHECK constraint, `ER_CHECK_CONSTRAINT_VIOLATED`. */
287
+ const MYSQL_CHECK_VIOLATION_ERRORS = [3819];
288
+ /** The SQLSTATE Postgres sends for each constraint violation reported under a shared SQLSTATE, by the numbers MySQL and MariaDB share, as the SQLite driver maps its own codes, so a consumer such as `isUniqueConstraintViolation` reads them alike. */
285
289
  const CONSTRAINT_SQLSTATES = /* @__PURE__ */ new Map([
286
290
  [1062, UNIQUE_VIOLATION],
287
291
  [1586, UNIQUE_VIOLATION],
@@ -289,49 +293,52 @@ const CONSTRAINT_SQLSTATES = /* @__PURE__ */ new Map([
289
293
  [1217, FOREIGN_KEY_VIOLATION],
290
294
  [1451, FOREIGN_KEY_VIOLATION],
291
295
  [1452, FOREIGN_KEY_VIOLATION],
292
- [1048, "23502"],
293
- [3819, "23514"]
296
+ [1048, NOT_NULL_VIOLATION]
294
297
  ]);
298
+ function constraintSqlState(errno, server) {
299
+ return server.checkViolationErrors.includes(errno) ? CHECK_VIOLATION : CONSTRAINT_SQLSTATES.get(errno);
300
+ }
295
301
  const PUBLIC_KEY_FIX = "Add allowPublicKeyRetrieval=true to the URL, or connect over TLS with sslmode or ssl=true in the URL. Fetching the key over plain TCP lets a machine between the client and the server pose as the server and read the password; TLS does not.";
296
302
  /** The fix for a failed connection when the package's error names its cause, such as a sign-in that needs the server's public key. */
297
303
  function connectionFix(error) {
298
304
  return isMariadbError(error) && error.errno === ER_CANNOT_RETRIEVE_RSA_KEY ? PUBLIC_KEY_FIX : void 0;
299
305
  }
300
- function publicKeyNeeded(error) {
301
- return new SqlConnectionError(`MySQL sign-in needs the server's public key: the account signs in with caching_sha2_password or sha256_password over a connection without TLS. ${PUBLIC_KEY_FIX}`, {
306
+ function publicKeyNeeded(error, displayName) {
307
+ return new SqlConnectionError(`${displayName} sign-in needs the server's public key: the account signs in with caching_sha2_password or sha256_password over a connection without TLS. ${PUBLIC_KEY_FIX}`, {
302
308
  cause: error,
303
309
  transient: false
304
310
  });
305
311
  }
306
- function poolTimedOut(error) {
312
+ function poolTimedOut(error, server) {
313
+ const { displayName } = server;
307
314
  const cause = error.cause;
308
- if (connectingCannotSucceed(cause)) return normalizeMysqlError(cause);
309
- return new SqlConnectionError(cause instanceof Error ? `Timed out waiting for a pooled MySQL connection; the pool could not open one: ${serverMessage(cause)}` : "Timed out waiting for a pooled MySQL connection; every connection in the pool was in use.", {
315
+ if (connectingCannotSucceed(cause)) return normalizeMysqlError(cause, server);
316
+ return new SqlConnectionError(cause instanceof Error ? `Timed out waiting for a pooled ${displayName} connection; the pool could not open one: ${serverMessage(cause)}` : `Timed out waiting for a pooled ${displayName} connection; every connection in the pool was in use.`, {
310
317
  cause: error,
311
318
  transient: true
312
319
  });
313
320
  }
314
321
  /**
315
- * An error from the `mariadb` package as the driver reports it, in the family's types as the Postgres driver reports its own: a Node socket or DNS error as a `SqlConnectionError`, transient as the Postgres driver's table says; a lost connection and a pool that gave no connection in time as a transient `SqlConnectionError`; a sign-in that needs the server's public key, and session setup that fails, as a `SqlConnectionError` that is not transient; a sign-in MySQL refuses, as Postgres's 28P01, and an error MySQL reported about a statement as `SqlQueryError` with its SQLSTATE, a constraint violation with the SQLSTATE Postgres sends; and any other error unchanged. A pool that timed out because it could not connect in a way no retry can get past reports that error.
322
+ * An error from the `mariadb` package as the driver reports it, in the family's types as the Postgres driver reports its own: a Node socket or DNS error as a `SqlConnectionError`, transient as the Postgres driver's table says; a lost connection and a pool that gave no connection in time as a transient `SqlConnectionError`; a sign-in that needs the server's public key, and session setup that fails, as a `SqlConnectionError` that is not transient; a sign-in MySQL refuses, as Postgres's 28P01, and an error MySQL reported about a statement as `SqlQueryError` with its SQLSTATE, a constraint violation with the SQLSTATE Postgres sends, a CHECK violation by the server's own error numbers; and any other error unchanged. A pool that timed out because it could not connect in a way no retry can get past reports that error.
316
323
  */
317
- function normalizeMysqlError(error) {
324
+ function normalizeMysqlError(error, server) {
318
325
  const transient = nodeConnectionTransience(error);
319
326
  if (transient !== void 0 && error instanceof Error) return new SqlConnectionError(error.message, {
320
327
  cause: error,
321
328
  transient
322
329
  });
323
330
  if (!isMariadbError(error)) return error;
324
- if (error.errno === ER_CANNOT_RETRIEVE_RSA_KEY) return publicKeyNeeded(error);
331
+ if (error.errno === ER_CANNOT_RETRIEVE_RSA_KEY) return publicKeyNeeded(error, server.displayName);
325
332
  if (error.errno === ER_INITIAL_SQL_ERROR) return new SqlConnectionError(serverMessage(error), {
326
333
  cause: error,
327
334
  transient: false
328
335
  });
329
336
  if (isFatal(error) && !SIGN_IN_REFUSED.has(error.errno)) return connectionLost(error);
330
- if (error.errno === ER_GET_CONNECTION_TIMEOUT) return poolTimedOut(error);
337
+ if (error.errno === ER_GET_CONNECTION_TIMEOUT) return poolTimedOut(error, server);
331
338
  if (typeof error.sqlState !== "string") return error;
332
339
  return new SqlQueryError(error.sqlMessage ?? error.message, {
333
340
  cause: error,
334
- sqlState: CONSTRAINT_SQLSTATES.get(error.errno) ?? error.sqlState
341
+ sqlState: constraintSqlState(error.errno, server) ?? error.sqlState
335
342
  });
336
343
  }
337
344
  const DECIMAL_INTEGER = /^-?\d+$/;
@@ -371,7 +378,6 @@ var SessionSettingsGuard = class {
371
378
  };
372
379
  function unsendable(message, paramIndex, received) {
373
380
  return mysqlError("RUNTIME.ENCODE_FAILED", message, { meta: {
374
- target: "mysql",
375
381
  paramIndex,
376
382
  received
377
383
  } });
@@ -390,15 +396,15 @@ function receivedKind(value) {
390
396
  /**
391
397
  * The value the `mariadb` package writes into the statement for a parameter. A finite number or a bigint goes as it is, and the package writes its digits. A non-finite number is refused, because the package would write `NaN` or `Infinity` into the SQL. A bigint must fit a signed BIGINT, so a parameter's type never depends on its value. A `Uint8Array` goes as a Buffer over the same bytes, because the package writes any other `Uint8Array` as JSON text. A `Date` is refused: the package writes it in the process's local time zone, and the MySQL codecs send dates as text. So is text with a lone UTF-16 surrogate, which the package writes as `?` or U+FFFD depending on the text's length.
392
398
  */
393
- function bindValue(value, index) {
399
+ function bindValue(value, index, displayName) {
394
400
  if (value === null || value === void 0) return null;
395
401
  if (typeof value === "number") {
396
- if (!Number.isFinite(value)) throw unsendable(`Parameter ${index + 1} is ${value}, which MySQL cannot store`, index, String(value));
402
+ if (!Number.isFinite(value)) throw unsendable(`Parameter ${index + 1} is ${value}, which ${displayName} cannot store`, index, String(value));
397
403
  return value;
398
404
  }
399
405
  if (typeof value === "bigint") {
400
406
  if (withinBigint(value)) return value;
401
- throw unsendable(`Parameter ${index + 1} is an integer outside MySQL's signed 64-bit BIGINT`, index, "bigint");
407
+ throw unsendable(`Parameter ${index + 1} is an integer outside ${displayName}'s signed 64-bit BIGINT`, index, "bigint");
402
408
  }
403
409
  if (Buffer.isBuffer(value)) return value;
404
410
  if (value instanceof Uint8Array) return Buffer.from(value.buffer, value.byteOffset, value.byteLength);
@@ -408,10 +414,10 @@ function bindValue(value, index) {
408
414
  }
409
415
  if (typeof value === "boolean") return value;
410
416
  const received = receivedKind(value);
411
- throw unsendable(`Parameter ${index + 1} is of type ${received}; a MySQL parameter must be text, a number, a bigint, a boolean, bytes or null, and a Date is sent as text by its codec`, index, received);
417
+ throw unsendable(`Parameter ${index + 1} is of type ${received}; a ${displayName} parameter must be text, a number, a bigint, a boolean, bytes or null, and a Date is sent as text by its codec`, index, received);
412
418
  }
413
- function placeholderMismatch(placeholders, values) {
414
- return structuredError("RUNTIME.PARAM_PLACEHOLDER_MISMATCH", `The MySQL statement writes placeholders ${JSON.stringify(placeholders)} for ${values} parameter value(s); write each value as a numbered ?N, or every value as a bare ? in order, and no other placeholder.`, {
419
+ function placeholderMismatch(placeholders, values, displayName) {
420
+ return structuredError("RUNTIME.PARAM_PLACEHOLDER_MISMATCH", `The ${displayName} statement writes placeholders ${JSON.stringify(placeholders)} for ${values} parameter value(s); write each value as a numbered ?N, or every value as a bare ? in order, and no other placeholder.`, {
415
421
  why: "A placeholder that does not match a value binds a value to the wrong place in the statement, or leaves a value unbound.",
416
422
  fix: "Pass values into raw SQL through interpolation rather than writing a `?` in the SQL text.",
417
423
  meta: {
@@ -421,32 +427,32 @@ function placeholderMismatch(placeholders, values) {
421
427
  });
422
428
  }
423
429
  /** The index into `values` each placeholder takes: `?N` takes value N, and bare `?`s take the values in order. */
424
- function valueIndexes(placeholders, values) {
430
+ function valueIndexes(placeholders, values, displayName) {
425
431
  const texts = placeholders.map((placeholder) => placeholder.text);
426
432
  if (texts.every((text) => text === "?")) {
427
- if (placeholders.length !== values) throw placeholderMismatch(texts, values);
433
+ if (placeholders.length !== values) throw placeholderMismatch(texts, values, displayName);
428
434
  return placeholders.map((_, index) => index);
429
435
  }
430
436
  const indexes = placeholders.map((placeholder) => (placeholder.number ?? 0) - 1);
431
- if (!(indexes.every((index) => index >= 0 && index < values) && new Set(indexes).size === values)) throw placeholderMismatch(texts, values);
437
+ if (!(indexes.every((index) => index >= 0 && index < values) && new Set(indexes).size === values)) throw placeholderMismatch(texts, values, displayName);
432
438
  return indexes;
433
439
  }
434
440
  /**
435
441
  * The statement with each placeholder written as MySQL's positional `?`, and its values in that order. The adapter writes numbered `?N` placeholders, a value written as often as its `?N` appears; the control plane writes bare `?`s, which take the values in order. `tokenizeMysqlSql` reads the statement as MySQL's lexer does, so a `?` inside a quoted string, a backtick identifier or a comment stays text. Refuses a statement that mixes the two forms, or whose placeholders and values do not match.
436
442
  */
437
- function positionalParams(sql, values) {
443
+ function positionalParams(sql, values, displayName) {
438
444
  const tokens = tokenizeMysqlSql(sql);
439
- const indexes = valueIndexes(tokens.filter((token) => token.kind === "placeholder"), values.length);
445
+ const indexes = valueIndexes(tokens.filter((token) => token.kind === "placeholder"), values.length, displayName);
440
446
  return {
441
447
  sql: tokens.map((token) => token.kind === "placeholder" ? "?" : token.text).join(""),
442
- values: indexes.map((index) => bindValue(values[index], index))
448
+ values: indexes.map((index) => bindValue(values[index], index, displayName))
443
449
  };
444
450
  }
445
451
  /** The server status flag MySQL sets in every reply while it reports `NO_BACKSLASH_ESCAPES` in the session's `sql_mode`. */
446
452
  const NO_BACKSLASH_ESCAPES = 512;
447
- function noBackslashEscapesRefusal(params) {
448
- return mysqlError("RUNTIME.SQL_MODE_UNSUPPORTED", "MySQL reports NO_BACKSLASH_ESCAPES in this connection's sql_mode, which the MySQL target does not support, so the driver does not send a statement with values", {
449
- why: "In this mode MySQL ends a string at a backslash and a quote, while the mariadb package, which writes the values into the statement, finds its placeholders as if the backslash escaped the quote, so a value could land outside its string literal and run as SQL. The driver removes the mode on every connection it opens, so a statement on this connection made MySQL report it: a raw SET sql_mode that set it, which stays until the connection closes or a statement clears it, or a stored procedure that set it inside itself, after which MySQL restores the mode the connection had, which may be off, but keeps reporting this one until a statement sets sql_mode again.",
453
+ function noBackslashEscapesRefusal(params, displayName) {
454
+ return mysqlError("RUNTIME.SQL_MODE_UNSUPPORTED", `${displayName} reports NO_BACKSLASH_ESCAPES in this connection's sql_mode, which the ${displayName} target does not support, so the driver does not send a statement with values`, {
455
+ why: `In this mode ${displayName} ends a string at a backslash and a quote, while the mariadb package, which writes the values into the statement, finds its placeholders as if the backslash escaped the quote, so a value could land outside its string literal and run as SQL. The driver removes the mode on every connection it opens, so a statement on this connection made ${displayName} report it: a raw SET sql_mode that set it, which stays until the connection closes or a statement clears it, or a stored procedure that set it inside itself, after which ${displayName} restores the mode the connection had, which may be off, but keeps reporting this one until a statement sets sql_mode again.`,
450
456
  fix: `Do not set NO_BACKSLASH_ESCAPES on a connection Prisma uses, in raw SQL, a stored procedure or a trigger. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs the mode must run in a transaction or on a connection you hold, which must set the mode back before it is released, with ${SET_SQL_MODE}. A statement without values still runs.`,
451
457
  meta: {
452
458
  sqlMode: "NO_BACKSLASH_ESCAPES",
@@ -459,10 +465,10 @@ function reportedCharacterSet(collation) {
459
465
  if (typeof collation === "object" && collation !== null && "charset" in collation && "maxLength" in collation) return collation.charset === "utf8" ? `utf8mb${String(collation.maxLength)}` : String(collation.charset);
460
466
  return "unknown";
461
467
  }
462
- function characterSetRefusal(characterSet, params) {
463
- return mysqlError("RUNTIME.CHARACTER_SET_UNSUPPORTED", `The driver could not confirm that MySQL reads this connection's statements as utf8mb4: the character set the mariadb package last recorded for it is ${characterSet}. The MySQL target supports only utf8mb4, so the driver does not send a statement with values`, {
464
- why: "The mariadb package, which writes the values into the statement, encodes the statement in the character set it last recorded and finds its placeholders byte by byte. In a character set such as sjis, cp932, big5 or gbk, the second byte of some characters is a backslash, so the package can read the end of a string literal in the SQL differently from MySQL, and a value could run as SQL. The package records the character set from the server greeting and from MySQL's report of changed session variables. Two causes are known: a statement on this connection changed character_set_client, such as a raw SET NAMES; or the server does not report character_set_client in session_track_system_variables, so the package never saw the driver set utf8mb4 and still holds the default character set from the greeting.",
465
- fix: `If a statement changed the character set: do not change it on a connection Prisma uses. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs another character set must run in a transaction or on a connection you hold, which must set it back before it is released, with ${SET_UTF8MB4}. If no statement changed it: add character_set_client back to the server's session_track_system_variables, as in MySQL's default, and restart the client. A statement without values still runs.`,
468
+ function characterSetRefusal(characterSet, params, displayName) {
469
+ return mysqlError("RUNTIME.CHARACTER_SET_UNSUPPORTED", `The driver could not confirm that ${displayName} reads this connection's statements as utf8mb4: the character set the mariadb package last recorded for it is ${characterSet}. The ${displayName} target supports only utf8mb4, so the driver does not send a statement with values`, {
470
+ why: `The mariadb package, which writes the values into the statement, encodes the statement in the character set it last recorded and finds its placeholders byte by byte. In a character set such as sjis, cp932, big5 or gbk, the second byte of some characters is a backslash, so the package can read the end of a string literal in the SQL differently from ${displayName}, and a value could run as SQL. The package records the character set from the server greeting and from ${displayName}'s report of changed session variables. Two causes are known: a statement on this connection changed character_set_client, such as a raw SET NAMES; or the server does not report character_set_client in session_track_system_variables, so the package never saw the driver set utf8mb4 and still holds the default character set from the greeting.`,
471
+ fix: `If a statement changed the character set: do not change it on a connection Prisma uses. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs another character set must run in a transaction or on a connection you hold, which must set it back before it is released, with ${SET_UTF8MB4}. If no statement changed it: add character_set_client back to the server's session_track_system_variables, as in ${displayName}'s default, and restart the client. A statement without values still runs.`,
466
472
  meta: {
467
473
  characterSet,
468
474
  params
@@ -472,21 +478,21 @@ function characterSetRefusal(characterSet, params) {
472
478
  /**
473
479
  * The statement to hand to `connection`: `sql` with its placeholders written as `?` and the values in their order, for the package to write in. A statement without values comes back as written with no values, so the package sends it without searching it for placeholders. Refuses a statement with values while the server last reported `NO_BACKSLASH_ESCAPES` on, or while the package's record of the character set is not utf8mb4, which a statement the application sends or a server that does not report `character_set_client` can cause. A statement without values still runs, so the setting can be put back; the driver's lexer still reads a backslash as an escape then, so at worst it refuses such a statement for a `?` it reads outside a string.
474
480
  */
475
- function statementFor(connection, sql, params) {
481
+ function statementFor(connection, sql, params, displayName) {
476
482
  const { info } = connection;
477
483
  assertDefined(info, "the package gives every connection its info when it creates it");
478
484
  if (params.length > 0) {
479
- if ((info.status & NO_BACKSLASH_ESCAPES) !== 0) throw noBackslashEscapesRefusal(params.length);
485
+ if ((info.status & NO_BACKSLASH_ESCAPES) !== 0) throw noBackslashEscapesRefusal(params.length, displayName);
480
486
  const characterSet = reportedCharacterSet(info.collation);
481
- if (characterSet !== "utf8mb4") throw characterSetRefusal(characterSet, params.length);
487
+ if (characterSet !== "utf8mb4") throw characterSetRefusal(characterSet, params.length, displayName);
482
488
  }
483
- const statement = positionalParams(sql, params);
489
+ const statement = positionalParams(sql, params, displayName);
484
490
  return params.length > 0 ? statement : {
485
491
  sql,
486
492
  values: void 0
487
493
  };
488
494
  }
489
495
  //#endregion
490
- export { connectionFix as a, mysqlConnectionOptions as c, mysqlPoolOptions as d, normalizeMysqlError as f, connectingCannotSucceed as i, mysqlDriverDescriptorMetaFor as l, statementFor as m, acquireClientQueryLock as n, connectionLost as o, sessionSettingsStatement as p, applySessionSettings as r, isFatal as s, SessionSettingsGuard as t, mysqlPoolIdleTimeoutMillis as u };
496
+ export { connectingCannotSucceed as a, isFatal as c, mysqlPoolIdleTimeoutMillis as d, mysqlPoolOptions as f, statementFor as h, applySessionSettings as i, mysqlConnectionOptions as l, sessionSettingsStatement as m, SessionSettingsGuard as n, connectionFix as o, normalizeMysqlError as p, acquireClientQueryLock as r, connectionLost as s, MYSQL_CHECK_VIOLATION_ERRORS as t, mysqlDriverDescriptorMetaFor as u };
491
497
 
492
- //# sourceMappingURL=statement-CT5tB4uX-CHqHFM3z.mjs.map
498
+ //# sourceMappingURL=statement-a2Eekpu6-BDJa255m.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statement-a2Eekpu6-BDJa255m.mjs","names":["#queue","#statement","#ensured"],"sources":["../../../../3-targets/mysql/1-mysql/3-driver/dist/statement-a2Eekpu6.mjs"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\nimport { SqlConnectionError, SqlQueryError } from \"@internal/sql-errors\";\nimport { quoteIdentifier, tokenizeMysqlSql } from \"@internal/target-mysql/sql-utils\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { mysqlError } from \"@internal/target-mysql/errors\";\n//#region src/core/client-query-lock.ts\nvar AsyncMutex = class {\n\t#queue = Promise.resolve();\n\tasync lock() {\n\t\tconst previous = this.#queue;\n\t\tlet releaseLock;\n\t\tthis.#queue = new Promise((resolve) => {\n\t\t\treleaseLock = resolve;\n\t\t});\n\t\tawait previous;\n\t\treturn () => {\n\t\t\treleaseLock?.();\n\t\t\treleaseLock = void 0;\n\t\t};\n\t}\n};\n/**\n* One statement at a time on each client, in the order sent, as the Postgres driver's per-client lock runs them, on the runtime and the control driver alike. The lock is held until the statement settles, or for a stream's whole life, so a statement sent while a stream is open waits for it.\n*/\nconst clientQueryLocks = /* @__PURE__ */ new WeakMap();\nfunction acquireClientQueryLock(client) {\n\tlet mutex = clientQueryLocks.get(client);\n\tif (mutex === void 0) {\n\t\tmutex = new AsyncMutex();\n\t\tclientQueryLocks.set(client, mutex);\n\t}\n\treturn mutex.lock();\n}\n//#endregion\n//#region src/core/session-setup.ts\n/**\n* Removes the `sql_mode` entries the MySQL target does not support, `NO_BACKSLASH_ESCAPES` and `ANSI_QUOTES`, and the combination mode `ANSI`, which MySQL lists beside its parts and which would set `ANSI_QUOTES` again; no other combination mode includes either. It adds `NO_AUTO_VALUE_ON_ZERO`, so an explicit 0 in an auto-increment column is stored as 0, as Postgres stores it, rather than replaced with a generated value. Leaves no empty entry between two commas.\n*/\nconst SET_SQL_MODE = \"SET SESSION sql_mode = TRIM(LEADING ',' FROM CONCAT(REPLACE(REPLACE(REPLACE(REPLACE(CONCAT(',', @@SESSION.sql_mode, ','), ',NO_BACKSLASH_ESCAPES,', ','), ',ANSI_QUOTES,', ','), ',ANSI,', ','), ',NO_AUTO_VALUE_ON_ZERO,', ','), 'NO_AUTO_VALUE_ON_ZERO'))\";\n/** Makes MySQL read each statement, and the package write it, as utf8mb4. */\nconst SET_UTF8MB4 = \"SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci\";\n/**\n* The statements every new connection runs once, before any other. The lexer that finds placeholders reads a backslash as an escape and `\"…\"` as a string, so the session clears NO_BACKSLASH_ESCAPES and ANSI_QUOTES and MySQL reads quoted text the same way, and sets NO_AUTO_VALUE_ON_ZERO; and it reads each statement as utf8mb4. These hold no value, so they run through the package's `initSql`; the target's session settings, which do, are set afterwards.\n*/\nconst SESSION_SETUP = [SET_SQL_MODE, SET_UTF8MB4];\n//#endregion\n//#region src/core/text-or-bytes.ts\n/** MySQL's `binary` collation, which marks a string or blob column that holds bytes. */\nconst BINARY_COLLATION = 63;\n/** The column types whose value is text, or bytes when the column's collation is binary. */\nconst CHARACTER_OR_BLOB_TYPES = /* @__PURE__ */ new Set([\n\t\"VARCHAR\",\n\t\"VAR_STRING\",\n\t\"STRING\",\n\t\"TINY_BLOB\",\n\t\"MEDIUM_BLOB\",\n\t\"LONG_BLOB\",\n\t\"BLOB\"\n]);\n/** The column types whose value MySQL sends as text. A type outside this list, such as BIT, GEOMETRY or one the package has no name for, is read as bytes. */\nconst TEXT_TYPES = /* @__PURE__ */ new Set([\n\t...CHARACTER_OR_BLOB_TYPES,\n\t\"DECIMAL\",\n\t\"NEWDECIMAL\",\n\t\"FLOAT\",\n\t\"DOUBLE\",\n\t\"TINY\",\n\t\"SHORT\",\n\t\"INT\",\n\t\"INT24\",\n\t\"BIGINT\",\n\t\"YEAR\",\n\t\"DATE\",\n\t\"NEWDATE\",\n\t\"TIME\",\n\t\"TIME2\",\n\t\"DATETIME\",\n\t\"DATETIME2\",\n\t\"TIMESTAMP\",\n\t\"TIMESTAMP2\",\n\t\"JSON\",\n\t\"ENUM\",\n\t\"SET\",\n\t\"NULL\"\n]);\n/**\n* Reads each column as the row value ADR 155 sets at the driver boundary: a binary string or blob, BIT, GEOMETRY and a column of a type the package does not know as its bytes, every other column as text, and NULL as `null`. Bytes are a plain `Uint8Array`, not the package's `Buffer`.\n*/\nconst readTextOrBytes = (field) => {\n\tif (!TEXT_TYPES.has(field.type) || CHARACTER_OR_BLOB_TYPES.has(field.type) && field.collation.index === BINARY_COLLATION) {\n\t\tconst bytes = field.buffer();\n\t\treturn bytes === null ? null : new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n\t}\n\treturn field.string();\n};\n//#endregion\n//#region src/core/connection-options.ts\nconst DEFAULT_CONNECT_TIMEOUT_MILLIS = 2e4;\nconst DEFAULT_IDLE_TIMEOUT_MILLIS = 3e4;\nconst urlParameters = type({\n\t\"ssl?\": type(\"'true' | '1' | 'false' | '0'\").pipe((text) => text === \"true\" || text === \"1\"),\n\t\"sslmode?\": \"'disable' | 'prefer' | 'require' | 'verify-ca' | 'verify-full' | 'no-verify'\",\n\t\"sslcert?\": \"string > 0\",\n\t\"sslkey?\": \"string > 0\",\n\t\"sslrootcert?\": \"string > 0\",\n\t\"allowPublicKeyRetrieval?\": type(\"'true' | 'false'\").pipe((text) => text === \"true\")\n});\n/** The form each URL parameter's value must take, for the refusal of a value. */\nconst PARAMETER_FORMS = {\n\tssl: \"true, 1, false or 0\",\n\tsslmode: \"disable, prefer, require, verify-ca, verify-full or no-verify\",\n\tsslcert: \"the path of a PEM file\",\n\tsslkey: \"the path of a PEM file\",\n\tsslrootcert: \"the path of a PEM file\",\n\tallowPublicKeyRetrieval: \"true or false\"\n};\nfunction isParameterName(name) {\n\treturn Object.hasOwn(PARAMETER_FORMS, name);\n}\n/**\n* Options the URL cannot change. The package writes each value into its statement at a bare `?`; every option that would change where or how it writes one (named placeholders, an object written as `SET` entries, several statements in one) stays off, and `logParam` keeps values out of error messages. `permitRedirect` stays off, so a server cannot send the client, with its credentials, to another host, which `pg` never does. `typeCast` reads every column as text or bytes, so no column reaches a codec as a value the package parsed. `foundRows` makes an UPDATE count the rows it matched, as Postgres's row count does. The connection is utf8mb4: the driver reads each statement as utf8mb4 to find its placeholders, and MySQL must read it the same way.\n*/\nconst FIXED_OPTIONS = {\n\tcollation: \"UTF8MB4_UNICODE_CI\",\n\tmultipleStatements: false,\n\tnamedPlaceholders: false,\n\tpermitSetMultiParamEntries: false,\n\tpermitLocalInfile: false,\n\tlogParam: false,\n\tpermitRedirect: false,\n\tfoundRows: true,\n\ttypeCast: readTextOrBytes\n};\n/** Refuses the URL. `parameters` names the parameters at fault; no value from the URL goes into the error, because a URL carries the password. */\nfunction invalidBinding(displayName, reason, parameters) {\n\treturn structuredError(\"RUNTIME.BINDING_INVALID\", `${displayName} connection URL: ${reason}`, { meta: {\n\t\treceived: parameters.join(\", \"),\n\t\treason\n\t} });\n}\n/** Parses `url` as the Postgres facade does, refusing it without the parser's error, which carries the whole URL. */\nfunction parseUrl(url, displayName) {\n\ttry {\n\t\treturn new URL(url);\n\t} catch {\n\t\tthrow invalidBinding(displayName, \"the URL cannot be parsed\", []);\n\t}\n}\nfunction readUrl(url, displayName) {\n\tconst parsed = parseUrl(url, displayName);\n\tif (parsed.searchParams.has(\"charset\")) throw invalidBinding(displayName, \"the driver always uses utf8mb4, because it reads each statement as utf8mb4 to find its placeholders; remove the charset parameter\", [\"charset\"]);\n\tconst names = [...new Set(parsed.searchParams.keys())].filter(isParameterName);\n\tconst parameters = urlParameters(Object.fromEntries([...parsed.searchParams].filter(([name]) => isParameterName(name))));\n\tif (parameters instanceof type.errors) {\n\t\tconst invalid = names.filter((name) => parameters.some((error) => error.path[0] === name));\n\t\tthrow invalidBinding(displayName, invalid.map((name) => `${name} must be ${PARAMETER_FORMS[name]}`).join(\"; \"), invalid);\n\t}\n\tif (parameters.sslcert !== void 0 && parameters.sslkey === void 0) throw invalidBinding(displayName, \"sslcert names the client's certificate and needs sslkey; to check the server's certificate against a CA file, as sslcert did in Prisma 7, use sslrootcert\", [\"sslcert\"]);\n\treturn {\n\t\tparsed,\n\t\tparameters\n\t};\n}\nfunction readPem(displayName, parameter, path) {\n\ttry {\n\t\treturn readFileSync(path, \"utf8\");\n\t} catch {\n\t\tthrow invalidBinding(displayName, `the file ${parameter} names cannot be read`, [parameter]);\n\t}\n}\n/**\n* The TLS settings the URL gives, read as `pg-connection-string` reads them for the Postgres driver: `ssl=true` turns TLS on and `ssl=false` off; `sslcert`, `sslkey`, `sslrootcert` or `sslmode` turn it on, with the certificate, key and CA read from the files they name. `sslmode=disable` turns it off; `no-verify` accepts any server certificate; every other mode verifies the certificate and the host name, as `verify-full` does.\n*/\nfunction tlsOptions(parameters, displayName) {\n\tconst { sslcert, sslkey, sslrootcert, sslmode } = parameters;\n\tif ([\n\t\tsslcert,\n\t\tsslkey,\n\t\tsslrootcert,\n\t\tsslmode\n\t].every((value) => value === void 0)) return parameters.ssl;\n\tif (sslmode === \"disable\") return false;\n\treturn {\n\t\t...ifDefined(\"cert\", sslcert === void 0 ? void 0 : readPem(displayName, \"sslcert\", sslcert)),\n\t\t...ifDefined(\"key\", sslkey === void 0 ? void 0 : readPem(displayName, \"sslkey\", sslkey)),\n\t\t...ifDefined(\"ca\", sslrootcert === void 0 ? void 0 : readPem(displayName, \"sslrootcert\", sslrootcert)),\n\t\t...sslmode === \"no-verify\" ? { rejectUnauthorized: false } : {}\n\t};\n}\nfunction connectionOptions(parsed, parameters, connectTimeoutMs, displayName) {\n\treturn {\n\t\thost: decodeURIComponent(parsed.hostname).replace(/^\\[(.*)\\]$/, \"$1\"),\n\t\t...ifDefined(\"port\", parsed.port === \"\" ? void 0 : Number(parsed.port)),\n\t\tuser: decodeURIComponent(parsed.username),\n\t\tpassword: decodeURIComponent(parsed.password),\n\t\tdatabase: decodeURIComponent(parsed.pathname.slice(1)),\n\t\t...ifDefined(\"ssl\", tlsOptions(parameters, displayName)),\n\t\tallowPublicKeyRetrieval: parameters.allowPublicKeyRetrieval ?? false,\n\t\tconnectTimeout: connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MILLIS,\n\t\tinitSql: [...SESSION_SETUP],\n\t\t...FIXED_OPTIONS\n\t};\n}\n/** The `mariadb` options for one connection to the server a URL names. Ignores a URL parameter the driver does not read, as `pg` does, and refuses a charset. A refusal names the database as `displayName`. */\nfunction mysqlConnectionOptions(url, settings) {\n\tconst { parsed, parameters } = readUrl(url, settings.displayName);\n\treturn connectionOptions(parsed, parameters, settings.connectTimeoutMs, settings.displayName);\n}\n/** How long a connection may stay idle before the pool, and the driver's cancel connection, close it. */\nfunction mysqlPoolIdleTimeoutMillis(poolOptions) {\n\treturn poolOptions?.idleTimeoutMillis ?? DEFAULT_IDLE_TIMEOUT_MILLIS;\n}\n/**\n* The `mariadb` pool options for a `mysql://` URL, sized and timed as the Postgres driver's `pg.Pool`: it opens a connection only when one is needed (`minimumIdle: 0`), closes one idle for `idleTimeoutMillis`, and waits `connectionTimeoutMillis` both to open a connection and for a pooled one to come free.\n*/\nfunction mysqlPoolOptions(url, displayName, poolOptions) {\n\tconst { parsed, parameters } = readUrl(url, displayName);\n\tconst timeoutMs = poolOptions?.connectionTimeoutMillis ?? DEFAULT_CONNECT_TIMEOUT_MILLIS;\n\treturn {\n\t\t...connectionOptions(parsed, parameters, timeoutMs, displayName),\n\t\tacquireTimeout: timeoutMs,\n\t\tminimumIdle: 0,\n\t\tidleTimeout: Math.ceil(mysqlPoolIdleTimeoutMillis(poolOptions) / 1e3),\n\t\t...ifDefined(\"connectionLimit\", poolOptions?.max)\n\t};\n}\n//#endregion\n//#region src/core/descriptor-meta.ts\n/** The descriptor meta of the MySQL driver built for `targetId`: MySQL's, or a target's that extends MySQL. */\nfunction mysqlDriverDescriptorMetaFor(targetId) {\n\treturn {\n\t\tkind: \"driver\",\n\t\tfamilyId: \"sql\",\n\t\ttargetId,\n\t\tid: targetId,\n\t\tversion: \"0.0.1\",\n\t\tcapabilities: {}\n\t};\n}\n//#endregion\n//#region src/core/normalize-error.ts\nfunction isMariadbError(error) {\n\treturn error instanceof Error && \"errno\" in error && typeof error.errno === \"number\";\n}\n/** Whether `error` left its connection unusable: the package marks a lost socket, and a server error of SQLSTATE class 08, as fatal. */\nfunction isFatal(error) {\n\treturn error instanceof Error && \"fatal\" in error && error.fatal === true;\n}\nfunction serverMessage(error) {\n\treturn isMariadbError(error) ? error.sqlMessage ?? error.message : error.message;\n}\n/** The error a statement ends with when its connection is lost or closed under it: a `SqlConnectionError` a retry on a new connection can get past, as on Postgres. */\nfunction connectionLost(cause) {\n\treturn new SqlConnectionError(serverMessage(cause), {\n\t\tcause,\n\t\ttransient: true,\n\t\t...ifDefined(\"sqlState\", isMariadbError(cause) ? cause.sqlState ?? void 0 : void 0)\n\t});\n}\n/** Node's socket and DNS error codes, and whether a retry can succeed after each, as the Postgres driver classifies them. */\nconst NODE_CONNECTION_CODES = /* @__PURE__ */ new Map([\n\t[\"ECONNRESET\", true],\n\t[\"ETIMEDOUT\", true],\n\t[\"EPIPE\", true],\n\t[\"EAI_AGAIN\", true],\n\t[\"ECONNREFUSED\", false],\n\t[\"ENOTFOUND\", false],\n\t[\"EHOSTUNREACH\", false]\n]);\n/** Whether a retry can succeed after `error`, for a Node socket or DNS error; undefined for any other. */\nfunction nodeConnectionTransience(error) {\n\treturn error instanceof Error && \"code\" in error && typeof error.code === \"string\" ? NODE_CONNECTION_CODES.get(error.code) : void 0;\n}\nconst ER_GET_CONNECTION_TIMEOUT = 45028;\nconst ER_INITIAL_SQL_ERROR = 45030;\nconst ER_CANNOT_RETRIEVE_RSA_KEY = 45044;\n/** The errors MySQL refuses a sign-in with: access denied, access denied for a socket-authenticated account, and an authentication plugin the server has not loaded. Another attempt with the same URL fails the same way. */\nconst SIGN_IN_REFUSED = /* @__PURE__ */ new Set([\n\t1045,\n\t1698,\n\t1524\n]);\n/** Whether `error` is one another attempt to connect with the same settings cannot get past: a refused connection, an unknown or unreachable host, a refused sign-in, a sign-in that needs the server's public key, or session setup MySQL refuses. */\nfunction connectingCannotSucceed(error) {\n\tif (nodeConnectionTransience(error) === false) return true;\n\treturn isMariadbError(error) && (SIGN_IN_REFUSED.has(error.errno) || error.errno === ER_CANNOT_RETRIEVE_RSA_KEY || error.errno === ER_INITIAL_SQL_ERROR);\n}\nconst UNIQUE_VIOLATION = \"23505\";\nconst FOREIGN_KEY_VIOLATION = \"23503\";\nconst NOT_NULL_VIOLATION = \"23502\";\nconst CHECK_VIOLATION = \"23514\";\n/** MySQL's error for a failed CHECK constraint, `ER_CHECK_CONSTRAINT_VIOLATED`. */\nconst MYSQL_CHECK_VIOLATION_ERRORS = [3819];\n/** The SQLSTATE Postgres sends for each constraint violation reported under a shared SQLSTATE, by the numbers MySQL and MariaDB share, as the SQLite driver maps its own codes, so a consumer such as `isUniqueConstraintViolation` reads them alike. */\nconst CONSTRAINT_SQLSTATES = /* @__PURE__ */ new Map([\n\t[1062, UNIQUE_VIOLATION],\n\t[1586, UNIQUE_VIOLATION],\n\t[1216, FOREIGN_KEY_VIOLATION],\n\t[1217, FOREIGN_KEY_VIOLATION],\n\t[1451, FOREIGN_KEY_VIOLATION],\n\t[1452, FOREIGN_KEY_VIOLATION],\n\t[1048, NOT_NULL_VIOLATION]\n]);\nfunction constraintSqlState(errno, server) {\n\treturn server.checkViolationErrors.includes(errno) ? CHECK_VIOLATION : CONSTRAINT_SQLSTATES.get(errno);\n}\nconst PUBLIC_KEY_FIX = \"Add allowPublicKeyRetrieval=true to the URL, or connect over TLS with sslmode or ssl=true in the URL. Fetching the key over plain TCP lets a machine between the client and the server pose as the server and read the password; TLS does not.\";\n/** The fix for a failed connection when the package's error names its cause, such as a sign-in that needs the server's public key. */\nfunction connectionFix(error) {\n\treturn isMariadbError(error) && error.errno === ER_CANNOT_RETRIEVE_RSA_KEY ? PUBLIC_KEY_FIX : void 0;\n}\nfunction publicKeyNeeded(error, displayName) {\n\treturn new SqlConnectionError(`${displayName} sign-in needs the server's public key: the account signs in with caching_sha2_password or sha256_password over a connection without TLS. ${PUBLIC_KEY_FIX}`, {\n\t\tcause: error,\n\t\ttransient: false\n\t});\n}\nfunction poolTimedOut(error, server) {\n\tconst { displayName } = server;\n\tconst cause = error.cause;\n\tif (connectingCannotSucceed(cause)) return normalizeMysqlError(cause, server);\n\treturn new SqlConnectionError(cause instanceof Error ? `Timed out waiting for a pooled ${displayName} connection; the pool could not open one: ${serverMessage(cause)}` : `Timed out waiting for a pooled ${displayName} connection; every connection in the pool was in use.`, {\n\t\tcause: error,\n\t\ttransient: true\n\t});\n}\n/**\n* An error from the `mariadb` package as the driver reports it, in the family's types as the Postgres driver reports its own: a Node socket or DNS error as a `SqlConnectionError`, transient as the Postgres driver's table says; a lost connection and a pool that gave no connection in time as a transient `SqlConnectionError`; a sign-in that needs the server's public key, and session setup that fails, as a `SqlConnectionError` that is not transient; a sign-in MySQL refuses, as Postgres's 28P01, and an error MySQL reported about a statement as `SqlQueryError` with its SQLSTATE, a constraint violation with the SQLSTATE Postgres sends, a CHECK violation by the server's own error numbers; and any other error unchanged. A pool that timed out because it could not connect in a way no retry can get past reports that error.\n*/\nfunction normalizeMysqlError(error, server) {\n\tconst transient = nodeConnectionTransience(error);\n\tif (transient !== void 0 && error instanceof Error) return new SqlConnectionError(error.message, {\n\t\tcause: error,\n\t\ttransient\n\t});\n\tif (!isMariadbError(error)) return error;\n\tif (error.errno === ER_CANNOT_RETRIEVE_RSA_KEY) return publicKeyNeeded(error, server.displayName);\n\tif (error.errno === ER_INITIAL_SQL_ERROR) return new SqlConnectionError(serverMessage(error), {\n\t\tcause: error,\n\t\ttransient: false\n\t});\n\tif (isFatal(error) && !SIGN_IN_REFUSED.has(error.errno)) return connectionLost(error);\n\tif (error.errno === ER_GET_CONNECTION_TIMEOUT) return poolTimedOut(error, server);\n\tif (typeof error.sqlState !== \"string\") return error;\n\treturn new SqlQueryError(error.sqlMessage ?? error.message, {\n\t\tcause: error,\n\t\tsqlState: constraintSqlState(error.errno, server) ?? error.sqlState\n\t});\n}\n//#endregion\n//#region src/core/session-settings.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** A setting's value as MySQL takes it: decimal integer text as a whole number, because MySQL refuses text for an integer variable, and any other text as it is. */\nfunction settingValue(value) {\n\treturn DECIMAL_INTEGER.test(value) ? BigInt(value) : value;\n}\n/** The one statement that sets `sessionSettings`: each name a quoted identifier, each value a parameter. Undefined when there is nothing to set. */\nfunction sessionSettingsStatement(sessionSettings) {\n\tconst entries = Object.entries(sessionSettings);\n\tif (entries.length === 0) return void 0;\n\treturn {\n\t\tsql: `SET SESSION ${entries.map(([name]) => `${quoteIdentifier(name)} = ?`).join(\", \")}`,\n\t\tvalues: entries.map(([, value]) => settingValue(value))\n\t};\n}\n/** Sets the session settings on `connection`, the package writing each value into the statement. Throws the package's error as it is. */\nasync function applySessionSettings(connection, statement) {\n\tawait connection.query(statement.sql, [...statement.values]);\n}\n/**\n* Ensures the session settings a target declares on each physical connection the runtime driver gets from its pool, once, as the Postgres driver's `SessionSettingsGuard` does for a pool it did not start the sessions of. The package hands out a new wrapper for each `getConnection`, so a connection is known by its `info`, which belongs to the physical connection.\n*/\nvar SessionSettingsGuard = class {\n\t#statement;\n\t#ensured = /* @__PURE__ */ new WeakSet();\n\tconstructor(sessionSettings) {\n\t\tthis.#statement = sessionSettingsStatement(sessionSettings);\n\t}\n\tasync ensure(connection) {\n\t\tconst key = connection.info;\n\t\tassertDefined(key, \"the package gives every connection its info when it creates it\");\n\t\tif (this.#statement === void 0 || this.#ensured.has(key)) return;\n\t\tawait applySessionSettings(connection, this.#statement);\n\t\tthis.#ensured.add(key);\n\t}\n};\n//#endregion\n//#region src/core/parameter-values.ts\nfunction unsendable(message, paramIndex, received) {\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", message, { meta: {\n\t\tparamIndex,\n\t\treceived\n\t} });\n}\nconst BIGINT_MIN = -(2n ** 63n);\nconst BIGINT_MAX = 2n ** 63n - 1n;\nconst LONE_SURROGATE = /\\p{Surrogate}/u;\nfunction withinBigint(value) {\n\treturn value >= BIGINT_MIN && value <= BIGINT_MAX;\n}\nfunction receivedKind(value) {\n\tif (value instanceof Date) return \"Date\";\n\tif (Array.isArray(value)) return \"array\";\n\treturn typeof value;\n}\n/**\n* The value the `mariadb` package writes into the statement for a parameter. A finite number or a bigint goes as it is, and the package writes its digits. A non-finite number is refused, because the package would write `NaN` or `Infinity` into the SQL. A bigint must fit a signed BIGINT, so a parameter's type never depends on its value. A `Uint8Array` goes as a Buffer over the same bytes, because the package writes any other `Uint8Array` as JSON text. A `Date` is refused: the package writes it in the process's local time zone, and the MySQL codecs send dates as text. So is text with a lone UTF-16 surrogate, which the package writes as `?` or U+FFFD depending on the text's length.\n*/\nfunction bindValue(value, index, displayName) {\n\tif (value === null || value === void 0) return null;\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) throw unsendable(`Parameter ${index + 1} is ${value}, which ${displayName} cannot store`, index, String(value));\n\t\treturn value;\n\t}\n\tif (typeof value === \"bigint\") {\n\t\tif (withinBigint(value)) return value;\n\t\tthrow unsendable(`Parameter ${index + 1} is an integer outside ${displayName}'s signed 64-bit BIGINT`, index, \"bigint\");\n\t}\n\tif (Buffer.isBuffer(value)) return value;\n\tif (value instanceof Uint8Array) return Buffer.from(value.buffer, value.byteOffset, value.byteLength);\n\tif (typeof value === \"string\") {\n\t\tif (!LONE_SURROGATE.test(value)) return value;\n\t\tthrow unsendable(`Parameter ${index + 1} is text with a lone UTF-16 surrogate, which is not a character and has no utf8mb4 form; the mariadb package would store it as ? or as U+FFFD, depending on the length of the text`, index, \"string\");\n\t}\n\tif (typeof value === \"boolean\") return value;\n\tconst received = receivedKind(value);\n\tthrow unsendable(`Parameter ${index + 1} is of type ${received}; a ${displayName} parameter must be text, a number, a bigint, a boolean, bytes or null, and a Date is sent as text by its codec`, index, received);\n}\n//#endregion\n//#region src/core/positional-params.ts\nfunction placeholderMismatch(placeholders, values, displayName) {\n\treturn structuredError(\"RUNTIME.PARAM_PLACEHOLDER_MISMATCH\", `The ${displayName} statement writes placeholders ${JSON.stringify(placeholders)} for ${values} parameter value(s); write each value as a numbered ?N, or every value as a bare ? in order, and no other placeholder.`, {\n\t\twhy: \"A placeholder that does not match a value binds a value to the wrong place in the statement, or leaves a value unbound.\",\n\t\tfix: \"Pass values into raw SQL through interpolation rather than writing a `?` in the SQL text.\",\n\t\tmeta: {\n\t\t\tplaceholders,\n\t\t\tparams: values\n\t\t}\n\t});\n}\n/** The index into `values` each placeholder takes: `?N` takes value N, and bare `?`s take the values in order. */\nfunction valueIndexes(placeholders, values, displayName) {\n\tconst texts = placeholders.map((placeholder) => placeholder.text);\n\tif (texts.every((text) => text === \"?\")) {\n\t\tif (placeholders.length !== values) throw placeholderMismatch(texts, values, displayName);\n\t\treturn placeholders.map((_, index) => index);\n\t}\n\tconst indexes = placeholders.map((placeholder) => (placeholder.number ?? 0) - 1);\n\tif (!(indexes.every((index) => index >= 0 && index < values) && new Set(indexes).size === values)) throw placeholderMismatch(texts, values, displayName);\n\treturn indexes;\n}\n/**\n* The statement with each placeholder written as MySQL's positional `?`, and its values in that order. The adapter writes numbered `?N` placeholders, a value written as often as its `?N` appears; the control plane writes bare `?`s, which take the values in order. `tokenizeMysqlSql` reads the statement as MySQL's lexer does, so a `?` inside a quoted string, a backtick identifier or a comment stays text. Refuses a statement that mixes the two forms, or whose placeholders and values do not match.\n*/\nfunction positionalParams(sql, values, displayName) {\n\tconst tokens = tokenizeMysqlSql(sql);\n\tconst indexes = valueIndexes(tokens.filter((token) => token.kind === \"placeholder\"), values.length, displayName);\n\treturn {\n\t\tsql: tokens.map((token) => token.kind === \"placeholder\" ? \"?\" : token.text).join(\"\"),\n\t\tvalues: indexes.map((index) => bindValue(values[index], index, displayName))\n\t};\n}\n//#endregion\n//#region src/core/statement.ts\n/** The server status flag MySQL sets in every reply while it reports `NO_BACKSLASH_ESCAPES` in the session's `sql_mode`. */\nconst NO_BACKSLASH_ESCAPES = 512;\nfunction noBackslashEscapesRefusal(params, displayName) {\n\treturn mysqlError(\"RUNTIME.SQL_MODE_UNSUPPORTED\", `${displayName} reports NO_BACKSLASH_ESCAPES in this connection's sql_mode, which the ${displayName} target does not support, so the driver does not send a statement with values`, {\n\t\twhy: `In this mode ${displayName} ends a string at a backslash and a quote, while the mariadb package, which writes the values into the statement, finds its placeholders as if the backslash escaped the quote, so a value could land outside its string literal and run as SQL. The driver removes the mode on every connection it opens, so a statement on this connection made ${displayName} report it: a raw SET sql_mode that set it, which stays until the connection closes or a statement clears it, or a stored procedure that set it inside itself, after which ${displayName} restores the mode the connection had, which may be off, but keeps reporting this one until a statement sets sql_mode again.`,\n\t\tfix: `Do not set NO_BACKSLASH_ESCAPES on a connection Prisma uses, in raw SQL, a stored procedure or a trigger. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs the mode must run in a transaction or on a connection you hold, which must set the mode back before it is released, with ${SET_SQL_MODE}. A statement without values still runs.`,\n\t\tmeta: {\n\t\t\tsqlMode: \"NO_BACKSLASH_ESCAPES\",\n\t\t\tparams\n\t\t}\n\t});\n}\n/** The character set MySQL last reported for the statements the connection sends, as the package records it: utf8mb3 and utf8mb4 both as `utf8`, told apart by their longest character. */\nfunction reportedCharacterSet(collation) {\n\tif (typeof collation === \"object\" && collation !== null && \"charset\" in collation && \"maxLength\" in collation) return collation.charset === \"utf8\" ? `utf8mb${String(collation.maxLength)}` : String(collation.charset);\n\treturn \"unknown\";\n}\nfunction characterSetRefusal(characterSet, params, displayName) {\n\treturn mysqlError(\"RUNTIME.CHARACTER_SET_UNSUPPORTED\", `The driver could not confirm that ${displayName} reads this connection's statements as utf8mb4: the character set the mariadb package last recorded for it is ${characterSet}. The ${displayName} target supports only utf8mb4, so the driver does not send a statement with values`, {\n\t\twhy: `The mariadb package, which writes the values into the statement, encodes the statement in the character set it last recorded and finds its placeholders byte by byte. In a character set such as sjis, cp932, big5 or gbk, the second byte of some characters is a backslash, so the package can read the end of a string literal in the SQL differently from ${displayName}, and a value could run as SQL. The package records the character set from the server greeting and from ${displayName}'s report of changed session variables. Two causes are known: a statement on this connection changed character_set_client, such as a raw SET NAMES; or the server does not report character_set_client in session_track_system_variables, so the package never saw the driver set utf8mb4 and still holds the default character set from the greeting.`,\n\t\tfix: `If a statement changed the character set: do not change it on a connection Prisma uses. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs another character set must run in a transaction or on a connection you hold, which must set it back before it is released, with ${SET_UTF8MB4}. If no statement changed it: add character_set_client back to the server's session_track_system_variables, as in ${displayName}'s default, and restart the client. A statement without values still runs.`,\n\t\tmeta: {\n\t\t\tcharacterSet,\n\t\t\tparams\n\t\t}\n\t});\n}\n/**\n* The statement to hand to `connection`: `sql` with its placeholders written as `?` and the values in their order, for the package to write in. A statement without values comes back as written with no values, so the package sends it without searching it for placeholders. Refuses a statement with values while the server last reported `NO_BACKSLASH_ESCAPES` on, or while the package's record of the character set is not utf8mb4, which a statement the application sends or a server that does not report `character_set_client` can cause. A statement without values still runs, so the setting can be put back; the driver's lexer still reads a backslash as an escape then, so at worst it refuses such a statement for a `?` it reads outside a string.\n*/\nfunction statementFor(connection, sql, params, displayName) {\n\tconst { info } = connection;\n\tassertDefined(info, \"the package gives every connection its info when it creates it\");\n\tif (params.length > 0) {\n\t\tif ((info.status & NO_BACKSLASH_ESCAPES) !== 0) throw noBackslashEscapesRefusal(params.length, displayName);\n\t\tconst characterSet = reportedCharacterSet(info.collation);\n\t\tif (characterSet !== \"utf8mb4\") throw characterSetRefusal(characterSet, params.length, displayName);\n\t}\n\tconst statement = positionalParams(sql, params, displayName);\n\treturn params.length > 0 ? statement : {\n\t\tsql,\n\t\tvalues: void 0\n\t};\n}\n//#endregion\nexport { MYSQL_CHECK_VIOLATION_ERRORS as a, connectionLost as c, mysqlDriverDescriptorMetaFor as d, mysqlConnectionOptions as f, acquireClientQueryLock as h, sessionSettingsStatement as i, isFatal as l, mysqlPoolOptions as m, SessionSettingsGuard as n, connectingCannotSucceed as o, mysqlPoolIdleTimeoutMillis as p, applySessionSettings as r, connectionFix as s, statementFor as t, normalizeMysqlError as u };\n\n//# sourceMappingURL=statement-a2Eekpu6.mjs.map"],"mappings":";;;;;;;;;;AASA,IAAI,aAAa,MAAM;CACtB,SAAS,QAAQ,QAAQ;CACzB,MAAM,OAAO;EACZ,MAAM,WAAW,KAAKA;EACtB,IAAI;EACJ,KAAKA,SAAS,IAAI,SAAS,YAAY;GACtC,cAAc;EACf,CAAC;EACD,MAAM;EACN,aAAa;GACZ,cAAc;GACd,cAAc,KAAK;EACpB;CACD;AACD;;;;AAIA,MAAM,mCAAmC,IAAI,QAAQ;AACrD,SAAS,uBAAuB,QAAQ;CACvC,IAAI,QAAQ,iBAAiB,IAAI,MAAM;CACvC,IAAI,UAAU,KAAK,GAAG;EACrB,QAAQ,IAAI,WAAW;EACvB,iBAAiB,IAAI,QAAQ,KAAK;CACnC;CACA,OAAO,MAAM,KAAK;AACnB;;;;AAMA,MAAM,eAAe;;AAErB,MAAM,cAAc;;;;AAIpB,MAAM,g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ts CHANGED
@@ -1,25 +1,27 @@
1
- import { a as MysqlCodecOptions, c as mysqlCodec, i as MysqlCodecDescriptorRegistry, n as AnyMysqlCodecDescriptor, o as buildMysqlCodecDescriptorRegistry, r as MysqlCodecDescriptor, s as isMysqlCodecDescriptor, t as AdaptedMysqlCodecDescriptor } from "./codec-descriptor-DXyubAS6-XDBj6Yet.mjs";
2
- import { a as MYSQL_DATE_STRING_CODEC_ID, c as MYSQL_ENUM_CODEC_ID, d as MYSQL_TIMESTAMP_DATE_CODEC_ID, f as MYSQL_TIMESTAMP_STRING_CODEC_ID, h as MYSQL_TIME_TEMPORAL_CODEC_ID, i as MYSQL_DATETIME_TEMPORAL_CODEC_ID, l as MYSQL_INT_CODEC_ID, m as MYSQL_TIME_STRING_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, o as MYSQL_DATE_TEMPORAL_CODEC_ID, p as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, r as MYSQL_DATETIME_STRING_CODEC_ID, s as MYSQL_DURATION_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CODEC_ID } from "./codec-ids-Dgh5IpML-DGXIq6j8.mjs";
3
- import { C as mysqlTimestampText, E as renderMysqlEnumType, S as mysqlTimestamp, T as mysqlVarcharParams, _ as mysqlInt, a as mysqlCharParams, b as mysqlTime, c as mysqlDateText, d as mysqlDatetimeText, f as mysqlDuration, g as mysqlEnumParams, h as mysqlEnum, i as mysqlChar, l as mysqlDatetime, m as mysqlDurationText, n as MYSQL_TIMESTAMP_RANGE, o as mysqlDataTypes, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, t as MYSQL_DATETIME_RANGE, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText, y as mysqlTextDataTypes } from "./data-types-D2HAT-Qf-CSdDz1Pk.mjs";
4
- import { _ as encodeMysqlDatetime, g as decodeMysqlDatetime } from "./codecs-BMidk26M-B_iWNti6.mjs";
5
- import { t as CodecTypes } from "./codec-types-Bai_CFkk-DmZ74URd.mjs";
6
- import "./codec-types-BS-lWfda.mjs";
1
+ import { a as MysqlCodecOptions, c as mysqlCodec, i as MysqlCodecDescriptorRegistry, n as AnyMysqlCodecDescriptor, o as buildMysqlCodecDescriptorRegistry, r as MysqlCodecDescriptor, s as isMysqlCodecDescriptor, t as AdaptedMysqlCodecDescriptor } from "./codec-descriptor-DXsJwUng-D4abEAFs.mjs";
2
+ 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-DHeJ2SMJ-Uz1FAFmQ.mjs";
3
+ import { A as mysqlLongblob, B as renderMysqlEnumType, C as mysqlDuration, D as mysqlEnumParams, E as mysqlEnum, F as mysqlTimeText, I as mysqlTimestamp, L as mysqlTimestampText, M as mysqlText, N as mysqlTextDataTypes, 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, d as mysqlDataTypes, f as mysqlDate, g as mysqlDatetimeText, h as mysqlDatetimeParams, i as decimalColumnHolds, j as mysqlLongblobFromHexText, k as mysqlJson, l as mysqlChar, m as mysqlDatetime, n as MYSQL_TIMESTAMP_RANGE, o as decimalTextInColumn, p as mysqlDateText, r as MYSQL_WIDEST_DECIMAL, s as mysqlBigint, t as MYSQL_DATETIME_RANGE, u as mysqlCharParams, v as mysqlDecimalColumnAsCreated, w as mysqlDurationParams, x as mysqlDecimalText, y as mysqlDecimalColumnOfReference, z as mysqlVarcharParams } from "./data-types-C_vInIbm-Gt1XINav.mjs";
4
+ import { C as encodeMysqlDatetime, S as decodeMysqlDatetime } from "./codecs-D35fqdXJ-BZwilYUu.mjs";
5
+ import { t as CodecTypes } from "./codec-types-C4Q_JJgX-CUPkvPDx.mjs";
6
+ import "./codec-types-DxSSgcpB.mjs";
7
7
  import { i as MysqlDdlVisitor, n as MysqlCreateTable, r as MysqlDdlNode, t as AnyMysqlDdlNode } from "./nodes-xc0cR0_c-CLET35o0.mjs";
8
8
  import "./ddl-Bobm-S7I.mjs";
9
- import { a as assembleMysqlCodecRegistry, c as mysqlCodecRegistry, i as MysqlCodecRegistry, l as mysqlCurrentValueFor, n as MYSQL_INSTANT_NOW, o as createMysqlBuiltinCodecLookup, r as MYSQL_TIME_NOW, s as mysqlCodecDescriptorRegistry, t as MYSQL_DATE_NOW, u as mysqlNowExpression } from "./codecs-CIJRyUd3.mjs";
10
- import "./codec-descriptor-BRcKIX3h.mjs";
9
+ import { a as MysqlRuntimeTargetMeta, c as mysqlIsolationLevelSchema, f as validateMysqlIsolationLevel, i as MysqlRuntimeTargetInstance, l as mysqlIsolationLevels, n as MysqlIsolationLevel, o as MysqlRuntimeTargetOptions, r as MysqlRuntimeTargetDescriptor, s as createMysqlRuntimeTargetDescriptor, t as MysqlContractSerializer, u as mysqlNowGenerators } from "./runtime-Ci3hPz1j.mjs";
10
+ import "./codec-descriptor-CqM_hQjY.mjs";
11
+ import { a as assembleMysqlCodecRegistry, c as mysqlCodecRegistry, i as MysqlCodecRegistry, l as mysqlCurrentValueFor, n as MYSQL_INSTANT_NOW, o as createMysqlBuiltinCodecLookup, r as MYSQL_TIME_NOW, s as mysqlCodecDescriptorRegistry, t as MYSQL_DATE_NOW, u as mysqlNowExpression } from "./codecs-DTfUoamS.mjs";
12
+ import { t as mysqlAggregateDescriptors } from "./aggregates-BK8qyA2x.mjs";
11
13
  import { n as SQL_RAW_CODEC_ID, r as SQL_VARCHAR_CODEC_ID, t as SQL_CHAR_CODEC_ID } from "./codec-ids-BHUwoNOM.mjs";
12
14
  import { n as buildSignMarkerBootstrapQueries, r as createTable, t as buildControlTableBootstrapQueries } from "./contract-free-BnJBWENn.mjs";
13
15
  import { t as MysqlPlanTargetDetails } from "./planner-target-details-D6g2uSp--6VJKSGxe.mjs";
14
- import { i as mysqlScalarTypeConstructors, n as createMysqlControlTargetDescriptor, t as MysqlControlTargetOptions } from "./control-Dj8nIA1M.mjs";
16
+ import { i as mysqlScalarTypeConstructors, n as createMysqlControlTargetDescriptor, t as MysqlControlTargetOptions } from "./control-B7v7zc3l.mjs";
15
17
  import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-CWJyQ3dZ.mjs";
16
- import { t as mysqlDataTypeEntries } from "./data-types-65iVc7q1.mjs";
17
- import { n as mysqlResolveDefault, r as readMysqlDefault, t as MysqlReportedDefault } from "./default-normalizer-D-8Ii0df.mjs";
18
- import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-DjCkC9IM.mjs";
18
+ import { t as mysqlDataTypeEntries } from "./data-types-COQT9bVG.mjs";
19
+ import { a as readMysqlDefault, i as mysqlResolveDefault, n as isMysqlBlobColumnType, r as isMysqlBytesColumnType, t as MysqlReportedDefault } from "./default-normalizer-zXWtDBp_.mjs";
20
+ import { t as mysqlTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-DEKunXiL.mjs";
21
+ import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-B81Qeu5_.mjs";
19
22
  import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-Px2qK06F.mjs";
20
- import { A as unique, C as createMysqlMigrationRunner, D as primaryKey, E as placeholder, O as rawSql, S as createMysqlMigrationPlanner, T as lit, _ as MysqlOpFactoryCall, a as CreateTableCall, b as TypeScriptRenderableMysqlMigration, c as DropIndexCall, d as MigrationCLI, f as MysqlMigration, g as MysqlMigrationTarget, h as MysqlMigrationPlanner, i as CreateIndexCall, k as sql, l as DropTableCall, m as MysqlMigrationDestinationInfo, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationBase, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, v as MysqlPlanResult, w as fn, x as col, y as RawSqlCall } from "./migration-DILkj7kB.mjs";
21
- import "./pack-CqULIal0.mjs";
22
- import { a as mysqlIsolationLevels, c as validateMysqlIsolationLevel, i as mysqlIsolationLevelSchema, n as MysqlIsolationLevel, o as mysqlNowGenerators, r as MysqlRuntimeTargetInstance, t as MysqlContractSerializer } from "./runtime-CbqytTbM.mjs";
23
+ import { A as unique, C as createMysqlMigrationRunner, D as primaryKey, E as placeholder, O as rawSql, S as createMysqlMigrationPlanner, T as lit, _ as MysqlOpFactoryCall, a as CreateTableCall, b as TypeScriptRenderableMysqlMigration, c as DropIndexCall, d as MigrationCLI, f as MysqlMigration, g as MysqlMigrationTarget, h as MysqlMigrationPlanner, i as CreateIndexCall, k as sql, l as DropTableCall, m as MysqlMigrationDestinationInfo, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationBase, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, v as MysqlPlanResult, w as fn, x as col, y as RawSqlCall } from "./migration-O-3NHVlW.mjs";
24
+ import "./pack-C5_g-3YX.mjs";
23
25
  import { a as quoteLiteral, i as quoteIdentifier, n as MysqlSqlToken, o as tokenizeMysqlSql, r as escapeLiteral, t as MysqlPlaceholderToken } from "./sql-utils-DBvre8Ar.mjs";
24
26
  import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./types-gXYDzQXs.mjs";
25
- export { type AdaptedMysqlCodecDescriptor, AddColumnCall, AddForeignKeyCall, AddUniqueCall, type AnyMysqlCodecDescriptor, type AnyMysqlDdlNode, CONTROL_TABLE_NAMES, CodecTypes, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, type MysqlCodecDescriptorRegistry, type MysqlCodecOptions, type MysqlCodecRegistry, MysqlContractSerializer, type MysqlControlTargetOptions, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, type MysqlDdlVisitor, type MysqlIsolationLevel, MysqlMigrationBase, type MysqlMigrationDestinationInfo, MysqlMigrationPlanner, type MysqlMigrationTarget, type MysqlOpFactoryCall, type MysqlPlaceholderToken, type MysqlPlanResult, type MysqlPlanTargetDetails, type MysqlReportedDefault, type MysqlRuntimeTargetInstance, type MysqlSqlToken, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, validateMysqlIsolationLevel, withMarkerLock };
27
+ export { type AdaptedMysqlCodecDescriptor, AddColumnCall, AddForeignKeyCall, AddUniqueCall, type AnyMysqlCodecDescriptor, type AnyMysqlDdlNode, CONTROL_TABLE_NAMES, CodecTypes, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_BIGINT_NUMBER_CODEC_ID, MYSQL_BOOLEAN_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DECIMAL_CODEC_ID, MYSQL_DOUBLE_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_JSON_CODEC_ID, MYSQL_LONGBLOB_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MYSQL_WIDEST_DECIMAL, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, type MysqlCodecDescriptorRegistry, type MysqlCodecOptions, type MysqlCodecRegistry, MysqlContractSerializer, type MysqlControlTargetOptions, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, type MysqlDdlVisitor, type MysqlIsolationLevel, MysqlMigrationBase, type MysqlMigrationDestinationInfo, MysqlMigrationPlanner, type MysqlMigrationTarget, type MysqlOpFactoryCall, type MysqlPlaceholderToken, type MysqlPlanResult, type MysqlPlanTargetDetails, type MysqlReportedDefault, type MysqlRuntimeTargetDescriptor, type MysqlRuntimeTargetInstance, type MysqlRuntimeTargetMeta, type MysqlRuntimeTargetOptions, type MysqlSqlToken, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createMysqlRuntimeTargetDescriptor, createTable, decimalColumnHolds, decimalTextDigits, decimalTextInColumn, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlBlobColumnType, isMysqlBytesColumnType, isMysqlCodecDescriptor, lit, mysqlAggregateDescriptors, mysqlBigint, mysqlBoolean, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDecimal, mysqlDecimalColumnAsCreated, mysqlDecimalColumnOfReference, mysqlDecimalParams, mysqlDecimalText, mysqlDouble, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlJson, mysqlLongblob, mysqlLongblobFromHexText, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlTargetDescriptorMetaRuntime, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, validateMysqlIsolationLevel, withMarkerLock };
package/dist/target.mjs CHANGED
@@ -1,25 +1,27 @@
1
- import { a as mysqlCodec, i as isMysqlCodecDescriptor, n as buildMysqlCodecDescriptorRegistry, t as MysqlCodecDescriptor } from "./codec-descriptor-3xp1XvVH-DfPKpYeP.mjs";
2
- import { a as MYSQL_DATE_STRING_CODEC_ID, c as MYSQL_ENUM_CODEC_ID, d as MYSQL_TIMESTAMP_DATE_CODEC_ID, f as MYSQL_TIMESTAMP_STRING_CODEC_ID, h as MYSQL_TIME_TEMPORAL_CODEC_ID, i as MYSQL_DATETIME_TEMPORAL_CODEC_ID, l as MYSQL_INT_CODEC_ID, m as MYSQL_TIME_STRING_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, o as MYSQL_DATE_TEMPORAL_CODEC_ID, p as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, r as MYSQL_DATETIME_STRING_CODEC_ID, s as MYSQL_DURATION_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CODEC_ID } from "./codec-ids-CrR9Xi7r-CjbGCS3o.mjs";
1
+ 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-DiyLf9dW.mjs";
2
+ import { l as mysqlError, u as mysqlQueryNotYetSupported } from "./errors-CWtFTnst-xBLJ-9Lp.mjs";
3
+ import { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from "./sql-utils-CveZhawQ-B2QmUlY0.mjs";
4
+ import { A as mysqlLongblob, B as renderMysqlEnumType, C as mysqlDuration, D as mysqlEnumParams, E as mysqlEnum, F as mysqlTimeText, I as mysqlTimestamp, L as mysqlTimestampText, M as mysqlText, N as mysqlTextDataTypes, 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, d as mysqlDataTypes, f as mysqlDate, g as mysqlDatetimeText, h as mysqlDatetimeParams, i as decimalColumnHolds, j as mysqlLongblobFromHexText, k as mysqlJson, l as mysqlChar, m as mysqlDatetime, n as MYSQL_TIMESTAMP_RANGE, o as decimalTextInColumn, p as mysqlDateText, r as MYSQL_WIDEST_DECIMAL, s as mysqlBigint, t as MYSQL_DATETIME_RANGE, u as mysqlCharParams, v as mysqlDecimalColumnAsCreated, w as mysqlDurationParams, x as mysqlDecimalText, y as mysqlDecimalColumnOfReference, z as mysqlVarcharParams } from "./data-types-CU_43cNv-CQ8eHx3H.mjs";
5
+ import { t as mysqlAggregateDescriptors } from "./aggregates-Bk6CCgQ-.mjs";
6
+ import { a as mysqlCodec, i as isMysqlCodecDescriptor, n as buildMysqlCodecDescriptorRegistry, t as MysqlCodecDescriptor } from "./codec-descriptor-ByN7iIha-48yW7oDN.mjs";
3
7
  import { n as SQL_RAW_CODEC_ID, r as SQL_VARCHAR_CODEC_ID, t as SQL_CHAR_CODEC_ID } from "./codec-ids-C00hAFkc.mjs";
4
- import { c as mysqlQueryNotYetSupported, s as mysqlError } from "./errors-Cng94tYg-DTH51xWG.mjs";
5
- import { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from "./sql-utils-Cmv_TVa8-CNW3UmfQ.mjs";
6
- import { C as mysqlTimestampText, E as renderMysqlEnumType, S as mysqlTimestamp, T as mysqlVarcharParams, _ as mysqlInt, a as mysqlCharParams, b as mysqlTime, c as mysqlDateText, d as mysqlDatetimeText, f as mysqlDuration, g as mysqlEnumParams, h as mysqlEnum, i as mysqlChar, l as mysqlDatetime, m as mysqlDurationText, n as MYSQL_TIMESTAMP_RANGE, o as mysqlDataTypes, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, t as MYSQL_DATETIME_RANGE, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText, y as mysqlTextDataTypes } from "./data-types-DOaaPS93-lycGybNk.mjs";
7
- import { a as mysqlNowExpression, i as mysqlCurrentValueFor, n as MYSQL_INSTANT_NOW, r as MYSQL_TIME_NOW, t as MYSQL_DATE_NOW } from "./now-expression-DVD18CUc-DJqdZY96.mjs";
8
- import { a as mysqlCodecDescriptorRegistry, i as encodeMysqlDatetime, n as createMysqlBuiltinCodecLookup, o as mysqlCodecRegistry, r as decodeMysqlDatetime, t as assembleMysqlCodecRegistry } from "./codecs-wVJlFapM.mjs";
8
+ import { 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-Ixs-vg-B.mjs";
9
+ import { a as mysqlCodecDescriptorRegistry, i as encodeMysqlDatetime, n as createMysqlBuiltinCodecLookup, o as mysqlCodecRegistry, r as decodeMysqlDatetime, t as assembleMysqlCodecRegistry } from "./codecs-DVX-3El1.mjs";
9
10
  import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-CcQ77JE7-DKb3ubVU.mjs";
10
11
  import { n as MysqlDdlNode, t as MysqlCreateTable } from "./nodes-CvcX47ot-CcCy0Oh4.mjs";
11
12
  import { t as createTable } from "./ddl-DDmMHyA_-grdUmU3J.mjs";
12
13
  import { n as buildSignMarkerBootstrapQueries, t as buildControlTableBootstrapQueries } from "./contract-free-DekbHRyr.mjs";
13
- import { t as mysqlDataTypeEntries } from "./data-type-entries-C7VH2IHc-DM6TbTaz.mjs";
14
- import { t as mysqlNowGenerators } from "./date-time-now-generators-BKakW3gd-CIFPuRdM.mjs";
15
- import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-BF6YvSag-ChHHvlHc.mjs";
16
- import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./mysql-database-CHl9-oSL-B1arvq6Q.mjs";
17
- import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs";
18
- import { n as readMysqlDefault, t as mysqlResolveDefault } from "./default-normalizer-C8pc7SbL-BXd70q02.mjs";
19
- import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-Bwew7cAs-ElLxlCQp.mjs";
20
- import { _ as createMysqlMigrationPlanner, a as CreateTableCall, c as DropIndexCall, f as MysqlMigration, g as TypeScriptRenderableMysqlMigration, h as RawSqlCall, i as CreateIndexCall, l as DropTableCall, m as MysqlMigrationPlanner, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationBase, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, v as createMysqlMigrationRunner, x as rawSql } from "./runner-DEKKxDyw-Cdo1Ysod.mjs";
21
- import { t as createMysqlControlTargetDescriptor } from "./control-RYDTbndD.mjs";
14
+ import { t as mysqlDataTypeEntries } from "./data-type-entries-DlbQ1Bvl-BFkHeHVz.mjs";
15
+ import { t as mysqlTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs";
16
+ import { t as mysqlNowGenerators } from "./date-time-now-generators-Cx_aQTSw-ay1tlvw6.mjs";
17
+ import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-BHSEcFWR-41BcRcOy.mjs";
18
+ import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./mysql-database-ByniOtau-BKBIGgSm.mjs";
19
+ import { t as MysqlContractSerializer } from "./mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs";
20
+ import { i as readMysqlDefault, n as isMysqlBytesColumnType, r as mysqlResolveDefault, t as isMysqlBlobColumnType } from "./default-normalizer-C9c043DP-DPhwJOC4.mjs";
21
+ import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-B7CyXf2F-CakjZnQP.mjs";
22
+ import { _ as createMysqlMigrationRunner, a as CreateTableCall, b as rawSql, c as DropIndexCall, d as MysqlMigration, f as MysqlMigrationBase, g as createMysqlMigrationPlanner, h as TypeScriptRenderableMysqlMigration, i as CreateIndexCall, l as DropTableCall, m as RawSqlCall, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationPlanner, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall } from "./runner-IjNtlp_v-DLCqpSh5.mjs";
23
+ import { t as createMysqlControlTargetDescriptor } from "./control-DtXS4WsY.mjs";
22
24
  import { a as placeholder, c as unique, i as lit, n as col, o as primaryKey, r as fn, s as sql, t as MigrationCLI } from "./migration-tFuoN9GB.mjs";
23
- import { i as validateMysqlIsolationLevel, n as mysqlIsolationLevels, t as mysqlIsolationLevelSchema } from "./runtime-DUDdsFyy.mjs";
24
- import { t as tokenizeMysqlSql } from "./sql-utils-BE8tDXHs.mjs";
25
- export { AddColumnCall, AddForeignKeyCall, AddUniqueCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, MysqlContractSerializer, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, MysqlMigrationBase, MysqlMigrationPlanner, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, validateMysqlIsolationLevel, withMarkerLock };
25
+ import { a as validateMysqlIsolationLevel, n as mysqlIsolationLevelSchema, r as mysqlIsolationLevels, t as createMysqlRuntimeTargetDescriptor } from "./runtime-_c_DZuYR.mjs";
26
+ import { t as tokenizeMysqlSql } from "./sql-utils-DVH8boEI.mjs";
27
+ export { AddColumnCall, AddForeignKeyCall, AddUniqueCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_BIGINT_NUMBER_CODEC_ID, MYSQL_BOOLEAN_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DECIMAL_CODEC_ID, MYSQL_DOUBLE_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_JSON_CODEC_ID, MYSQL_LONGBLOB_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MYSQL_WIDEST_DECIMAL, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, MysqlContractSerializer, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, MysqlMigrationBase, MysqlMigrationPlanner, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createMysqlRuntimeTargetDescriptor, createTable, decimalColumnHolds, decimalTextDigits, decimalTextInColumn, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlBlobColumnType, isMysqlBytesColumnType, isMysqlCodecDescriptor, lit, mysqlAggregateDescriptors, mysqlBigint, mysqlBoolean, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDecimal, mysqlDecimalColumnAsCreated, mysqlDecimalColumnOfReference, mysqlDecimalParams, mysqlDecimalText, mysqlDouble, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlJson, mysqlLongblob, mysqlLongblobFromHexText, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlTargetDescriptorMetaRuntime, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, validateMysqlIsolationLevel, withMarkerLock };
@@ -0,0 +1,2 @@
1
+ import { t as mysqlAggregateDescriptors } from "./aggregates-BK8qyA2x.mjs";
2
+ export { mysqlAggregateDescriptors };