@prisma/orm-target-mysql 8.0.0-rc.23-dev.7 → 8.0.0-rc.23-dev.9
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.
- package/dist/adapter-D0qXT1lj.d.mts +57 -0
- package/dist/adapter-D0qXT1lj.d.mts.map +1 -0
- package/dist/adapter.d.mts +6 -6
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.d.mts +2 -2
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__codec-types.d.mts +2 -2
- package/dist/adapter__control.d.mts +2 -2
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +19 -10
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs → codec-descriptor-3xp1XvVH-DfPKpYeP.mjs} +2 -2
- package/dist/codec-descriptor-3xp1XvVH-DfPKpYeP.mjs.map +1 -0
- package/dist/codec-descriptor-BRcKIX3h.d.mts +2 -0
- package/dist/{codec-descriptor-DXyubAS6-siA0R8Ow.d.mts → codec-descriptor-DXyubAS6-XDBj6Yet.d.mts} +2 -2
- package/dist/codec-descriptor-DXyubAS6-XDBj6Yet.d.mts.map +1 -0
- package/dist/codec-descriptor-J3TP08l8-BmdgkIU6.d.mts +1 -0
- package/dist/{codec-ids-CrR9Xi7r-CarpqbNM.mjs → codec-ids-CrR9Xi7r-CjbGCS3o.mjs} +2 -2
- package/dist/codec-ids-CrR9Xi7r-CjbGCS3o.mjs.map +1 -0
- package/dist/{codec-ids-Dgh5IpML-76oBMuwK.d.mts → codec-ids-Dgh5IpML-DGXIq6j8.d.mts} +2 -2
- package/dist/codec-ids-Dgh5IpML-DGXIq6j8.d.mts.map +1 -0
- package/dist/codec-types-BS-lWfda.d.mts +1 -0
- package/dist/{codec-types-Bai_CFkk-Blx2GxCH.d.mts → codec-types-Bai_CFkk-DmZ74URd.d.mts} +5 -5
- package/dist/codec-types-Bai_CFkk-DmZ74URd.d.mts.map +1 -0
- package/dist/codec-types-Dk2h5dBB.d.mts +1 -0
- package/dist/{codecs-BMidk26M-DsKq6wt5.d.mts → codecs-BMidk26M-B_iWNti6.d.mts} +5 -5
- package/dist/codecs-BMidk26M-B_iWNti6.d.mts.map +1 -0
- package/dist/{codecs-C_twedMx.d.mts → codecs-CIJRyUd3.d.mts} +4 -4
- package/dist/codecs-CIJRyUd3.d.mts.map +1 -0
- package/dist/{codecs-BfiB79-5.mjs → codecs-wVJlFapM.mjs} +7 -7
- package/dist/codecs-wVJlFapM.mjs.map +1 -0
- package/dist/{contract-free-Cw9Mjcro.d.mts → contract-free-BnJBWENn.d.mts} +3 -3
- package/dist/contract-free-BnJBWENn.d.mts.map +1 -0
- package/dist/{contract-free-BvCdx_Ee.mjs → contract-free-DekbHRyr.mjs} +4 -4
- package/dist/contract-free-DekbHRyr.mjs.map +1 -0
- package/dist/control-BBuy6yt5.mjs +73 -0
- package/dist/control-BBuy6yt5.mjs.map +1 -0
- package/dist/control-BiZaCqna.mjs +89 -0
- package/dist/control-BiZaCqna.mjs.map +1 -0
- package/dist/{control-BBhWaGnH.mjs → control-CyGJDPay.mjs} +102 -77
- package/dist/control-CyGJDPay.mjs.map +1 -0
- package/dist/control-D7_IpeiU.d.mts +31 -0
- package/dist/control-D7_IpeiU.d.mts.map +1 -0
- package/dist/{control-BvSM7mGR.d.mts → control-Dj8nIA1M.d.mts} +13 -4
- package/dist/control-Dj8nIA1M.d.mts.map +1 -0
- package/dist/{control-MoPFgSaQ.d.mts → control-WNuLF2Wh.d.mts} +29 -56
- package/dist/control-WNuLF2Wh.d.mts.map +1 -0
- package/dist/{control-tables-CHw2F-rg.d.mts → control-tables-CWJyQ3dZ.d.mts} +2 -2
- package/dist/control-tables-CWJyQ3dZ.d.mts.map +1 -0
- package/dist/{control-tables-CcQ77JE7-CxTQYoQJ.mjs → control-tables-CcQ77JE7-DKb3ubVU.mjs} +2 -2
- package/dist/control-tables-CcQ77JE7-DKb3ubVU.mjs.map +1 -0
- package/dist/{data-type-entries-C7VH2IHc-D1d5I8zF.mjs → data-type-entries-C7VH2IHc-DM6TbTaz.mjs} +3 -3
- package/dist/data-type-entries-C7VH2IHc-DM6TbTaz.mjs.map +1 -0
- package/dist/{data-types-C-rfxpgB.d.mts → data-types-65iVc7q1.d.mts} +3 -3
- package/dist/data-types-65iVc7q1.d.mts.map +1 -0
- package/dist/{data-types-D2HAT-Qf-CRI506c0.d.mts → data-types-D2HAT-Qf-CSdDz1Pk.d.mts} +2 -2
- package/dist/data-types-D2HAT-Qf-CSdDz1Pk.d.mts.map +1 -0
- package/dist/{data-types-DOaaPS93-DBkMJyh1.mjs → data-types-DOaaPS93-lycGybNk.mjs} +4 -4
- package/dist/data-types-DOaaPS93-lycGybNk.mjs.map +1 -0
- package/dist/{date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs → date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs} +4 -4
- package/dist/date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs.map +1 -0
- package/dist/ddl-Bobm-S7I.d.mts +1 -0
- package/dist/{ddl-DDmMHyA_-Bb8sXoS0.mjs → ddl-DDmMHyA_-grdUmU3J.mjs} +3 -3
- package/dist/ddl-DDmMHyA_-grdUmU3J.mjs.map +1 -0
- package/dist/{default-normalizer-C8pc7SbL-CKgOEnGl.mjs → default-normalizer-C8pc7SbL-BXd70q02.mjs} +3 -3
- package/dist/default-normalizer-C8pc7SbL-BXd70q02.mjs.map +1 -0
- package/dist/{default-normalizer-CGIwQiKB.d.mts → default-normalizer-D-8Ii0df.d.mts} +2 -2
- package/dist/default-normalizer-D-8Ii0df.d.mts.map +1 -0
- package/dist/{descriptor-meta-CsMPRsxp-DhK87vlc.mjs → descriptor-meta-CsMPRsxp-QVV7vNY8.mjs} +6 -6
- package/dist/descriptor-meta-CsMPRsxp-QVV7vNY8.mjs.map +1 -0
- package/dist/descriptor-meta-pVdZBI-g-BJN4T_on.mjs +32 -0
- package/dist/descriptor-meta-pVdZBI-g-BJN4T_on.mjs.map +1 -0
- package/dist/driver.d.mts +3 -3
- package/dist/driver.mjs +3 -2
- package/dist/driver__control.d.mts +2 -2
- package/dist/driver__control.mjs +2 -2
- package/dist/driver__runtime.d.mts +2 -2
- package/dist/driver__runtime.mjs +2 -564
- package/dist/{errors-Cng94tYg-D02Eud2d.mjs → errors-Cng94tYg-DTH51xWG.mjs} +2 -2
- package/dist/errors-Cng94tYg-DTH51xWG.mjs.map +1 -0
- package/dist/{errors-DfrC_yfG.d.mts → errors-DjCkC9IM.d.mts} +2 -2
- package/dist/errors-DjCkC9IM.d.mts.map +1 -0
- package/dist/{marker-lock-Bwew7cAs-CZ20Y_tA.mjs → marker-lock-Bwew7cAs-ElLxlCQp.mjs} +3 -3
- package/dist/marker-lock-Bwew7cAs-ElLxlCQp.mjs.map +1 -0
- package/dist/{marker-lock-su6IxinO.d.mts → marker-lock-Px2qK06F.d.mts} +2 -2
- package/dist/marker-lock-Px2qK06F.d.mts.map +1 -0
- package/dist/{marker-read-Cf80LSbG-CUp3v1e5.mjs → marker-read-D1hp62hF-3-4fEgDD.mjs} +6 -23
- package/dist/marker-read-D1hp62hF-3-4fEgDD.mjs.map +1 -0
- package/dist/{migration-DmlblTTw.d.mts → migration-DILkj7kB.d.mts} +41 -29
- package/dist/migration-DILkj7kB.d.mts.map +1 -0
- package/dist/{mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs → mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs} +4 -4
- package/dist/mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs.map +1 -0
- package/dist/{mysql-database-CHl9-oSL-CWZLDXt6.mjs → mysql-database-CHl9-oSL-B1arvq6Q.mjs} +5 -5
- package/dist/mysql-database-CHl9-oSL-B1arvq6Q.mjs.map +1 -0
- package/dist/{nodes-CvcX47ot-B-ZaUYRj.mjs → nodes-CvcX47ot-CcCy0Oh4.mjs} +2 -2
- package/dist/nodes-CvcX47ot-CcCy0Oh4.mjs.map +1 -0
- package/dist/{nodes-xc0cR0_c-2YbhgEjb.d.mts → nodes-xc0cR0_c-CLET35o0.d.mts} +2 -2
- package/dist/nodes-xc0cR0_c-CLET35o0.d.mts.map +1 -0
- package/dist/{now-expression-DVD18CUc-00buJUto.mjs → now-expression-DVD18CUc-DJqdZY96.mjs} +3 -3
- package/dist/now-expression-DVD18CUc-DJqdZY96.mjs.map +1 -0
- package/dist/{pack-BXvLVBWP.d.mts → pack-COnjX17N.d.mts} +6 -6
- package/dist/pack-COnjX17N.d.mts.map +1 -0
- package/dist/{planner-target-details-D6g2uSp--C5NKHmCc.d.mts → planner-target-details-D6g2uSp--6VJKSGxe.d.mts} +2 -2
- package/dist/planner-target-details-D6g2uSp--6VJKSGxe.d.mts.map +1 -0
- package/dist/{require-temporal-DeDQhbTn-Bxc65WbA.mjs → require-temporal-DeDQhbTn-CdpjEWCB.mjs} +3 -3
- package/dist/require-temporal-DeDQhbTn-CdpjEWCB.mjs.map +1 -0
- package/dist/{runner-C39AEe6--BVG3xPYw.mjs → runner-BIjAWX-E-BgTmrD8f.mjs} +146 -124
- package/dist/runner-BIjAWX-E-BgTmrD8f.mjs.map +1 -0
- package/dist/runtime-BGF0cSIt.mjs +569 -0
- package/dist/runtime-BGF0cSIt.mjs.map +1 -0
- package/dist/{runtime-ClRDfPiY.d.mts → runtime-Cm-T3hbP.d.mts} +4 -4
- package/dist/runtime-Cm-T3hbP.d.mts.map +1 -0
- package/dist/{runtime-BGyTXcQH.d.mts → runtime-DN20lWEg.d.mts} +7 -5
- package/dist/runtime-DN20lWEg.d.mts.map +1 -0
- package/dist/{runtime-CrB5DXx4.d.mts → runtime-sPIp-JgC.d.mts} +2 -2
- package/dist/runtime-sPIp-JgC.d.mts.map +1 -0
- package/dist/{sql-utils-bD4SfgX0.mjs → sql-utils-BE8tDXHs.mjs} +3 -3
- package/dist/sql-utils-BE8tDXHs.mjs.map +1 -0
- package/dist/{sql-utils-Cmv_TVa8-BetrIUcj.mjs → sql-utils-Cmv_TVa8-CNW3UmfQ.mjs} +3 -3
- package/dist/sql-utils-Cmv_TVa8-CNW3UmfQ.mjs.map +1 -0
- package/dist/{sql-utils-BOS1c2QT.d.mts → sql-utils-DBvre8Ar.d.mts} +2 -2
- package/dist/sql-utils-DBvre8Ar.d.mts.map +1 -0
- package/dist/{statement-DC62oiSx-Buzptbpk.mjs → statement-CT5tB4uX-CHqHFM3z.mjs} +17 -14
- package/dist/statement-CT5tB4uX-CHqHFM3z.mjs.map +1 -0
- package/dist/target.d.mts +24 -24
- package/dist/target.mjs +22 -21
- package/dist/target__codec-descriptor.d.mts +2 -2
- package/dist/target__codec-descriptor.mjs +1 -1
- package/dist/target__codec-ids.d.mts +1 -1
- package/dist/target__codec-ids.mjs +1 -1
- package/dist/target__codec-types.d.mts +2 -2
- package/dist/target__codecs.d.mts +2 -2
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__contract-free.d.mts +1 -1
- package/dist/target__contract-free.mjs +2 -2
- package/dist/target__control-tables.d.mts +1 -1
- package/dist/target__control-tables.mjs +1 -1
- package/dist/target__control.d.mts +3 -3
- package/dist/target__control.mjs +3 -64
- package/dist/target__data-types.d.mts +2 -2
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__ddl.d.mts +2 -2
- package/dist/target__ddl.mjs +1 -1
- package/dist/target__default-normalizer.d.mts +1 -1
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__errors.d.mts +1 -1
- package/dist/target__errors.mjs +1 -1
- package/dist/target__marker-lock.d.mts +1 -1
- package/dist/target__marker-lock.mjs +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__runtime.d.mts +1 -1
- package/dist/target__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__sql-utils.d.mts +1 -1
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.d.mts +1 -1
- package/dist/target__types.mjs +1 -1
- package/dist/{types-CgrFHUdk.d.mts → types-gXYDzQXs.d.mts} +2 -2
- package/dist/types-gXYDzQXs.d.mts.map +1 -0
- package/package.json +10 -10
- package/dist/adapter-Dl4Wwz1I.d.mts +0 -29
- package/dist/adapter-Dl4Wwz1I.d.mts.map +0 -1
- package/dist/codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs.map +0 -1
- package/dist/codec-descriptor-DXyubAS6-siA0R8Ow.d.mts.map +0 -1
- package/dist/codec-descriptor-J3TP08l8-ekLvUVxW.d.mts +0 -1
- package/dist/codec-descriptor-oLRh9E29.d.mts +0 -2
- package/dist/codec-ids-CrR9Xi7r-CarpqbNM.mjs.map +0 -1
- package/dist/codec-ids-Dgh5IpML-76oBMuwK.d.mts.map +0 -1
- package/dist/codec-types-BH5moCD9.d.mts +0 -1
- package/dist/codec-types-Bai_CFkk-Blx2GxCH.d.mts.map +0 -1
- package/dist/codec-types-zzVcrnbk.d.mts +0 -1
- package/dist/codecs-BMidk26M-DsKq6wt5.d.mts.map +0 -1
- package/dist/codecs-BfiB79-5.mjs.map +0 -1
- package/dist/codecs-C_twedMx.d.mts.map +0 -1
- package/dist/contract-contributions-ChiX6W0F-CAng98bZ.mjs +0 -15
- package/dist/contract-contributions-ChiX6W0F-CAng98bZ.mjs.map +0 -1
- package/dist/contract-free-BvCdx_Ee.mjs.map +0 -1
- package/dist/contract-free-Cw9Mjcro.d.mts.map +0 -1
- package/dist/control-5eVF1TXc.mjs +0 -74
- package/dist/control-5eVF1TXc.mjs.map +0 -1
- package/dist/control-BBhWaGnH.mjs.map +0 -1
- package/dist/control-BvSM7mGR.d.mts.map +0 -1
- package/dist/control-DHkZbo58.d.mts +0 -25
- package/dist/control-DHkZbo58.d.mts.map +0 -1
- package/dist/control-MoPFgSaQ.d.mts.map +0 -1
- package/dist/control-tables-CHw2F-rg.d.mts.map +0 -1
- package/dist/control-tables-CcQ77JE7-CxTQYoQJ.mjs.map +0 -1
- package/dist/data-type-entries-C7VH2IHc-D1d5I8zF.mjs.map +0 -1
- package/dist/data-types-C-rfxpgB.d.mts.map +0 -1
- package/dist/data-types-D2HAT-Qf-CRI506c0.d.mts.map +0 -1
- package/dist/data-types-DOaaPS93-DBkMJyh1.mjs.map +0 -1
- package/dist/date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs.map +0 -1
- package/dist/ddl-CT6DPEqg.d.mts +0 -1
- package/dist/ddl-DDmMHyA_-Bb8sXoS0.mjs.map +0 -1
- package/dist/default-normalizer-C8pc7SbL-CKgOEnGl.mjs.map +0 -1
- package/dist/default-normalizer-CGIwQiKB.d.mts.map +0 -1
- package/dist/descriptor-meta-CsMPRsxp-DhK87vlc.mjs.map +0 -1
- package/dist/driver__runtime.mjs.map +0 -1
- package/dist/errors-Cng94tYg-D02Eud2d.mjs.map +0 -1
- package/dist/errors-DfrC_yfG.d.mts.map +0 -1
- package/dist/marker-lock-Bwew7cAs-CZ20Y_tA.mjs.map +0 -1
- package/dist/marker-lock-su6IxinO.d.mts.map +0 -1
- package/dist/marker-read-Cf80LSbG-CUp3v1e5.mjs.map +0 -1
- package/dist/migration-DmlblTTw.d.mts.map +0 -1
- package/dist/mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs.map +0 -1
- package/dist/mysql-database-CHl9-oSL-CWZLDXt6.mjs.map +0 -1
- package/dist/nodes-CvcX47ot-B-ZaUYRj.mjs.map +0 -1
- package/dist/nodes-xc0cR0_c-2YbhgEjb.d.mts.map +0 -1
- package/dist/now-expression-DVD18CUc-00buJUto.mjs.map +0 -1
- package/dist/pack-BXvLVBWP.d.mts.map +0 -1
- package/dist/planner-target-details-D6g2uSp--C5NKHmCc.d.mts.map +0 -1
- package/dist/require-temporal-DeDQhbTn-Bxc65WbA.mjs.map +0 -1
- package/dist/runner-C39AEe6--BVG3xPYw.mjs.map +0 -1
- package/dist/runtime-BGyTXcQH.d.mts.map +0 -1
- package/dist/runtime-ClRDfPiY.d.mts.map +0 -1
- package/dist/runtime-CrB5DXx4.d.mts.map +0 -1
- package/dist/sql-utils-BOS1c2QT.d.mts.map +0 -1
- package/dist/sql-utils-Cmv_TVa8-BetrIUcj.mjs.map +0 -1
- package/dist/sql-utils-bD4SfgX0.mjs.map +0 -1
- package/dist/statement-DC62oiSx-Buzptbpk.mjs.map +0 -1
- package/dist/target__control.mjs.map +0 -1
- package/dist/types-CgrFHUdk.d.mts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, r as identityJsonProjection, t as MysqlCodecDescriptor } from "./codec-descriptor-3xp1XvVH-
|
|
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-
|
|
3
|
-
import { c as mysqlQueryNotYetSupported, n as errorDateTimeUnwritable, o as errorTemporalWrongType, r as errorTemporalNonIsoCalendar, s as mysqlError, t as errorDateTimeUnreadable } from "./errors-Cng94tYg-
|
|
4
|
-
import { C as mysqlTimestampText, S as mysqlTimestamp, _ as mysqlInt, 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, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText } from "./data-types-DOaaPS93-
|
|
5
|
-
import { t as requireTemporal } from "./require-temporal-DeDQhbTn-
|
|
1
|
+
import { a as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, r as identityJsonProjection, t as MysqlCodecDescriptor } from "./codec-descriptor-3xp1XvVH-DfPKpYeP.mjs";
|
|
2
|
+
import { a as MYSQL_DATE_STRING_CODEC_ID, c as MYSQL_ENUM_CODEC_ID, d as MYSQL_TIMESTAMP_DATE_CODEC_ID, f as MYSQL_TIMESTAMP_STRING_CODEC_ID, h as MYSQL_TIME_TEMPORAL_CODEC_ID, i as MYSQL_DATETIME_TEMPORAL_CODEC_ID, l as MYSQL_INT_CODEC_ID, m as MYSQL_TIME_STRING_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, o as MYSQL_DATE_TEMPORAL_CODEC_ID, p as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, r as MYSQL_DATETIME_STRING_CODEC_ID, s as MYSQL_DURATION_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CODEC_ID } from "./codec-ids-CrR9Xi7r-CjbGCS3o.mjs";
|
|
3
|
+
import { c as mysqlQueryNotYetSupported, n as errorDateTimeUnwritable, o as errorTemporalWrongType, r as errorTemporalNonIsoCalendar, s as mysqlError, t as errorDateTimeUnreadable } from "./errors-Cng94tYg-DTH51xWG.mjs";
|
|
4
|
+
import { C as mysqlTimestampText, S as mysqlTimestamp, _ as mysqlInt, 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, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText } from "./data-types-DOaaPS93-lycGybNk.mjs";
|
|
5
|
+
import { t as requireTemporal } from "./require-temporal-DeDQhbTn-CdpjEWCB.mjs";
|
|
6
6
|
import { CodecImpl, dateTimeStoredText, decimalTextBigintLiteral, refuseJsonValue, renderTsLiteral } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { CastExpr, SqlCharCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
|
|
8
8
|
import { sqlRawDataType } from "@prisma/orm-family-sql/contract/data-type";
|
|
@@ -10,7 +10,7 @@ import { hasDigitsBelow, hasDigitsBelowAMillisecond, isValidDate } from "@prisma
|
|
|
10
10
|
import { describeValue, temporalFromText, temporalToText, withoutUtcDesignator } from "@prisma/orm-framework/type-implementations/temporal-text";
|
|
11
11
|
import { extractCodecLookup } from "@prisma/orm-framework/components/control";
|
|
12
12
|
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
13
|
-
//#region ../../../3-targets/mysql/1-target/dist/codecs.mjs
|
|
13
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/codecs.mjs
|
|
14
14
|
function messageOf(cause) {
|
|
15
15
|
return cause instanceof Error ? cause.message : String(cause);
|
|
16
16
|
}
|
|
@@ -747,4 +747,4 @@ function createMysqlBuiltinCodecLookup() {
|
|
|
747
747
|
//#endregion
|
|
748
748
|
export { mysqlCodecDescriptorRegistry as a, encodeMysqlDatetime as i, createMysqlBuiltinCodecLookup as n, mysqlCodecRegistry as o, decodeMysqlDatetime as r, assembleMysqlCodecRegistry as t };
|
|
749
749
|
|
|
750
|
-
//# sourceMappingURL=codecs-
|
|
750
|
+
//# sourceMappingURL=codecs-wVJlFapM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs-wVJlFapM.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/codecs.mjs"],"sourcesContent":["import { a as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, r as identityJsonProjection, t as MysqlCodecDescriptor } from \"./codec-descriptor-3xp1XvVH.mjs\";\nimport { 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.mjs\";\nimport { c as mysqlQueryNotYetSupported, n as errorDateTimeUnwritable, o as errorTemporalWrongType, r as errorTemporalNonIsoCalendar, s as mysqlError, t as errorDateTimeUnreadable } from \"./errors-Cng94tYg.mjs\";\nimport { C as mysqlTimestampText, S as mysqlTimestamp, _ as mysqlInt, 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, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText } from \"./data-types-DOaaPS93.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-DeDQhbTn.mjs\";\nimport { a as mysqlNowExpression, i as mysqlCurrentValueFor, n as MYSQL_INSTANT_NOW, r as MYSQL_TIME_NOW, t as MYSQL_DATE_NOW } from \"./now-expression-DVD18CUc.mjs\";\nimport { CodecImpl, dateTimeStoredText, decimalTextBigintLiteral, refuseJsonValue, renderTsLiteral } from \"@internal/framework-components/codec\";\nimport { CastExpr, SqlCharCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { hasDigitsBelow, hasDigitsBelowAMillisecond, isValidDate } from \"@internal/type-implementations/date\";\nimport { describeValue, temporalFromText, temporalToText, withoutUtcDesignator } from \"@internal/type-implementations/temporal-text\";\nimport { extractCodecLookup } from \"@internal/framework-components/control\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/date-time-values.ts\nfunction messageOf(cause) {\n\treturn cause instanceof Error ? cause.message : String(cause);\n}\n/** The text MySQL reads for a stored date and time, `2024-01-02 03:04:05.5`. */\nfunction mysqlWireText(stored) {\n\treturn stored.replace(\"T\", \" \");\n}\n/** The UTC date and time without an offset that ISO 8601 text with a UTC offset names, in the form `stored` writes. Throws when the text names no instant, or one `stored` refuses. */\nfunction utcDateTimeOfInstantText(codecId, text, stored) {\n\treturn stored(withoutUtcDesignator(dateTimeStoredText(text, {\n\t\tshape: \"instant\",\n\t\townerId: codecId\n\t})));\n}\n/** The stored form `stored` writes for a value an application wrote; a value it refuses is refused as `RUNTIME.ENCODE_FAILED`. */\nfunction storedTextForWrite(codecId, value, stored) {\n\tif (typeof value !== \"string\") throw errorDateTimeUnwritable({\n\t\tcodecId,\n\t\treceived: describeValue(value),\n\t\tdetail: \"It writes ISO 8601 text.\"\n\t});\n\ttry {\n\t\treturn stored(value);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnwritable({\n\t\t\tcodecId,\n\t\t\treceived: JSON.stringify(value),\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The stored form of the text MySQL returned for a row, as `stored` reads it; text `stored` refuses is refused as `RUNTIME.DECODE_FAILED`. */\nfunction storedTextFromWire(codecId, wire, stored) {\n\tif (typeof wire !== \"string\") throw errorDateTimeUnreadable({\n\t\tcodecId,\n\t\tvalue: String(wire),\n\t\tdetail: `MySQL returned ${describeValue(wire)}, not text.`\n\t});\n\ttry {\n\t\treturn stored(wire);\n\t} catch (cause) {\n\t\tthrow errorDateTimeUnreadable({\n\t\t\tcodecId,\n\t\t\tvalue: wire,\n\t\t\tdetail: messageOf(cause),\n\t\t\tcause\n\t\t});\n\t}\n}\n/** The Temporal value that stored text names, read with `parse`. */\nfunction temporalFromStoredText(identity, text, parse) {\n\tconst read = temporalFromText(requireTemporal({\n\t\tcodecId: identity.codecId,\n\t\toperation: \"decode\"\n\t}), text, parse);\n\tif (read.kind === \"unreadable\") throw errorDateTimeUnreadable({\n\t\tcodecId: identity.codecId,\n\t\tvalue: text,\n\t\tdetail: `${identity.temporalTag} cannot hold it: ${read.detail}. Use ${identity.stringType} to read the column as text.`,\n\t\tcause: read.cause\n\t});\n\treturn read.value;\n}\n/** The stored form of a Temporal value, as `stored` writes its ISO text. A value of another kind, in a calendar other than ISO 8601, or with digits below a microsecond, which MySQL does not hold, is refused. */\nfunction storedTextOfTemporal(identity, value, stored) {\n\tconst encoded = temporalToText(value, identity.temporalTag);\n\tswitch (encoded.kind) {\n\t\tcase \"wrong-type\": throw errorTemporalWrongType(identity.codecId, identity.temporalTag, identity.stringType, encoded.received);\n\t\tcase \"non-iso-calendar\": throw errorTemporalNonIsoCalendar(identity.codecId, encoded.calendarId);\n\t\tcase \"text\":\n\t\t\tif (hasDigitsBelow(encoded.text, 6)) throw errorDateTimeUnwritable({\n\t\t\t\tcodecId: identity.codecId,\n\t\t\t\treceived: `the ${identity.temporalTag} ${encoded.text}`,\n\t\t\t\tdetail: \"It has digits below a microsecond, and MySQL holds microseconds at most. Round it first, as in value.round({ smallestUnit: 'microsecond', roundingMode: 'trunc' }).\"\n\t\t\t});\n\t\t\treturn storedTextForWrite(identity.codecId, encoded.text, stored);\n\t}\n}\nconst WIRE_DATE_TIME = /^(\\d{4}-\\d{2}-\\d{2})[ T](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)$/;\n/** The instant the text MySQL sends for a `datetime` or a `timestamp` names in UTC: every session runs in UTC, so the text holds no time zone of its own. */\nfunction dateOfWireText(codecId, wire) {\n\tconst match = WIRE_DATE_TIME.exec(wire);\n\tconst date = match === null ? void 0 : /* @__PURE__ */ new Date(`${match[1]}T${match[2]}Z`);\n\tif (date === void 0 || !isValidDate(date)) throw mysqlError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be a date and time as MySQL prints it`, { meta: {\n\t\tcodecId,\n\t\treceived: String(wire)\n\t} });\n\treturn date;\n}\n/** The text MySQL reads for a `Date` in UTC, with millisecond digits. An Invalid Date, and an instant `stored` refuses, are refused. */\nfunction wireTextOfDate(codecId, value, stored) {\n\tif (!isValidDate(value)) throw mysqlError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a valid Date`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\tconst text = value.toISOString();\n\tstoredTextForWrite(codecId, text, (instant) => utcDateTimeOfInstantText(codecId, instant, stored));\n\treturn mysqlWireText(withoutUtcDesignator(text));\n}\n/** The fraction digits a column with `params` holds: its `precision`, or 0, which MySQL holds when none is written. */\nfunction precisionOf(params) {\n\tconst precision = params[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 0;\n}\n/** `stored`, a contract value of a column with `params`; a value with more fraction digits than the column holds, which MySQL would round, is refused. */\nfunction storedWithinPrecision(codecId, stored, params) {\n\tconst precision = precisionOf(params);\n\tif (!hasDigitsBelow(stored, precision)) return stored;\n\treturn refuseJsonValue(codecId, `a value with at most ${precision} ${precision === 1 ? \"fraction digit\" : \"fraction digits\"} of a second, which precision ${precision} holds without rounding`, stored);\n}\n/** Wire text with its fraction cut to the digits the column's `precision` holds: MySQL rounds a value to its column, which could carry it to the next second, day or past the column's range. A codec reference that names no precision, as a raw parameter writes, describes no column, so its value is written whole. */\nfunction roundedDownToPrecision(text, params) {\n\tconst precision = params[\"precision\"];\n\tif (typeof precision !== \"number\") return text;\n\treturn text.replace(/\\.(\\d+)$/, (_fraction, digits) => precision === 0 ? \"\" : `.${digits.slice(0, precision)}`);\n}\n//#endregion\n//#region src/core/date-time-codecs.ts\n/** The stored form of an instant written as ISO 8601 text with a UTC offset: its UTC date and time, in the form `stored` writes. */\nconst instantIn = (codecId, stored) => (text) => utcDateTimeOfInstantText(codecId, text, stored);\n/** Reads the text MySQL returns for a row in any year: a column's range is refused on write only. */\nconst anyYear = (ownerId, shape) => (text) => dateTimeStoredText(text, {\n\tshape,\n\townerId\n});\nconst datetimeRow = anyYear(mysqlDatetime.id, \"dateTime\");\nconst timestampRow = anyYear(mysqlTimestamp.id, \"dateTime\");\nconst dateRow = anyYear(mysqlDate.id, \"date\");\nconst DATETIME_TEMPORAL = {\n\tcodecId: MYSQL_DATETIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.Instant\",\n\tstringType: \"DatetimeString\"\n};\nconst TIMESTAMP_TEMPORAL = {\n\tcodecId: MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.Instant\",\n\tstringType: \"TimestampString\"\n};\nconst DATE_TEMPORAL = {\n\tcodecId: MYSQL_DATE_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainDate\",\n\tstringType: \"DateString\"\n};\nconst TIME_TEMPORAL = {\n\tcodecId: MYSQL_TIME_TEMPORAL_CODEC_ID,\n\ttemporalTag: \"Temporal.PlainTime\",\n\tstringType: \"TimeString\"\n};\nconst instantOf = (identity, stored) => temporalFromStoredText(identity, `${stored}Z`, (temporal, text) => temporal.Instant.from(text));\n/** A MySQL `timestamp` as a JavaScript `Date`, read and written in UTC. */\nvar MysqlTimestampDateCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(wireTextOfDate(this.id, value, mysqlTimestampText), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn dateOfWireText(this.id, wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\tconst stored = storedWithinPrecision(this.id, value.value, this.dataTypeParams);\n\t\tif (hasDigitsBelowAMillisecond(stored)) return refuseJsonValue(this.id, `a timestamp with no digits below a millisecond, which a Date drops: ${JSON.stringify(value.value)} has them`, value.value);\n\t\treturn /* @__PURE__ */ new Date(`${stored}Z`);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input.toISOString().replace(\"Z\", \"\"));\n\t}\n};\nvar MysqlTimestampDateDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTimestamp.id;\n\tcodecId = MYSQL_TIMESTAMP_DATE_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimestampDateCodec(this, mysqlTimestamp, params);\n\t}\n};\nconst mysqlTimestampDateDescriptor = new MysqlTimestampDateDescriptor();\n/** An instant read as `Temporal.Instant` from a `datetime` that holds it in UTC. */\nvar MysqlDatetimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(this.stored(value)), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn instantOf(DATETIME_TEMPORAL, storedTextFromWire(this.id, wire, datetimeRow));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn instantOf(DATETIME_TEMPORAL, storedWithinPrecision(this.id, value.value, this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(this.stored(input));\n\t}\n\tstored(value) {\n\t\treturn storedTextOfTemporal(DATETIME_TEMPORAL, value, instantIn(this.id, mysqlDatetimeText));\n\t}\n};\nvar MysqlDatetimeTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDatetime.id;\n\tcodecId = MYSQL_DATETIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDatetimeTemporalCodec(this, mysqlDatetime, params);\n\t}\n};\nconst mysqlDatetimeTemporalDescriptor = new MysqlDatetimeTemporalDescriptor();\n/** An instant read as `Temporal.Instant` from a `timestamp`. */\nvar MysqlTimestampTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(this.stored(value)), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn instantOf(TIMESTAMP_TEMPORAL, storedTextFromWire(this.id, wire, timestampRow));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn instantOf(TIMESTAMP_TEMPORAL, storedWithinPrecision(this.id, value.value, this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(this.stored(input));\n\t}\n\tstored(value) {\n\t\treturn storedTextOfTemporal(TIMESTAMP_TEMPORAL, value, instantIn(this.id, mysqlTimestampText));\n\t}\n};\nvar MysqlTimestampTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTimestamp.id;\n\tcodecId = MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimestampTemporalCodec(this, mysqlTimestamp, params);\n\t}\n};\nconst mysqlTimestampTemporalDescriptor = new MysqlTimestampTemporalDescriptor();\n/** The literal of the instant text a string codec reads from a stored date and time, which has no offset. */\nfunction renderInstantTextLiteral(value) {\n\treturn typeof value === \"string\" ? renderTsLiteral(`${value}Z`) : void 0;\n}\n/** An instant read as ISO 8601 text in UTC, `2024-01-01T00:00:00.5Z`, from a `datetime`. A write takes ISO 8601 text with any UTC offset. */\nvar MysqlDatetimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(storedTextForWrite(this.id, value, instantIn(this.id, mysqlDatetimeText))), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn `${storedTextFromWire(this.id, wire, datetimeRow)}Z`;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn `${storedWithinPrecision(this.id, value.value, this.dataTypeParams)}Z`;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(instantIn(this.id, mysqlDatetimeText)(input));\n\t}\n};\nvar MysqlDatetimeStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDatetime.id;\n\tcodecId = MYSQL_DATETIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\trenderValueLiteral(value) {\n\t\treturn renderInstantTextLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDatetimeStringCodec(this, mysqlDatetime, params);\n\t}\n};\nconst mysqlDatetimeStringDescriptor = new MysqlDatetimeStringDescriptor();\n/** An instant read as ISO 8601 text in UTC, `2024-01-01T00:00:00.5Z`, from a `timestamp`. A write takes ISO 8601 text with any UTC offset. */\nvar MysqlTimestampStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(mysqlWireText(storedTextForWrite(this.id, value, instantIn(this.id, mysqlTimestampText))), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn `${storedTextFromWire(this.id, wire, timestampRow)}Z`;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn `${storedWithinPrecision(this.id, value.value, this.dataTypeParams)}Z`;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(instantIn(this.id, mysqlTimestampText)(input));\n\t}\n};\nvar MysqlTimestampStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTimestamp.id;\n\tcodecId = MYSQL_TIMESTAMP_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\trenderValueLiteral(value) {\n\t\treturn renderInstantTextLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimestampStringCodec(this, mysqlTimestamp, params);\n\t}\n};\nconst mysqlTimestampStringDescriptor = new MysqlTimestampStringDescriptor();\n/** A calendar date read as ISO 8601 text, `2024-02-29`. */\nvar MysqlDateStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, mysqlDateText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, dateRow);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar MysqlDateStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDate.id;\n\tcodecId = MYSQL_DATE_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlDateStringCodec(this, mysqlDate);\n\t}\n};\nconst mysqlDateStringDescriptor = new MysqlDateStringDescriptor();\n/** A calendar date read as `Temporal.PlainDate`. */\nvar MysqlDateTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextOfTemporal(DATE_TEMPORAL, value, mysqlDateText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn this.plainDateOf(storedTextFromWire(this.id, wire, dateRow));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn this.plainDateOf(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(storedTextOfTemporal(DATE_TEMPORAL, input, mysqlDateText));\n\t}\n\tplainDateOf(stored) {\n\t\treturn temporalFromStoredText(DATE_TEMPORAL, stored, (temporal, text) => temporal.PlainDate.from(text));\n\t}\n};\nvar MysqlDateTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDate.id;\n\tcodecId = MYSQL_DATE_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = void 0;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlDateTemporalCodec(this, mysqlDate);\n\t}\n};\nconst mysqlDateTemporalDescriptor = new MysqlDateTemporalDescriptor();\n/** A time of day read as ISO 8601 text, `09:30:00.5`. A MySQL `time` outside 00:00:00 to 23:59:59.999999 is no time of day, so it is refused on read and on write. */\nvar MysqlTimeStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(storedTextForWrite(this.id, value, mysqlTimeText), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, mysqlTimeText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn storedWithinPrecision(this.id, value.value, this.dataTypeParams);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar MysqlTimeStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTime.id;\n\tcodecId = MYSQL_TIME_STRING_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimeStringCodec(this, mysqlTime, params);\n\t}\n};\nconst mysqlTimeStringDescriptor = new MysqlTimeStringDescriptor();\n/** A time of day read as `Temporal.PlainTime`. */\nvar MysqlTimeTemporalCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(storedTextOfTemporal(TIME_TEMPORAL, value, mysqlTimeText), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn this.plainTimeOf(storedTextFromWire(this.id, wire, mysqlTimeText));\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn this.plainTimeOf(storedWithinPrecision(this.id, value.value, this.dataTypeParams));\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(storedTextOfTemporal(TIME_TEMPORAL, input, mysqlTimeText));\n\t}\n\tplainTimeOf(stored) {\n\t\treturn temporalFromStoredText(TIME_TEMPORAL, stored, (temporal, text) => temporal.PlainTime.from(text));\n\t}\n};\nvar MysqlTimeTemporalDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlTime.id;\n\tcodecId = MYSQL_TIME_TEMPORAL_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlTimeTemporalCodec(this, mysqlTime, params);\n\t}\n};\nconst mysqlTimeTemporalDescriptor = new MysqlTimeTemporalDescriptor();\n/** A length of time read as the ISO 8601 duration it was written as, `PT1H30M`, stored in a `varchar` column. Its text does not sort in the order of the durations, so it offers no order. */\nvar MysqlDurationStringCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn storedTextForWrite(this.id, value, mysqlDurationText);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn storedTextFromWire(this.id, wire, mysqlDurationText);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.storedDataTypeValueOf(input);\n\t}\n};\nvar MysqlDurationStringDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDuration.id;\n\tcodecId = MYSQL_DURATION_STRING_CODEC_ID;\n\ttraits = [\"equality\"];\n\tparamsSchema = mysqlDurationParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(_params) {\n\t\treturn () => new MysqlDurationStringCodec(this, mysqlDuration);\n\t}\n};\nconst mysqlDurationStringDescriptor = new MysqlDurationStringDescriptor();\n//#endregion\n//#region src/core/codecs.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\nconst BIGINT_MIN = -(2n ** 63n);\nconst BIGINT_MAX = 2n ** 63n - 1n;\n/** Projects a bigint as its decimal text: a JSON number past 2^53 would lose digits when JavaScript parses the include. */\nconst textJsonProjection = (expression) => CastExpr.as(expression, \"CHAR\");\nfunction decodeFailed(codecId, expected, received) {\n\tthrow mysqlError(\"RUNTIME.DECODE_FAILED\", `${codecId} wire value must be ${expected}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(received)\n\t} });\n}\nfunction encodeFailed(codecId, expected, received) {\n\tthrow mysqlError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be ${expected}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(received)\n\t} });\n}\nconst mysqlSqlCharDescriptor = mysqlCodec(sqlCharDescriptor, {\n\tdataType: mysqlChar,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlCharCodec(descriptor, dataType, params)\n});\nconst mysqlSqlVarcharDescriptor = mysqlCodec(sqlVarcharDescriptor, {\n\tdataType: mysqlVarchar,\n\trenderValueLiteral: renderTsLiteral,\n\tjsonProjection: identityJsonProjection,\n\tfactory: (descriptor, dataType, params) => () => new SqlVarcharCodec(descriptor, dataType, params)\n});\nconst mysqlSqlRawDescriptor = mysqlCodec(sqlRawDescriptor, {\n\tdataType: sqlRawDataType,\n\tjsonProjection: () => {\n\t\tthrow mysqlQueryNotYetSupported(\"Reading a raw column inside an include\");\n\t},\n\tfactory: (descriptor, dataType, params) => () => new SqlRawCodec(descriptor, dataType, params)\n});\nvar MysqlTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlTextDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlText.id;\n\tcodecId = MYSQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlTextCodec(this, mysqlText);\n\t}\n};\nconst mysqlTextDescriptor = new MysqlTextDescriptor();\n/** A MySQL `int` as a JavaScript number. A row carries it as decimal text, and an include's JSON as a number. */\nvar MysqlIntCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\tif (!Number.isSafeInteger(value)) return encodeFailed(MYSQL_INT_CODEC_ID, \"an integer\", value);\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\tif (typeof wire === \"number\") return wire;\n\t\tif (!DECIMAL_INTEGER.test(wire)) return decodeFailed(MYSQL_INT_CODEC_ID, \"the decimal text of an integer\", wire);\n\t\treturn Number(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlIntDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlInt.id;\n\tcodecId = MYSQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlIntCodec(this, mysqlInt);\n\t}\n};\nconst mysqlIntDescriptor = new MysqlIntDescriptor();\n/** A MySQL `bigint` as a JavaScript bigint. A row, an include's JSON and a parameter carry it as decimal text, as the Postgres `int8` codec does; MySQL reads a text parameter beside a `bigint` column exactly. */\nvar MysqlBigintCodec = class extends CodecImpl {\n\t/** The bigint itself: the driver writes it as bare digits, which MySQL reads as an exact integer even beside an expression, where it compares quoted text as a double. */\n\tasync toWire(value, _ctx) {\n\t\tif (typeof value !== \"bigint\" || value < BIGINT_MIN || value > BIGINT_MAX) return encodeFailed(MYSQL_BIGINT_CODEC_ID, `a bigint from ${BIGINT_MIN} to ${BIGINT_MAX}`, value);\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\tif (typeof wire === \"bigint\") return wire;\n\t\tif (!DECIMAL_INTEGER.test(wire)) return decodeFailed(MYSQL_BIGINT_CODEC_ID, \"the decimal text of an integer\", wire);\n\t\treturn BigInt(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn BigInt(value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input.toString());\n\t}\n};\nvar MysqlBigintDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlBigint.id;\n\tcodecId = MYSQL_BIGINT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\trenderValueLiteral(value) {\n\t\treturn decimalTextBigintLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn textJsonProjection(expression);\n\t}\n\tfactory() {\n\t\treturn () => new MysqlBigintCodec(this, mysqlBigint);\n\t}\n};\nconst mysqlBigintDescriptor = new MysqlBigintDescriptor();\n/**\n* Reads the text MySQL sends for a `datetime` as the instant it names in UTC: the codec writes every value in UTC, so the column holds no time zone of its own.\n*/\nfunction decodeMysqlDatetime(wire) {\n\treturn dateOfWireText(MYSQL_DATETIME_CODEC_ID, wire);\n}\n/** The text MySQL reads for an instant in UTC, with millisecond digits. A `Date` outside the years a `datetime` holds is refused. */\nfunction encodeMysqlDatetime(value) {\n\treturn wireTextOfDate(MYSQL_DATETIME_CODEC_ID, value, mysqlDatetimeText);\n}\n/** A MySQL `datetime` as a JavaScript `Date`, read and written in UTC. */\nvar MysqlDatetimeCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn roundedDownToPrecision(encodeMysqlDatetime(value), this.dataTypeParams);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn decodeMysqlDatetime(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\tconst stored = storedWithinPrecision(this.id, value.value, this.dataTypeParams);\n\t\tif (hasDigitsBelowAMillisecond(stored)) return refuseJsonValue(this.id, `a datetime with no digits below a millisecond, which a Date drops: ${JSON.stringify(value.value)} has them`, value.value);\n\t\treturn /* @__PURE__ */ new Date(`${stored}Z`);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input.toISOString().replace(\"Z\", \"\"));\n\t}\n};\nvar MysqlDatetimeDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlDatetime.id;\n\tcodecId = MYSQL_DATETIME_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\tparamsSchema = mysqlDatetimeParams;\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlDatetimeCodec(this, mysqlDatetime, params);\n\t}\n};\nconst mysqlDatetimeDescriptor = new MysqlDatetimeDescriptor();\n/** A native MySQL enum column, whose value is the member's text. */\nvar MysqlEnumCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar MysqlEnumDescriptor = class extends MysqlCodecDescriptor {\n\tdataType = mysqlEnum.id;\n\tcodecId = MYSQL_ENUM_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = mysqlEnumParams;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tjsonProjection(expression) {\n\t\treturn identityJsonProjection(expression);\n\t}\n\tfactory(params) {\n\t\treturn () => new MysqlEnumCodec(this, mysqlEnum, params);\n\t}\n};\n/** Every codec descriptor this target ships. */\nconst codecDescriptors = [\n\tmysqlSqlCharDescriptor,\n\tmysqlSqlVarcharDescriptor,\n\tmysqlSqlRawDescriptor,\n\tmysqlTextDescriptor,\n\tmysqlIntDescriptor,\n\tmysqlBigintDescriptor,\n\tmysqlDatetimeDescriptor,\n\tmysqlDatetimeTemporalDescriptor,\n\tmysqlDatetimeStringDescriptor,\n\tmysqlTimestampDateDescriptor,\n\tmysqlTimestampTemporalDescriptor,\n\tmysqlTimestampStringDescriptor,\n\tmysqlDateStringDescriptor,\n\tmysqlDateTemporalDescriptor,\n\tmysqlTimeStringDescriptor,\n\tmysqlTimeTemporalDescriptor,\n\tmysqlDurationStringDescriptor,\n\tnew MysqlEnumDescriptor()\n];\n//#endregion\n//#region src/core/registry.ts\n/** Every codec descriptor `@internal/target-mysql` ships, for consumers that enumerate or look up a MySQL codec by id. ADR 208. */\nconst mysqlCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst mysqlCodecDescriptorRegistry = buildMysqlCodecDescriptorRegistry(codecDescriptors);\n//#endregion\n//#region src/core/codec-registry.ts\nfunction descriptorsFrom(contributors) {\n\treturn contributors.flatMap((contributor) => contributor.types?.codecTypes?.codecDescriptors ?? []);\n}\nfunction buildMysqlCodecRegistry(descriptors) {\n\tconst descriptorRegistry = buildMysqlCodecDescriptorRegistry(descriptors);\n\tconst registry = {\n\t\t...extractCodecLookup([{\n\t\t\tid: \"mysql-codecs\",\n\t\t\ttypes: { codecTypes: { codecDescriptors: Array.from(descriptorRegistry.values()) } }\n\t\t}]),\n\t\tdescriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),\n\t\tvalues: () => descriptorRegistry.values()\n\t};\n\treturn Object.freeze(registry);\n}\n/** The codec registry of a MySQL stack: the target's built-in codecs and those its extensions contribute. */\nfunction assembleMysqlCodecRegistry(target, extensions) {\n\treturn buildMysqlCodecRegistry([\n\t\t...descriptorsFrom([target]),\n\t\t...mysqlCodecDescriptorRegistry.values(),\n\t\t...descriptorsFrom(extensions)\n\t]);\n}\n/** A codec registry of the MySQL built-in codecs only. */\nfunction createMysqlBuiltinCodecLookup() {\n\treturn buildMysqlCodecRegistry([...mysqlCodecDescriptorRegistry.values()]);\n}\n//#endregion\nexport { MYSQL_DATE_NOW, MYSQL_INSTANT_NOW, MYSQL_TIME_NOW, assembleMysqlCodecRegistry, createMysqlBuiltinCodecLookup, decodeMysqlDatetime, encodeMysqlDatetime, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCurrentValueFor, mysqlNowExpression };\n\n//# sourceMappingURL=codecs.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,UAAU,OAAO;CACzB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC7D;;AAEA,SAAS,cAAc,QAAQ;CAC9B,OAAO,OAAO,QAAQ,KAAK,GAAG;AAC/B;;AAEA,SAAS,yBAAyB,SAAS,MAAM,QA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BAAgB,CAAC,MAAM,CAAC;EAC3B,GAAG,6BAA6B,OAAO;EACvC,GAAG,gBAAgB,UAAU;CAC9B,CAAC;AACF;;AAEA,SAAS,gCAAgC;CACxC,OAAO,wBAAwB,CAAC,GAAG,6BAA6B,OAAO,CAAC,CAAC;AAC1E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as MysqlCreateTable, r as MysqlDdlNode } from "./nodes-xc0cR0_c-
|
|
1
|
+
import { n as MysqlCreateTable, r as MysqlDdlNode } from "./nodes-xc0cR0_c-CLET35o0.mjs";
|
|
2
2
|
import { DdlColumn, DdlTableConstraint } from "@prisma/orm-family-sql/relational-core/ast";
|
|
3
|
-
//#region ../../../3-targets/mysql/1-target/dist/contract-free.d.mts
|
|
3
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/contract-free.d.mts
|
|
4
4
|
//#region src/contract-free/control-bootstrap.d.ts
|
|
5
5
|
/** The DDL that creates the marker table `db sign` writes, when it does not exist. */
|
|
6
6
|
declare function buildSignMarkerBootstrapQueries(): readonly MysqlDdlNode[];
|
|
@@ -19,4 +19,4 @@ declare function createTable(options: {
|
|
|
19
19
|
}): MysqlCreateTable;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { buildSignMarkerBootstrapQueries as n, createTable as r, buildControlTableBootstrapQueries as t };
|
|
22
|
-
//# sourceMappingURL=contract-free-
|
|
22
|
+
//# sourceMappingURL=contract-free-BnJBWENn.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-free-BnJBWENn.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/contract-free.d.mts"],"mappings":";;;;;iBAIiB,4CAA4C;;iBAE5C,8CAA8C;;;;;;iBAM9C,YAAY;WAClB;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME } from "./control-tables-CcQ77JE7-
|
|
2
|
-
import { t as createTable } from "./ddl-DDmMHyA_-
|
|
1
|
+
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME } from "./control-tables-CcQ77JE7-DKb3ubVU.mjs";
|
|
2
|
+
import { t as createTable } from "./ddl-DDmMHyA_-grdUmU3J.mjs";
|
|
3
3
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
4
4
|
import { col, fn, lit } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
5
|
-
//#region ../../../3-targets/mysql/1-target/dist/contract-free.mjs
|
|
5
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/contract-free.mjs
|
|
6
6
|
const NOW = fn("CURRENT_TIMESTAMP(3)");
|
|
7
7
|
const markerTable = createTable({
|
|
8
8
|
table: MARKER_TABLE_NAME,
|
|
@@ -68,4 +68,4 @@ function buildControlTableBootstrapQueries() {
|
|
|
68
68
|
//#endregion
|
|
69
69
|
export { buildSignMarkerBootstrapQueries as n, buildControlTableBootstrapQueries as t };
|
|
70
70
|
|
|
71
|
-
//# sourceMappingURL=contract-free-
|
|
71
|
+
//# sourceMappingURL=contract-free-DekbHRyr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-free-DekbHRyr.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/contract-free.mjs"],"sourcesContent":["import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME } from \"./control-tables-CcQ77JE7.mjs\";\nimport { t as createTable } from \"./ddl-DDmMHyA_.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/control-bootstrap.ts\nconst NOW = fn(\"CURRENT_TIMESTAMP(3)\");\nconst markerTable = createTable({\n\ttable: MARKER_TABLE_NAME,\n\tifNotExists: true,\n\tcolumns: [\n\t\tcol(\"space\", \"varchar(191)\", {\n\t\t\tnotNull: true,\n\t\t\tprimaryKey: true,\n\t\t\tdefault: lit(APP_SPACE_ID)\n\t\t}),\n\t\tcol(\"core_hash\", \"varchar(191)\", { notNull: true }),\n\t\tcol(\"profile_hash\", \"varchar(191)\", { notNull: true }),\n\t\tcol(\"contract_json\", \"longtext\"),\n\t\tcol(\"canonical_version\", \"int\"),\n\t\tcol(\"updated_at\", \"datetime(3)\", {\n\t\t\tnotNull: true,\n\t\t\tdefault: NOW\n\t\t}),\n\t\tcol(\"app_tag\", \"text\"),\n\t\tcol(\"meta\", \"text\", {\n\t\t\tnotNull: true,\n\t\t\tdefault: fn(\"'{}'\")\n\t\t}),\n\t\tcol(\"invariants\", \"text\", {\n\t\t\tnotNull: true,\n\t\t\tdefault: fn(\"'[]'\")\n\t\t})\n\t]\n});\nconst ledgerTable = createTable({\n\ttable: LEDGER_TABLE_NAME,\n\tifNotExists: true,\n\tcolumns: [\n\t\tcol(\"id\", \"bigint\", {\n\t\t\tnotNull: true,\n\t\t\tprimaryKey: true,\n\t\t\tdefault: fn(\"autoincrement()\")\n\t\t}),\n\t\tcol(\"created_at\", \"datetime(3)\", {\n\t\t\tnotNull: true,\n\t\t\tdefault: NOW\n\t\t}),\n\t\tcol(\"space\", \"varchar(191)\", { notNull: true }),\n\t\tcol(\"migration_name\", \"text\", { notNull: true }),\n\t\tcol(\"migration_hash\", \"varchar(191)\", { notNull: true }),\n\t\tcol(\"origin_core_hash\", \"varchar(191)\"),\n\t\tcol(\"origin_profile_hash\", \"varchar(191)\"),\n\t\tcol(\"destination_core_hash\", \"varchar(191)\", { notNull: true }),\n\t\tcol(\"destination_profile_hash\", \"varchar(191)\"),\n\t\tcol(\"contract_json_before\", \"longtext\"),\n\t\tcol(\"contract_json_after\", \"longtext\"),\n\t\tcol(\"operations\", \"longtext\", { notNull: true })\n\t]\n});\n/** The DDL that creates the marker table `db sign` writes, when it does not exist. */\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [markerTable];\n}\n/** The DDL that creates the marker and ledger tables the migration runner writes, when they do not exist. */\nfunction buildControlTableBootstrapQueries() {\n\treturn [markerTable, ledgerTable];\n}\n//#endregion\nexport { buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, createTable };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;AAKA,MAAM,MAAM,GAAG,sBAAsB;AACrC,MAAM,cAAc,YAAY;CAC/B,OAAO;CACP,aAAa;CACb,SAAS;EACR,IAAI,SAAS,gBAAgB;GAC5B,SAAS;GACT,YAAY;GACZ,SAAS,IAAI,YAAY;EAC1B,CAAC;EACD,IAAI,aAAa,gBAAgB,EAAE,SAAS,KAAK,CAAC;EAClD,IAAI,gBAAgB,gBAAgB,EAAE,SAAS,KAAK,CAAC;EACrD,IAAI,iBAAiB,UAAU;EAC/B,IAAI,qBAAqB,KAAK;EAC9B,IAAI,cAAc,eAAe;GAChC,SAAS;GACT,SAAS;EACV,CAAC;EACD,IAAI,WAAW,MAAM;EACrB,IAAI,QAAQ,QAAQ;GACnB,SAAS;GACT,SAAS,GAAG,MAAM;EACnB,CAAC;EACD,IAAI,cAAc,QAAQ;GACzB,SAAS;GACT,SAAS,GAAG,MAAM;EACnB,CAAC;CACF;AACD,CAAC;AACD,MAAM,cAAc,YAAY;CAC/B,OAAO;CACP,aAAa;CACb,SAAS;EACR,IAAI,MAAM,UAAU;GACnB,SAAS;GACT,YAAY;GACZ,SAAS,GAAG,iBAAiB;EAC9B,CAAC;EACD,IAAI,cAAc,eAAe;GAChC,SAAS;GACT,SAAS;EACV,CAAC;EACD,IAAI,SAAS,gBAAgB,EAAE,SAAS,KAAK,CAAC;EAC9C,IAAI,kBAAkB,QAAQ,EAAE,SAAS,KAAK,CAAC;EAC/C,IAAI,kBAAkB,gBAAgB,EAAE,SAAS,KAAK,CAAC;EACvD,IAAI,oBAAoB,cAAc;EACtC,IAAI,uBAAuB,cAAc;EACzC,IAAI,yBAAyB,gBAAgB,EAAE,SAAS,KAAK,CAAC;EAC9D,IAAI,4BAA4B,cAAc;EAC9C,IAAI,wBAAwB,UAAU;EACtC,IAAI,uBAAuB,UAAU;EACrC,IAAI,cAAc,YAAY,EAAE,SAAS,KAAK,CAAC;CAChD;AACD,CAAC;;AAED,SAAS,kCAAkC;CAC1C,OAAO,CAAC,WAAW;AACpB;;AAEA,SAAS,oCAAoC;CAC5C,OAAO,CAAC,aAAa,WAAW;AACjC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { s as mysqlError } from "./errors-Cng94tYg-DTH51xWG.mjs";
|
|
2
|
+
import { n as mysqlTargetDescriptorMeta } from "./descriptor-meta-CsMPRsxp-QVV7vNY8.mjs";
|
|
3
|
+
import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs";
|
|
4
|
+
import { _ as createMysqlMigrationPlanner, b as mysqlContractToSchema, d as MYSQL_MIGRATION_MODULE, v as createMysqlMigrationRunner, y as diffMysqlSchema } from "./runner-BIjAWX-E-BgTmrD8f.mjs";
|
|
5
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
6
|
+
import { setFallbackTemporal } from "@prisma/orm-framework/type-implementations/temporal";
|
|
7
|
+
import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
|
|
8
|
+
import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
|
|
9
|
+
import { sqlTypeLookupsOf } from "@prisma/orm-family-sql/family/control";
|
|
10
|
+
import { relationalNodeEntityKind, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
|
|
11
|
+
import { Temporal } from "temporal-polyfill/full/implementation";
|
|
12
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/control.mjs
|
|
13
|
+
/** The MySQL `SchemaVerifier`. Verification runs through `diffSchema`; these hooks add nothing, as on the other SQL targets. */
|
|
14
|
+
var MysqlSchemaVerifier = class extends SqlSchemaVerifierBase {
|
|
15
|
+
verifyCommonSqlSchema(_options) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
verifyTargetExtensions(_options) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
function isSqlContract(contract) {
|
|
23
|
+
return contract === null || contract.storage instanceof SqlStorage;
|
|
24
|
+
}
|
|
25
|
+
/** The control target of MySQL, or of a target that extends it, which reuses MySQL's planner, runner, schema verifier and contract serializer under its own target id. */
|
|
26
|
+
function createMysqlControlTargetDescriptor(options) {
|
|
27
|
+
setFallbackTemporal(Temporal);
|
|
28
|
+
const { descriptorMeta } = options;
|
|
29
|
+
const migrationTarget = {
|
|
30
|
+
targetId: descriptorMeta.targetId,
|
|
31
|
+
migrationModule: options.migrationModule
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
...descriptorMeta,
|
|
35
|
+
contractSerializer: new MysqlContractSerializer(),
|
|
36
|
+
schemaVerifier: new MysqlSchemaVerifier(),
|
|
37
|
+
diffSchema: diffMysqlSchema,
|
|
38
|
+
classifySubjectGranularity: relationalNodeGranularity,
|
|
39
|
+
classifyEntityKind: relationalNodeEntityKind,
|
|
40
|
+
migrations: {
|
|
41
|
+
createPlanner(adapter) {
|
|
42
|
+
return createMysqlMigrationPlanner(adapter, migrationTarget);
|
|
43
|
+
},
|
|
44
|
+
createRunner(family) {
|
|
45
|
+
return blindCast(createMysqlMigrationRunner(family));
|
|
46
|
+
},
|
|
47
|
+
contractToSchema(contract, frameworkComponents) {
|
|
48
|
+
if (!isSqlContract(contract)) throw mysqlError("CONTRACT.TARGET_MISMATCH", "The MySQL target received a contract that is not a SQL contract.");
|
|
49
|
+
return mysqlContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
create() {
|
|
53
|
+
return {
|
|
54
|
+
familyId: "sql",
|
|
55
|
+
targetId: descriptorMeta.targetId
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
createPlanner(adapter) {
|
|
59
|
+
return createMysqlMigrationPlanner(adapter, migrationTarget);
|
|
60
|
+
},
|
|
61
|
+
createRunner(family) {
|
|
62
|
+
return createMysqlMigrationRunner(family);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const mysqlControlTargetDescriptor = createMysqlControlTargetDescriptor({
|
|
67
|
+
descriptorMeta: mysqlTargetDescriptorMeta,
|
|
68
|
+
migrationModule: MYSQL_MIGRATION_MODULE
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
export { mysqlControlTargetDescriptor as n, createMysqlControlTargetDescriptor as t };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=control-BBuy6yt5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-BBuy6yt5.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/control.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as mysqlScalarTypeConstructors, t as mysqlTargetDescriptorMeta } from \"./descriptor-meta-CsMPRsxp.mjs\";\nimport { t as MysqlContractSerializer } from \"./mysql-contract-serializer-BnTKRSsN.mjs\";\nimport { _ as MYSQL_MIGRATION_MODULE, b as diffMysqlSchema, r as createMysqlMigrationPlanner, t as createMysqlMigrationRunner, x as mysqlContractToSchema } from \"./runner-BIjAWX-E.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { setFallbackTemporal } from \"@internal/type-implementations/temporal\";\nimport { sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { Temporal } from \"temporal-polyfill/full/implementation\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\n//#region src/core/migrations/mysql-schema-verifier.ts\n/** The MySQL `SchemaVerifier`. Verification runs through `diffSchema`; these hooks add nothing, as on the other SQL targets. */\nvar MysqlSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/migrations/control-target.ts\nfunction isSqlContract(contract) {\n\treturn contract === null || contract.storage instanceof SqlStorage;\n}\n/** The control target of MySQL, or of a target that extends it, which reuses MySQL's planner, runner, schema verifier and contract serializer under its own target id. */\nfunction createMysqlControlTargetDescriptor(options) {\n\tsetFallbackTemporal(Temporal);\n\tconst { descriptorMeta } = options;\n\tconst migrationTarget = {\n\t\ttargetId: descriptorMeta.targetId,\n\t\tmigrationModule: options.migrationModule\n\t};\n\treturn {\n\t\t...descriptorMeta,\n\t\tcontractSerializer: new MysqlContractSerializer(),\n\t\tschemaVerifier: new MysqlSchemaVerifier(),\n\t\tdiffSchema: diffMysqlSchema,\n\t\tclassifySubjectGranularity: relationalNodeGranularity,\n\t\tclassifyEntityKind: relationalNodeEntityKind,\n\t\tmigrations: {\n\t\t\tcreatePlanner(adapter) {\n\t\t\t\treturn createMysqlMigrationPlanner(adapter, migrationTarget);\n\t\t\t},\n\t\t\tcreateRunner(family) {\n\t\t\t\treturn blindCast(createMysqlMigrationRunner(family));\n\t\t\t},\n\t\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\t\tif (!isSqlContract(contract)) throw mysqlError(\"CONTRACT.TARGET_MISMATCH\", \"The MySQL target received a contract that is not a SQL contract.\");\n\t\t\t\treturn mysqlContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));\n\t\t\t}\n\t\t},\n\t\tcreate() {\n\t\t\treturn {\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: descriptorMeta.targetId\n\t\t\t};\n\t\t},\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createMysqlMigrationPlanner(adapter, migrationTarget);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createMysqlMigrationRunner(family);\n\t\t}\n\t};\n}\nconst mysqlControlTargetDescriptor = createMysqlControlTargetDescriptor({\n\tdescriptorMeta: mysqlTargetDescriptorMeta,\n\tmigrationModule: MYSQL_MIGRATION_MODULE\n});\n//#endregion\nexport { createMysqlControlTargetDescriptor, mysqlControlTargetDescriptor as default, mysqlScalarTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,IAAI,sBAAsB,cAAc,sBAAsB;CAC7D,sBAAsB,UAAU;EAC/B,OAAO,CAAC;CACT;CACA,uBAAuB,UAAU;EAChC,OAAO,CAAC;CACT;AACD;AAGA,SAAS,cAAc,UAAU;CAChC,OAAO,aAAa,QAAQ,SAAS,mBAAmB;AACzD;;AAEA,SAAS,mCAAmC,SAAS;CACpD,oBAAoB,QAAQ;CAC5B,MAAM,EAAE,mBAAmB;CAC3B,MAAM,kBAAkB;EACvB,UAAU,eAAe;EACzB,iBAAiB,QAAQ;CAC1B;CACA,OAAO;EACN,GAAG;EACH,oBAAoB,IAAI,wBAAwB;EAChD,gBAAgB,IAAI,oBAAoB;EACxC,YAAY;EACZ,4BAA4B;EAC5B,oBAAoB;EACpB,YAAY;GACX,cAAc,SAAS;IACtB,OAAO,4BAA4B,SAAS,eAAe;GAC5D;GACA,aAAa,QAAQ;IACpB,OAAO,UAAU,2BAA2B,MAAM,CAAC;GACpD;GACA,iBAAiB,UAAU,qBAAqB;IAC/C,IAAI,CAAC,cAAc,QAAQ,GAAG,MAAM,WAAW,4BAA4B,kEAAkE;IAC7I,OAAO,sBAAsB,UAAU,iBAAiB,mBAAmB,CAAC;GAC7E;EACD;EACA,SAAS;GACR,OAAO;IACN,UAAU;IACV,UAAU,eAAe;GAC1B;EACD;EACA,cAAc,SAAS;GACtB,OAAO,4BAA4B,SAAS,eAAe;EAC5D;EACA,aAAa,QAAQ;GACpB,OAAO,2BAA2B,MAAM;EACzC;CACD;AACD;AACA,MAAM,+BAA+B,mCAAmC;CACvE,gBAAgB;CAChB,iBAAiB;AAClB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { a as connectionFix, c as mysqlConnectionOptions, f as normalizeMysqlError, l as mysqlDriverDescriptorMetaFor, m as statementFor, n as acquireClientQueryLock, o as connectionLost, p as sessionSettingsStatement, r as applySessionSettings, s as isFatal } from "./statement-CT5tB4uX-CHqHFM3z.mjs";
|
|
2
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
|
+
import { errorRuntime } from "@prisma/orm-framework/errors/execution";
|
|
4
|
+
import { redactDatabaseUrl } from "@prisma/orm-framework/utils/redact-db-url";
|
|
5
|
+
import { createConnection } from "mariadb";
|
|
6
|
+
//#region ../../../3-targets/mysql/1-mysql/3-driver/dist/control.mjs
|
|
7
|
+
/**
|
|
8
|
+
* A connection for the control plane of MySQL, or of a target that extends it, carrying that target's id. It runs every statement as the runtime driver does, a user's `rawSql` migration step included: in one round trip over the text protocol, the package writing its values into it, one at a time in the order sent, under the runtime driver's per-client lock.
|
|
9
|
+
*/
|
|
10
|
+
var MysqlControlDriverFor = class {
|
|
11
|
+
connection;
|
|
12
|
+
targetId;
|
|
13
|
+
familyId = "sql";
|
|
14
|
+
#lost;
|
|
15
|
+
constructor(connection, targetId) {
|
|
16
|
+
this.connection = connection;
|
|
17
|
+
this.targetId = targetId;
|
|
18
|
+
connection.on("error", (error) => {
|
|
19
|
+
this.#lost = error;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** Runs `sql` and returns its rows, every column as text and a binary column as bytes. */
|
|
23
|
+
async query(sql, params) {
|
|
24
|
+
const releaseLock = await acquireClientQueryLock(this.connection);
|
|
25
|
+
try {
|
|
26
|
+
if (this.#lost !== void 0) throw connectionLost(this.#lost);
|
|
27
|
+
const statement = statementFor(this.connection, sql, params ?? []);
|
|
28
|
+
const result = await this.connection.query(statement.sql, statement.values);
|
|
29
|
+
return { rows: Array.isArray(result) ? blindCast([...result]) : [] };
|
|
30
|
+
} catch (error) {
|
|
31
|
+
if (error instanceof Error && isFatal(error)) {
|
|
32
|
+
this.#lost = error;
|
|
33
|
+
throw connectionLost(error);
|
|
34
|
+
}
|
|
35
|
+
throw normalizeMysqlError(error);
|
|
36
|
+
} finally {
|
|
37
|
+
releaseLock();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async databaseName() {
|
|
41
|
+
const { rows } = await this.query("SELECT DATABASE() AS name");
|
|
42
|
+
const name = rows[0]?.name;
|
|
43
|
+
return typeof name === "string" && name.length > 0 ? name : void 0;
|
|
44
|
+
}
|
|
45
|
+
async close() {
|
|
46
|
+
await this.connection.end().catch(() => {});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/** A MySQL connection for the control plane. */
|
|
50
|
+
var MysqlControlDriver = class extends MysqlControlDriverFor {
|
|
51
|
+
constructor(connection) {
|
|
52
|
+
super(connection, "mysql");
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
/** The control driver descriptor of MySQL, or of a target that extends it, whose drivers carry `targetId`. */
|
|
56
|
+
function createMysqlControlDriverDescriptor(targetId) {
|
|
57
|
+
return {
|
|
58
|
+
...mysqlDriverDescriptorMetaFor(targetId),
|
|
59
|
+
create: (url, options) => connectControlDriver(url, options, (connection) => new MysqlControlDriverFor(connection, targetId))
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
async function connectControlDriver(url, options, driverFor) {
|
|
63
|
+
const connectionOptions = mysqlConnectionOptions(url, { connectTimeoutMs: options?.connectTimeoutMs });
|
|
64
|
+
const settings = sessionSettingsStatement(options?.sessionSettings ?? {});
|
|
65
|
+
try {
|
|
66
|
+
const connection = await createConnection(connectionOptions);
|
|
67
|
+
if (settings !== void 0) await applySessionSettings(connection, settings).catch(async (error) => {
|
|
68
|
+
await connection.end().catch(() => {});
|
|
69
|
+
throw error;
|
|
70
|
+
});
|
|
71
|
+
return driverFor(connection);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
const normalized = normalizeMysqlError(error);
|
|
74
|
+
throw errorRuntime("DRIVER.CONNECTION_FAILED", "Database connection failed", {
|
|
75
|
+
why: normalized instanceof Error ? normalized.message : String(normalized),
|
|
76
|
+
fix: connectionFix(error) ?? "Verify the database URL, ensure the database is reachable, and confirm credentials/permissions",
|
|
77
|
+
meta: { ...redactDatabaseUrl(url) },
|
|
78
|
+
cause: error
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const mysqlDriverDescriptor = {
|
|
83
|
+
...mysqlDriverDescriptorMetaFor("mysql"),
|
|
84
|
+
create: (url, options) => connectControlDriver(url, options, (connection) => new MysqlControlDriver(connection))
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { createMysqlControlDriverDescriptor as n, mysqlDriverDescriptor as r, MysqlControlDriver as t };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=control-BiZaCqna.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-BiZaCqna.mjs","names":["#lost"],"sources":["../../../../3-targets/mysql/1-mysql/3-driver/dist/control.mjs"],"sourcesContent":["import { c as isFatal, d as mysqlConnectionOptions, i as sessionSettingsStatement, l as normalizeMysqlError, m as acquireClientQueryLock, o as connectionFix, r as applySessionSettings, s as connectionLost, t as statementFor, u as mysqlDriverDescriptorMetaFor } from \"./statement-CT5tB4uX.mjs\";\nimport { errorRuntime } from \"@internal/errors/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { redactDatabaseUrl } from \"@internal/utils/redact-db-url\";\nimport { createConnection } from \"mariadb\";\n//#region src/core/migrations/control-driver.ts\n/**\n* A connection for the control plane of MySQL, or of a target that extends it, carrying that target's id. It runs every statement as the runtime driver does, a user's `rawSql` migration step included: in one round trip over the text protocol, the package writing its values into it, one at a time in the order sent, under the runtime driver's per-client lock.\n*/\nvar MysqlControlDriverFor = class {\n\tconnection;\n\ttargetId;\n\tfamilyId = \"sql\";\n\t#lost;\n\tconstructor(connection, targetId) {\n\t\tthis.connection = connection;\n\t\tthis.targetId = targetId;\n\t\tconnection.on(\"error\", (error) => {\n\t\t\tthis.#lost = error;\n\t\t});\n\t}\n\t/** Runs `sql` and returns its rows, every column as text and a binary column as bytes. */\n\tasync query(sql, params) {\n\t\tconst releaseLock = await acquireClientQueryLock(this.connection);\n\t\ttry {\n\t\t\tif (this.#lost !== void 0) throw connectionLost(this.#lost);\n\t\t\tconst statement = statementFor(this.connection, sql, params ?? []);\n\t\t\tconst result = await this.connection.query(statement.sql, statement.values);\n\t\t\treturn { rows: Array.isArray(result) ? blindCast([...result]) : [] };\n\t\t} catch (error) {\n\t\t\tif (error instanceof Error && isFatal(error)) {\n\t\t\t\tthis.#lost = error;\n\t\t\t\tthrow connectionLost(error);\n\t\t\t}\n\t\t\tthrow normalizeMysqlError(error);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t}\n\t}\n\tasync databaseName() {\n\t\tconst { rows } = await this.query(\"SELECT DATABASE() AS name\");\n\t\tconst name = rows[0]?.name;\n\t\treturn typeof name === \"string\" && name.length > 0 ? name : void 0;\n\t}\n\tasync close() {\n\t\tawait this.connection.end().catch(() => {});\n\t}\n};\n/** A MySQL connection for the control plane. */\nvar MysqlControlDriver = class extends MysqlControlDriverFor {\n\tconstructor(connection) {\n\t\tsuper(connection, \"mysql\");\n\t}\n};\n/** The control driver descriptor of MySQL, or of a target that extends it, whose drivers carry `targetId`. */\nfunction createMysqlControlDriverDescriptor(targetId) {\n\treturn {\n\t\t...mysqlDriverDescriptorMetaFor(targetId),\n\t\tcreate: (url, options) => connectControlDriver(url, options, (connection) => new MysqlControlDriverFor(connection, targetId))\n\t};\n}\nasync function connectControlDriver(url, options, driverFor) {\n\tconst connectionOptions = mysqlConnectionOptions(url, { connectTimeoutMs: options?.connectTimeoutMs });\n\tconst settings = sessionSettingsStatement(options?.sessionSettings ?? {});\n\ttry {\n\t\tconst connection = await createConnection(connectionOptions);\n\t\tif (settings !== void 0) await applySessionSettings(connection, settings).catch(async (error) => {\n\t\t\tawait connection.end().catch(() => {});\n\t\t\tthrow error;\n\t\t});\n\t\treturn driverFor(connection);\n\t} catch (error) {\n\t\tconst normalized = normalizeMysqlError(error);\n\t\tthrow errorRuntime(\"DRIVER.CONNECTION_FAILED\", \"Database connection failed\", {\n\t\t\twhy: normalized instanceof Error ? normalized.message : String(normalized),\n\t\t\tfix: connectionFix(error) ?? \"Verify the database URL, ensure the database is reachable, and confirm credentials/permissions\",\n\t\t\tmeta: { ...redactDatabaseUrl(url) },\n\t\t\tcause: error\n\t\t});\n\t}\n}\nconst mysqlDriverDescriptor = {\n\t...mysqlDriverDescriptorMetaFor(\"mysql\"),\n\tcreate: (url, options) => connectControlDriver(url, options, (connection) => new MysqlControlDriver(connection))\n};\n//#endregion\nexport { MysqlControlDriver, createMysqlControlDriverDescriptor, mysqlDriverDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;AASA,IAAI,wBAAwB,MAAM;CACjC;CACA;CACA,WAAW;CACX;CACA,YAAY,YAAY,UAAU;EACjC,KAAK,aAAa;EAClB,KAAK,WAAW;EAChB,WAAW,GAAG,UAAU,UAAU;GACjC,KAAKA,QAAQ;EACd,CAAC;CACF;;CAEA,MAAM,MAAM,KAAK,QAAQ;EACxB,MAAM,cAAc,MAAM,uBAAuB,KAAK,UAAU;EAChE,IAAI;GACH,IAAI,KAAKA,UAAU,KAAK,GAAG,MAAM,eAAe,KAAKA,KAAK;GAC1D,MAAM,YAAY,aAAa,KAAK,YAAY,KAAK,UAAU,CAAC,CAAC;GACjE,MAAM,SAAS,MAAM,KAAK,WAAW,MAAM,UAAU,KAAK,UAAU,MAAM;GAC1E,OAAO,EAAE,MAAM,MAAM,QAAQ,MAAM,IAAI,UAAU,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE;EACpE,SAAS,OAAO;GACf,IAAI,iBAAiB,SAAS,QAAQ,KAAK,GAAG;IAC7C,KAAKA,QAAQ;IACb,MAAM,eAAe,KAAK;GAC3B;GACA,MAAM,oBAAoB,KAA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