@prisma/orm-target-mysql 8.0.0-rc.22-dev.11 → 8.0.0-rc.22-dev.12

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 (146) hide show
  1. package/README.md +2 -0
  2. package/dist/adapter.d.mts +4 -4
  3. package/dist/adapter.mjs +1 -1
  4. package/dist/adapter__codec-types.d.mts +2 -2
  5. package/dist/adapter__control.d.mts +1 -1
  6. package/dist/adapter__control.mjs +1 -1
  7. package/dist/adapter__runtime.d.mts +1 -1
  8. package/dist/adapter__runtime.mjs +17 -6
  9. package/dist/adapter__runtime.mjs.map +1 -1
  10. package/dist/{codec-descriptor-Du6DSz-3-ytBCu_mq.mjs → codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs} +5 -3
  11. package/dist/codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs.map +1 -0
  12. package/dist/codec-ids-CrR9Xi7r-CarpqbNM.mjs +20 -0
  13. package/dist/codec-ids-CrR9Xi7r-CarpqbNM.mjs.map +1 -0
  14. package/dist/codec-ids-Dgh5IpML-76oBMuwK.d.mts +20 -0
  15. package/dist/codec-ids-Dgh5IpML-76oBMuwK.d.mts.map +1 -0
  16. package/dist/codec-types-BH5moCD9.d.mts +1 -0
  17. package/dist/codec-types-Bai_CFkk-Blx2GxCH.d.mts +31 -0
  18. package/dist/codec-types-Bai_CFkk-Blx2GxCH.d.mts.map +1 -0
  19. package/dist/codec-types-zzVcrnbk.d.mts +1 -0
  20. package/dist/codecs-BMidk26M-DsKq6wt5.d.mts +282 -0
  21. package/dist/codecs-BMidk26M-DsKq6wt5.d.mts.map +1 -0
  22. package/dist/codecs-BfiB79-5.mjs +750 -0
  23. package/dist/codecs-BfiB79-5.mjs.map +1 -0
  24. package/dist/codecs-C_twedMx.d.mts +36 -0
  25. package/dist/codecs-C_twedMx.d.mts.map +1 -0
  26. package/dist/{control-CgeXsxCR.mjs → control-5eVF1TXc.mjs} +2 -2
  27. package/dist/{control-CgeXsxCR.mjs.map → control-5eVF1TXc.mjs.map} +1 -1
  28. package/dist/{control-H2sjKXXS.mjs → control-BBhWaGnH.mjs} +24 -13
  29. package/dist/control-BBhWaGnH.mjs.map +1 -0
  30. package/dist/control-BvSM7mGR.d.mts +396 -0
  31. package/dist/control-BvSM7mGR.d.mts.map +1 -0
  32. package/dist/{control-Ez_PtlFI.d.mts → control-MoPFgSaQ.d.mts} +2 -2
  33. package/dist/{control-Ez_PtlFI.d.mts.map → control-MoPFgSaQ.d.mts.map} +1 -1
  34. package/dist/data-type-entries-C7VH2IHc-D1d5I8zF.mjs +59 -0
  35. package/dist/data-type-entries-C7VH2IHc-D1d5I8zF.mjs.map +1 -0
  36. package/dist/{data-types-SXrh0Lou.d.mts → data-types-C-rfxpgB.d.mts} +2 -2
  37. package/dist/data-types-C-rfxpgB.d.mts.map +1 -0
  38. package/dist/data-types-D2HAT-Qf-CRI506c0.d.mts +88 -0
  39. package/dist/data-types-D2HAT-Qf-CRI506c0.d.mts.map +1 -0
  40. package/dist/data-types-DOaaPS93-DBkMJyh1.mjs +289 -0
  41. package/dist/data-types-DOaaPS93-DBkMJyh1.mjs.map +1 -0
  42. package/dist/date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs +72 -0
  43. package/dist/date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs.map +1 -0
  44. package/dist/{default-normalizer-BDUgHXUn-Xk7HQJuI.mjs → default-normalizer-C8pc7SbL-CKgOEnGl.mjs} +22 -12
  45. package/dist/default-normalizer-C8pc7SbL-CKgOEnGl.mjs.map +1 -0
  46. package/dist/{default-normalizer-BBhGpw7r.d.mts → default-normalizer-CGIwQiKB.d.mts} +4 -4
  47. package/dist/{default-normalizer-BBhGpw7r.d.mts.map → default-normalizer-CGIwQiKB.d.mts.map} +1 -1
  48. package/dist/descriptor-meta-CsMPRsxp-DhK87vlc.mjs +352 -0
  49. package/dist/descriptor-meta-CsMPRsxp-DhK87vlc.mjs.map +1 -0
  50. package/dist/driver.mjs +1 -1
  51. package/dist/driver__control.mjs +1 -1
  52. package/dist/driver__runtime.mjs +1 -1
  53. package/dist/errors-Cng94tYg-D02Eud2d.mjs +87 -0
  54. package/dist/errors-Cng94tYg-D02Eud2d.mjs.map +1 -0
  55. package/dist/{errors-BYhjQT7y.d.mts → errors-DfrC_yfG.d.mts} +2 -2
  56. package/dist/{errors-BYhjQT7y.d.mts.map → errors-DfrC_yfG.d.mts.map} +1 -1
  57. package/dist/{marker-lock-CmGvN4hw-Com29AtQ.mjs → marker-lock-Bwew7cAs-CZ20Y_tA.mjs} +3 -3
  58. package/dist/{marker-lock-CmGvN4hw-Com29AtQ.mjs.map → marker-lock-Bwew7cAs-CZ20Y_tA.mjs.map} +1 -1
  59. package/dist/{marker-read-Cf80LSbG-BZaJ8Ll6.mjs → marker-read-Cf80LSbG-CUp3v1e5.mjs} +3 -3
  60. package/dist/{marker-read-Cf80LSbG-BZaJ8Ll6.mjs.map → marker-read-Cf80LSbG-CUp3v1e5.mjs.map} +1 -1
  61. package/dist/mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs +35 -0
  62. package/dist/mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs.map +1 -0
  63. package/dist/{mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs → mysql-database-CHl9-oSL-CWZLDXt6.mjs} +39 -40
  64. package/dist/mysql-database-CHl9-oSL-CWZLDXt6.mjs.map +1 -0
  65. package/dist/now-expression-DVD18CUc-00buJUto.mjs +38 -0
  66. package/dist/now-expression-DVD18CUc-00buJUto.mjs.map +1 -0
  67. package/dist/{pack-DXsOvRJn.d.mts → pack-BXvLVBWP.d.mts} +394 -14
  68. package/dist/{pack-DXsOvRJn.d.mts.map → pack-BXvLVBWP.d.mts.map} +1 -1
  69. package/dist/require-temporal-DeDQhbTn-Bxc65WbA.mjs +16 -0
  70. package/dist/require-temporal-DeDQhbTn-Bxc65WbA.mjs.map +1 -0
  71. package/dist/{runner-BaBQoXiU-C7ln-4b2.mjs → runner-C39AEe6--BVG3xPYw.mjs} +7 -7
  72. package/dist/{runner-BaBQoXiU-C7ln-4b2.mjs.map → runner-C39AEe6--BVG3xPYw.mjs.map} +1 -1
  73. package/dist/{runtime-CeuRr9nE.d.mts → runtime-ClRDfPiY.d.mts} +2 -2
  74. package/dist/{runtime-CeuRr9nE.d.mts.map → runtime-ClRDfPiY.d.mts.map} +1 -1
  75. package/dist/runtime-CrB5DXx4.d.mts +54 -0
  76. package/dist/runtime-CrB5DXx4.d.mts.map +1 -0
  77. package/dist/{sql-utils-Db0IQO_B-PaULnfrE.mjs → sql-utils-Cmv_TVa8-BetrIUcj.mjs} +3 -3
  78. package/dist/{sql-utils-Db0IQO_B-PaULnfrE.mjs.map → sql-utils-Cmv_TVa8-BetrIUcj.mjs.map} +1 -1
  79. package/dist/{sql-utils-RW0vJvDl.mjs → sql-utils-bD4SfgX0.mjs} +2 -2
  80. package/dist/{sql-utils-RW0vJvDl.mjs.map → sql-utils-bD4SfgX0.mjs.map} +1 -1
  81. package/dist/{statement-DC62oiSx-DTx1JaP7.mjs → statement-DC62oiSx-Buzptbpk.mjs} +5 -5
  82. package/dist/{statement-DC62oiSx-DTx1JaP7.mjs.map → statement-DC62oiSx-Buzptbpk.mjs.map} +1 -1
  83. package/dist/target.d.mts +14 -13
  84. package/dist/target.mjs +17 -13
  85. package/dist/target__codec-descriptor.mjs +1 -1
  86. package/dist/target__codec-ids.d.mts +2 -2
  87. package/dist/target__codec-ids.mjs +2 -2
  88. package/dist/target__codec-types.d.mts +2 -2
  89. package/dist/target__codecs.d.mts +3 -3
  90. package/dist/target__codecs.mjs +3 -2
  91. package/dist/target__control.d.mts +2 -2
  92. package/dist/target__control.mjs +38 -32
  93. package/dist/target__control.mjs.map +1 -1
  94. package/dist/target__data-types.d.mts +3 -3
  95. package/dist/target__data-types.mjs +3 -3
  96. package/dist/target__default-normalizer.d.mts +1 -1
  97. package/dist/target__default-normalizer.mjs +1 -1
  98. package/dist/target__errors.d.mts +1 -1
  99. package/dist/target__errors.mjs +1 -1
  100. package/dist/target__marker-lock.mjs +1 -1
  101. package/dist/target__migration.mjs +1 -1
  102. package/dist/target__pack.d.mts +1 -1
  103. package/dist/target__pack.mjs +1 -1
  104. package/dist/target__runtime.d.mts +2 -2
  105. package/dist/target__runtime.mjs +3 -3
  106. package/dist/target__runtime.mjs.map +1 -1
  107. package/dist/target__sql-utils.mjs +2 -2
  108. package/dist/target__types.d.mts +2 -0
  109. package/dist/target__types.mjs +2 -0
  110. package/dist/{control-_4epnrIW.d.mts → types-CgrFHUdk.d.mts} +3 -8
  111. package/dist/types-CgrFHUdk.d.mts.map +1 -0
  112. package/package.json +18 -12
  113. package/dist/codec-descriptor-Du6DSz-3-ytBCu_mq.mjs.map +0 -1
  114. package/dist/codec-ids-cjxtOcLM-vFeQhgPm.mjs +0 -10
  115. package/dist/codec-ids-cjxtOcLM-vFeQhgPm.mjs.map +0 -1
  116. package/dist/codec-ids-sMOU8F-B-BQbCq2dr.d.mts +0 -10
  117. package/dist/codec-ids-sMOU8F-B-BQbCq2dr.d.mts.map +0 -1
  118. package/dist/codec-types-Bd7DL1Mr-CZWNfnp9.d.mts +0 -21
  119. package/dist/codec-types-Bd7DL1Mr-CZWNfnp9.d.mts.map +0 -1
  120. package/dist/codec-types-Bo3Jfilx.d.mts +0 -1
  121. package/dist/codec-types-Ja2kLzLS.d.mts +0 -1
  122. package/dist/codecs-C00kjHgh.mjs +0 -282
  123. package/dist/codecs-C00kjHgh.mjs.map +0 -1
  124. package/dist/codecs-CO_VNEYU-CwAnKzRs.d.mts +0 -102
  125. package/dist/codecs-CO_VNEYU-CwAnKzRs.d.mts.map +0 -1
  126. package/dist/codecs-DM61agRr.d.mts +0 -21
  127. package/dist/codecs-DM61agRr.d.mts.map +0 -1
  128. package/dist/control-H2sjKXXS.mjs.map +0 -1
  129. package/dist/control-_4epnrIW.d.mts.map +0 -1
  130. package/dist/data-type-entries-B0AoBozh-f9AEUIUQ.mjs +0 -42
  131. package/dist/data-type-entries-B0AoBozh-f9AEUIUQ.mjs.map +0 -1
  132. package/dist/data-types-BpihGKoK-BMW-m4EN.d.mts +0 -52
  133. package/dist/data-types-BpihGKoK-BMW-m4EN.d.mts.map +0 -1
  134. package/dist/data-types-Dv9gwVRV-BZPzCWZk.mjs +0 -181
  135. package/dist/data-types-Dv9gwVRV-BZPzCWZk.mjs.map +0 -1
  136. package/dist/data-types-SXrh0Lou.d.mts.map +0 -1
  137. package/dist/default-normalizer-BDUgHXUn-Xk7HQJuI.mjs.map +0 -1
  138. package/dist/descriptor-meta-D7tc0iue-C4W7o0Av.mjs +0 -82
  139. package/dist/descriptor-meta-D7tc0iue-C4W7o0Av.mjs.map +0 -1
  140. package/dist/descriptor-meta-runtime-Cur6umHo-C_4rsCGC.mjs +0 -20
  141. package/dist/descriptor-meta-runtime-Cur6umHo-C_4rsCGC.mjs.map +0 -1
  142. package/dist/errors-rvH_F2Yj-BQrO_--u.mjs +0 -20
  143. package/dist/errors-rvH_F2Yj-BQrO_--u.mjs.map +0 -1
  144. package/dist/mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs.map +0 -1
  145. package/dist/runtime-Cl0BbTZq.d.mts +0 -22
  146. package/dist/runtime-Cl0BbTZq.d.mts.map +0 -1
