@prisma/orm-target-mysql 8.0.0-rc.24-dev.27 → 8.0.0-rc.24-dev.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-D4QpAe2i.d.mts +374 -0
- package/dist/adapter-D4QpAe2i.d.mts.map +1 -0
- package/dist/adapter.d.mts +8 -6
- package/dist/adapter.mjs +5 -3
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__codec-types.d.mts +2 -2
- package/dist/adapter__control.d.mts +1 -1
- package/dist/adapter__control.mjs +1 -1
- package/dist/adapter__runtime.d.mts +2 -2
- package/dist/adapter__runtime.mjs +2 -501
- package/dist/adapter__sql-renderer.d.mts +3 -0
- package/dist/adapter__sql-renderer.mjs +2 -0
- package/dist/aggregates-BK8qyA2x.d.mts +164 -0
- package/dist/aggregates-BK8qyA2x.d.mts.map +1 -0
- package/dist/aggregates-Bk6CCgQ-.mjs +145 -0
- package/dist/aggregates-Bk6CCgQ-.mjs.map +1 -0
- package/dist/codec-descriptor-B1fMmxOK-D59zKJws.d.mts +1 -0
- package/dist/{codec-descriptor-3xp1XvVH-DfPKpYeP.mjs → codec-descriptor-ByN7iIha-48yW7oDN.mjs} +23 -16
- package/dist/codec-descriptor-ByN7iIha-48yW7oDN.mjs.map +1 -0
- package/dist/codec-descriptor-CqM_hQjY.d.mts +2 -0
- package/dist/{codec-descriptor-DXyubAS6-XDBj6Yet.d.mts → codec-descriptor-DXsJwUng-D4abEAFs.d.mts} +10 -5
- package/dist/codec-descriptor-DXsJwUng-D4abEAFs.d.mts.map +1 -0
- package/dist/codec-ids-DHeJ2SMJ-Uz1FAFmQ.d.mts +26 -0
- package/dist/codec-ids-DHeJ2SMJ-Uz1FAFmQ.d.mts.map +1 -0
- package/dist/codec-ids-DuWt4aOn-DiyLf9dW.mjs +26 -0
- package/dist/codec-ids-DuWt4aOn-DiyLf9dW.mjs.map +1 -0
- package/dist/codec-types-BQBBUlf_.d.mts +1 -0
- package/dist/{codec-types-Bai_CFkk-DmZ74URd.d.mts → codec-types-C4Q_JJgX-CUPkvPDx.d.mts} +11 -5
- package/dist/codec-types-C4Q_JJgX-CUPkvPDx.d.mts.map +1 -0
- package/dist/codec-types-DxSSgcpB.d.mts +1 -0
- package/dist/{codecs-BMidk26M-B_iWNti6.d.mts → codecs-D35fqdXJ-BZwilYUu.d.mts} +115 -7
- package/dist/codecs-D35fqdXJ-BZwilYUu.d.mts.map +1 -0
- package/dist/{codecs-CIJRyUd3.d.mts → codecs-DTfUoamS.d.mts} +3 -3
- package/dist/{codecs-CIJRyUd3.d.mts.map → codecs-DTfUoamS.d.mts.map} +1 -1
- package/dist/{codecs-wVJlFapM.mjs → codecs-DVX-3El1.mjs} +429 -12
- package/dist/codecs-DVX-3El1.mjs.map +1 -0
- package/dist/{control-Dj8nIA1M.d.mts → control-B7v7zc3l.d.mts} +272 -13
- package/dist/control-B7v7zc3l.d.mts.map +1 -0
- package/dist/{control-D7_IpeiU.d.mts → control-BFe8NrSk.d.mts} +22 -5
- package/dist/control-BFe8NrSk.d.mts.map +1 -0
- package/dist/{control-BiZaCqna.mjs → control-BTolgwH5.mjs} +28 -13
- package/dist/control-BTolgwH5.mjs.map +1 -0
- package/dist/{control-CTfV1Zag.mjs → control-CZSBblPm.mjs} +26 -19
- package/dist/control-CZSBblPm.mjs.map +1 -0
- package/dist/{control-WNuLF2Wh.d.mts → control-DqJJGh-5.d.mts} +3 -3
- package/dist/control-DqJJGh-5.d.mts.map +1 -0
- package/dist/{control-RYDTbndD.mjs → control-DtXS4WsY.mjs} +9 -14
- package/dist/control-DtXS4WsY.mjs.map +1 -0
- package/dist/data-type-entries-DlbQ1Bvl-BFkHeHVz.mjs +108 -0
- package/dist/data-type-entries-DlbQ1Bvl-BFkHeHVz.mjs.map +1 -0
- package/dist/{data-types-65iVc7q1.d.mts → data-types-COQT9bVG.d.mts} +2 -2
- package/dist/data-types-COQT9bVG.d.mts.map +1 -0
- package/dist/data-types-CU_43cNv-CQ8eHx3H.mjs +461 -0
- package/dist/data-types-CU_43cNv-CQ8eHx3H.mjs.map +1 -0
- package/dist/{data-types-D2HAT-Qf-CSdDz1Pk.d.mts → data-types-C_vInIbm-Gt1XINav.d.mts} +58 -4
- package/dist/data-types-C_vInIbm-Gt1XINav.d.mts.map +1 -0
- package/dist/{date-time-now-generators-BKakW3gd-CIFPuRdM.mjs → date-time-now-generators-Cx_aQTSw-ay1tlvw6.mjs} +4 -15
- package/dist/date-time-now-generators-Cx_aQTSw-ay1tlvw6.mjs.map +1 -0
- package/dist/default-normalizer-C9c043DP-DPhwJOC4.mjs +175 -0
- package/dist/default-normalizer-C9c043DP-DPhwJOC4.mjs.map +1 -0
- package/dist/default-normalizer-zXWtDBp_.d.mts +31 -0
- package/dist/default-normalizer-zXWtDBp_.d.mts.map +1 -0
- package/dist/{descriptor-meta-e29H69KN-t-S8_DYh.mjs → descriptor-meta-BFQUMwkh-Bc3o-ZMV.mjs} +19 -12
- package/dist/descriptor-meta-BFQUMwkh-Bc3o-ZMV.mjs.map +1 -0
- package/dist/{descriptor-meta-BF6YvSag-ChHHvlHc.mjs → descriptor-meta-BHSEcFWR-41BcRcOy.mjs} +219 -25
- package/dist/descriptor-meta-BHSEcFWR-41BcRcOy.mjs.map +1 -0
- package/dist/descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs +17 -0
- package/dist/descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs.map +1 -0
- package/dist/descriptor-meta-runtime-DEKunXiL.d.mts +22 -0
- package/dist/descriptor-meta-runtime-DEKunXiL.d.mts.map +1 -0
- package/dist/driver.d.mts +3 -3
- package/dist/driver.mjs +2 -2
- package/dist/driver__control.d.mts +2 -2
- package/dist/driver__control.mjs +1 -1
- package/dist/driver__runtime.d.mts +2 -2
- package/dist/driver__runtime.mjs +1 -1
- package/dist/{errors-DjCkC9IM.d.mts → errors-B81Qeu5_.d.mts} +3 -2
- package/dist/errors-B81Qeu5_.d.mts.map +1 -0
- package/dist/{errors-Cng94tYg-DTH51xWG.mjs → errors-CWtFTnst-xBLJ-9Lp.mjs} +43 -17
- package/dist/errors-CWtFTnst-xBLJ-9Lp.mjs.map +1 -0
- package/dist/{marker-lock-Bwew7cAs-ElLxlCQp.mjs → marker-lock-B7CyXf2F-CakjZnQP.mjs} +3 -3
- package/dist/{marker-lock-Bwew7cAs-ElLxlCQp.mjs.map → marker-lock-B7CyXf2F-CakjZnQP.mjs.map} +1 -1
- package/dist/{marker-read-D1hp62hF-3-4fEgDD.mjs → marker-read-D1hp62hF-BSXs2TVo.mjs} +3 -3
- package/dist/{marker-read-D1hp62hF-3-4fEgDD.mjs.map → marker-read-D1hp62hF-BSXs2TVo.mjs.map} +1 -1
- package/dist/{migration-DILkj7kB.d.mts → migration-O-3NHVlW.d.mts} +2 -5
- package/dist/migration-O-3NHVlW.d.mts.map +1 -0
- package/dist/{mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs → mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs} +4 -4
- package/dist/{mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs.map → mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs.map} +1 -1
- package/dist/{mysql-database-CHl9-oSL-B1arvq6Q.mjs → mysql-database-ByniOtau-BKBIGgSm.mjs} +45 -17
- package/dist/mysql-database-ByniOtau-BKBIGgSm.mjs.map +1 -0
- package/dist/{now-expression-DVD18CUc-DJqdZY96.mjs → now-expression-DDHpZL6o-Ixs-vg-B.mjs} +3 -3
- package/dist/{now-expression-DVD18CUc-DJqdZY96.mjs.map → now-expression-DDHpZL6o-Ixs-vg-B.mjs.map} +1 -1
- package/dist/{pack-CqULIal0.d.mts → pack-C5_g-3YX.d.mts} +272 -11
- package/dist/{pack-CqULIal0.d.mts.map → pack-C5_g-3YX.d.mts.map} +1 -1
- package/dist/{require-temporal-DeDQhbTn-CdpjEWCB.mjs → require-temporal-DDdrgVtL-VOKxTqhD.mjs} +3 -3
- package/dist/{require-temporal-DeDQhbTn-CdpjEWCB.mjs.map → require-temporal-DDdrgVtL-VOKxTqhD.mjs.map} +1 -1
- package/dist/{runner-DEKKxDyw-Cdo1Ysod.mjs → runner-IjNtlp_v-DLCqpSh5.mjs} +68 -72
- package/dist/runner-IjNtlp_v-DLCqpSh5.mjs.map +1 -0
- package/dist/runtime-Bw6vKz9t.mjs +96 -0
- package/dist/runtime-Bw6vKz9t.mjs.map +1 -0
- package/dist/{runtime-DB0w8R7i.mjs → runtime-CHWztV6c.mjs} +66 -46
- package/dist/runtime-CHWztV6c.mjs.map +1 -0
- package/dist/{runtime-DN20lWEg.d.mts → runtime-CQ1V-8Yh.d.mts} +11 -4
- package/dist/runtime-CQ1V-8Yh.d.mts.map +1 -0
- package/dist/{runtime-CbqytTbM.d.mts → runtime-Ci3hPz1j.d.mts} +16 -5
- package/dist/runtime-Ci3hPz1j.d.mts.map +1 -0
- package/dist/{runtime-DUDdsFyy.mjs → runtime-_c_DZuYR.mjs} +18 -13
- package/dist/runtime-_c_DZuYR.mjs.map +1 -0
- package/dist/runtime-dn4-kzZV.d.mts +43 -0
- package/dist/runtime-dn4-kzZV.d.mts.map +1 -0
- package/dist/sql-renderer-CrnJ8cCo.d.mts +1 -0
- package/dist/sql-renderer-DfPaqPkD-DFaweHvr.mjs +501 -0
- package/dist/sql-renderer-DfPaqPkD-DFaweHvr.mjs.map +1 -0
- package/dist/sql-renderer-fnDhRUHs-CcsyIaZ4.d.mts +95 -0
- package/dist/sql-renderer-fnDhRUHs-CcsyIaZ4.d.mts.map +1 -0
- package/dist/{sql-utils-Cmv_TVa8-CNW3UmfQ.mjs → sql-utils-CveZhawQ-B2QmUlY0.mjs} +3 -3
- package/dist/{sql-utils-Cmv_TVa8-CNW3UmfQ.mjs.map → sql-utils-CveZhawQ-B2QmUlY0.mjs.map} +1 -1
- package/dist/{sql-utils-BE8tDXHs.mjs → sql-utils-DVH8boEI.mjs} +3 -6
- package/dist/sql-utils-DVH8boEI.mjs.map +1 -0
- package/dist/{statement-CT5tB4uX-CHqHFM3z.mjs → statement-a2Eekpu6-BDJa255m.mjs} +73 -67
- package/dist/statement-a2Eekpu6-BDJa255m.mjs.map +1 -0
- package/dist/target.d.mts +18 -16
- package/dist/target.mjs +21 -19
- package/dist/target__aggregates.d.mts +2 -0
- package/dist/target__aggregates.mjs +2 -0
- package/dist/target__codec-descriptor.d.mts +2 -2
- package/dist/target__codec-descriptor.mjs +1 -1
- package/dist/target__codec-ids.d.mts +2 -2
- package/dist/target__codec-ids.mjs +2 -2
- 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__control.d.mts +1 -1
- package/dist/target__control.mjs +2 -2
- package/dist/target__data-types.d.mts +3 -3
- package/dist/target__data-types.mjs +3 -3
- package/dist/target__default-normalizer.d.mts +2 -2
- package/dist/target__default-normalizer.mjs +2 -2
- package/dist/target__descriptor-meta-runtime.d.mts +2 -0
- package/dist/target__descriptor-meta-runtime.mjs +2 -0
- package/dist/target__errors.d.mts +1 -1
- package/dist/target__errors.mjs +1 -1
- package/dist/target__marker-lock.mjs +1 -1
- package/dist/target__migration.d.mts +1 -1
- package/dist/target__migration.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +4 -4
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.mjs +1 -1
- package/package.json +13 -10
- package/dist/adapter-1Kd67Gfa.d.mts +0 -66
- package/dist/adapter-1Kd67Gfa.d.mts.map +0 -1
- package/dist/adapter__runtime.mjs.map +0 -1
- package/dist/codec-descriptor-3xp1XvVH-DfPKpYeP.mjs.map +0 -1
- package/dist/codec-descriptor-BRcKIX3h.d.mts +0 -2
- package/dist/codec-descriptor-DXyubAS6-XDBj6Yet.d.mts.map +0 -1
- package/dist/codec-descriptor-J3TP08l8-BmdgkIU6.d.mts +0 -1
- package/dist/codec-ids-CrR9Xi7r-CjbGCS3o.mjs +0 -20
- package/dist/codec-ids-CrR9Xi7r-CjbGCS3o.mjs.map +0 -1
- package/dist/codec-ids-Dgh5IpML-DGXIq6j8.d.mts +0 -20
- package/dist/codec-ids-Dgh5IpML-DGXIq6j8.d.mts.map +0 -1
- package/dist/codec-types-BS-lWfda.d.mts +0 -1
- package/dist/codec-types-Bai_CFkk-DmZ74URd.d.mts.map +0 -1
- package/dist/codec-types-Dk2h5dBB.d.mts +0 -1
- package/dist/codecs-BMidk26M-B_iWNti6.d.mts.map +0 -1
- package/dist/codecs-wVJlFapM.mjs.map +0 -1
- package/dist/control-BiZaCqna.mjs.map +0 -1
- package/dist/control-CTfV1Zag.mjs.map +0 -1
- package/dist/control-D7_IpeiU.d.mts.map +0 -1
- package/dist/control-Dj8nIA1M.d.mts.map +0 -1
- package/dist/control-RYDTbndD.mjs.map +0 -1
- package/dist/control-WNuLF2Wh.d.mts.map +0 -1
- package/dist/data-type-entries-C7VH2IHc-DM6TbTaz.mjs +0 -59
- package/dist/data-type-entries-C7VH2IHc-DM6TbTaz.mjs.map +0 -1
- package/dist/data-types-65iVc7q1.d.mts.map +0 -1
- package/dist/data-types-D2HAT-Qf-CSdDz1Pk.d.mts.map +0 -1
- package/dist/data-types-DOaaPS93-lycGybNk.mjs +0 -289
- package/dist/data-types-DOaaPS93-lycGybNk.mjs.map +0 -1
- package/dist/date-time-now-generators-BKakW3gd-CIFPuRdM.mjs.map +0 -1
- package/dist/default-normalizer-C8pc7SbL-BXd70q02.mjs +0 -100
- package/dist/default-normalizer-C8pc7SbL-BXd70q02.mjs.map +0 -1
- package/dist/default-normalizer-D-8Ii0df.d.mts +0 -27
- package/dist/default-normalizer-D-8Ii0df.d.mts.map +0 -1
- package/dist/descriptor-meta-BF6YvSag-ChHHvlHc.mjs.map +0 -1
- package/dist/descriptor-meta-e29H69KN-t-S8_DYh.mjs.map +0 -1
- package/dist/errors-Cng94tYg-DTH51xWG.mjs.map +0 -1
- package/dist/errors-DjCkC9IM.d.mts.map +0 -1
- package/dist/migration-DILkj7kB.d.mts.map +0 -1
- package/dist/mysql-database-CHl9-oSL-B1arvq6Q.mjs.map +0 -1
- package/dist/runner-DEKKxDyw-Cdo1Ysod.mjs.map +0 -1
- package/dist/runtime-CbqytTbM.d.mts.map +0 -1
- package/dist/runtime-Cm-T3hbP.d.mts +0 -29
- package/dist/runtime-Cm-T3hbP.d.mts.map +0 -1
- package/dist/runtime-DB0w8R7i.mjs.map +0 -1
- package/dist/runtime-DN20lWEg.d.mts.map +0 -1
- package/dist/runtime-DUDdsFyy.mjs.map +0 -1
- package/dist/sql-utils-BE8tDXHs.mjs.map +0 -1
- package/dist/statement-CT5tB4uX-CHqHFM3z.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-BHSEcFWR-41BcRcOy.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-BHSEcFWR.mjs"],"sourcesContent":["import { _ as MYSQL_TIMESTAMP_DATE_CODEC_ID, a as MYSQL_DATETIME_STRING_CODEC_ID, b as MYSQL_TIME_STRING_CODEC_ID, c as MYSQL_DATE_TEMPORAL_CODEC_ID, d as MYSQL_DURATION_STRING_CODEC_ID, g as MYSQL_TEXT_CODEC_ID, h as MYSQL_LONGBLOB_CODEC_ID, i as MYSQL_DATETIME_CODEC_ID, l as MYSQL_DECIMAL_CODEC_ID, m as MYSQL_JSON_CODEC_ID, n as MYSQL_BIGINT_NUMBER_CODEC_ID, o as MYSQL_DATETIME_TEMPORAL_CODEC_ID, p as MYSQL_INT_CODEC_ID, r as MYSQL_BOOLEAN_CODEC_ID, s as MYSQL_DATE_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_DOUBLE_CODEC_ID, v as MYSQL_TIMESTAMP_STRING_CODEC_ID, x as MYSQL_TIME_TEMPORAL_CODEC_ID, y as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID } from \"./codec-ids-DuWt4aOn.mjs\";\nimport { N as mysqlTextDataTypes, O as mysqlInt, r as MYSQL_WIDEST_DECIMAL } from \"./data-types-CU_43cNv.mjs\";\nimport { t as mysqlDataTypeEntries } from \"./data-type-entries-DlbQ1Bvl.mjs\";\nimport { t as mysqlTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-BaIF7fOE.mjs\";\nimport { t as mysqlNowGenerators } from \"./date-time-now-generators-Cx_aQTSw.mjs\";\nimport { SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from \"@internal/family-sql/pack\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID } from \"@internal/type-implementations/now\";\n//#region src/core/authoring.ts\n/** The type constructors whose arguments are sizes, which take values of `mysql/int`, and the created-at and updated-at aliases on the type a bare `DateTime` becomes: a `datetime(3)` column read as a JavaScript `Date`. */\nconst mysqlAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: \"mysql/int\" }),\n\ttemporal: /* @__PURE__ */ temporalTypeAliases({\n\t\tcodecId: MYSQL_DATETIME_CODEC_ID,\n\t\ttypeParams: { precision: 3 }\n\t}, \"a JavaScript Date\")\n};\n//#endregion\n//#region src/core/generator-functions.ts\n/** The \"now\" generator for each codec that has one. The `now` generator function binds it. */\nconst mysqlNowGeneratorIds = {\n\t[MYSQL_DATETIME_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[MYSQL_DATETIME_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[MYSQL_DATETIME_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_DATE_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_DATE_STRING_CODEC_ID]: DATE_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_DATE_TEMPORAL_CODEC_ID]: PLAIN_DATE_NOW_GENERATOR_ID,\n\t[MYSQL_TIME_STRING_CODEC_ID]: TIME_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_TIME_TEMPORAL_CODEC_ID]: PLAIN_TIME_NOW_GENERATOR_ID\n};\n/** The generators that round down to the column's fraction digits, 0 for a bare type. */\nconst takesPrecision = /* @__PURE__ */ new Set([\n\tINSTANT_NOW_GENERATOR_ID,\n\tINSTANT_STRING_NOW_GENERATOR_ID,\n\tPLAIN_TIME_NOW_GENERATOR_ID,\n\tTIME_STRING_NOW_GENERATOR_ID\n]);\n/** The fraction digits a `Date` holds: `timestampNow` takes a precision only below them, so a column of 3 or more, such as a bare `DateTime`, keeps a contract with no generator params. */\nconst DATE_FRACTION_DIGITS = 3;\nfunction nowParams(generatorId, typeParams) {\n\tconst written = typeParams?.[\"precision\"];\n\tconst precision = typeof written === \"number\" ? written : 0;\n\tif (takesPrecision.has(generatorId)) return { precision };\n\tif (generatorId === TIMESTAMP_NOW_GENERATOR_ID && precision < DATE_FRACTION_DIGITS) return { precision };\n}\nconst mysqlGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: mysqlInt.id }),\n\t{\n\t\tname: \"now\",\n\t\tbindings: Object.entries(mysqlNowGeneratorIds).map(([codecId, generatorId]) => singleGeneratorBinding({\n\t\t\tcodecIds: [codecId],\n\t\t\tgeneratorId,\n\t\t\tparamsFromField: (column) => nowParams(generatorId, column.typeParams)\n\t\t}))\n\t},\n\t...idGeneratorFunctionBindings({ text: [MYSQL_TEXT_CODEC_ID] })\n];\n/** The `now` generators MySQL binds. The SQL family registers the identifier generators. */\nconst mysqlGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }, ...mysqlNowGenerators.map(({ id }) => ({ id }))];\n/** The type of a size argument, `precision`, `scale` or `length`: an int, as for the family's `sql.Varchar(length)`. */\nconst MYSQL_SIZE_TYPE = \"mysql/int\";\nconst precision = {\n\tkind: \"value\",\n\tdataType: MYSQL_SIZE_TYPE,\n\tname: \"precision\",\n\toptional: true\n};\nconst scale = {\n\tkind: \"value\",\n\tdataType: MYSQL_SIZE_TYPE,\n\tname: \"scale\",\n\toptional: true\n};\nconst length = {\n\tkind: \"value\",\n\tdataType: MYSQL_SIZE_TYPE,\n\tname: \"length\"\n};\n/** The precision and scale of `Decimal` where they are not written: the widest decimal, the column Prisma ORM 7 created. MySQL's own bare `decimal` is `decimal(10,0)`, which holds no digits after the point. Each is filled on its own, so `Decimal(precision: 40)` is `decimal(40,30)`. */\nconst MYSQL_DECIMAL_DEFAULTS = MYSQL_WIDEST_DECIMAL;\n/**\n* MySQL's explicit scalar types other than the date and time types. Each is named after the MySQL column type that stores it, plus the application value where that column type is read by more than one codec (`Int8BigInt` and `Int8Number`). Where that name would be a convenience name, the explicit type takes MySQL's own second name for the column type, as PostgreSQL's explicit types do: `Int4`, `Int8…`, `Float8`, `NumericString` and `Bool`. A JSON column's explicit type is `PlainJson`, as on every target. ADR 322.\n*/\nconst mysqlExplicitScalarTypes = {\n\tInt4: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 32-bit integer stored as MySQL int and represented as a JavaScript number.\",\n\t\toutput: { codecId: MYSQL_INT_CODEC_ID }\n\t},\n\tInt8BigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: MYSQL_BIGINT_CODEC_ID }\n\t},\n\tInt8Number: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript number within its safe integer range.\",\n\t\toutput: { codecId: MYSQL_BIGINT_NUMBER_CODEC_ID }\n\t},\n\tFloat8: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A double-precision floating-point number stored as MySQL double and represented as a JavaScript number.\",\n\t\toutput: { codecId: MYSQL_DOUBLE_CODEC_ID }\n\t},\n\tNumericString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"An exact decimal number stored as MySQL decimal and represented as decimal text, with every digit the column holds after the point: 1.5 in a decimal(10,2) reads \\\"1.50\\\". `precision` is the digits the column holds, at most 65, and `scale` the digits after the point, at most 30; MySQL holds decimal(10,0) when neither is written.\",\n\t\targs: [precision, scale],\n\t\toutput: {\n\t\t\tcodecId: MYSQL_DECIMAL_CODEC_ID,\n\t\t\ttypeParams: {\n\t\t\t\tprecision: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0\n\t\t\t\t},\n\t\t\t\tscale: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tVarchar: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Text of at most `length` characters, stored as MySQL varchar. A column of at most 191 characters can be indexed.\",\n\t\targs: [length],\n\t\toutput: {\n\t\t\tcodecId: SQL_VARCHAR_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tText: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Text of up to 65,535 bytes, stored as MySQL text. MySQL cannot index a text column without a prefix length.\",\n\t\toutput: { codecId: MYSQL_TEXT_CODEC_ID }\n\t},\n\tBool: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A boolean stored as MySQL tinyint(1) holding 0 or 1 and represented as a JavaScript boolean. A stored value other than 0 or 1 fails to read.\",\n\t\toutput: { codecId: MYSQL_BOOLEAN_CODEC_ID }\n\t},\n\tLongblob: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"Bytes stored as MySQL longblob and represented as a Uint8Array. MySQL cannot index a longblob column without a prefix length.\",\n\t\toutput: { codecId: MYSQL_LONGBLOB_CODEC_ID }\n\t},\n\tPlainJson: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A JSON document stored as MySQL json, which MariaDB stores as longtext with a json_valid check, and represented as the JSON value. A json column has no equality filter and no ordering.\",\n\t\toutput: { codecId: MYSQL_JSON_CODEC_ID }\n\t}\n};\nfunction storageOption(storage) {\n\treturn {\n\t\tkind: \"option\",\n\t\tname: \"storage\",\n\t\tvalues: [storage],\n\t\tdefault: storage,\n\t\toptional: true\n\t};\n}\n/**\n* The convenience types of MySQL's scalars. Each is a type choice: `storage` names the MySQL column type that stores the value and, for `BigInt`, `as` chooses the application value; `precision`, `scale` and `length` are passed on to the explicit type chosen. A bare name gives the column it gave before these were type choices, which is the column Prisma ORM 7 created. ADR 279, ADR 322.\n*/\nconst mysqlConvenienceScalarTypes = {\n\tInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer read as a JavaScript number, stored as MySQL int, a signed 32-bit integer.\",\n\t\targs: [storageOption(\"int\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"int\" },\n\t\t\ttype: \"Int4\"\n\t\t}]\n\t},\n\tBigInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A signed 64-bit integer, stored as MySQL bigint. `as` is what the application reads: bigint, or number within the safe integer range.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"bigint\", \"number\"],\n\t\t\tdefault: \"bigint\",\n\t\t\toptional: true\n\t\t}, storageOption(\"bigint\")],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"bigint\",\n\t\t\t\tstorage: \"bigint\"\n\t\t\t},\n\t\t\ttype: \"Int8BigInt\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"number\",\n\t\t\t\tstorage: \"bigint\"\n\t\t\t},\n\t\t\ttype: \"Int8Number\"\n\t\t}]\n\t},\n\tFloat: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A floating-point number, stored as MySQL double, a double-precision float, which holds every JavaScript number but NaN and the infinities; -0 is written as 0.\",\n\t\targs: [storageOption(\"double\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"double\" },\n\t\t\ttype: \"Float8\"\n\t\t}]\n\t},\n\tDecimal: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: `An exact decimal number, read as decimal text with every digit the column holds after the point, such as \"12.50\" in a decimal(10,2). \\`storage\\` is decimal, of \\`precision\\` digits, \\`scale\\` of them after the point: decimal(${MYSQL_DECIMAL_DEFAULTS.precision},${MYSQL_DECIMAL_DEFAULTS.scale}) unless written.`,\n\t\targs: [\n\t\t\tstorageOption(\"decimal\"),\n\t\t\tprecision,\n\t\t\tscale\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"decimal\" },\n\t\t\ttype: \"NumericString\",\n\t\t\tdefaults: MYSQL_DECIMAL_DEFAULTS\n\t\t}]\n\t},\n\tString: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: `Text. \\`storage\\` is varchar, of at most \\`length\\` characters, 191 unless written, so that it can be indexed; or text, of up to 65,535 bytes, which cannot be indexed without a prefix length.`,\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"varchar\", \"text\"],\n\t\t\tdefault: \"varchar\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\t...length,\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"varchar\" },\n\t\t\ttype: \"Varchar\",\n\t\t\tdefaults: { length: 191 }\n\t\t}, {\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"Text\"\n\t\t}]\n\t},\n\tBoolean: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A boolean, stored as MySQL tinyint(1) holding 0 or 1, which is what MySQL writes for TRUE and FALSE.\",\n\t\targs: [storageOption(\"tinyint\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"tinyint\" },\n\t\t\ttype: \"Bool\"\n\t\t}]\n\t},\n\tBytes: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Bytes, read as a Uint8Array, stored as MySQL longblob, which holds up to 4 GB and cannot be indexed without a prefix length.\",\n\t\targs: [storageOption(\"longblob\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"longblob\" },\n\t\t\ttype: \"Longblob\"\n\t\t}]\n\t},\n\tJson: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A JSON document, read as the JSON value it holds, stored as MySQL json. It has no equality filter and no ordering. MySQL sorts the keys of a stored object; MariaDB keeps the text as written.\",\n\t\targs: [storageOption(\"json\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"json\" },\n\t\t\ttype: \"PlainJson\"\n\t\t}]\n\t}\n};\n/** The explicit type `codecId`, whose `precision` argument is the number of fraction digits its column holds, 0 to 6; MySQL holds 0 when none is written. */\nfunction withPrecision(codecId, documentation) {\n\treturn {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation,\n\t\targs: [precision],\n\t\toutput: {\n\t\t\tcodecId,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t};\n}\n/**\n* The explicit date and time types. Each is named after its MySQL column type, with a suffix for the value the application reads; `DurationString` is stored as `varchar`, since MySQL has no interval type. ADR 315.\n*/\nconst mysqlDateTimeTypeConstructors = {\n\tDatetimeJsDate: {\n\t\t...withPrecision(MYSQL_DATETIME_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as a JavaScript Date. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tDatetimeTemporal: withPrecision(MYSQL_DATETIME_TEMPORAL_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as Temporal.Instant. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDatetimeString: withPrecision(MYSQL_DATETIME_STRING_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as ISO 8601 text in UTC, such as 2024-01-01T00:00:00.5Z. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tTimestampJsDate: {\n\t\t...withPrecision(MYSQL_TIMESTAMP_DATE_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as a JavaScript Date. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tTimestampTemporal: withPrecision(MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as Temporal.Instant. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tTimestampString: withPrecision(MYSQL_TIMESTAMP_STRING_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as ISO 8601 text in UTC, such as 2024-01-01T00:00:00.5Z. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A calendar date stored as MySQL date and represented as ISO 8601 text, such as 2024-02-29.\",\n\t\toutput: { codecId: MYSQL_DATE_STRING_CODEC_ID }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as MySQL date and represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: MYSQL_DATE_TEMPORAL_CODEC_ID }\n\t},\n\tTimeString: {\n\t\t...withPrecision(MYSQL_TIME_STRING_CODEC_ID, \"A time of day stored as MySQL time and represented as ISO 8601 text, such as 09:30:00. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tTimeTemporal: withPrecision(MYSQL_TIME_TEMPORAL_CODEC_ID, \"A time of day stored as MySQL time and represented as Temporal.PlainTime. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDurationString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: `A length of time stored as MySQL varchar(191), so that it can be indexed, and represented as the ISO 8601 duration it was written as, such as PT1H30M.`,\n\t\toutput: {\n\t\t\tcodecId: MYSQL_DURATION_STRING_CODEC_ID,\n\t\t\ttypeParams: { length: 191 }\n\t\t}\n\t}\n};\nconst MICROSECONDS = { precision: 6 };\nconst MILLISECONDS = { precision: 3 };\n/**\n* The convenience date and time types. Each is a type choice: its `as` and `storage` arguments choose the explicit type it becomes, and `precision` is passed on to that type. MySQL holds no fraction of a second in a bare `datetime`, `timestamp` or `time`, so a row that reads a `Date` defaults to milliseconds, which a `Date` holds, and every other row to microseconds, as PostgreSQL's bare types hold. ADR 279, ADR 315.\n*/\nconst mysqlConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time, read and written in UTC. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string, such as \\\"2024-01-01T00:00:00Z\\\". `storage` is datetime, or timestamp, which holds 1970 to 2038.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\n\t\t\t\t\t\"jsDate\",\n\t\t\t\t\t\"temporal\",\n\t\t\t\t\t\"string\"\n\t\t\t\t],\n\t\t\t\tdefault: \"jsDate\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"datetime\", \"timestamp\"],\n\t\t\t\tdefault: \"datetime\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeJsDate\",\n\t\t\t\tdefaults: MILLISECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeTemporal\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeString\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampJsDate\",\n\t\t\t\tdefaults: MILLISECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampTemporal\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampString\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date. `as` is what the application reads: string, such as \\\"2024-02-29\\\", or temporal (Temporal.PlainDate).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"date\"],\n\t\t\tdefault: \"date\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"date\"\n\t\t\t},\n\t\t\ttype: \"DateString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"date\"\n\t\t\t},\n\t\t\ttype: \"DateTemporal\"\n\t\t}]\n\t},\n\tTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A time of day, from 00:00:00 to 23:59:59.999999. `as` is what the application reads: string, such as \\\"09:30:00\\\", or temporal (Temporal.PlainTime).\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"time\"],\n\t\t\t\tdefault: \"time\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"time\"\n\t\t\t},\n\t\t\ttype: \"TimeString\",\n\t\t\tdefaults: MICROSECONDS\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"time\"\n\t\t\t},\n\t\t\ttype: \"TimeTemporal\",\n\t\t\tdefaults: MICROSECONDS\n\t\t}]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: `A length of time, stored as MySQL varchar(191), since MySQL has no interval type. \\`as\\` is what the application reads: string, an ISO 8601 duration such as \"PT1H30M\".`,\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"varchar\"],\n\t\t\tdefault: \"varchar\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"varchar\"\n\t\t\t},\n\t\t\ttype: \"DurationString\"\n\t\t}]\n\t}\n};\n/**\n* The explicit and convenience scalar types, the explicit date and time types and the convenience date and time types. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst mysqlScalarTypeConstructors = {\n\t...mysqlExplicitScalarTypes,\n\t...mysqlConvenienceScalarTypes,\n\t...mysqlDateTimeTypeConstructors,\n\t...mysqlConvenienceDateTimeTypes\n};\nconst mysqlTargetDescriptorMeta = {\n\t...mysqlTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tauthoring: {\n\t\ttype: {\n\t\t\t...mysqlScalarTypeConstructors,\n\t\t\t...mysqlAuthoringTypes\n\t\t},\n\t\tdataTypes: mysqlDataTypeEntries(),\n\t\ttextDataTypes: mysqlTextDataTypes\n\t},\n\tgeneratorFunctions: mysqlGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: mysqlGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { mysqlScal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L;IACC,MAAM;IACN,MAAM;IACN,QAAQ,CAAC,UAAU,UAAU;IAC7B,SAAS;IACT,UAAU;GACX;GACA;IACC,MAAM;IACN,MAAM;IACN,QAAQ,CAAC,MAAM;IACf,SAAS;IACT,UAAU;GACX;GACA;EACD;EACA,SAAS,CAAC;GACT,MAAM;IACL,IAAI;IACJ,SAAS;GACV;GACA,MAAM;GACN,UAAU;EACX,GAAG;GACF,MAAM;IACL,IAAI;IACJ,SAAS;GACV;GACA,MAAM;GACN,UAAU;EACX,CAAC;CACF;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,QAAQ,CAAC,QAAQ;GACjB,SAAS;GACT,UAAU;EACX,GAAG;GACF,MAAM;GACN,MAAM;GACN,QAAQ,CAAC,SAAS;GAClB,SAAS;GACT,UAAU;EACX,CAAC;EACD,SAAS,CAAC;GACT,MAAM;IACL,IAAI;IACJ,SAAS;GACV;GACA,MAAM;EACP,CAAC;CACF;AACD;;;;AAIA,MAAM,8BAA8B;CACnC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACJ;AACA,MAAM,4BAA4B;CACjC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,WAAW,qBAAqB;EAChC,eAAe;CAChB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as mysqlDataTypes } from "./data-types-CU_43cNv-CQ8eHx3H.mjs";
|
|
2
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-runtime-BaIF7fOE.mjs
|
|
3
|
+
const mysqlTargetDescriptorMetaRuntime = {
|
|
4
|
+
kind: "target",
|
|
5
|
+
familyId: "sql",
|
|
6
|
+
targetId: "mysql",
|
|
7
|
+
id: "mysql",
|
|
8
|
+
displayName: "MySQL",
|
|
9
|
+
version: "0.0.1",
|
|
10
|
+
capabilities: {},
|
|
11
|
+
dataTypes: mysqlDataTypes,
|
|
12
|
+
sessionSettings: { time_zone: "+00:00" }
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { mysqlTargetDescriptorMetaRuntime as t };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-runtime-BaIF7fOE-BX9t3rkk.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-runtime-BaIF7fOE.mjs"],"sourcesContent":["import { d as mysqlDataTypes } from \"./data-types-CU_43cNv.mjs\";\nconst mysqlTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"mysql\",\n\tid: \"mysql\",\n\tdisplayName: \"MySQL\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: mysqlDataTypes,\n\tsessionSettings: { time_zone: \"+00:00\" }\n};\n//#endregion\nexport { mysqlTargetDescriptorMetaRuntime as t };\n\n//# sourceMappingURL=descriptor-meta-runtime-BaIF7fOE.mjs.map"],"mappings":";;AACA,MAAM,mCAAmC;CACxC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,aAAa;CACb,SAAS;CACT,cAAc,CAAC;CACf,WAAW;CACX,iBAAiB,EAAE,WAAW,SAAS;AACxC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { t as CodecTypes } from "./codec-types-C4Q_JJgX-CUPkvPDx.mjs";
|
|
2
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-runtime.d.mts
|
|
3
|
+
//#region src/core/descriptor-meta-runtime.d.ts
|
|
4
|
+
declare const mysqlTargetDescriptorMetaRuntimeBase: {
|
|
5
|
+
readonly kind: "target";
|
|
6
|
+
readonly familyId: "sql";
|
|
7
|
+
readonly targetId: "mysql";
|
|
8
|
+
readonly id: "mysql";
|
|
9
|
+
readonly displayName: "MySQL";
|
|
10
|
+
readonly version: "0.0.1";
|
|
11
|
+
readonly capabilities: {};
|
|
12
|
+
readonly dataTypes: readonly import("@prisma/orm-framework/components/codec").DataType[];
|
|
13
|
+
readonly sessionSettings: {
|
|
14
|
+
readonly time_zone: "+00:00";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare const mysqlTargetDescriptorMetaRuntime: typeof mysqlTargetDescriptorMetaRuntimeBase & {
|
|
18
|
+
readonly __codecTypes?: CodecTypes;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { mysqlTargetDescriptorMetaRuntime as t };
|
|
22
|
+
//# sourceMappingURL=descriptor-meta-runtime-DEKunXiL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-runtime-DEKunXiL.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-runtime.d.mts"],"mappings":";;;cAEc;WACH;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;;;cAGC,yCAAyC;WAC5C,eAAe"}
|
package/dist/driver.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as createMysqlControlDriverDescriptor, t as MysqlControlDriver } from "./control-
|
|
2
|
-
import { a as
|
|
3
|
-
export { type MysqlBinding, MysqlControlDriver, type MysqlDriverCreateOptions, type MysqlPoolOptions, type MysqlRuntimeDriver, createMysqlControlDriverDescriptor, createMysqlRuntimeDriverDescriptor };
|
|
1
|
+
import { n as MysqlControlDriverOptions, r as createMysqlControlDriverDescriptor, t as MysqlControlDriver } from "./control-BFe8NrSk.mjs";
|
|
2
|
+
import { a as MysqlRuntimeDriverOptions, i as MysqlRuntimeDriver, n as MysqlDriverCreateOptions, o as createMysqlRuntimeDriverDescriptor, r as MysqlPoolOptions, t as MysqlBinding } from "./runtime-CQ1V-8Yh.mjs";
|
|
3
|
+
export { type MysqlBinding, MysqlControlDriver, type MysqlControlDriverOptions, type MysqlDriverCreateOptions, type MysqlPoolOptions, type MysqlRuntimeDriver, type MysqlRuntimeDriverOptions, createMysqlControlDriverDescriptor, createMysqlRuntimeDriverDescriptor };
|
package/dist/driver.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as createMysqlControlDriverDescriptor, t as MysqlControlDriver } from "./control-
|
|
2
|
-
import { t as createMysqlRuntimeDriverDescriptor } from "./runtime-
|
|
1
|
+
import { n as createMysqlControlDriverDescriptor, t as MysqlControlDriver } from "./control-BTolgwH5.mjs";
|
|
2
|
+
import { t as createMysqlRuntimeDriverDescriptor } from "./runtime-CHWztV6c.mjs";
|
|
3
3
|
export { MysqlControlDriver, createMysqlControlDriverDescriptor, createMysqlRuntimeDriverDescriptor };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
export { MysqlControlDriver, createMysqlControlDriverDescriptor, mysqlDriverDescriptor as default };
|
|
1
|
+
import { i as mysqlDriverDescriptor, n as MysqlControlDriverOptions, r as createMysqlControlDriverDescriptor, t as MysqlControlDriver } from "./control-BFe8NrSk.mjs";
|
|
2
|
+
export { MysqlControlDriver, type MysqlControlDriverOptions, createMysqlControlDriverDescriptor, mysqlDriverDescriptor as default };
|
package/dist/driver__control.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createMysqlControlDriverDescriptor, r as mysqlDriverDescriptor, t as MysqlControlDriver } from "./control-
|
|
1
|
+
import { n as createMysqlControlDriverDescriptor, r as mysqlDriverDescriptor, t as MysqlControlDriver } from "./control-BTolgwH5.mjs";
|
|
2
2
|
export { MysqlControlDriver, createMysqlControlDriverDescriptor, mysqlDriverDescriptor as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { type MysqlBinding, type MysqlDriverCreateOptions, type MysqlPoolOptions, type MysqlRuntimeDriver, createMysqlRuntimeDriverDescriptor, mysqlRuntimeDriverDescriptor as default };
|
|
1
|
+
import { a as MysqlRuntimeDriverOptions, i as MysqlRuntimeDriver, n as MysqlDriverCreateOptions, o as createMysqlRuntimeDriverDescriptor, r as MysqlPoolOptions, s as mysqlRuntimeDriverDescriptor, t as MysqlBinding } from "./runtime-CQ1V-8Yh.mjs";
|
|
2
|
+
export { type MysqlBinding, type MysqlDriverCreateOptions, type MysqlPoolOptions, type MysqlRuntimeDriver, type MysqlRuntimeDriverOptions, createMysqlRuntimeDriverDescriptor, mysqlRuntimeDriverDescriptor as default };
|
package/dist/driver__runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mysqlRuntimeDriverDescriptor, t as createMysqlRuntimeDriverDescriptor } from "./runtime-
|
|
1
|
+
import { n as mysqlRuntimeDriverDescriptor, t as createMysqlRuntimeDriverDescriptor } from "./runtime-CHWztV6c.mjs";
|
|
2
2
|
export { createMysqlRuntimeDriverDescriptor, mysqlRuntimeDriverDescriptor as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { StructuredError, StructuredErrorOptions } from "@prisma/orm-framework/utils/structured-error";
|
|
2
|
+
import "@prisma/orm-family-sql/relational-core/ast";
|
|
2
3
|
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/errors.d.mts
|
|
3
4
|
//#region src/core/errors.d.ts
|
|
4
5
|
type MysqlTargetErrorCode = 'CONTRACT.ARGUMENT_INVALID' | 'CONTRACT.CONSTRAINT_INVALID' | 'CONTRACT.IDENTIFIER_INVALID' | 'CONTRACT.NAMESPACE_INVALID' | 'CONTRACT.TARGET_MISMATCH' | 'CONTRACT.TYPE_PARAMS_INVALID' | 'MIGRATION.CONTRACT_SPACE_VIOLATION' | 'MIGRATION.MARKER_LOCK_TIMEOUT' | 'MIGRATION.MYSQL_CONTROL_STACK_MISSING' | 'RUNTIME.AST_INVALID' | 'RUNTIME.AST_UNSUPPORTED' | 'RUNTIME.CHARACTER_SET_UNSUPPORTED' | 'RUNTIME.DECODE_FAILED' | 'RUNTIME.ENCODE_FAILED' | 'RUNTIME.SQL_MODE_UNSUPPORTED' | 'RUNTIME.TEMPORAL_UNAVAILABLE';
|
|
5
6
|
declare function mysqlError(code: MysqlTargetErrorCode, message: string, options?: StructuredErrorOptions): StructuredError;
|
|
6
|
-
/** The refusal of a query
|
|
7
|
+
/** The refusal of a query the MySQL target cannot run yet: `what` names the feature. */
|
|
7
8
|
declare function mysqlQueryNotYetSupported(what: string): StructuredError;
|
|
8
9
|
//#endregion
|
|
9
10
|
export { mysqlQueryNotYetSupported as n, mysqlError as t };
|
|
10
|
-
//# sourceMappingURL=errors-
|
|
11
|
+
//# sourceMappingURL=errors-B81Qeu5_.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-B81Qeu5_.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/errors.d.mts"],"mappings":";;;;KAGK;iBACY,WAAW,MAAM,sBAAsB,iBAAiB,UAAU,yBAAyB;;iBAE3F,0BAA0B,eAAe"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
2
1
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
3
|
-
|
|
2
|
+
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/errors-CWtFTnst.mjs
|
|
4
4
|
function mysqlError(code, message, options) {
|
|
5
5
|
return structuredError(code, message, options);
|
|
6
6
|
}
|
|
7
|
-
/** The refusal of a query
|
|
7
|
+
/** The refusal of a query the MySQL target cannot run yet: `what` names the feature. */
|
|
8
8
|
function mysqlQueryNotYetSupported(what) {
|
|
9
|
-
return mysqlError("RUNTIME.AST_UNSUPPORTED", `${what} is not yet supported on MySQL.`, {
|
|
10
|
-
why: "The MySQL
|
|
11
|
-
fix: "
|
|
12
|
-
meta: {
|
|
13
|
-
target: "mysql",
|
|
14
|
-
feature: what
|
|
15
|
-
}
|
|
9
|
+
return mysqlError("RUNTIME.AST_UNSUPPORTED", `${what} is not yet supported on MySQL and MariaDB.`, {
|
|
10
|
+
why: "The codecs MySQL and MariaDB share do not render this query form yet.",
|
|
11
|
+
fix: "Write the query another way, or use a Postgres or SQLite target for it.",
|
|
12
|
+
meta: { feature: what }
|
|
16
13
|
});
|
|
17
14
|
}
|
|
18
15
|
const TEMPORAL_UNAVAILABLE_FIX = "Run on a runtime with Temporal available, install a Temporal polyfill before creating the client, or write the column as a convenience type at its default, which needs no Temporal: `DateTime` reads a JavaScript `Date`, and `Date`, `Time` and `Duration` read ISO 8601 strings.";
|
|
@@ -47,7 +44,7 @@ function errorTemporalWrongType(codecId, temporalTag, stringType, received) {
|
|
|
47
44
|
}
|
|
48
45
|
function errorTemporalNonIsoCalendar(codecId, calendarId) {
|
|
49
46
|
return mysqlError("RUNTIME.ENCODE_FAILED", `Codec '${codecId}' accepts only the iso8601 calendar, but the value carries '${calendarId}'.`, {
|
|
50
|
-
why: "MySQL
|
|
47
|
+
why: "MySQL and MariaDB store no calendar alongside a date, so a non-ISO calendar would be discarded on write and the value would read back as a different date than the one authored.",
|
|
51
48
|
fix: "Convert the value with .withCalendar(\"iso8601\") before writing if the ISO projection is what you mean to store.",
|
|
52
49
|
meta: {
|
|
53
50
|
codecId,
|
|
@@ -55,11 +52,40 @@ function errorTemporalNonIsoCalendar(codecId, calendarId) {
|
|
|
55
52
|
}
|
|
56
53
|
});
|
|
57
54
|
}
|
|
58
|
-
|
|
55
|
+
function holderOf(codecId, column, value) {
|
|
56
|
+
return column === void 0 ? `A ${codecId} value is ${value}` : `Column "${column.table}"."${column.name}" holds ${value}`;
|
|
57
|
+
}
|
|
58
|
+
function columnMeta(codecId, column, received) {
|
|
59
|
+
return {
|
|
60
|
+
codecId,
|
|
61
|
+
...column === void 0 ? {} : {
|
|
62
|
+
table: column.table,
|
|
63
|
+
column: column.name
|
|
64
|
+
},
|
|
65
|
+
received: received.slice(0, 100)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** A codec read a value from the database that its application value cannot hold, such as an integer past the safe integer range read as a JavaScript number. `reads` says what the codec reads, and `fix` what to change. */
|
|
69
|
+
function errorColumnUnreadable(options) {
|
|
70
|
+
const { codecId, received, column, notA, reads, fix } = options;
|
|
71
|
+
return mysqlError("RUNTIME.DECODE_FAILED", `${holderOf(codecId, column, received)}, which is not ${notA}. ${codecId} reads ${reads}.`, {
|
|
72
|
+
fix,
|
|
73
|
+
meta: columnMeta(codecId, column, received)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/** A codec was given a value its column cannot hold, before the value reached the database. `holds` says what the column holds. */
|
|
77
|
+
function errorColumnUnwritable(options) {
|
|
78
|
+
const { codecId, received, column, holds, fix } = options;
|
|
79
|
+
return mysqlError("RUNTIME.ENCODE_FAILED", `Cannot write ${received} to ${column === void 0 ? `a ${codecId} value` : `column "${column.table}"."${column.name}"`}, which holds ${holds}.`, {
|
|
80
|
+
fix,
|
|
81
|
+
meta: columnMeta(codecId, column, received)
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** A date or time codec read a value from the database that is not a value of its type, such as a zero date or a `time` that is no time of day, or that `Temporal` cannot hold. */
|
|
59
85
|
function errorDateTimeUnreadable(options) {
|
|
60
86
|
const { codecId, value, detail } = options;
|
|
61
|
-
return mysqlError("RUNTIME.DECODE_FAILED", `Codec '${codecId}' cannot read the value
|
|
62
|
-
why: "MySQL can hold values the column's type does not, such as the zero date 0000-00-00 or a time of 838:59:59, when a row is written outside Prisma.",
|
|
87
|
+
return mysqlError("RUNTIME.DECODE_FAILED", `Codec '${codecId}' cannot read the value the database returned: ${JSON.stringify(value)}. ${detail}`, {
|
|
88
|
+
why: "MySQL and MariaDB can hold values the column's type does not, such as the zero date 0000-00-00 or a time of 838:59:59, when a row is written outside Prisma.",
|
|
63
89
|
fix: "Rewrite the row with a value the column type holds, or read the column with a type that holds its text, such as String.",
|
|
64
90
|
meta: {
|
|
65
91
|
codecId,
|
|
@@ -72,7 +98,7 @@ function errorDateTimeUnreadable(options) {
|
|
|
72
98
|
function errorDateTimeUnwritable(options) {
|
|
73
99
|
const { codecId, received, detail } = options;
|
|
74
100
|
return mysqlError("RUNTIME.ENCODE_FAILED", `Codec '${codecId}' cannot write ${received}. ${detail}`, {
|
|
75
|
-
why: "The codec refuses a value its column does not hold before it reaches
|
|
101
|
+
why: "The codec refuses a value its column does not hold before it reaches the database.",
|
|
76
102
|
fix: "Write a value the column holds, as the message shows.",
|
|
77
103
|
meta: {
|
|
78
104
|
codecId,
|
|
@@ -82,6 +108,6 @@ function errorDateTimeUnwritable(options) {
|
|
|
82
108
|
});
|
|
83
109
|
}
|
|
84
110
|
//#endregion
|
|
85
|
-
export {
|
|
111
|
+
export { errorTemporalNonIsoCalendar as a, errorTemporalWrongType as c, errorDateTimeUnwritable as i, mysqlError as l, errorColumnUnwritable as n, errorTemporalUnavailable as o, errorDateTimeUnreadable as r, errorTemporalUnavailableForDefault as s, errorColumnUnreadable as t, mysqlQueryNotYetSupported as u };
|
|
86
112
|
|
|
87
|
-
//# sourceMappingURL=errors-
|
|
113
|
+
//# sourceMappingURL=errors-CWtFTnst-xBLJ-9Lp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-CWtFTnst-xBLJ-9Lp.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/errors-CWtFTnst.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/errors.ts\nfunction mysqlError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n/** The refusal of a query the MySQL target cannot run yet: `what` names the feature. */\nfunction mysqlQueryNotYetSupported(what) {\n\treturn mysqlError(\"RUNTIME.AST_UNSUPPORTED\", `${what} is not yet supported on MySQL and MariaDB.`, {\n\t\twhy: \"The codecs MySQL and MariaDB share do not render this query form yet.\",\n\t\tfix: \"Write the query another way, or use a Postgres or SQLite target for it.\",\n\t\tmeta: { feature: what }\n\t});\n}\nconst TEMPORAL_UNAVAILABLE_FIX = \"Run on a runtime with Temporal available, install a Temporal polyfill before creating the client, or write the column as a convenience type at its default, which needs no Temporal: `DateTime` reads a JavaScript `Date`, and `Date`, `Time` and `Duration` read ISO 8601 strings.\";\nfunction errorTemporalUnavailable(codecId, operation) {\n\treturn mysqlError(\"RUNTIME.TEMPORAL_UNAVAILABLE\", `Codec '${codecId}' cannot ${operation} a value because this runtime has no global Temporal implementation.`, {\n\t\twhy: \"Temporal-backed codecs read and write their values through the global Temporal API, which this runtime does not provide.\",\n\t\tfix: TEMPORAL_UNAVAILABLE_FIX,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\toperation\n\t\t}\n\t});\n}\nfunction errorTemporalUnavailableForDefault(generatorId) {\n\treturn mysqlError(\"RUNTIME.TEMPORAL_UNAVAILABLE\", `Mutation default generator '${generatorId}' cannot produce a value because this runtime has no global Temporal implementation.`, {\n\t\twhy: \"The generator answers a Temporal-backed column, so the value it produces is a Temporal value, which this runtime cannot construct.\",\n\t\tfix: TEMPORAL_UNAVAILABLE_FIX,\n\t\tmeta: { generatorId }\n\t});\n}\nfunction errorTemporalWrongType(codecId, temporalTag, stringType, received) {\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' encodes a ${temporalTag}, but received ${received}.`, {\n\t\twhy: \"The codec writes the Temporal value's own ISO 8601 text. A value of another type has no text the column holds.\",\n\t\tfix: `Pass a ${temporalTag}, or author the column with its ${stringType} type to write ISO 8601 text.`,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\ttemporalTag,\n\t\t\tstringType,\n\t\t\treceived\n\t\t}\n\t});\n}\nfunction errorTemporalNonIsoCalendar(codecId, calendarId) {\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' accepts only the iso8601 calendar, but the value carries '${calendarId}'.`, {\n\t\twhy: \"MySQL and MariaDB store no calendar alongside a date, so a non-ISO calendar would be discarded on write and the value would read back as a different date than the one authored.\",\n\t\tfix: \"Convert the value with .withCalendar(\\\"iso8601\\\") before writing if the ISO projection is what you mean to store.\",\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tcalendarId\n\t\t}\n\t});\n}\nfunction holderOf(codecId, column, value) {\n\treturn column === void 0 ? `A ${codecId} value is ${value}` : `Column \"${column.table}\".\"${column.name}\" holds ${value}`;\n}\nfunction columnMeta(codecId, column, received) {\n\treturn {\n\t\tcodecId,\n\t\t...column === void 0 ? {} : {\n\t\t\ttable: column.table,\n\t\t\tcolumn: column.name\n\t\t},\n\t\treceived: received.slice(0, 100)\n\t};\n}\n/** A codec read a value from the database that its application value cannot hold, such as an integer past the safe integer range read as a JavaScript number. `reads` says what the codec reads, and `fix` what to change. */\nfunction errorColumnUnreadable(options) {\n\tconst { codecId, received, column, notA, reads, fix } = options;\n\treturn mysqlError(\"RUNTIME.DECODE_FAILED\", `${holderOf(codecId, column, received)}, which is not ${notA}. ${codecId} reads ${reads}.`, {\n\t\tfix,\n\t\tmeta: columnMeta(codecId, column, received)\n\t});\n}\n/** A codec was given a value its column cannot hold, before the value reached the database. `holds` says what the column holds. */\nfunction errorColumnUnwritable(options) {\n\tconst { codecId, received, column, holds, fix } = options;\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", `Cannot write ${received} to ${column === void 0 ? `a ${codecId} value` : `column \"${column.table}\".\"${column.name}\"`}, which holds ${holds}.`, {\n\t\tfix,\n\t\tmeta: columnMeta(codecId, column, received)\n\t});\n}\n/** A date or time codec read a value from the database that is not a value of its type, such as a zero date or a `time` that is no time of day, or that `Temporal` cannot hold. */\nfunction errorDateTimeUnreadable(options) {\n\tconst { codecId, value, detail } = options;\n\treturn mysqlError(\"RUNTIME.DECODE_FAILED\", `Codec '${codecId}' cannot read the value the database returned: ${JSON.stringify(value)}. ${detail}`, {\n\t\twhy: \"MySQL and MariaDB can hold values the column's type does not, such as the zero date 0000-00-00 or a time of 838:59:59, when a row is written outside Prisma.\",\n\t\tfix: \"Rewrite the row with a value the column type holds, or read the column with a type that holds its text, such as String.\",\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tvalue: value.slice(0, 100)\n\t\t},\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\n/** A date or time codec was given a value its column does not hold, such as a date before the year 1000 or text with digits below a microsecond. */\nfunction errorDateTimeUnwritable(options) {\n\tconst { codecId, received, detail } = options;\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", `Codec '${codecId}' cannot write ${received}. ${detail}`, {\n\t\twhy: \"The codec refuses a value its column does not hold before it reaches the database.\",\n\t\tfix: \"Write a value the column holds, as the message shows.\",\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\treceived: received.slice(0, 100)\n\t\t},\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\n//#endregion\nexport { errorTemporalNonIsoCalendar as a, errorTemporalWrongType as c, errorDateTimeUnwritable as i, mysqlError as l, errorColumnUnwritable as n, errorTemporalUnavailable as o, errorDateTimeUnreadable as r, errorTemporalUnavailableForDefault as s, errorColumnUnreadable as t, mysqlQueryNotYetSupported as u };\n\n//# sourceMappingURL=errors-CWtFTnst.mjs.map"],"mappings":";;;AAGA,SAAS,WAAW,MAAM,SAAS,SAAS;CAC3C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;AAEA,SAAS,0BAA0B,MAAM;CACxC,OAAO,WAAW,2BAA2B,GAAG,KAAK,8CAA8C;EAClG,KAAK;EACL,KAAK;EACL,MAAM,EAAE,SAAS,KAAK;CACvB,CAAC;AACF;AACA,MAAM,2BAA2B;AACjC,SAAS,yBAAyB,SAAS,WAAW;CACrD,OAAO,WAAW,gCAAgC,UAAU,QAAQ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AAU,QAAQ,OAAO,QAAQ;CAClD,OAAO,WAAW,yBAAyB,gBAAgB,SAAS,MAAM,WAAW,KAAK,IAAI,KAAK,QAAQ,UAAU,WAAW,OAAO,MAAM,KAAK,OAAO,KAAK,GAAG,gBAAgB,MAAM,IAAI;EAC1L;EACA,MAAM,WAAW,SAAS,QAAQ,QAAQ;CAC3C,CAAC;AACF;;AAEA,SAAS,wBAAwB,SAAS;CACzC,MAAM,EAAE,SAAS,OAAO,WAAW;CACnC,OAAO,WAAW,yBAAyB,UAAU,QAAQ,iDAAiD,KAAK,UAAU,KAAK,EAAE,IAAI,UAAU;EACjJ,KAAK;EACL,KAAK;EACL,MAAM;GACL;GACA,OAAO,MAAM,MAAM,GAAG,GAAG;EAC1B;EACA,GAAG,UAAU,SAAS,QAAQ,KAAK;CACpC,CAAC;AACF;;AAEA,SAAS,wBAAwB,SAAS;CACzC,MAAM,EAAE,SAAS,UAAU,WAAW;CACtC,OAAO,WAAW,yBAAyB,UAAU,QAAQ,iBAAiB,SAAS,IAAI,UAAU;EACpG,KAAK;EACL,KAAK;EACL,MAAM;GACL;GACA,UAAU,SAAS,MAAM,GAAG,GAAG;EAChC;EACA,GAAG,UAAU,SAAS,QAAQ,KAAK;CACpC,CAAC;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/marker-lock-
|
|
1
|
+
import { l as mysqlError } from "./errors-CWtFTnst-xBLJ-9Lp.mjs";
|
|
2
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/marker-lock-B7CyXf2F.mjs
|
|
3
3
|
/** How long a migration runner or `db sign` waits for another one to release the marker lock. */
|
|
4
4
|
const MARKER_LOCK_TIMEOUT_SECONDS = 60;
|
|
5
5
|
/** `GET_LOCK` names are global to the server, so the name carries a hash of the connection's database: two databases on one server never wait on each other. */
|
|
@@ -48,4 +48,4 @@ async function withMarkerLock(driver, work, succeeded = () => true) {
|
|
|
48
48
|
//#endregion
|
|
49
49
|
export { withMarkerLock as i, acquireMarkerLock as n, releaseMarkerLock as r, MARKER_LOCK_TIMEOUT_SECONDS as t };
|
|
50
50
|
|
|
51
|
-
//# sourceMappingURL=marker-lock-
|
|
51
|
+
//# sourceMappingURL=marker-lock-B7CyXf2F-CakjZnQP.mjs.map
|
package/dist/{marker-lock-Bwew7cAs-ElLxlCQp.mjs.map → marker-lock-B7CyXf2F-CakjZnQP.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker-lock-
|
|
1
|
+
{"version":3,"file":"marker-lock-B7CyXf2F-CakjZnQP.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/marker-lock-B7CyXf2F.mjs"],"sourcesContent":["import { l as mysqlError } from \"./errors-CWtFTnst.mjs\";\n//#region src/core/marker-lock.ts\n/** How long a migration runner or `db sign` waits for another one to release the marker lock. */\nconst MARKER_LOCK_TIMEOUT_SECONDS = 60;\n/** `GET_LOCK` names are global to the server, so the name carries a hash of the connection's database: two databases on one server never wait on each other. */\nconst LOCK_NAME = \"CONCAT('prisma_marker_', LEFT(SHA2(DATABASE(), 256), 50))\";\nfunction lockResult(rows) {\n\tconst value = rows[0]?.[\"acquired\"];\n\treturn value === null || value === void 0 ? void 0 : String(value);\n}\n/**\n* Takes the marker lock on the connection `driver` holds. MySQL holds a `GET_LOCK` lock for the session, not for a transaction, so the caller releases it with {@link releaseMarkerLock} on the same connection when the work it guards ends.\n*/\nasync function acquireMarkerLock(driver, timeoutSeconds = 60) {\n\tconst { rows } = await driver.query(`SELECT GET_LOCK(${LOCK_NAME}, ?) AS acquired`, [timeoutSeconds]);\n\tif (lockResult(rows) !== \"1\") throw mysqlError(\"MIGRATION.MARKER_LOCK_TIMEOUT\", `Another process held the migration marker lock for ${timeoutSeconds} seconds.`, {\n\t\twhy: \"A migration or db sign on this database is still running, and they write the contract markers one at a time.\",\n\t\tfix: \"Wait for the other process to finish, then run the command again.\",\n\t\tmeta: { timeoutSeconds }\n\t});\n}\n/** Releases the marker lock {@link acquireMarkerLock} took on this connection. */\nasync function releaseMarkerLock(driver) {\n\tawait driver.query(`SELECT RELEASE_LOCK(${LOCK_NAME}) AS released`);\n}\n/**\n* Releases the marker lock after work that failed, keeping that failure: a release that fails too is dropped. MySQL frees a session's locks when the session ends, which is the usual reason a release fails.\n*/\nasync function releaseMarkerLockAfterFailure(driver) {\n\tawait releaseMarkerLock(driver).catch(() => void 0);\n}\n/**\n* The one way MySQL holds the marker lock: takes it on the connection `driver` holds, runs `work`, and releases it on the same connection when `work` ends. A failed release is reported only when `work` succeeded; when `work` throws, or `succeeded` says its result is a failure, that outcome is what comes back.\n*/\nasync function withMarkerLock(driver, work, succeeded = () => true) {\n\tawait acquireMarkerLock(driver);\n\tlet result;\n\ttry {\n\t\tresult = await work();\n\t} catch (error) {\n\t\tawait releaseMarkerLockAfterFailure(driver);\n\t\tthrow error;\n\t}\n\tif (succeeded(result)) await releaseMarkerLock(driver);\n\telse await releaseMarkerLockAfterFailure(driver);\n\treturn result;\n}\n//#endregion\nexport { withMarkerLock as i, acquireMarkerLock as n, releaseMarkerLock as r, MARKER_LOCK_TIMEOUT_SECONDS as t };\n\n//# sourceMappingURL=marker-lock-B7CyXf2F.mjs.map"],"mappings":";;;AAGA,MAAM,8BAA8B;;AAEpC,MAAM,YAAY;AAClB,SAAS,WAAW,MAAM;CACzB,MAAM,QAAQ,KAAK,EAAE,GAAG;CACxB,OAAO,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,OAAO,KAAK;AAClE;;;;AAIA,eAAe,kBAAkB,QAAQ,iBAAiB,IAAI;CAC7D,MAAM,EAAE,SAAS,MAAM,OAAO,MAAM,mBAAmB,UAAU,mBAAmB,CAAC,cAAc,CAAC;CACpG,IAAI,WAAW,IAAI,MAAM,KAAK,MAAM,WAAW,iCAAiC,sDAAsD,eAAe,YAAY;EAChK,KAAK;EACL,KAAK;EACL,MAAM,EAAE,eAAe;CACxB,CAAC;AACF;;AAEA,eAAe,kBAAkB,QAAQ;CACxC,MAAM,OAAO,MAAM,uBAAuB,UAAU,cAAc;AACnE;;;;AAIA,eAAe,8BAA8B,QAAQ;CACpD,MAAM,kBAAkB,MAAM,CAAC,CAAC,YAAY,KAAK,CAAC;AACnD;;;;AAIA,eAAe,eAAe,QAAQ,MAAM,kBAAkB,MAAM;CACnE,MAAM,kBAAkB,MAAM;CAC9B,IAAI;CACJ,IAAI;EACH,SAAS,MAAM,KAAK;CACrB,SAAS,OAAO;EACf,MAAM,8BAA8B,MAAM;EAC1C,MAAM;CACP;CACA,IAAI,UAAU,MAAM,GAAG,MAAM,kBAAkB,MAAM;MAChD,MAAM,8BAA8B,MAAM;CAC/C,OAAO;AACR"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as quoteIdentifier } from "./sql-utils-
|
|
2
|
-
import { r as decodeMysqlDatetime } from "./codecs-
|
|
1
|
+
import { n as quoteIdentifier } from "./sql-utils-CveZhawQ-B2QmUlY0.mjs";
|
|
2
|
+
import { r as decodeMysqlDatetime } from "./codecs-DVX-3El1.mjs";
|
|
3
3
|
import { r as MARKER_TABLE_NAME } from "./control-tables-CcQ77JE7-DKb3ubVU.mjs";
|
|
4
4
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { withMarkerReadErrorHandling } from "@prisma/orm-framework/errors/execution";
|
|
@@ -58,4 +58,4 @@ async function readMarkerResult(driver, space) {
|
|
|
58
58
|
//#endregion
|
|
59
59
|
export { tableExists as a, readMarkerRows as i, parseJsonColumn as n, readMarkerResult as r, decodeMysqlMarkerRow as t };
|
|
60
60
|
|
|
61
|
-
//# sourceMappingURL=marker-read-D1hp62hF-
|
|
61
|
+
//# sourceMappingURL=marker-read-D1hp62hF-BSXs2TVo.mjs.map
|
package/dist/{marker-read-D1hp62hF-3-4fEgDD.mjs.map → marker-read-D1hp62hF-BSXs2TVo.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker-read-D1hp62hF-
|
|
1
|
+
{"version":3,"file":"marker-read-D1hp62hF-BSXs2TVo.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/2-adapter/dist/marker-read-D1hp62hF.mjs"],"sourcesContent":["import { decodeMysqlDatetime } from \"@internal/target-mysql/codecs\";\nimport { withMarkerReadErrorHandling } from \"@internal/errors/execution\";\nimport { MARKER_TABLE_NAME } from \"@internal/target-mysql/control-tables\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { parseContractMarkerRow } from \"@internal/family-sql/verify\";\nimport { quoteIdentifier } from \"@internal/target-mysql/sql-utils\";\n//#region src/core/marker-read.ts\nconst MARKER_COLUMNS = \"space, core_hash, profile_hash, contract_json, canonical_version, updated_at, app_tag, meta, invariants\";\n/** Whether the connection's database has the table `name`. */\nasync function tableExists(driver, name) {\n\tconst { rows } = await driver.query(\"SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = ?\", [name]);\n\treturn rows.length > 0;\n}\nfunction parseJsonColumn(column, text) {\n\tif (typeof text !== \"string\") return text;\n\ttry {\n\t\treturn JSON.parse(text);\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tthrow structuredError(\"CONTRACT.MARKER_ROW_CORRUPT\", `Invalid contract marker row: ${column} is not valid JSON: ${detail}`, {\n\t\t\tmeta: { detail },\n\t\t\tcause: error\n\t\t});\n\t}\n}\n/** A marker row as MySQL's text arrives, in the shape the family's marker parser reads. */\nfunction decodeMysqlMarkerRow(row) {\n\tconst canonicalVersion = row[\"canonical_version\"];\n\tconst updatedAt = row[\"updated_at\"];\n\treturn parseContractMarkerRow({\n\t\t...row,\n\t\tcanonical_version: typeof canonicalVersion === \"string\" ? Number(canonicalVersion) : canonicalVersion,\n\t\tupdated_at: typeof updatedAt === \"string\" ? decodeMysqlDatetime(updatedAt) : updatedAt,\n\t\tinvariants: parseJsonColumn(\"invariants\", row[\"invariants\"])\n\t});\n}\nasync function readMarkerRows(driver, space) {\n\tif (!await tableExists(driver, MARKER_TABLE_NAME)) return void 0;\n\tconst select = `SELECT ${MARKER_COLUMNS} FROM ${quoteIdentifier(MARKER_TABLE_NAME)}`;\n\tconst { rows } = space === void 0 ? await driver.query(select) : await driver.query(`${select} WHERE space = ?`, [space]);\n\treturn rows;\n}\n/** The marker of `space`, or whether the marker table or the space's row is missing. */\nasync function readMarkerResult(driver, space) {\n\treturn withMarkerReadErrorHandling(async () => {\n\t\tconst rows = await readMarkerRows(driver, space);\n\t\tif (rows === void 0) return { kind: \"no-table\" };\n\t\tconst [row] = rows;\n\t\treturn row === void 0 ? { kind: \"absent\" } : {\n\t\t\tkind: \"present\",\n\t\t\trecord: decodeMysqlMarkerRow(row)\n\t\t};\n\t}, {\n\t\tspace,\n\t\tmarkerLocation: MARKER_TABLE_NAME\n\t});\n}\n//#endregion\nexport { tableExists as a, readMarkerRows as i, parseJsonColumn as n, readMarkerResult as r, decodeMysqlMarkerRow as t };\n\n//# sourceMappingURL=marker-read-D1hp62hF.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,iBAAiB;;AAEvB,eAAe,YAAY,QAAQ,MAAM;CACxC,MAAM,EAAE,SAAS,MAAM,OAAO,MAAM,uGAAuG,CAAC,IAAI,CAAC;CACjJ,OAAO,KAAK,SAAS;AACtB;AACA,SAAS,gBAAgB,QAAQ,MAAM;CACtC,IAAI,OAAO,SAAS,UAAU,OAAO;CACrC,IAAI;EACH,OAAO,KAAK,MAAM,IAAI;CACvB,SAAS,OAAO;EACf,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EACpE,MAAM,gBAAgB,+BAA+B,gCAAgC,OAAO,sBAAsB,UAAU;GAC3H,MAAM,EAAE,OAAO;GACf,OAAO;EACR,CAAC;CACF;AACD;;AAEA,SAAS,qBAAqB,KAAK;CAClC,MAAM,mBAAmB,IAAI;CAC7B,MAAM,YAAY,IAAI;CACtB,OAAO,uBAAuB;EAC7B,GAAG;EACH,mBAAmB,OAAO,qBAAqB,WAAW,OAAO,gBAAgB,IAAI;EACrF,YAAY,OAAO,cAAc,WAAW,oBAAoB,SAAS,IAAI;EAC7E,YAAY,gBAAgB,cAAc,IAAI,aAAa;CAC5D,CAAC;AACF;AACA,eAAe,eAAe,QAAQ,OAAO;CAC5C,IAAI,CAAC,MAAM,YAAY,QAAA,gBAAyB,GAAG,OAAO,KAAK;CAC/D,MAAM,SAAS,UAAU,eAAe,QAAQ,gBAAgB,iBAAiB;CACjF,MAAM,EAAE,SAAS,UAAU,KAAK,IAAI,MAAM,OAAO,MAAM,MAAM,IAAI,MAAM,OAAO,MAAM,GAAG,OAAO,mBAAmB,CAAC,KAAK,CAAC;CACxH,OAAO;AACR;;AAEA,eAAe,iBAAiB,QAAQ,OAAO;CAC9C,OAAO,4BAA4B,YAAY;EAC9C,MAAM,OAAO,MAAM,eAAe,QAAQ,KAAK;EAC/C,IAAI,SAAS,KAAK,GAAG,OAAO,EAAE,MAAM,WAAW;EAC/C,MAAM,CAAC,OAAO;EACd,OAAO,QAAQ,KAAK,IAAI,EAAE,MAAM,SAAS,IAAI;GAC5C,MAAM;GACN,QAAQ,qBAAqB,GAAG;EACjC;CACD,GAAG;EACF;EACA,gBAAgB;CACjB,CAAC;AACF"}
|
|
@@ -7,7 +7,6 @@ import { ReferentialAction, SqlStorage } from "@prisma/orm-family-sql/contract/t
|
|
|
7
7
|
import { MigrationOperationClass, MigrationOperationPolicy, SqlControlFamilyInstance, SqlMigrationPlanOperation, SqlMigrationPlanner, SqlMigrationRunner, SqlPlannerFailureResult } from "@prisma/orm-family-sql/family/control";
|
|
8
8
|
import { ImportRequirement, TsExpression } from "@prisma/orm-framework/ts-render";
|
|
9
9
|
import { Migration } from "@prisma/orm-family-sql/family/migration";
|
|
10
|
-
import { ImportSpecifierResolver } from "@prisma/orm-framework/components/emission";
|
|
11
10
|
import { MigrationCLI } from "@prisma/orm-toolchain/cli/migration-cli";
|
|
12
11
|
import { placeholder } from "@prisma/orm-framework/errors/migration";
|
|
13
12
|
import { sql } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
@@ -229,10 +228,8 @@ declare class RawSqlCall extends MysqlOpFactoryCallNode {
|
|
|
229
228
|
type MysqlOpFactoryCall = CreateTableCall | DropTableCall | AddColumnCall | DropColumnCall | CreateIndexCall | DropIndexCall | AddUniqueCall | DropUniqueCall | AddForeignKeyCall | DropForeignKeyCall | RawSqlCall;
|
|
230
229
|
//#endregion
|
|
231
230
|
//#region src/core/migrations/planner-produced-mysql-migration.d.ts
|
|
232
|
-
/** The target a planner plans for: the id its operations and migrations carry, and the facade module its `migration.ts` imports from. */
|
|
233
231
|
interface MysqlMigrationTarget<TargetId extends string> {
|
|
234
232
|
readonly targetId: TargetId;
|
|
235
|
-
readonly migrationModule: string;
|
|
236
233
|
}
|
|
237
234
|
interface MysqlMigrationDestinationInfo {
|
|
238
235
|
readonly storageHash: string;
|
|
@@ -255,7 +252,7 @@ declare class TypeScriptRenderableMysqlMigration<TargetId extends string = 'mysq
|
|
|
255
252
|
describe(): MigrationMeta;
|
|
256
253
|
get destination(): MysqlMigrationDestinationInfo;
|
|
257
254
|
get spaceId(): string;
|
|
258
|
-
renderTypeScript(
|
|
255
|
+
renderTypeScript(migrationModule: string): string;
|
|
259
256
|
}
|
|
260
257
|
//#endregion
|
|
261
258
|
//#region src/core/migrations/planner.d.ts
|
|
@@ -293,4 +290,4 @@ declare function createMysqlMigrationPlanner<TargetId extends string>(lowerer: E
|
|
|
293
290
|
declare function createMysqlMigrationRunner(family: SqlControlFamilyInstance): SqlMigrationRunner<MysqlPlanTargetDetails>;
|
|
294
291
|
//#endregion
|
|
295
292
|
export { unique as A, createMysqlMigrationRunner as C, primaryKey as D, placeholder as E, rawSql as O, createMysqlMigrationPlanner as S, lit$1 as T, MysqlOpFactoryCall as _, CreateTableCall as a, TypeScriptRenderableMysqlMigration as b, DropIndexCall as c, MigrationCLI as d, MysqlMigration as f, MysqlMigrationTarget as g, MysqlMigrationPlanner as h, CreateIndexCall as i, sql as k, DropTableCall as l, MysqlMigrationDestinationInfo as m, AddForeignKeyCall as n, DropColumnCall as o, MysqlMigrationBase as p, AddUniqueCall as r, DropForeignKeyCall as s, AddColumnCall as t, DropUniqueCall as u, MysqlPlanResult as v, fn$1 as w, col$1 as x, RawSqlCall as y };
|
|
296
|
-
//# sourceMappingURL=migration-
|
|
293
|
+
//# sourceMappingURL=migration-O-3NHVlW.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-O-3NHVlW.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/migration.d.mts"],"mappings":";;;;;;;;;;;;;;;;;KAgBK,KAAK,0BAA0B;;iBAEnB,OAAO,IAAI,KAAK;;;;;;uBAMV,mBAAmB,yBAAyB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,wBAAwB,UAAU,OAAO;oBAC9N,UAAU;qBACT,gBAAgB,kBAAkB;EACrD,YAAY,QAAQ,oBAAoB;UAChC;YACE,YAAY;aACX;aACA,kBAAkB;aAClB,uBAAuB;MAC9B,QAAQ;YACF,UAAU;aACT;MACP;YACM,UAAU;aACT;aACA,QAAQ;MACf,QAAQ;YACF,WAAW;aACV;aACA;MACP;YACM,YAAY;aACX;aACA;aACA;aACA;MACP;YACM,UAAU;aACT;aACA;MACP;YACM,UAAU;aACT;aACA;aACA;MACP;YACM,WAAW;aACV;aACA;MACP;YACM,cAAc;aACb;aACA;aACA;aACA;eACE;eACA;;aAEF,WAAW;aACX,WAAW;MAClB;YACM,eAAe;aACd;aACA;MACP;;;uBAGiB,eAAe,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,4BAA4B,OAAO;WAC1L;;;;uBAIY,+BAA+B,wBAAwB;oBAC1D;oBACA,gBAAgB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AAuB,oBAAoB;EAC3D;;cAEY,2BAA2B;WAC9B;WACA;WACA;WACA;WACA;EACT,YAAY,mBAAmB;EAC/B,KAAK,WAAW,uBAAuB,oBAAoB;EAC3D;;;cAGY,mBAAmB;WACtB,IAAI;WACJ;WACA,gBAAgB;WAChB;EACT,YAAY,IAAI;EAChB,QAAQ;EACR;EACA,+BAA+B;;KAE5B,qBAAqB,kBAAkB,gBAAgB,gBAAgB,iBAAiB,kBAAkB,gBAAgB,gBAAgB,iBAAiB,oBAAoB,qBAAqB;;;UAG/L,qBAAqB;WACpB,UAAU;;UAEX;WACC;WACA;;;cAGG,mCAAmC,2CAA2C,mBAAmB,qBAAqB;;WAEzH,UAAU;EACnB,YAAY;aACD,gBAAgB;aAChB,MAAM;aACN;aACA;aACA,cAAc;aACd,UAAU;aACV,QAAQ,qBAAqB;;MAEpC,wBAAwB,KAAK,QAAQ;EACzC,YAAY;MACR,eAAe;MACf;EACJ,iBAAiB;;;;KAId,gBAAgB;WACV;WACA,MAAM,mCAAmC;WACzC;WACA,mBAAmB;WACnB,wBAAwB;WACxB,0BAA0B;IACjC;;;;cAIU,sBAAsB,8CAA8C,oBAAoB,yBAAyB,wBAAwB;;EAErJ,YAAY,SAAS,uBAAuB,QAAQ,qBAAqB;EACzE,KAAK;aACM;aACA;aACA,QAAQ;aACR,cAAc;aACd,QAAQ;aACR,qBAAqB;aACrB,qBAAqB,cAAc;aACnC;aACA,YAAY;aACZ;MACP,gBAAgB;EACpB,eAAe,SAAS,0BAA0B,kBAAkB,mCAAmC;;iBAExF,4BAA4B,yBAAyB,SAAS,uBAAuB,QAAQ,qBAAqB,YAAY,sBAAsB;;;iBAGpJ,2BAA2B,QAAQ,2BAA2B,mBAAmB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as mysqlCreateNamespace } from "./mysql-database-
|
|
1
|
+
import { d as mysqlDataTypes } from "./data-types-CU_43cNv-CQ8eHx3H.mjs";
|
|
2
|
+
import { n as mysqlCreateNamespace } from "./mysql-database-ByniOtau-BKBIGgSm.mjs";
|
|
3
3
|
import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
5
|
import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
|
|
6
|
-
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/mysql-contract-serializer-
|
|
6
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/mysql-contract-serializer-D7NjmI2L.mjs
|
|
7
7
|
/** The MySQL target's contract serializer: the SQL family's, with each namespace built as a `MysqlDatabase`. */
|
|
8
8
|
var MysqlContractSerializer = class extends SqlContractSerializerBase {
|
|
9
9
|
constructor() {
|
|
@@ -32,4 +32,4 @@ var MysqlContractSerializer = class extends SqlContractSerializerBase {
|
|
|
32
32
|
//#endregion
|
|
33
33
|
export { MysqlContractSerializer as t };
|
|
34
34
|
|
|
35
|
-
//# sourceMappingURL=mysql-contract-serializer-
|
|
35
|
+
//# sourceMappingURL=mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mysql-contract-serializer-
|
|
1
|
+
{"version":3,"file":"mysql-contract-serializer-D7NjmI2L-gTs-kAW1.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/mysql-contract-serializer-D7NjmI2L.mjs"],"sourcesContent":["import { d as mysqlDataTypes } from \"./data-types-CU_43cNv.mjs\";\nimport { n as mysqlCreateNamespace } from \"./mysql-database-ByniOtau.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { SqlContractSerializerBase } from \"@internal/family-sql/ir\";\n//#region src/core/mysql-contract-serializer.ts\n/** The MySQL target's contract serializer: the SQL family's, with each namespace built as a `MysqlDatabase`. */\nvar MysqlContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map(), [], createDataTypeLookup(mysqlDataTypes));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\treturn mysqlCreateNamespace(blindCast(super.hydrateSqlNamespaceEntry(nsId, raw)));\n\t}\n\tserializeContract(contract) {\n\t\tconst { storage, ...rest } = contract;\n\t\tconst namespacesJson = {};\n\t\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) namespacesJson[nsId] = {\n\t\t\tid: ns.id,\n\t\t\tentries: this.serializeNamespaceEntries(ns.entries)\n\t\t};\n\t\treturn blindCast({\n\t\t\t...rest,\n\t\t\tstorage: {\n\t\t\t\tstorageHash: String(storage.storageHash),\n\t\t\t\tnamespaces: namespacesJson,\n\t\t\t\t...storage.types !== void 0 ? { types: this.serializeJsonObject(storage.types) } : {}\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\nexport { MysqlContractSerializer as t };\n\n//# sourceMappingURL=mysql-contract-serializer-D7NjmI2L.mjs.map"],"mappings":";;;;;;;AAOA,IAAI,0BAA0B,cAAc,0BAA0B;CACrE,cAAc;EACb,sBAAsB,IAAI,IAAI,GAAG,CAAC,GAAG,qBAAqB,cAAc,CAAC;CAC1E;CACA,yBAAyB,MAAM,KAAK;EACnC,OAAO,qBAAqB,UAAU,MAAM,yBAAyB,MAAM,GAAG,CAAC,CAAC;CACjF;CACA,kBAAkB,UAAU;EAC3B,MAAM,EAAE,SAAS,GAAG,SAAS;EAC7B,MAAM,iBAAiB,CAAC;EACxB,KAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,QAAQ,UAAU,GAAG,eAAe,QAAQ;GACnF,IAAI,GAAG;GACP,SAAS,KAAK,0BAA0B,GAAG,OAAO;EACnD;EACA,OAAO,UAAU;GAChB,GAAG;GACH,SAAS;IACR,aAAa,OAAO,QAAQ,WAAW;IACvC,YAAY;IACZ,GAAG,QAAQ,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,oBAAoB,QAAQ,KAAK,EAAE,IAAI,CAAC;GACrF;EACD,CAAC;CACF;AACD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as quoteIdentifier } from "./sql-utils-
|
|
3
|
-
import {
|
|
1
|
+
import { l as mysqlError } from "./errors-CWtFTnst-xBLJ-9Lp.mjs";
|
|
2
|
+
import { n as quoteIdentifier } from "./sql-utils-CveZhawQ-B2QmUlY0.mjs";
|
|
3
|
+
import { I as mysqlTimestamp, P as mysqlTime, _ as mysqlDecimal, m as mysqlDatetime, v as mysqlDecimalColumnAsCreated } from "./data-types-CU_43cNv-CQ8eHx3H.mjs";
|
|
4
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
5
|
import { UNBOUND_NAMESPACE_ID, freezeNode, hydrateNamespaceEntities } from "@prisma/orm-framework/components/ir";
|
|
6
6
|
import { SqlNamespaceBase } from "@prisma/orm-family-sql/contract/types";
|
|
7
7
|
import { tableEntityKind } from "@prisma/orm-family-sql/contract/entity-kinds";
|
|
8
|
-
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/mysql-database-
|
|
8
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/mysql-database-ByniOtau.mjs
|
|
9
9
|
const MYSQL_NAMESPACE_KIND = "mysql-namespace";
|
|
10
10
|
/**
|
|
11
11
|
* The MySQL database a connection uses, as the contract's one namespace. Tables are addressed unqualified, so the contract runs against whichever database the connection names.
|
|
@@ -45,8 +45,8 @@ function enumMembersOf(namespace, tableName, columnName, column) {
|
|
|
45
45
|
const valueSetName = isLoose(ref) && ref["namespaceId"] === namespace.id ? ref["entityName"] : void 0;
|
|
46
46
|
const valueSet = typeof valueSetName === "string" ? namespace.entries["valueSet"]?.[valueSetName] : void 0;
|
|
47
47
|
const values = isLoose(valueSet) ? valueSet["values"] : void 0;
|
|
48
|
-
if (!Array.isArray(values) || !values.every((value) => typeof value === "string")) throw mysqlError("CONTRACT.TYPE_PARAMS_INVALID", `${subject} is a
|
|
49
|
-
why: "A native
|
|
48
|
+
if (!Array.isArray(values) || !values.every((value) => typeof value === "string")) throw mysqlError("CONTRACT.TYPE_PARAMS_INVALID", `${subject} is a native enum column but has no enum whose text members it can list.`, {
|
|
49
|
+
why: "A native enum column on MySQL and MariaDB is written with its members, which come from the enum that types the column.",
|
|
50
50
|
fix: "Type the column with a PSL enum or an enumType() whose members are text.",
|
|
51
51
|
meta: {
|
|
52
52
|
table: tableName,
|
|
@@ -66,7 +66,7 @@ function enumColumnWithMembers(namespace, tableName, columnName, column) {
|
|
|
66
66
|
const values = enumMembersOf(namespace, tableName, columnName, column);
|
|
67
67
|
const listed = typeParams["values"];
|
|
68
68
|
if (listed !== void 0 && !(Array.isArray(listed) && sameMembers(listed, values))) throw mysqlError("CONTRACT.TYPE_PARAMS_INVALID", `Column "${tableName}"."${columnName}" lists enum members that differ from the members of the enum that types it.`, {
|
|
69
|
-
why: "
|
|
69
|
+
why: "An enum column on MySQL and MariaDB takes its members from its enum, in the order the enum declares them, so the database and the contract enforce the same members.",
|
|
70
70
|
fix: "Remove the column’s own members, or make them equal the enum’s members in the same order.",
|
|
71
71
|
meta: {
|
|
72
72
|
table: tableName,
|
|
@@ -105,22 +105,47 @@ function withZeroPrecision(column) {
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
+
function isUnwrittenDecimalColumn(column) {
|
|
109
|
+
if (!isLoose(column) || column["dataType"] !== mysqlDecimal.id) return false;
|
|
110
|
+
const typeParams = column["typeParams"];
|
|
111
|
+
return !isLoose(typeParams) || typeParams["precision"] === void 0 || typeParams["scale"] === void 0;
|
|
112
|
+
}
|
|
113
|
+
/** A `decimal` column with no precision or no scale written records the column the server makes of it, `decimal(10,0)` for neither and a scale of 0 for a precision alone, and its default is written as that column prints it; a codec reference with no precision is a raw parameter's or an aggregate's, of no column. */
|
|
114
|
+
function withDecimalColumnParams(column) {
|
|
115
|
+
const typeParams = mysqlDecimalColumnAsCreated(isLoose(column["typeParams"]) ? column["typeParams"] : {});
|
|
116
|
+
const columnDefault = column["default"];
|
|
117
|
+
if (!isLoose(columnDefault) || typeof columnDefault["value"] !== "string") return {
|
|
118
|
+
...column,
|
|
119
|
+
typeParams
|
|
120
|
+
};
|
|
121
|
+
const printed = mysqlDecimal.toContract(mysqlDecimal.valueFrom(columnDefault["value"], typeParams));
|
|
122
|
+
return {
|
|
123
|
+
...column,
|
|
124
|
+
typeParams,
|
|
125
|
+
default: {
|
|
126
|
+
...columnDefault,
|
|
127
|
+
value: printed
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function withFilledColumnParams(namespace, tableName, columnName, column) {
|
|
132
|
+
if (isEnumColumn(column)) return enumColumnWithMembers(namespace, tableName, columnName, column);
|
|
133
|
+
if (isUnwrittenPrecisionColumn(column)) return withZeroPrecision(column);
|
|
134
|
+
if (isUnwrittenDecimalColumn(column)) return withDecimalColumnParams(column);
|
|
135
|
+
return column;
|
|
136
|
+
}
|
|
108
137
|
function withFilledTypeParams(namespace, tableName, table) {
|
|
109
138
|
if (!isLoose(table)) return table;
|
|
110
139
|
const columns = table["columns"];
|
|
111
|
-
if (!isLoose(columns)
|
|
112
|
-
const filled = Object.fromEntries(Object.entries(columns).map(([columnName, column]) =>
|
|
113
|
-
if (isEnumColumn(column)) return [columnName, enumColumnWithMembers(namespace, tableName, columnName, column)];
|
|
114
|
-
if (isUnwrittenPrecisionColumn(column)) return [columnName, withZeroPrecision(column)];
|
|
115
|
-
return [columnName, column];
|
|
116
|
-
}));
|
|
140
|
+
if (!isLoose(columns)) return table;
|
|
141
|
+
const filled = Object.fromEntries(Object.entries(columns).map(([columnName, column]) => [columnName, withFilledColumnParams(namespace, tableName, columnName, column)]));
|
|
117
142
|
return {
|
|
118
143
|
...table,
|
|
119
144
|
columns: filled
|
|
120
145
|
};
|
|
121
146
|
}
|
|
122
147
|
/**
|
|
123
|
-
* Writes the type parameters MySQL gives a column that the authored schema leaves out. Each MySQL enum column's members, from the value set the column names, go into its type parameters in the order the enum declares them, and a column whose own members differ from them is refused; the column's type is then `enum('A','B')`, so the database enforces the members and `db verify` sees a change to them as a change of the column's type. A `datetime`, `timestamp` or `time` column with no precision records precision 0.
|
|
148
|
+
* Writes the type parameters MySQL gives a column that the authored schema leaves out. Each MySQL enum column's members, from the value set the column names, go into its type parameters in the order the enum declares them, and a column whose own members differ from them is refused; the column's type is then `enum('A','B')`, so the database enforces the members and `db verify` sees a change to them as a change of the column's type. A `datetime`, `timestamp` or `time` column with no precision records precision 0, and a `decimal` column with no precision or scale the precision and scale the server gives it.
|
|
124
149
|
*/
|
|
125
150
|
function fillTypeParams(input) {
|
|
126
151
|
const tables = input.entries["table"];
|
|
@@ -141,7 +166,7 @@ function rejectSqlBodyIndexes(input) {
|
|
|
141
166
|
const indexes = isLoose(table) ? table["indexes"] : void 0;
|
|
142
167
|
for (const index of Array.isArray(indexes) ? indexes : []) {
|
|
143
168
|
if (!isLoose(index)) continue;
|
|
144
|
-
if (index["expression"] !== void 0 || index["where"] !== void 0) throw mysqlError("CONTRACT.ARGUMENT_INVALID", `MySQL
|
|
169
|
+
if (index["expression"] !== void 0 || index["where"] !== void 0) throw mysqlError("CONTRACT.ARGUMENT_INVALID", `The MySQL and MariaDB targets do not support expression or partial indexes yet: index "${String(index["name"] ?? "<unnamed>")}" on table "${tableName}" declares ${index["expression"] !== void 0 ? "an expression" : "a where predicate"}. Use a fields-only index.`, { meta: { table: tableName } });
|
|
145
170
|
}
|
|
146
171
|
}
|
|
147
172
|
}
|
|
@@ -149,11 +174,14 @@ function rejectSqlBodyIndexes(input) {
|
|
|
149
174
|
* The namespace factory the MySQL target hands `defineContract` and the PSL interpreter. MySQL has one namespace per connection, the framework's unbound slot.
|
|
150
175
|
*/
|
|
151
176
|
function mysqlCreateNamespace(input) {
|
|
152
|
-
if (input.id !== UNBOUND_NAMESPACE_ID) throw mysqlError("CONTRACT.NAMESPACE_INVALID", `
|
|
177
|
+
if (input.id !== UNBOUND_NAMESPACE_ID) throw mysqlError("CONTRACT.NAMESPACE_INVALID", `MySQL and MariaDB do not support namespaces, but the contract puts a model in namespace "${input.id}".`, {
|
|
178
|
+
fix: "Remove `namespace` from the model.",
|
|
179
|
+
meta: { received: input.id }
|
|
180
|
+
});
|
|
153
181
|
rejectSqlBodyIndexes(input);
|
|
154
182
|
return new MysqlDatabase(fillTypeParams(input));
|
|
155
183
|
}
|
|
156
184
|
//#endregion
|
|
157
185
|
export { mysqlCreateNamespace as n, MysqlDatabase as t };
|
|
158
186
|
|
|
159
|
-
//# sourceMappingURL=mysql-database-
|
|
187
|
+
//# sourceMappingURL=mysql-database-ByniOtau-BKBIGgSm.mjs.map
|