@@ -0,0 +1,54 @@
1
+ import * as nowValues from "@prisma/orm-framework/type-implementations/now";
2
+ import { GeneratorParams } from "@prisma/orm-framework/type-implementations/now";
3
+ import { Namespace } from "@prisma/orm-framework/components/ir";
4
+ import { SqlNamespaceInput, SqlStorage } from "@prisma/orm-family-sql/contract/types";
5
+ import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
6
+ import { Contract } from "@prisma/orm-framework/contract/types";
7
+ import { Temporal } from "temporal-spec";
8
+ import { RuntimeTargetInstance } from "@prisma/orm-framework/components/execution";
9
+ import { SqlRuntimeTargetDescriptor } from "@prisma/orm-family-sql/runtime";
10
+ import { JsonObject } from "@prisma/orm-framework/utils/json";
11
+ //#region ../../../3-targets/mysql/1-target/dist/runtime.d.mts
12
+ //#region src/core/date-time-now-generators.d.ts
13
+ declare function instantNow(params?: GeneratorParams): Temporal.Instant;
14
+ declare function plainDateNow(): Temporal.PlainDate;
15
+ declare function plainTimeNow(params?: GeneratorParams): Temporal.PlainTime;
16
+ declare function instantStringNow(params?: GeneratorParams): string;
17
+ declare function timeStringNow(params?: GeneratorParams): string;
18
+ /**
19
+ * The MySQL "now" generators, one per date and time codec except `mysql/datetime@1` and `mysql/timestamp-date@1`, which use the SQL family's `timestampNow`. All read the clock through `Date.now()` and write UTC. Each rounds down to the column's `precision` param, so MySQL, which rounds a value to the column's fraction digits, stores the value the client holds rather than rounding it up. The string generators write the text their codec reads, with no trailing zeros in the fraction.
20
+ */
21
+ declare const mysqlNowGenerators: readonly [{
22
+ readonly id: "instantNow";
23
+ readonly generate: typeof instantNow;
24
+ }, {
25
+ readonly id: "plainDateNow";
26
+ readonly generate: typeof plainDateNow;
27
+ }, {
28
+ readonly id: "plainTimeNow";
29
+ readonly generate: typeof plainTimeNow;
30
+ }, {
31
+ readonly id: "instantStringNow";
32
+ readonly generate: typeof instantStringNow;
33
+ }, {
34
+ readonly id: "dateStringNow";
35
+ readonly generate: typeof nowValues.dateStringNow;
36
+ }, {
37
+ readonly id: "timeStringNow";
38
+ readonly generate: typeof timeStringNow;
39
+ }];
40
+ //#endregion
41
+ //#region src/core/mysql-contract-serializer.d.ts
42
+ /** The MySQL target's contract serializer: the SQL family's, with each namespace built as a `MysqlDatabase`. */
43
+ declare class MysqlContractSerializer extends SqlContractSerializerBase<Contract<SqlStorage>> {
44
+ constructor();
45
+ protected hydrateSqlNamespaceEntry(nsId: string, raw: Record<string, unknown>): Namespace | SqlNamespaceInput;
46
+ serializeContract(contract: Contract<SqlStorage>): JsonObject;
47
+ }
48
+ //#endregion
49
+ //#region src/core/runtime/runtime-target.d.ts
50
+ interface MysqlRuntimeTargetInstance extends RuntimeTargetInstance<'sql', 'mysql'> {}
51
+ declare const mysqlRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<'mysql', MysqlRuntimeTargetInstance>;
52
+ //#endregion
53
+ export { mysqlRuntimeTargetDescriptor as i, MysqlRuntimeTargetInstance as n, mysqlNowGenerators as r, MysqlContractSerializer as t };
54
+ //# sourceMappingURL=runtime-CrB5DXx4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-CrB5DXx4.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;iBAWiB,WAAW,SAAS,kBAAkB,SAAS;iBAC/C,gBAAgB,SAAS;iBACzB,aAAa,SAAS,kBAAkB,SAAS;iBACjD,iBAAiB,SAAS;iBAC1B,cAAc,SAAS;;;;cAI1B;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB,UAAU;;WAE3B;WACA,iBAAiB;;;;;cAKd,gCAAgC,0BAA0B,SAAS;EAC/E;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,mCAAmC;cAC/B,8BAA8B,oCAAoC"}
@@ -1,5 +1,5 @@
1
- import { t as mysqlError } from "./errors-rvH_F2Yj-BQrO_--u.mjs";
2
- //#region ../../../3-targets/mysql/1-target/dist/sql-utils-Db0IQO_B.mjs
1
+ import { s as mysqlError } from "./errors-Cng94tYg-D02Eud2d.mjs";
2
+ //#region ../../../3-targets/mysql/1-target/dist/sql-utils-Cmv_TVa8.mjs
3
3
  /** A MySQL identifier in backticks, with each backtick doubled. */
4
4
  function quoteIdentifier(identifier) {
5
5
  if (identifier.length === 0) throw mysqlError("CONTRACT.IDENTIFIER_INVALID", "Identifier cannot be empty", { meta: {
@@ -27,4 +27,4 @@ function quoteLiteral(value) {
27
27
  //#endregion
28
28
  export { quoteIdentifier as n, quoteLiteral as r, escapeLiteral as t };
29
29
 
30
- //# sourceMappingURL=sql-utils-Db0IQO_B-PaULnfrE.mjs.map
30
+ //# sourceMappingURL=sql-utils-Cmv_TVa8-BetrIUcj.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-utils-Db0IQO_B-PaULnfrE.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils-Db0IQO_B.mjs"],"sourcesContent":["import { t as mysqlError } from \"./errors-rvH_F2Yj.mjs\";\n//#region src/core/sql-utils.ts\n/** A MySQL identifier in backticks, with each backtick doubled. */\nfunction quoteIdentifier(identifier) {\n\tif (identifier.length === 0) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot be empty\", { meta: {\n\t\tvalue: identifier,\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.includes(\"\\0\")) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot contain null bytes\", { meta: {\n\t\tvalue: identifier.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"identifier\"\n\t} });\n\treturn `\\`${identifier.replace(/`/g, \"``\")}\\``;\n}\n/** The body of a MySQL string literal: quotes doubled and backslashes escaped, as MySQL reads them under its default SQL mode. */\nfunction escapeLiteral(value) {\n\tif (value.includes(\"\\0\")) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Literal value cannot contain null bytes\", { meta: {\n\t\tvalue: value.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"literal\"\n\t} });\n\treturn value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"''\");\n}\n/** A MySQL string literal. */\nfunction quoteLiteral(value) {\n\treturn `'${escapeLiteral(value)}'`;\n}\n//#endregion\nexport { quoteIdentifier as n, quoteLiteral as r, escapeLiteral as t };\n\n//# sourceMappingURL=sql-utils-Db0IQO_B.mjs.map"],"mappings":";;;AAGA,SAAS,gBAAgB,YAAY;CACpC,IAAI,WAAW,WAAW,GAAG,MAAM,WAAW,+BAA+B,8BAA8B,EAAE,MAAM;EAClH,OAAO;EACP,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,IAAI,GAAG,MAAM,WAAW,+BAA+B,wCAAwC,EAAE,MAAM;EAC9H,OAAO,WAAW,QAAQ,OAAO,KAAK;EACtC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,KAAK,WAAW,QAAQ,MAAM,IAAI,EAAE;AAC5C;;AAEA,SAAS,cAAc,OAAO;CAC7B,IAAI,MAAM,SAAS,IAAI,GAAG,MAAM,WAAW,+BAA+B,2CAA2C,EAAE,MAAM;EAC5H,OAAO,MAAM,QAAQ,OAAO,KAAK;EACjC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,MAAM,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,IAAI;AACvD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO,IAAI,cAAc,KAAK,EAAE;AACjC"}
1
+ {"version":3,"file":"sql-utils-Cmv_TVa8-BetrIUcj.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils-Cmv_TVa8.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\n//#region src/core/sql-utils.ts\n/** A MySQL identifier in backticks, with each backtick doubled. */\nfunction quoteIdentifier(identifier) {\n\tif (identifier.length === 0) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot be empty\", { meta: {\n\t\tvalue: identifier,\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.includes(\"\\0\")) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot contain null bytes\", { meta: {\n\t\tvalue: identifier.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"identifier\"\n\t} });\n\treturn `\\`${identifier.replace(/`/g, \"``\")}\\``;\n}\n/** The body of a MySQL string literal: quotes doubled and backslashes escaped, as MySQL reads them under its default SQL mode. */\nfunction escapeLiteral(value) {\n\tif (value.includes(\"\\0\")) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Literal value cannot contain null bytes\", { meta: {\n\t\tvalue: value.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"literal\"\n\t} });\n\treturn value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"''\");\n}\n/** A MySQL string literal. */\nfunction quoteLiteral(value) {\n\treturn `'${escapeLiteral(value)}'`;\n}\n//#endregion\nexport { quoteIdentifier as n, quoteLiteral as r, escapeLiteral as t };\n\n//# sourceMappingURL=sql-utils-Cmv_TVa8.mjs.map"],"mappings":";;;AAGA,SAAS,gBAAgB,YAAY;CACpC,IAAI,WAAW,WAAW,GAAG,MAAM,WAAW,+BAA+B,8BAA8B,EAAE,MAAM;EAClH,OAAO;EACP,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,IAAI,GAAG,MAAM,WAAW,+BAA+B,wCAAwC,EAAE,MAAM;EAC9H,OAAO,WAAW,QAAQ,OAAO,KAAK;EACtC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,KAAK,WAAW,QAAQ,MAAM,IAAI,EAAE;AAC5C;;AAEA,SAAS,cAAc,OAAO;CAC7B,IAAI,MAAM,SAAS,IAAI,GAAG,MAAM,WAAW,+BAA+B,2CAA2C,EAAE,MAAM;EAC5H,OAAO,MAAM,QAAQ,OAAO,KAAK;EACjC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,MAAM,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,IAAI;AACvD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO,IAAI,cAAc,KAAK,EAAE;AACjC"}
@@ -1,4 +1,4 @@
1
- import { t as mysqlError } from "./errors-rvH_F2Yj-BQrO_--u.mjs";
1
+ import { s as mysqlError } from "./errors-Cng94tYg-D02Eud2d.mjs";
2
2
  //#region ../../../3-targets/mysql/1-target/dist/sql-utils.mjs
3
3
  const NUMBERED_PLACEHOLDER = /^\?([1-9]\d*)$/;
4
4
  function placeholderToken(text) {
@@ -91,4 +91,4 @@ function tokenizeMysqlSql(sql) {
91
91
  //#endregion
92
92
  export { tokenizeMysqlSql as t };
93
93
 
94
- //# sourceMappingURL=sql-utils-RW0vJvDl.mjs.map
94
+ //# sourceMappingURL=sql-utils-bD4SfgX0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sql-utils-RW0vJvDl.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils.mjs"],"sourcesContent":["import { t as mysqlError } from \"./errors-rvH_F2Yj.mjs\";\nimport { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from \"./sql-utils-Db0IQO_B.mjs\";\n//#region src/core/sql-lexer.ts\nconst NUMBERED_PLACEHOLDER = /^\\?([1-9]\\d*)$/;\nfunction placeholderToken(text) {\n\tconst digits = NUMBERED_PLACEHOLDER.exec(text)?.[1];\n\treturn {\n\t\tkind: \"placeholder\",\n\t\ttext,\n\t\tnumber: digits === void 0 ? void 0 : Number(digits)\n\t};\n}\n/** The index just past the quoted text that opens at `start`, where a doubled quote stays inside and, outside a backtick identifier, a backslash escapes the next character. The session clears `NO_BACKSLASH_ESCAPES` and `ANSI_QUOTES`, so MySQL reads quotes the same way. */\nfunction endOfQuoted(sql, start, quote) {\n\tlet index = start + 1;\n\twhile (index < sql.length) {\n\t\tconst char = sql[index];\n\t\tif (char === \"\\\\\" && quote !== \"`\") index += 2;\n\t\telse if (char === quote) {\n\t\t\tif (sql[index + 1] !== quote) return index + 1;\n\t\t\tindex += 2;\n\t\t} else index += 1;\n\t}\n\treturn sql.length;\n}\nfunction endOf(sql, start, terminator) {\n\tconst end = sql.indexOf(terminator, start);\n\treturn end === -1 ? sql.length : end + terminator.length;\n}\n/** MySQL opens a `--` comment when the next character is whitespace or a control character, or the text ends: `my_isspace` or `my_iscntrl` in its lexer. */\nfunction opensDashComment(sql, index) {\n\tif (!sql.startsWith(\"--\", index)) return false;\n\tconst next = sql.charCodeAt(index + 2);\n\treturn Number.isNaN(next) || next <= 32 || next === 127;\n}\nfunction isDigit(char) {\n\treturn char !== void 0 && char >= \"0\" && char <= \"9\";\n}\n/** A character of an unquoted identifier, keyword or number, as MySQL reads one: a letter, a digit, `$`, `_`, or any character past ASCII. */\nfunction isWordChar(char) {\n\tif (char === void 0) return false;\n\tconst lower = char.toLowerCase();\n\treturn isDigit(char) || lower >= \"a\" && lower <= \"z\" || char === \"$\" || char === \"_\" || char >= \"€\";\n}\nfunction isWhitespace(char) {\n\treturn char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\" || char === \"\\f\" || char === \"\\v\";\n}\nfunction endOfRun(sql, start, belongs) {\n\tlet end = start;\n\twhile (end < sql.length && belongs(sql[end])) end += 1;\n\treturn end;\n}\n/**\n* Splits MySQL SQL into tokens as MySQL's lexer reads it: a `?` inside a quoted string, a backtick identifier or a `#`, `--` or block comment is not a placeholder, and a keyword inside one is not a word. Joining the tokens' text gives the SQL back. Refuses an executable `/*!` comment, whose content MySQL runs as SQL and whose strings the comment's closing marker does not end.\n*/\nfunction tokenizeMysqlSql(sql) {\n\tconst tokens = [];\n\tlet index = 0;\n\twhile (index < sql.length) {\n\t\tconst char = sql[index];\n\t\tlet kind = \"symbol\";\n\t\tlet end = index + 1;\n\t\tif (char === \"'\" || char === \"\\\"\" || char === \"`\") {\n\t\t\tkind = \"quoted\";\n\t\t\tend = endOfQuoted(sql, index, char);\n\t\t} else if (char === \"#\" || opensDashComment(sql, index) || sql.startsWith(\"/*\", index)) {\n\t\t\tif (sql.startsWith(\"/*!\", index)) throw mysqlError(\"RUNTIME.AST_INVALID\", \"A MySQL statement may not contain an executable /*! comment, whose content MySQL runs as SQL\", { meta: {\n\t\t\t\ttarget: \"mysql\",\n\t\t\t\tposition: index\n\t\t\t} });\n\t\t\tkind = \"comment\";\n\t\t\tend = sql.startsWith(\"/*\", index) ? endOf(sql, index + 2, \"*/\") : endOf(sql, index, \"\\n\");\n\t\t} else if (char === \"?\") {\n\t\t\tkind = \"placeholder\";\n\t\t\tend = endOfRun(sql, end, isDigit);\n\t\t} else if (isWhitespace(char)) {\n\t\t\tkind = \"whitespace\";\n\t\t\tend = endOfRun(sql, index, isWhitespace);\n\t\t} else if (isWordChar(char)) {\n\t\t\tkind = \"word\";\n\t\t\tend = endOfRun(sql, index, isWordChar);\n\t\t}\n\t\tconst text = sql.slice(index, end);\n\t\ttokens.push(kind === \"placeholder\" ? placeholderToken(text) : {\n\t\t\tkind,\n\t\t\ttext\n\t\t});\n\t\tindex = end;\n\t}\n\treturn tokens;\n}\n//#endregion\nexport { escapeLiteral, quoteIdentifier, quoteLiteral, tokenizeMysqlSql };\n\n//# sourceMappingURL=sql-utils.mjs.map"],"mappings":";;AAGA,MAAM,uBAAuB;AAC7B,SAAS,iBAAiB,MAAM;CAC/B,MAAM,SAAS,qBAAqB,KAAK,IAAI,CAAC,GAAG;CACjD,OAAO;EACN,MAAM;EACN;EACA,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,MAAM;CACnD;AACD;;AAEA,SAAS,YAAY,KAAK,OAAO,OAAO;CACvC,IAAI,QAAQ,QAAQ;CACpB,OAAO,QAAQ,IAAI,QAAQ;EAC1B,MAAM,OAAO,IAAI;EACjB,IAAI,SAAS,QAAQ,UAAU,KAAK,SAAS;OACxC,IAAI,SAAS,OAAO;GACxB,IAAI,IAAI,QAAQ,OAAO,OAAO,OAAO,QAAQ;GAC7C,SAAS;EACV,OAAO,SAAS;CACjB;CACA,OAAO,IAAI;AACZ;AACA,SAAS,MAAM,KAAK,OAAO,YAAY;CACtC,MAAM,MAAM,IAAI,QAAQ,YAAY,KAAK;CACzC,OAAO,QAAQ,KAAK,IAAI,SAAS,MAAM,WAAW;AACnD;;AAEA,SAAS,iBAAiB,KAAK,OAAO;CACrC,IAAI,CAAC,IAAI,WAAW,MAAM,KAAK,GAAG,OAAO;CACzC,MAAM,OAAO,IAAI,WAAW,QAAQ,CAAC;CACrC,OAAO,OAAO,MAAM,IAAI,KA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a,IAAI,GAAG;GAC9B,OAAO;GACP,MAAM,SAAS,KAAK,OAAO,YAAY;EACxC,OAAO,IAAI,WAAW,IAAI,GAAG;GAC5B,OAAO;GACP,MAAM,SAAS,KAAK,OAAO,UAAU;EACtC;EACA,MAAM,OAAO,IAAI,MAAM,OAAO,GAAG;EACjC,OAAO,KAAK,SAAS,gBAAgB,iBAAiB,IAAI,IAAI;GAC7D;GACA;EACD,CAAC;EACD,QAAQ;CACT;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"sql-utils-bD4SfgX0.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from \"./sql-utils-Cmv_TVa8.mjs\";\n//#region src/core/sql-lexer.ts\nconst NUMBERED_PLACEHOLDER = /^\\?([1-9]\\d*)$/;\nfunction placeholderToken(text) {\n\tconst digits = NUMBERED_PLACEHOLDER.exec(text)?.[1];\n\treturn {\n\t\tkind: \"placeholder\",\n\t\ttext,\n\t\tnumber: digits === void 0 ? void 0 : Number(digits)\n\t};\n}\n/** The index just past the quoted text that opens at `start`, where a doubled quote stays inside and, outside a backtick identifier, a backslash escapes the next character. The session clears `NO_BACKSLASH_ESCAPES` and `ANSI_QUOTES`, so MySQL reads quotes the same way. */\nfunction endOfQuoted(sql, start, quote) {\n\tlet index = start + 1;\n\twhile (index < sql.length) {\n\t\tconst char = sql[index];\n\t\tif (char === \"\\\\\" && quote !== \"`\") index += 2;\n\t\telse if (char === quote) {\n\t\t\tif (sql[index + 1] !== quote) return index + 1;\n\t\t\tindex += 2;\n\t\t} else index += 1;\n\t}\n\treturn sql.length;\n}\nfunction endOf(sql, start, terminator) {\n\tconst end = sql.indexOf(terminator, start);\n\treturn end === -1 ? sql.length : end + terminator.length;\n}\n/** MySQL opens a `--` comment when the next character is whitespace or a control character, or the text ends: `my_isspace` or `my_iscntrl` in its lexer. */\nfunction opensDashComment(sql, index) {\n\tif (!sql.startsWith(\"--\", index)) return false;\n\tconst next = sql.charCodeAt(index + 2);\n\treturn Number.isNaN(next) || next <= 32 || next === 127;\n}\nfunction isDigit(char) {\n\treturn char !== void 0 && char >= \"0\" && char <= \"9\";\n}\n/** A character of an unquoted identifier, keyword or number, as MySQL reads one: a letter, a digit, `$`, `_`, or any character past ASCII. */\nfunction isWordChar(char) {\n\tif (char === void 0) return false;\n\tconst lower = char.toLowerCase();\n\treturn isDigit(char) || lower >= \"a\" && lower <= \"z\" || char === \"$\" || char === \"_\" || char >= \"€\";\n}\nfunction isWhitespace(char) {\n\treturn char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\" || char === \"\\f\" || char === \"\\v\";\n}\nfunction endOfRun(sql, start, belongs) {\n\tlet end = start;\n\twhile (end < sql.length && belongs(sql[end])) end += 1;\n\treturn end;\n}\n/**\n* Splits MySQL SQL into tokens as MySQL's lexer reads it: a `?` inside a quoted string, a backtick identifier or a `#`, `--` or block comment is not a placeholder, and a keyword inside one is not a word. Joining the tokens' text gives the SQL back. Refuses an executable `/*!` comment, whose content MySQL runs as SQL and whose strings the comment's closing marker does not end.\n*/\nfunction tokenizeMysqlSql(sql) {\n\tconst tokens = [];\n\tlet index = 0;\n\twhile (index < sql.length) {\n\t\tconst char = sql[index];\n\t\tlet kind = \"symbol\";\n\t\tlet end = index + 1;\n\t\tif (char === \"'\" || char === \"\\\"\" || char === \"`\") {\n\t\t\tkind = \"quoted\";\n\t\t\tend = endOfQuoted(sql, index, char);\n\t\t} else if (char === \"#\" || opensDashComment(sql, index) || sql.startsWith(\"/*\", index)) {\n\t\t\tif (sql.startsWith(\"/*!\", index)) throw mysqlError(\"RUNTIME.AST_INVALID\", \"A MySQL statement may not contain an executable /*! comment, whose content MySQL runs as SQL\", { meta: {\n\t\t\t\ttarget: \"mysql\",\n\t\t\t\tposition: index\n\t\t\t} });\n\t\t\tkind = \"comment\";\n\t\t\tend = sql.startsWith(\"/*\", index) ? endOf(sql, index + 2, \"*/\") : endOf(sql, index, \"\\n\");\n\t\t} else if (char === \"?\") {\n\t\t\tkind = \"placeholder\";\n\t\t\tend = endOfRun(sql, end, isDigit);\n\t\t} else if (isWhitespace(char)) {\n\t\t\tkind = \"whitespace\";\n\t\t\tend = endOfRun(sql, index, isWhitespace);\n\t\t} else if (isWordChar(char)) {\n\t\t\tkind = \"word\";\n\t\t\tend = endOfRun(sql, index, isWordChar);\n\t\t}\n\t\tconst text = sql.slice(index, end);\n\t\ttokens.push(kind === \"placeholder\" ? placeholderToken(text) : {\n\t\t\tkind,\n\t\t\ttext\n\t\t});\n\t\tindex = end;\n\t}\n\treturn tokens;\n}\n//#endregion\nexport { escapeLiteral, quoteIdentifier, quoteLiteral, tokenizeMysqlSql };\n\n//# sourceMappingURL=sql-utils.mjs.map"],"mappings":";;AAGA,MAAM,uBAAuB;AAC7B,SAAS,iBAAiB,MAAM;CAC/B,MAAM,SAAS,qBAAqB,KAAK,IAAI,CAAC,GAAG;CACjD,OAAO;EACN,MAAM;EACN;EACA,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,MAAM;CACnD;AACD;;AAEA,SAAS,YAAY,KAAK,OAAO,OAAO;CACvC,IAAI,QAAQ,QAAQ;CACpB,OAAO,QAAQ,IAAI,QAAQ;EAC1B,MAAM,OAAO,IAAI;EACjB,IAAI,SAAS,QAAQ,UAAU,KAAK,SAAS;OACxC,IAAI,SAAS,OAAO;GACxB,IAAI,IAAI,QAAQ,OAAO,OAAO,OAAO,QAAQ;GAC7C,SAAS;EACV,OAAO,SAAS;CACjB;CACA,OAAO,IAAI;AACZ;AACA,SAAS,MAAM,KAAK,OAAO,YAAY;CACtC,MAAM,MAAM,IAAI,QAAQ,YAAY,KAAK;CACzC,OAAO,QAAQ,KAAK,IAAI,SAAS,MAAM,WAAW;AACnD;;AAEA,SAAS,iBAAiB,KAAK,OAAO;CACrC,IAAI,CAAC,IAAI,WAAW,MAA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zF,OAAO,IAAI,SAAS,KAAK;GACxB,OAAO;GACP,MAAM,SAAS,KAAK,KAAK,OAAO;EACjC,OAAO,IAAI,aAAa,IAAI,GAAG;GAC9B,OAAO;GACP,MAAM,SAAS,KAAK,OAAO,YAAY;EACxC,OAAO,IAAI,WAAW,IAAI,GAAG;GAC5B,OAAO;GACP,MAAM,SAAS,KAAK,OAAO,UAAU;EACtC;EACA,MAAM,OAAO,IAAI,MAAM,OAAO,GAAG;EACjC,OAAO,KAAK,SAAS,gBAAgB,iBAAiB,IAAI,IAAI;GAC7D;GACA;EACD,CAAC;EACD,QAAQ;CACT;CACA,OAAO;AACR"}
@@ -1,9 +1,9 @@
1
- import { t as mysqlError } from "./errors-rvH_F2Yj-BQrO_--u.mjs";
2
- import { n as quoteIdentifier } from "./sql-utils-Db0IQO_B-PaULnfrE.mjs";
3
- import { t as tokenizeMysqlSql } from "./sql-utils-RW0vJvDl.mjs";
1
+ import { s as mysqlError } from "./errors-Cng94tYg-D02Eud2d.mjs";
2
+ import { n as quoteIdentifier } from "./sql-utils-Cmv_TVa8-BetrIUcj.mjs";
3
+ import { t as tokenizeMysqlSql } from "./sql-utils-bD4SfgX0.mjs";
4
4
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
5
- import { type } from "arktype";
6
5
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
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";
@@ -486,4 +486,4 @@ function statementFor(connection, sql, params) {
486
486
  //#endregion
487
487
  export { connectionFix as a, mysqlConnectionOptions as c, mysqlPoolOptions as d, normalizeMysqlError as f, connectingCannotSucceed as i, mysqlDriverDescriptorMeta 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 };
488
488
 
489
- //# sourceMappingURL=statement-DC62oiSx-DTx1JaP7.mjs.map
489
+ //# sourceMappingURL=statement-DC62oiSx-Buzptbpk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"statement-DC62oiSx-DTx1JaP7.mjs","names":["#queue","#statement","#ensured"],"sources":["../../../../3-targets/mysql/3-driver/dist/statement-DC62oiSx.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(reason, parameters) {\n\treturn structuredError(\"RUNTIME.BINDING_INVALID\", `MySQL 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) {\n\ttry {\n\t\treturn new URL(url);\n\t} catch {\n\t\tthrow invalidBinding(\"the URL cannot be parsed\", []);\n\t}\n}\nfunction readUrl(url) {\n\tconst parsed = parseUrl(url);\n\tif (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\"]);\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(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(\"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(parameter, path) {\n\ttry {\n\t\treturn readFileSync(path, \"utf8\");\n\t} catch {\n\t\tthrow invalidBinding(`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) {\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(\"sslcert\", sslcert)),\n\t\t...ifDefined(\"key\", sslkey === void 0 ? void 0 : readPem(\"sslkey\", sslkey)),\n\t\t...ifDefined(\"ca\", sslrootcert === void 0 ? void 0 : readPem(\"sslrootcert\", sslrootcert)),\n\t\t...sslmode === \"no-verify\" ? { rejectUnauthorized: false } : {}\n\t};\n}\nfunction connectionOptions(parsed, parameters, connectTimeoutMs) {\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)),\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 `mysql://` URL names. Ignores a URL parameter the driver does not read, as `pg` does, and refuses a charset. */\nfunction mysqlConnectionOptions(url, settings) {\n\tconst { parsed, parameters } = readUrl(url);\n\treturn connectionOptions(parsed, parameters, settings?.connectTimeoutMs);\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, poolOptions) {\n\tconst { parsed, parameters } = readUrl(url);\n\tconst timeoutMs = poolOptions?.connectionTimeoutMillis ?? DEFAULT_CONNECT_TIMEOUT_MILLIS;\n\treturn {\n\t\t...connectionOptions(parsed, parameters, timeoutMs),\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\nconst mysqlDriverDescriptorMeta = {\n\tkind: \"driver\",\n\tfamilyId: \"sql\",\n\ttargetId: \"mysql\",\n\tid: \"mysql\",\n\tversion: \"0.0.1\",\n\tcapabilities: {}\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\";\n/** 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. */\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, \"23502\"],\n\t[3819, \"23514\"]\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) {\n\treturn 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}`, {\n\t\tcause: error,\n\t\ttransient: false\n\t});\n}\nfunction poolTimedOut(error) {\n\tconst cause = error.cause;\n\tif (connectingCannotSucceed(cause)) return normalizeMysqlError(cause);\n\treturn 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.\", {\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; 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) {\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);\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);\n\tif (typeof error.sqlState !== \"string\") return error;\n\treturn new SqlQueryError(error.sqlMessage ?? error.message, {\n\t\tcause: error,\n\t\tsqlState: CONSTRAINT_SQLSTATES.get(error.errno) ?? 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\ttarget: \"mysql\",\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) {\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 MySQL 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 MySQL'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 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);\n}\n//#endregion\n//#region src/core/positional-params.ts\nfunction placeholderMismatch(placeholders, values) {\n\treturn 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.`, {\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) {\n\tconst texts = placeholders.map((placeholder) => placeholder.text);\n\tif (texts.every((text) => text === \"?\")) {\n\t\tif (placeholders.length !== values) throw placeholderMismatch(texts, values);\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);\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) {\n\tconst tokens = tokenizeMysqlSql(sql);\n\tconst indexes = valueIndexes(tokens.filter((token) => token.kind === \"placeholder\"), values.length);\n\treturn {\n\t\tsql: tokens.map((token) => token.kind === \"placeholder\" ? \"?\" : token.text).join(\"\"),\n\t\tvalues: indexes.map((index) => bindValue(values[index], index))\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) {\n\treturn 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\", {\n\t\twhy: \"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.\",\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) {\n\treturn 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`, {\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 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.\",\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 MySQL'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) {\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);\n\t\tconst characterSet = reportedCharacterSet(info.collation);\n\t\tif (characterSet !== \"utf8mb4\") throw characterSetRefusal(characterSet, params.length);\n\t}\n\tconst statement = positionalParams(sql, params);\n\treturn params.length > 0 ? statement : {\n\t\tsql,\n\t\tvalues: void 0\n\t};\n}\n//#endregion\nexport { connectingCannotSucceed as a, isFatal as c, mysqlConnectionOptions as d, mysqlPoolIdleTimeoutMillis as f, sessionSettingsStatement as i, normalizeMysqlError as l, acquireClientQueryLock as m, SessionSettingsGuard as n, connectionFix as o, mysqlPoolOptions as p, applySessionSettings as r, connectionLost as s, statementFor as t, mysqlDriverDescriptorMeta as u };\n\n//# sourceMappingURL=statement-DC62oiSx.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,Q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F;;AAEA,SAAS,qBAAqB,WAAW;CACxC,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,aAAa,aAAa,eAAe,WAAW,OAAO,UAAU,YAAY,SAAS,SAAS,OAAO,UAAU,SAAS,MAAM,OAAO,UAAU,OAAO;CACtN,OAAO;AACR;AACA,SAAS,oBAAoB,cAAc,QAAQ;CAClD,OAAO,WAAW,qCAAqC,wJAAwJ,aAAa,gGAAgG;EAC3T,KAAK;EACL,KAAK,gXAAgX,YAAY;EACjY,MAAM;GACL;GACA;EACD;CACD,CAAC;AACF;;;;AAIA,SAAS,aAAa,YAAY,KAAK,QAAQ;CAC9C,MAAM,EAAE,SAAS;CACjB,cAAc,MAAM,gEAAgE;CACpF,IAAI,OAAO,SAAS,GAAG;EACtB,KAAK,KAAK,SAAS,0BAA0B,GAAG,MAAM,0BAA0B,OAAO,MAAM;EAC7F,MAAM,eAAe,qBAAqB,KAAK,SAAS;EACxD,IAAI,iBAAiB,WAAW,MAAM,oBAAoB,cAAc,OAAO,MAAM;CACtF;CACA,MAAM,YAAY,iBAAiB,KAAK,MAAM;CAC9C,OAAO,OAAO,SAAS,IAAI,YAAY;EACtC;EACA,QAAQ,KAAK;CACd;AACD"}
1
+ {"version":3,"file":"statement-DC62oiSx-Buzptbpk.mjs","names":["#queue","#statement","#ensured"],"sources":["../../../../3-targets/mysql/3-driver/dist/statement-DC62oiSx.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(reason, parameters) {\n\treturn structuredError(\"RUNTIME.BINDING_INVALID\", `MySQL 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) {\n\ttry {\n\t\treturn new URL(url);\n\t} catch {\n\t\tthrow invalidBinding(\"the URL cannot be parsed\", []);\n\t}\n}\nfunction readUrl(url) {\n\tconst parsed = parseUrl(url);\n\tif (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\"]);\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(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(\"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(parameter, path) {\n\ttry {\n\t\treturn readFileSync(path, \"utf8\");\n\t} catch {\n\t\tthrow invalidBinding(`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) {\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(\"sslcert\", sslcert)),\n\t\t...ifDefined(\"key\", sslkey === void 0 ? void 0 : readPem(\"sslkey\", sslkey)),\n\t\t...ifDefined(\"ca\", sslrootcert === void 0 ? void 0 : readPem(\"sslrootcert\", sslrootcert)),\n\t\t...sslmode === \"no-verify\" ? { rejectUnauthorized: false } : {}\n\t};\n}\nfunction connectionOptions(parsed, parameters, connectTimeoutMs) {\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)),\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 `mysql://` URL names. Ignores a URL parameter the driver does not read, as `pg` does, and refuses a charset. */\nfunction mysqlConnectionOptions(url, settings) {\n\tconst { parsed, parameters } = readUrl(url);\n\treturn connectionOptions(parsed, parameters, settings?.connectTimeoutMs);\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, poolOptions) {\n\tconst { parsed, parameters } = readUrl(url);\n\tconst timeoutMs = poolOptions?.connectionTimeoutMillis ?? DEFAULT_CONNECT_TIMEOUT_MILLIS;\n\treturn {\n\t\t...connectionOptions(parsed, parameters, timeoutMs),\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\nconst mysqlDriverDescriptorMeta = {\n\tkind: \"driver\",\n\tfamilyId: \"sql\",\n\ttargetId: \"mysql\",\n\tid: \"mysql\",\n\tversion: \"0.0.1\",\n\tcapabilities: {}\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\";\n/** 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. */\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, \"23502\"],\n\t[3819, \"23514\"]\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) {\n\treturn 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}`, {\n\t\tcause: error,\n\t\ttransient: false\n\t});\n}\nfunction poolTimedOut(error) {\n\tconst cause = error.cause;\n\tif (connectingCannotSucceed(cause)) return normalizeMysqlError(cause);\n\treturn 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.\", {\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; 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) {\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);\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);\n\tif (typeof error.sqlState !== \"string\") return error;\n\treturn new SqlQueryError(error.sqlMessage ?? error.message, {\n\t\tcause: error,\n\t\tsqlState: CONSTRAINT_SQLSTATES.get(error.errno) ?? 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\ttarget: \"mysql\",\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) {\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 MySQL 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 MySQL'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 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);\n}\n//#endregion\n//#region src/core/positional-params.ts\nfunction placeholderMismatch(placeholders, values) {\n\treturn 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.`, {\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) {\n\tconst texts = placeholders.map((placeholder) => placeholder.text);\n\tif (texts.every((text) => text === \"?\")) {\n\t\tif (placeholders.length !== values) throw placeholderMismatch(texts, values);\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);\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) {\n\tconst tokens = tokenizeMysqlSql(sql);\n\tconst indexes = valueIndexes(tokens.filter((token) => token.kind === \"placeholder\"), values.length);\n\treturn {\n\t\tsql: tokens.map((token) => token.kind === \"placeholder\" ? \"?\" : token.text).join(\"\"),\n\t\tvalues: indexes.map((index) => bindValue(values[index], index))\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) {\n\treturn 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\", {\n\t\twhy: \"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.\",\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) {\n\treturn 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`, {\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 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.\",\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 MySQL'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) {\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);\n\t\tconst characterSet = reportedCharacterSet(info.collation);\n\t\tif (characterSet !== \"utf8mb4\") throw characterSetRefusal(characterSet, params.length);\n\t}\n\tconst statement = positionalParams(sql, params);\n\treturn params.length > 0 ? statement : {\n\t\tsql,\n\t\tvalues: void 0\n\t};\n}\n//#endregion\nexport { connectingCannotSucceed as a, isFatal as c, mysqlConnectionOptions as d, mysqlPoolIdleTimeoutMillis as f, sessionSettingsStatement as i, normalizeMysqlError as l, acquireClientQueryLock as m, SessionSettingsGuard as n, connectionFix as o, mysqlPoolOptions as p, applySessionSettings as r, connectionLost as s, statementFor as t, mysqlDriverDescriptorMeta as u };\n\n//# sourceMappingURL=statement-DC62oiSx.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,gBAAgB,CAAC,cAAc,WAAW;;AAIhD,MAAM,mBAAmB;;AAEzB,MAAM,0CAA0C,IAAI,IAAI;CACvD;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;AAED,MAAM,6BAA6B,IAAI,IAAI;CAC1C,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;;;AAID,MAAM,mBAAmB,UAAU;CAClC,IAAI,CAAC,WAAW,I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W,MAAM,oBAAoB,cAAc,OAAO,MAAM;CACtF;CACA,MAAM,YAAY,iBAAiB,KAAK,MAAM;CAC9C,OAAO,OAAO,SAAS,IAAI,YAAY;EACtC;EACA,QAAQ,KAAK;CACd;AACD"}
package/dist/target.d.mts CHANGED
@@ -1,24 +1,25 @@
1
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-siA0R8Ow.mjs";
2
- import { a as MYSQL_TEXT_CODEC_ID, i as MYSQL_INT_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, r as MYSQL_ENUM_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID } from "./codec-ids-sMOU8F-B-BQbCq2dr.mjs";
3
- import { a as mysqlDatetime, c as mysqlEnum, d as mysqlText, f as mysqlTextDataTypes, h as renderMysqlEnumType, i as mysqlDataTypes, l as mysqlEnumParams, m as mysqlVarcharParams, n as mysqlChar, o as mysqlDatetimeParams, p as mysqlVarchar, r as mysqlCharParams, s as mysqlDatetimeText, t as mysqlBigint, u as mysqlInt } from "./data-types-BpihGKoK-BMW-m4EN.mjs";
4
- import { o as decodeMysqlDatetime, s as encodeMysqlDatetime } from "./codecs-CO_VNEYU-CwAnKzRs.mjs";
5
- import { t as CodecTypes } from "./codec-types-Bd7DL1Mr-CZWNfnp9.mjs";
6
- import "./codec-types-Ja2kLzLS.mjs";
7
- import { a as mysqlCodecRegistry, i as mysqlCodecDescriptorRegistry, n as assembleMysqlCodecRegistry, r as createMysqlBuiltinCodecLookup, t as MysqlCodecRegistry } from "./codecs-DM61agRr.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-76oBMuwK.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-CRI506c0.mjs";
4
+ import { _ as encodeMysqlDatetime, g as decodeMysqlDatetime } from "./codecs-BMidk26M-DsKq6wt5.mjs";
5
+ import { t as CodecTypes } from "./codec-types-Bai_CFkk-Blx2GxCH.mjs";
6
+ import "./codec-types-BH5moCD9.mjs";
7
+ 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-C_twedMx.mjs";
8
8
  import { i as MysqlDdlVisitor, n as MysqlCreateTable, r as MysqlDdlNode, t as AnyMysqlDdlNode } from "./nodes-xc0cR0_c-2YbhgEjb.mjs";
9
9
  import "./ddl-CT6DPEqg.mjs";
10
10
  import "./codec-descriptor-oLRh9E29.mjs";
11
11
  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
12
  import { n as buildSignMarkerBootstrapQueries, r as createTable, t as buildControlTableBootstrapQueries } from "./contract-free-Cw9Mjcro.mjs";
13
13
  import { t as MysqlPlanTargetDetails } from "./planner-target-details-D6g2uSp--C5NKHmCc.mjs";
14
- import { r as mysqlCreateNamespace, t as MysqlDatabase } from "./control-_4epnrIW.mjs";
14
+ import { n as mysqlScalarTypeConstructors } from "./control-BvSM7mGR.mjs";
15
15
  import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-CHw2F-rg.mjs";
16
- import { t as mysqlDataTypeEntries } from "./data-types-SXrh0Lou.mjs";
17
- import { n as mysqlResolveDefault, r as readMysqlDefault, t as MysqlReportedDefault } from "./default-normalizer-BBhGpw7r.mjs";
18
- import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-BYhjQT7y.mjs";
16
+ import { t as mysqlDataTypeEntries } from "./data-types-C-rfxpgB.mjs";
17
+ import { n as mysqlResolveDefault, r as readMysqlDefault, t as MysqlReportedDefault } from "./default-normalizer-CGIwQiKB.mjs";
18
+ import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-DfrC_yfG.mjs";
19
19
  import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-su6IxinO.mjs";
20
20
  import { C as lit, D as sql, E as rawSql, O as unique, S as fn, T as primaryKey, _ as RawSqlCall, a as CreateTableCall, b as createMysqlMigrationPlanner, c as DropIndexCall, d as MigrationCLI, f as MysqlMigration, g as MysqlPlanResult, h as MysqlOpFactoryCall, i as CreateIndexCall, l as DropTableCall, m as MysqlMigrationPlanner, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationDestinationInfo, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, v as TypeScriptRenderableMysqlMigration, w as placeholder, x as createMysqlMigrationRunner, y as col } from "./migration-DmlblTTw.mjs";
21
- import "./pack-DXsOvRJn.mjs";
22
- import { n as MysqlRuntimeTargetInstance, t as MysqlContractSerializer } from "./runtime-Cl0BbTZq.mjs";
21
+ import "./pack-BXvLVBWP.mjs";
22
+ import { n as MysqlRuntimeTargetInstance, r as mysqlNowGenerators, t as MysqlContractSerializer } from "./runtime-CrB5DXx4.mjs";
23
23
  import { a as quoteLiteral, i as quoteIdentifier, n as MysqlSqlToken, o as tokenizeMysqlSql, r as escapeLiteral, t as MysqlPlaceholderToken } from "./sql-utils-BOS1c2QT.mjs";
24
- 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_ENUM_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, type MysqlCodecDescriptorRegistry, type MysqlCodecOptions, type MysqlCodecRegistry, MysqlContractSerializer, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, type MysqlDdlVisitor, type MysqlMigrationDestinationInfo, MysqlMigrationPlanner, 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, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlDataTypeEntries, mysqlDataTypes, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlText, mysqlTextDataTypes, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, withMarkerLock };
24
+ import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./types-CgrFHUdk.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, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, type MysqlDdlVisitor, type MysqlMigrationDestinationInfo, MysqlMigrationPlanner, 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, 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, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, withMarkerLock };
package/dist/target.mjs CHANGED
@@ -1,19 +1,23 @@
1
- import { i as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, r as isMysqlCodecDescriptor, t as MysqlCodecDescriptor } from "./codec-descriptor-Du6DSz-3-ytBCu_mq.mjs";
2
- import { a as MYSQL_TEXT_CODEC_ID, i as MYSQL_INT_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, r as MYSQL_ENUM_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID } from "./codec-ids-cjxtOcLM-vFeQhgPm.mjs";
1
+ import { a as mysqlCodec, i as isMysqlCodecDescriptor, n as buildMysqlCodecDescriptorRegistry, t as MysqlCodecDescriptor } from "./codec-descriptor-3xp1XvVH-yVLnNzZ8.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-CarpqbNM.mjs";
3
3
  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 { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-rvH_F2Yj-BQrO_--u.mjs";
5
- import { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from "./sql-utils-Db0IQO_B-PaULnfrE.mjs";
6
- import { a as mysqlDatetime, c as mysqlEnum, d as mysqlText, f as mysqlTextDataTypes, h as renderMysqlEnumType, i as mysqlDataTypes, l as mysqlEnumParams, m as mysqlVarcharParams, n as mysqlChar, o as mysqlDatetimeParams, p as mysqlVarchar, r as mysqlCharParams, s as mysqlDatetimeText, t as mysqlBigint, u as mysqlInt } from "./data-types-Dv9gwVRV-BZPzCWZk.mjs";
7
- import { a as mysqlCodecDescriptorRegistry, i as encodeMysqlDatetime, n as createMysqlBuiltinCodecLookup, o as mysqlCodecRegistry, r as decodeMysqlDatetime, t as assembleMysqlCodecRegistry } from "./codecs-C00kjHgh.mjs";
4
+ import { c as mysqlQueryNotYetSupported, s as mysqlError } from "./errors-Cng94tYg-D02Eud2d.mjs";
5
+ import { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from "./sql-utils-Cmv_TVa8-BetrIUcj.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-DBkMJyh1.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-00buJUto.mjs";
8
+ import { a as mysqlCodecDescriptorRegistry, i as encodeMysqlDatetime, n as createMysqlBuiltinCodecLookup, o as mysqlCodecRegistry, r as decodeMysqlDatetime, t as assembleMysqlCodecRegistry } from "./codecs-BfiB79-5.mjs";
8
9
  import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-CcQ77JE7-CxTQYoQJ.mjs";
9
10
  import { n as MysqlDdlNode, t as MysqlCreateTable } from "./nodes-CvcX47ot-B-ZaUYRj.mjs";
10
11
  import { t as createTable } from "./ddl-DDmMHyA_-Bb8sXoS0.mjs";
11
12
  import { n as buildSignMarkerBootstrapQueries, t as buildControlTableBootstrapQueries } from "./contract-free-BvCdx_Ee.mjs";
12
- import { t as mysqlDataTypeEntries } from "./data-type-entries-B0AoBozh-f9AEUIUQ.mjs";
13
- import { n as MysqlDatabase, r as mysqlCreateNamespace, t as MysqlContractSerializer } from "./mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs";
14
- import { n as readMysqlDefault, t as mysqlResolveDefault } from "./default-normalizer-BDUgHXUn-Xk7HQJuI.mjs";
15
- import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-CmGvN4hw-Com29AtQ.mjs";
16
- import { a as CreateTableCall, c as DropIndexCall, d as MysqlMigration, f as MysqlMigrationPlanner, g as createMysqlMigrationRunner, h as createMysqlMigrationPlanner, i as CreateIndexCall, l as DropTableCall, m as TypeScriptRenderableMysqlMigration, n as AddForeignKeyCall, o as DropColumnCall, p as RawSqlCall, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, y as rawSql } from "./runner-BaBQoXiU-C7ln-4b2.mjs";
13
+ import { t as mysqlDataTypeEntries } from "./data-type-entries-C7VH2IHc-D1d5I8zF.mjs";
14
+ import { t as mysqlNowGenerators } from "./date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs";
15
+ import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-CsMPRsxp-DhK87vlc.mjs";
16
+ import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./mysql-database-CHl9-oSL-CWZLDXt6.mjs";
17
+ import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs";
18
+ import { n as readMysqlDefault, t as mysqlResolveDefault } from "./default-normalizer-C8pc7SbL-CKgOEnGl.mjs";
19
+ import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-Bwew7cAs-CZ20Y_tA.mjs";
20
+ import { a as CreateTableCall, c as DropIndexCall, d as MysqlMigration, f as MysqlMigrationPlanner, g as createMysqlMigrationRunner, h as createMysqlMigrationPlanner, i as CreateIndexCall, l as DropTableCall, m as TypeScriptRenderableMysqlMigration, n as AddForeignKeyCall, o as DropColumnCall, p as RawSqlCall, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, y as rawSql } from "./runner-C39AEe6--BVG3xPYw.mjs";
17
21
  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";
18
- import { t as tokenizeMysqlSql } from "./sql-utils-RW0vJvDl.mjs";
19
- 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_ENUM_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, MysqlContractSerializer, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, MysqlMigrationPlanner, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlDataTypeEntries, mysqlDataTypes, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlText, mysqlTextDataTypes, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, withMarkerLock };
22
+ import { t as tokenizeMysqlSql } from "./sql-utils-bD4SfgX0.mjs";
23
+ 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, MysqlMigrationPlanner, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, 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, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, withMarkerLock };
@@ -1,2 +1,2 @@
1
- import { i as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, r as isMysqlCodecDescriptor, t as MysqlCodecDescriptor } from "./codec-descriptor-Du6DSz-3-ytBCu_mq.mjs";
1
+ import { a as mysqlCodec, i as isMysqlCodecDescriptor, n as buildMysqlCodecDescriptorRegistry, t as MysqlCodecDescriptor } from "./codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs";
2
2
  export { MysqlCodecDescriptor, buildMysqlCodecDescriptorRegistry, isMysqlCodecDescriptor, mysqlCodec };
@@ -1,3 +1,3 @@
1
- import { a as MYSQL_TEXT_CODEC_ID, i as MYSQL_INT_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, r as MYSQL_ENUM_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID } from "./codec-ids-sMOU8F-B-BQbCq2dr.mjs";
1
+ 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-76oBMuwK.mjs";
2
2
  import { n as SQL_RAW_CODEC_ID, r as SQL_VARCHAR_CODEC_ID, t as SQL_CHAR_CODEC_ID } from "./codec-ids-BHUwoNOM.mjs";
3
- export { MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID };
3
+ export { MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID };
@@ -1,3 +1,3 @@
1
- import { a as MYSQL_TEXT_CODEC_ID, i as MYSQL_INT_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, r as MYSQL_ENUM_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID } from "./codec-ids-cjxtOcLM-vFeQhgPm.mjs";
1
+ 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-CarpqbNM.mjs";
2
2
  import { n as SQL_RAW_CODEC_ID, r as SQL_VARCHAR_CODEC_ID, t as SQL_CHAR_CODEC_ID } from "./codec-ids-C00hAFkc.mjs";
3
- export { MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID };
3
+ export { MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID };
@@ -1,3 +1,3 @@
1
- import { t as CodecTypes } from "./codec-types-Bd7DL1Mr-CZWNfnp9.mjs";
2
- import "./codec-types-Ja2kLzLS.mjs";
1
+ import { t as CodecTypes } from "./codec-types-Bai_CFkk-Blx2GxCH.mjs";
2
+ import "./codec-types-BH5moCD9.mjs";
3
3
  export { CodecTypes };
@@ -1,3 +1,3 @@
1
- import { o as decodeMysqlDatetime, s as encodeMysqlDatetime } from "./codecs-CO_VNEYU-CwAnKzRs.mjs";
2
- import { a as mysqlCodecRegistry, i as mysqlCodecDescriptorRegistry, n as assembleMysqlCodecRegistry, r as createMysqlBuiltinCodecLookup, t as MysqlCodecRegistry } from "./codecs-DM61agRr.mjs";
3
- export { type MysqlCodecRegistry, assembleMysqlCodecRegistry, createMysqlBuiltinCodecLookup, decodeMysqlDatetime, encodeMysqlDatetime, mysqlCodecDescriptorRegistry, mysqlCodecRegistry };
1
+ import { _ as encodeMysqlDatetime, g as decodeMysqlDatetime } from "./codecs-BMidk26M-DsKq6wt5.mjs";
2
+ 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-C_twedMx.mjs";
3
+ export { MYSQL_DATE_NOW, MYSQL_INSTANT_NOW, MYSQL_TIME_NOW, type MysqlCodecRegistry, assembleMysqlCodecRegistry, createMysqlBuiltinCodecLookup, decodeMysqlDatetime, encodeMysqlDatetime, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCurrentValueFor, mysqlNowExpression };
@@ -1,2 +1,3 @@
1
- import { a as mysqlCodecDescriptorRegistry, i as encodeMysqlDatetime, n as createMysqlBuiltinCodecLookup, o as mysqlCodecRegistry, r as decodeMysqlDatetime, t as assembleMysqlCodecRegistry } from "./codecs-C00kjHgh.mjs";
2
- export { assembleMysqlCodecRegistry, createMysqlBuiltinCodecLookup, decodeMysqlDatetime, encodeMysqlDatetime, mysqlCodecDescriptorRegistry, mysqlCodecRegistry };
1
+ 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-00buJUto.mjs";
2
+ import { a as mysqlCodecDescriptorRegistry, i as encodeMysqlDatetime, n as createMysqlBuiltinCodecLookup, o as mysqlCodecRegistry, r as decodeMysqlDatetime, t as assembleMysqlCodecRegistry } from "./codecs-BfiB79-5.mjs";
3
+ export { MYSQL_DATE_NOW, MYSQL_INSTANT_NOW, MYSQL_TIME_NOW, assembleMysqlCodecRegistry, createMysqlBuiltinCodecLookup, decodeMysqlDatetime, encodeMysqlDatetime, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCurrentValueFor, mysqlNowExpression };
@@ -1,3 +1,3 @@
1
1
  import { t as MysqlPlanTargetDetails } from "./planner-target-details-D6g2uSp--C5NKHmCc.mjs";
2
- import { n as mysqlControlTargetDescriptor, r as mysqlCreateNamespace, t as MysqlDatabase } from "./control-_4epnrIW.mjs";
3
- export { MysqlDatabase, type MysqlPlanTargetDetails, mysqlControlTargetDescriptor as default, mysqlCreateNamespace };
2
+ import { n as mysqlScalarTypeConstructors, t as mysqlControlTargetDescriptor } from "./control-BvSM7mGR.mjs";
3
+ export { type MysqlPlanTargetDetails, mysqlControlTargetDescriptor as default, mysqlScalarTypeConstructors };