@prisma/orm-target-mysql 8.0.0-rc.22-dev.10 → 8.0.0-rc.22-dev.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{adapter-_WBomuTw.d.mts → adapter-Dl4Wwz1I.d.mts} +4 -2
- package/dist/adapter-Dl4Wwz1I.d.mts.map +1 -0
- package/dist/adapter.d.mts +5 -5
- package/dist/adapter.mjs +2 -2
- 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 +1 -1
- package/dist/adapter__runtime.mjs +89 -14
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{codec-descriptor-Du6DSz-3-ytBCu_mq.mjs → codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs} +5 -3
- package/dist/codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs.map +1 -0
- package/dist/codec-ids-CrR9Xi7r-CarpqbNM.mjs +20 -0
- package/dist/codec-ids-CrR9Xi7r-CarpqbNM.mjs.map +1 -0
- package/dist/codec-ids-Dgh5IpML-76oBMuwK.d.mts +20 -0
- package/dist/codec-ids-Dgh5IpML-76oBMuwK.d.mts.map +1 -0
- package/dist/codec-types-BH5moCD9.d.mts +1 -0
- package/dist/codec-types-Bai_CFkk-Blx2GxCH.d.mts +31 -0
- package/dist/codec-types-Bai_CFkk-Blx2GxCH.d.mts.map +1 -0
- package/dist/codec-types-zzVcrnbk.d.mts +1 -0
- package/dist/codecs-BMidk26M-DsKq6wt5.d.mts +282 -0
- package/dist/codecs-BMidk26M-DsKq6wt5.d.mts.map +1 -0
- package/dist/codecs-BfiB79-5.mjs +750 -0
- package/dist/codecs-BfiB79-5.mjs.map +1 -0
- package/dist/codecs-C_twedMx.d.mts +36 -0
- package/dist/codecs-C_twedMx.d.mts.map +1 -0
- package/dist/{contract-contributions-B9njRJbt-ClEtrK2L.mjs → contract-contributions-ChiX6W0F-CAng98bZ.mjs} +5 -4
- package/dist/contract-contributions-ChiX6W0F-CAng98bZ.mjs.map +1 -0
- package/dist/{control-6wRZXIJ7.mjs → control-5eVF1TXc.mjs} +2 -2
- package/dist/{control-6wRZXIJ7.mjs.map → control-5eVF1TXc.mjs.map} +1 -1
- package/dist/{control-WTY7Jpxk.mjs → control-BBhWaGnH.mjs} +24 -13
- package/dist/control-BBhWaGnH.mjs.map +1 -0
- package/dist/control-BvSM7mGR.d.mts +396 -0
- package/dist/control-BvSM7mGR.d.mts.map +1 -0
- package/dist/{control-Ez_PtlFI.d.mts → control-MoPFgSaQ.d.mts} +2 -2
- package/dist/{control-Ez_PtlFI.d.mts.map → control-MoPFgSaQ.d.mts.map} +1 -1
- package/dist/data-type-entries-C7VH2IHc-D1d5I8zF.mjs +59 -0
- package/dist/data-type-entries-C7VH2IHc-D1d5I8zF.mjs.map +1 -0
- package/dist/{data-types-SXrh0Lou.d.mts → data-types-C-rfxpgB.d.mts} +2 -2
- package/dist/data-types-C-rfxpgB.d.mts.map +1 -0
- package/dist/data-types-D2HAT-Qf-CRI506c0.d.mts +88 -0
- package/dist/data-types-D2HAT-Qf-CRI506c0.d.mts.map +1 -0
- package/dist/data-types-DOaaPS93-DBkMJyh1.mjs +289 -0
- package/dist/data-types-DOaaPS93-DBkMJyh1.mjs.map +1 -0
- package/dist/date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs +72 -0
- package/dist/date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs.map +1 -0
- package/dist/{default-normalizer-BDUgHXUn-Xk7HQJuI.mjs → default-normalizer-C8pc7SbL-CKgOEnGl.mjs} +22 -12
- package/dist/default-normalizer-C8pc7SbL-CKgOEnGl.mjs.map +1 -0
- package/dist/{default-normalizer-BBhGpw7r.d.mts → default-normalizer-CGIwQiKB.d.mts} +4 -4
- package/dist/{default-normalizer-BBhGpw7r.d.mts.map → default-normalizer-CGIwQiKB.d.mts.map} +1 -1
- package/dist/descriptor-meta-CsMPRsxp-DhK87vlc.mjs +352 -0
- package/dist/descriptor-meta-CsMPRsxp-DhK87vlc.mjs.map +1 -0
- package/dist/driver.mjs +1 -1
- package/dist/driver__control.mjs +1 -1
- package/dist/driver__runtime.mjs +275 -126
- package/dist/driver__runtime.mjs.map +1 -1
- package/dist/errors-Cng94tYg-D02Eud2d.mjs +87 -0
- package/dist/errors-Cng94tYg-D02Eud2d.mjs.map +1 -0
- package/dist/{errors-BYhjQT7y.d.mts → errors-DfrC_yfG.d.mts} +2 -2
- package/dist/{errors-BYhjQT7y.d.mts.map → errors-DfrC_yfG.d.mts.map} +1 -1
- package/dist/{marker-lock-CmGvN4hw-Com29AtQ.mjs → marker-lock-Bwew7cAs-CZ20Y_tA.mjs} +3 -3
- package/dist/{marker-lock-CmGvN4hw-Com29AtQ.mjs.map → marker-lock-Bwew7cAs-CZ20Y_tA.mjs.map} +1 -1
- package/dist/{marker-read-aEaHihYj-Cyg16yn1.mjs → marker-read-Cf80LSbG-CUp3v1e5.mjs} +5 -5
- package/dist/{marker-read-aEaHihYj-Cyg16yn1.mjs.map → marker-read-Cf80LSbG-CUp3v1e5.mjs.map} +1 -1
- package/dist/mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs +35 -0
- package/dist/mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs.map +1 -0
- package/dist/{mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs → mysql-database-CHl9-oSL-CWZLDXt6.mjs} +39 -40
- package/dist/mysql-database-CHl9-oSL-CWZLDXt6.mjs.map +1 -0
- package/dist/now-expression-DVD18CUc-00buJUto.mjs +38 -0
- package/dist/now-expression-DVD18CUc-00buJUto.mjs.map +1 -0
- package/dist/{pack-YVG-iBMQ.d.mts → pack-BXvLVBWP.d.mts} +395 -14
- package/dist/{pack-YVG-iBMQ.d.mts.map → pack-BXvLVBWP.d.mts.map} +1 -1
- package/dist/require-temporal-DeDQhbTn-Bxc65WbA.mjs +16 -0
- package/dist/require-temporal-DeDQhbTn-Bxc65WbA.mjs.map +1 -0
- package/dist/{runner-BaBQoXiU-C7ln-4b2.mjs → runner-C39AEe6--BVG3xPYw.mjs} +7 -7
- package/dist/{runner-BaBQoXiU-C7ln-4b2.mjs.map → runner-C39AEe6--BVG3xPYw.mjs.map} +1 -1
- package/dist/{runtime-CeuRr9nE.d.mts → runtime-ClRDfPiY.d.mts} +2 -2
- package/dist/{runtime-CeuRr9nE.d.mts.map → runtime-ClRDfPiY.d.mts.map} +1 -1
- package/dist/runtime-CrB5DXx4.d.mts +54 -0
- package/dist/runtime-CrB5DXx4.d.mts.map +1 -0
- package/dist/{sql-utils-Db0IQO_B-PaULnfrE.mjs → sql-utils-Cmv_TVa8-BetrIUcj.mjs} +3 -3
- package/dist/{sql-utils-Db0IQO_B-PaULnfrE.mjs.map → sql-utils-Cmv_TVa8-BetrIUcj.mjs.map} +1 -1
- package/dist/{sql-utils-RW0vJvDl.mjs → sql-utils-bD4SfgX0.mjs} +2 -2
- package/dist/{sql-utils-RW0vJvDl.mjs.map → sql-utils-bD4SfgX0.mjs.map} +1 -1
- package/dist/{statement-kfMRMKIt-D6cAOKys.mjs → statement-DC62oiSx-Buzptbpk.mjs} +21 -15
- package/dist/statement-DC62oiSx-Buzptbpk.mjs.map +1 -0
- package/dist/target.d.mts +14 -13
- package/dist/target.mjs +17 -13
- 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 +3 -3
- package/dist/target__codecs.mjs +3 -2
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +38 -32
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-types.d.mts +3 -3
- package/dist/target__data-types.mjs +3 -3
- 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.mjs +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 +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.d.mts +2 -0
- package/dist/target__types.mjs +2 -0
- package/dist/{control-_4epnrIW.d.mts → types-CgrFHUdk.d.mts} +3 -8
- package/dist/types-CgrFHUdk.d.mts.map +1 -0
- package/package.json +18 -12
- package/dist/adapter-_WBomuTw.d.mts.map +0 -1
- package/dist/codec-descriptor-Du6DSz-3-ytBCu_mq.mjs.map +0 -1
- package/dist/codec-ids-cjxtOcLM-vFeQhgPm.mjs +0 -10
- package/dist/codec-ids-cjxtOcLM-vFeQhgPm.mjs.map +0 -1
- package/dist/codec-ids-sMOU8F-B-BQbCq2dr.d.mts +0 -10
- package/dist/codec-ids-sMOU8F-B-BQbCq2dr.d.mts.map +0 -1
- package/dist/codec-types-Bd7DL1Mr-CZWNfnp9.d.mts +0 -21
- package/dist/codec-types-Bd7DL1Mr-CZWNfnp9.d.mts.map +0 -1
- package/dist/codec-types-Bo3Jfilx.d.mts +0 -1
- package/dist/codec-types-Ja2kLzLS.d.mts +0 -1
- package/dist/codecs-C00kjHgh.mjs +0 -282
- package/dist/codecs-C00kjHgh.mjs.map +0 -1
- package/dist/codecs-CO_VNEYU-CwAnKzRs.d.mts +0 -102
- package/dist/codecs-CO_VNEYU-CwAnKzRs.d.mts.map +0 -1
- package/dist/codecs-DM61agRr.d.mts +0 -21
- package/dist/codecs-DM61agRr.d.mts.map +0 -1
- package/dist/contract-contributions-B9njRJbt-ClEtrK2L.mjs.map +0 -1
- package/dist/control-WTY7Jpxk.mjs.map +0 -1
- package/dist/control-_4epnrIW.d.mts.map +0 -1
- package/dist/data-type-entries-B0AoBozh-f9AEUIUQ.mjs +0 -42
- package/dist/data-type-entries-B0AoBozh-f9AEUIUQ.mjs.map +0 -1
- package/dist/data-types-BpihGKoK-BMW-m4EN.d.mts +0 -52
- package/dist/data-types-BpihGKoK-BMW-m4EN.d.mts.map +0 -1
- package/dist/data-types-Dv9gwVRV-BZPzCWZk.mjs +0 -181
- package/dist/data-types-Dv9gwVRV-BZPzCWZk.mjs.map +0 -1
- package/dist/data-types-SXrh0Lou.d.mts.map +0 -1
- package/dist/default-normalizer-BDUgHXUn-Xk7HQJuI.mjs.map +0 -1
- package/dist/descriptor-meta-BurjcSiU-Cbk2L1jf.mjs +0 -82
- package/dist/descriptor-meta-BurjcSiU-Cbk2L1jf.mjs.map +0 -1
- package/dist/descriptor-meta-runtime-Bk_00UrX-BLN4Ahpj.mjs +0 -17
- package/dist/descriptor-meta-runtime-Bk_00UrX-BLN4Ahpj.mjs.map +0 -1
- package/dist/errors-rvH_F2Yj-BQrO_--u.mjs +0 -20
- package/dist/errors-rvH_F2Yj-BQrO_--u.mjs.map +0 -1
- package/dist/mysql-contract-serializer-DLv0uW_f-Cg4A43Ry.mjs.map +0 -1
- package/dist/runtime-Cl0BbTZq.d.mts +0 -22
- package/dist/runtime-Cl0BbTZq.d.mts.map +0 -1
- package/dist/statement-kfMRMKIt-D6cAOKys.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__control.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/control.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"target__control.mjs","names":[],"sources":["../../../../3-targets/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 { r as createMysqlMigrationPlanner, t as createMysqlMigrationRunner, v as diffMysqlSchema, y as mysqlContractToSchema } from \"./runner-C39AEe6-.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}\nfunction createMysqlControlTargetDescriptor() {\n\tsetFallbackTemporal(Temporal);\n\treturn {\n\t\t...mysqlTargetDescriptorMeta,\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);\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: \"mysql\"\n\t\t\t};\n\t\t},\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createMysqlMigrationPlanner(adapter);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createMysqlMigrationRunner(family);\n\t\t}\n\t};\n}\nconst mysqlControlTargetDescriptor = createMysqlControlTargetDescriptor();\n//#endregion\nexport { 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;AACA,SAAS,qCAAqC;CAC7C,oBAAoB,QAAQ;CAC5B,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,OAAO;GAC3C;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;GACX;EACD;EACA,cAAc,SAAS;GACtB,OAAO,4BAA4B,OAAO;EAC3C;EACA,aAAa,QAAQ;GACpB,OAAO,2BAA2B,MAAM;EACzC;CACD;AACD;AACA,MAAM,+BAA+B,mCAAmC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as mysqlDataTypeEntries } from "./data-types-
|
|
3
|
-
export { mysqlBigint, mysqlChar, mysqlCharParams, mysqlDataTypeEntries, mysqlDataTypes, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlEnum, mysqlEnumParams, mysqlInt, mysqlText, mysqlTextDataTypes, mysqlVarchar, mysqlVarcharParams, renderMysqlEnumType };
|
|
1
|
+
import { C as mysqlTimestampText, E as renderMysqlEnumType, S as mysqlTimestamp, T as mysqlVarcharParams, _ as mysqlInt, a as mysqlCharParams, b as mysqlTime, c as mysqlDateText, d as mysqlDatetimeText, f as mysqlDuration, g as mysqlEnumParams, h as mysqlEnum, i as mysqlChar, l as mysqlDatetime, m as mysqlDurationText, n as MYSQL_TIMESTAMP_RANGE, o as mysqlDataTypes, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, t as MYSQL_DATETIME_RANGE, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText, y as mysqlTextDataTypes } from "./data-types-D2HAT-Qf-CRI506c0.mjs";
|
|
2
|
+
import { t as mysqlDataTypeEntries } from "./data-types-C-rfxpgB.mjs";
|
|
3
|
+
export { MYSQL_DATETIME_RANGE, MYSQL_TIMESTAMP_RANGE, mysqlBigint, mysqlChar, mysqlCharParams, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlInt, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, renderMysqlEnumType };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as mysqlDataTypeEntries } from "./data-type-entries-
|
|
3
|
-
export { mysqlBigint, mysqlChar, mysqlCharParams, mysqlDataTypeEntries, mysqlDataTypes, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlEnum, mysqlEnumParams, mysqlInt, mysqlText, mysqlTextDataTypes, mysqlVarchar, mysqlVarcharParams, renderMysqlEnumType };
|
|
1
|
+
import { C as mysqlTimestampText, E as renderMysqlEnumType, S as mysqlTimestamp, T as mysqlVarcharParams, _ as mysqlInt, a as mysqlCharParams, b as mysqlTime, c as mysqlDateText, d as mysqlDatetimeText, f as mysqlDuration, g as mysqlEnumParams, h as mysqlEnum, i as mysqlChar, l as mysqlDatetime, m as mysqlDurationText, n as MYSQL_TIMESTAMP_RANGE, o as mysqlDataTypes, p as mysqlDurationParams, r as mysqlBigint, s as mysqlDate, t as MYSQL_DATETIME_RANGE, u as mysqlDatetimeParams, v as mysqlText, w as mysqlVarchar, x as mysqlTimeText, y as mysqlTextDataTypes } from "./data-types-DOaaPS93-DBkMJyh1.mjs";
|
|
2
|
+
import { t as mysqlDataTypeEntries } from "./data-type-entries-C7VH2IHc-D1d5I8zF.mjs";
|
|
3
|
+
export { MYSQL_DATETIME_RANGE, MYSQL_TIMESTAMP_RANGE, mysqlBigint, mysqlChar, mysqlCharParams, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlInt, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, renderMysqlEnumType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mysqlResolveDefault, r as readMysqlDefault, t as MysqlReportedDefault } from "./default-normalizer-
|
|
1
|
+
import { n as mysqlResolveDefault, r as readMysqlDefault, t as MysqlReportedDefault } from "./default-normalizer-CGIwQiKB.mjs";
|
|
2
2
|
export { type MysqlReportedDefault, mysqlResolveDefault, readMysqlDefault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as readMysqlDefault, t as mysqlResolveDefault } from "./default-normalizer-
|
|
1
|
+
import { n as readMysqlDefault, t as mysqlResolveDefault } from "./default-normalizer-C8pc7SbL-CKgOEnGl.mjs";
|
|
2
2
|
export { mysqlResolveDefault, readMysqlDefault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-
|
|
1
|
+
import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-DfrC_yfG.mjs";
|
|
2
2
|
export { mysqlError, mysqlQueryNotYetSupported };
|
package/dist/target__errors.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as mysqlQueryNotYetSupported, s as mysqlError } from "./errors-Cng94tYg-D02Eud2d.mjs";
|
|
2
2
|
export { mysqlError, mysqlQueryNotYetSupported };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-
|
|
1
|
+
import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-Bwew7cAs-CZ20Y_tA.mjs";
|
|
2
2
|
export { MARKER_LOCK_TIMEOUT_SECONDS, acquireMarkerLock, releaseMarkerLock, withMarkerLock };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as CreateTableCall, c as DropIndexCall, d as MysqlMigration, f as MysqlMigrationPlanner, g as createMysqlMigrationRunner, h as createMysqlMigrationPlanner, i as CreateIndexCall, l as DropTableCall, m as TypeScriptRenderableMysqlMigration, n as AddForeignKeyCall, o as DropColumnCall, p as RawSqlCall, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, y as rawSql } from "./runner-
|
|
1
|
+
import { a as CreateTableCall, c as DropIndexCall, d as MysqlMigration, f as MysqlMigrationPlanner, g as createMysqlMigrationRunner, h as createMysqlMigrationPlanner, i as CreateIndexCall, l as DropTableCall, m as TypeScriptRenderableMysqlMigration, n as AddForeignKeyCall, o as DropColumnCall, p as RawSqlCall, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, y as rawSql } from "./runner-C39AEe6--BVG3xPYw.mjs";
|
|
2
2
|
import { a as placeholder, c as unique, i as lit, n as col, o as primaryKey, r as fn, s as sql, t as MigrationCLI } from "./migration-tFuoN9GB.mjs";
|
|
3
3
|
export { AddColumnCall, AddForeignKeyCall, AddUniqueCall, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, MysqlMigration as Migration, MigrationCLI, MysqlMigrationPlanner, RawSqlCall, TypeScriptRenderableMysqlMigration, col, createMysqlMigrationPlanner, createMysqlMigrationRunner, fn, lit, placeholder, primaryKey, rawSql, sql, unique };
|
package/dist/target__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mysqlTargetDescriptorMeta } from "./pack-
|
|
1
|
+
import { t as mysqlTargetDescriptorMeta } from "./pack-BXvLVBWP.mjs";
|
|
2
2
|
export { mysqlTargetDescriptorMeta as default };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as mysqlTargetDescriptorMeta } from "./descriptor-meta-CsMPRsxp-DhK87vlc.mjs";
|
|
2
2
|
export { mysqlTargetDescriptorMeta as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as MysqlRuntimeTargetInstance, r as
|
|
2
|
-
export { MysqlContractSerializer, type MysqlRuntimeTargetInstance, mysqlRuntimeTargetDescriptor as default };
|
|
1
|
+
import { i as mysqlRuntimeTargetDescriptor, n as MysqlRuntimeTargetInstance, r as mysqlNowGenerators, t as MysqlContractSerializer } from "./runtime-CrB5DXx4.mjs";
|
|
2
|
+
export { MysqlContractSerializer, type MysqlRuntimeTargetInstance, mysqlRuntimeTargetDescriptor as default, mysqlNowGenerators };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as MysqlContractSerializer } from "./mysql-contract-serializer-
|
|
1
|
+
import { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from "./date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs";
|
|
2
|
+
import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs";
|
|
3
3
|
//#region ../../../3-targets/mysql/1-target/dist/runtime.mjs
|
|
4
4
|
const mysqlRuntimeTargetDescriptor = {
|
|
5
5
|
...mysqlTargetDescriptorMetaRuntime,
|
|
@@ -12,6 +12,6 @@ const mysqlRuntimeTargetDescriptor = {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
15
|
-
export { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default };
|
|
15
|
+
export { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default, mysqlNowGenerators };
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=target__runtime.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/runtime.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/runtime.mjs"],"sourcesContent":["import { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from \"./date-time-now-generators-DY-8Bodc.mjs\";\nimport { t as MysqlContractSerializer } from \"./mysql-contract-serializer-BnTKRSsN.mjs\";\n//#region src/core/runtime/runtime-target.ts\nconst mysqlRuntimeTargetDescriptor = {\n\t...mysqlTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"mysql\"\n\t\t};\n\t}\n};\n//#endregion\nexport { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default, mysqlNowGenerators };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;AAGA,MAAM,+BAA+B;CACpC,GAAG;CACH,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from "./sql-utils-
|
|
2
|
-
import { t as tokenizeMysqlSql } from "./sql-utils-
|
|
1
|
+
import { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from "./sql-utils-Cmv_TVa8-BetrIUcj.mjs";
|
|
2
|
+
import { t as tokenizeMysqlSql } from "./sql-utils-bD4SfgX0.mjs";
|
|
3
3
|
export { escapeLiteral, quoteIdentifier, quoteLiteral, tokenizeMysqlSql };
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { t as MysqlPlanTargetDetails } from "./planner-target-details-D6g2uSp--C5NKHmCc.mjs";
|
|
2
1
|
import { SqlNamespaceBase, SqlNamespaceEntries, SqlNamespaceInput, StorageTable } from "@prisma/orm-family-sql/contract/types";
|
|
3
|
-
|
|
4
|
-
//#region ../../../3-targets/mysql/1-target/dist/control.d.mts
|
|
5
|
-
//#region src/core/migrations/control-target.d.ts
|
|
6
|
-
declare const mysqlControlTargetDescriptor: SqlControlTargetDescriptor<'mysql', MysqlPlanTargetDetails>;
|
|
7
|
-
//#endregion
|
|
2
|
+
//#region ../../../3-targets/mysql/1-target/dist/types.d.mts
|
|
8
3
|
//#region src/core/mysql-database.d.ts
|
|
9
4
|
/**
|
|
10
5
|
* 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.
|
|
@@ -23,5 +18,5 @@ declare class MysqlDatabase extends SqlNamespaceBase {
|
|
|
23
18
|
*/
|
|
24
19
|
declare function mysqlCreateNamespace(input: SqlNamespaceInput): MysqlDatabase;
|
|
25
20
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
-
//# sourceMappingURL=
|
|
21
|
+
export { mysqlCreateNamespace as n, MysqlDatabase as t };
|
|
22
|
+
//# sourceMappingURL=types-CgrFHUdk.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CgrFHUdk.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/types.d.mts"],"mappings":";;;;;;cAKc,sBAAsB;WACzB;WACA;WACA,SAAS;EAClB,YAAY,OAAO;MACf,SAAS,SAAS,eAAe;EACrC;EACA,aAAa;;;;;iBAKE,qBAAqB,OAAO,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-mysql",
|
|
3
|
-
"version": "8.0.0-rc.22-dev.
|
|
3
|
+
"version": "8.0.0-rc.22-dev.12",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,23 +9,27 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "8.0.0-rc.22-dev.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.22-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.22-dev.
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.22-dev.12",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.22-dev.12",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.22-dev.12",
|
|
15
15
|
"@standard-schema/spec": "1.1.0",
|
|
16
16
|
"arktype": "^2.2.2",
|
|
17
|
-
"mariadb": "3.5.4"
|
|
17
|
+
"mariadb": "3.5.4",
|
|
18
|
+
"temporal-spec": "1.0.1"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
|
-
"@internal/adapter-mysql": "8.0.0-rc.22-dev.
|
|
21
|
-
"@internal/driver-mysql": "8.0.0-rc.22-dev.
|
|
22
|
-
"@internal/target-mysql": "8.0.0-rc.22-dev.
|
|
23
|
-
"@repo/
|
|
24
|
-
"@repo/
|
|
21
|
+
"@internal/adapter-mysql": "8.0.0-rc.22-dev.12",
|
|
22
|
+
"@internal/driver-mysql": "8.0.0-rc.22-dev.12",
|
|
23
|
+
"@internal/target-mysql": "8.0.0-rc.22-dev.12",
|
|
24
|
+
"@repo/test-utils": "8.0.0-rc.22-dev.12",
|
|
25
|
+
"@repo/tsconfig": "8.0.0-rc.22-dev.12",
|
|
26
|
+
"@repo/tsdown": "8.0.0-rc.22-dev.12",
|
|
25
27
|
"tsdown": "0.22.14",
|
|
26
|
-
"typescript": "5.9.3"
|
|
28
|
+
"typescript": "5.9.3",
|
|
29
|
+
"vitest": "5.0.0-rc.2"
|
|
27
30
|
},
|
|
28
31
|
"peerDependencies": {
|
|
32
|
+
"temporal-polyfill": "^1.0.4",
|
|
29
33
|
"typescript": ">=5.9"
|
|
30
34
|
},
|
|
31
35
|
"peerDependenciesMeta": {
|
|
@@ -59,6 +63,7 @@
|
|
|
59
63
|
"./target/pack": "./dist/target__pack.mjs",
|
|
60
64
|
"./target/runtime": "./dist/target__runtime.mjs",
|
|
61
65
|
"./target/sql-utils": "./dist/target__sql-utils.mjs",
|
|
66
|
+
"./target/types": "./dist/target__types.mjs",
|
|
62
67
|
"./package.json": "./package.json"
|
|
63
68
|
},
|
|
64
69
|
"repository": {
|
|
@@ -69,6 +74,7 @@
|
|
|
69
74
|
"scripts": {
|
|
70
75
|
"build": "tsdown",
|
|
71
76
|
"lint": "biome check . --error-on-warnings",
|
|
72
|
-
"clean": "rm -rf dist src-gen"
|
|
77
|
+
"clean": "rm -rf dist src-gen",
|
|
78
|
+
"test": "vitest run"
|
|
73
79
|
}
|
|
74
80
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-_WBomuTw.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-adapter/dist/adapter.d.mts"],"mappings":";;;cAEc,0BAA0B;WAC7B;aACE;aACA;aACA;aACA;;;;;;cAMC;WACH,cAAc;aACZ;eACE;eACA;eACA;eACA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-descriptor-Du6DSz-3-ytBCu_mq.mjs","names":["#descriptors"],"sources":["../../../../3-targets/mysql/1-target/dist/codec-descriptor-Du6DSz-3.mjs"],"sourcesContent":["import { CodecDescriptorImpl, validateCodecTypeParams } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/codec-descriptor.ts\nconst MYSQL_CODEC_DESCRIPTOR_KIND = \"mysql-codec\";\n/**\n* A codec descriptor the MySQL target registers. `jsonProjection` writes a column into the JSON an include reads, in the form the codec's `fromWire` reads from a row.\n*/\nvar MysqlCodecDescriptor = class extends CodecDescriptorImpl {\n\tdescriptorKind = MYSQL_CODEC_DESCRIPTOR_KIND;\n\tprojectJson(expression, ref) {\n\t\tif (ref.many === true) throw structuredError(\"RUNTIME.CODEC_DESCRIPTOR_ARRAY_UNSUPPORTED\", `Codec '${ref.codecId}' uses CodecRef.many, but MySQL has no stored scalar arrays.`, {\n\t\t\twhy: \"MySQL codec descriptors project scalar values only.\",\n\t\t\tfix: \"Use a scalar CodecRef.\",\n\t\t\tmeta: { codecId: ref.codecId }\n\t\t});\n\t\treturn this.jsonProjection(expression, blindCast(validateCodecTypeParams(this, ref)));\n\t}\n};\nvar MysqlCodecDescriptorAdapter = class extends MysqlCodecDescriptor {\n\toptions;\n\tdataType;\n\tcodecId;\n\ttraits;\n\tparamsSchema;\n\trenderValueLiteral;\n\tconstructor(descriptor, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.dataType = options.dataType.id;\n\t\tthis.codecId = descriptor.codecId;\n\t\tthis.traits = descriptor.traits;\n\t\tthis.paramsSchema = blindCast(options.dataType.params);\n\t\tif (descriptor.renderValueLiteral !== void 0) throw new InternalError(`${descriptor.codecId} is a family codec template with its own renderValueLiteral; pass renderValueLiteral in the options instead.`);\n\t\tif (options.renderValueLiteral !== void 0) this.renderValueLiteral = options.renderValueLiteral;\n\t}\n\tfactory = (params) => this.options.factory(this, this.options.dataType, params);\n\tjsonProjection(expression, params) {\n\t\treturn this.options.jsonProjection(expression, params);\n\t}\n};\n/** Adapts a family codec template to MySQL, naming the MySQL data type it represents. */\nfunction mysqlCodec(descriptor, options) {\n\treturn blindCast(new MysqlCodecDescriptorAdapter(descriptor, options));\n}\nfunction isMysqlCodecDescriptor(value) {\n\treturn typeof value === \"object\" && value !== null && \"descriptorKind\" in value && value.descriptorKind === MYSQL_CODEC_DESCRIPTOR_KIND && \"codecId\" in value && typeof value.codecId === \"string\" && \"factory\" in value && typeof value.factory === \"function\" && \"projectJson\" in value && typeof value.projectJson === \"function\";\n}\nvar MysqlCodecDescriptorRegistryImpl = class {\n\t#descriptors;\n\tconstructor(descriptors) {\n\t\tthis.#descriptors = descriptors;\n\t\tObject.freeze(this);\n\t}\n\tdescriptorFor(codecId) {\n\t\treturn this.#descriptors.get(codecId);\n\t}\n\t*values() {\n\t\tyield* this.#descriptors.values();\n\t}\n};\n/** Indexes MySQL codec descriptors by codec id, refusing a descriptor that is not a MySQL one and a codec id given twice. */\nfunction buildMysqlCodecDescriptorRegistry(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tif (!isMysqlCodecDescriptor(descriptor)) {\n\t\t\tconst codecId = candidateCodecId(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.CODEC_DESCRIPTOR_INVALID\", `Codec descriptor '${codecId}' is not a valid MySQL codec descriptor.`, {\n\t\t\t\twhy: \"MySQL codec registries require the mysql-codec discriminant and the MySQL descriptor methods.\",\n\t\t\t\tfix: \"Extend MysqlCodecDescriptor or adapt a family descriptor with mysqlCodec().\",\n\t\t\t\tmeta: { codecId }\n\t\t\t});\n\t\t}\n\t\tif (byId.has(descriptor.codecId)) throw structuredError(\"RUNTIME.DUPLICATE_CODEC\", `Duplicate MySQL codec descriptor id '${descriptor.codecId}'.`, {\n\t\t\twhy: \"Each codecId must resolve to exactly one MySQL descriptor during registry composition.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: {\n\t\t\t\tcodecId: descriptor.codecId,\n\t\t\t\ttarget: \"mysql\"\n\t\t\t}\n\t\t});\n\t\tbyId.set(descriptor.codecId, descriptor);\n\t}\n\treturn new MysqlCodecDescriptorRegistryImpl(byId);\n}\nfunction candidateCodecId(value) {\n\treturn typeof value === \"object\" && value !== null && \"codecId\" in value && typeof value.codecId === \"string\" ? value.codecId : \"<unknown>\";\n}\n//#endregion\nexport { mysqlCodec as i, buildMysqlCodecDescriptorRegistry as n, isMysqlCodecDescriptor as r, MysqlCodecDescriptor as t };\n\n//# sourceMappingURL=codec-descriptor-Du6DSz-3.mjs.map"],"mappings":";;;;;AAKA,MAAM,8BAA8B;;;;AAIpC,IAAI,uBAAuB,cAAc,oBAAoB;CAC5D,iBAAiB;CACjB,YAAY,YAAY,KAAK;EAC5B,IAAI,IAAI,SAAS,MAAM,MAAM,gBAAgB,8CAA8C,UAAU,IAAI,QAAQ,+DAA+D;GAC/K,KAAK;GACL,KAAK;GACL,MAAM,EAAE,SAAS,IAAI,QAAQ;EAC9B,CAAC;EACD,OAAO,KAAK,eAAe,YAAY,UAAU,wBAAwB,MAAM,GAAG,CAAC,CAAC;CACrF;AACD;AACA,IAAI,8BAA8B,cAAc,qBAAqB;CACpE;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,YAAY,SAAS;EAChC,MAAM;EACN,KAAK,UAAU;EACf,KAAK,WAAW,QAAQ,SAAS;EACjC,KAAK,UAAU,WAAW;EAC1B,KAAK,SAAS,WAAW;EACzB,KAAK,eAAe,UAAU,QAAQ,SAAS,MAAM;EACrD,IAAI,WAAW,uBAAuB,KAAK,GAAG,MAAM,IAAI,cAAc,GAAG,WAAW,QAAQ,6GAA6G;EACzM,IAAI,QAAQ,uBAAuB,KAAK,GAAG,KAAK,qBAAqB,QAAQ;CAC9E;CACA,WAAW,WAAW,KAAK,QAAQ,QAAQ,MAAM,KAAK,QAAQ,UAAU,MAAM;CAC9E,eAAe,YAAY,QAAQ;EAClC,OAAO,KAAK,QAAQ,eAAe,YAAY,MAAM;CACtD;AACD;;AAEA,SAAS,WAAW,YAAY,SAAS;CACxC,OAAO,UAAU,IAAI,4BAA4B,YAAY,OAAO,CAAC;AACtE;AACA,SAAS,uBAAuB,OAAO;CACtC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,oBAAoB,SAAS,MAAM,mBAAmB,+BAA+B,aAAa,SAAS,OAAO,MAAM,YAAY,YAAY,aAAa,SAAS,OAAO,MAAM,YAAY,cAAc,iBAAiB,SAAS,OAAO,MAAM,gBAAgB;AAC3T;AACA,IAAI,mCAAmC,MAAM;CAC5C;CACA,YAAY,aAAa;EACxB,KAAKA,eAAe;EACpB,OAAO,OAAO,IAAI;CACnB;CACA,cAAc,SAAS;EACtB,OAAO,KAAKA,aAAa,IAAI,OAAO;CACrC;CACA,CAAC,SAAS;EACT,OAAO,KAAKA,aAAa,OAAO;CACjC;AACD;;AAEA,SAAS,kCAAkC,aAAa;CACvD,MAAM,uBAAuB,IAAI,IAAI;CACrC,KAAK,MAAM,cAAc,aAAa;EACrC,IAAI,CAAC,uBAAuB,UAAU,GAAG;GACxC,MAAM,UAAU,iBAAiB,UAAU;GAC3C,MAAM,gBAAgB,oCAAoC,qBAAqB,QAAQ,2CAA2C;IACjI,KAAK;IACL,KAAK;IACL,MAAM,EAAE,QAAQ;GACjB,CAAC;EACF;EACA,IAAI,KAAK,IAAI,WAAW,OAAO,GAAG,MAAM,gBAAgB,2BAA2B,wCAAwC,WAAW,QAAQ,KAAK;GAClJ,KAAK;GACL,KAAK;GACL,MAAM;IACL,SAAS,WAAW;IACpB,QAAQ;GACT;EACD,CAAC;EACD,KAAK,IAAI,WAAW,SAAS,UAAU;CACxC;CACA,OAAO,IAAI,iCAAiC,IAAI;AACjD;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,aAAa,SAAS,OAAO,MAAM,YAAY,WAAW,MAAM,UAAU;AACjI"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../../../3-targets/mysql/1-target/dist/codec-ids-cjxtOcLM.mjs
|
|
2
|
-
const MYSQL_INT_CODEC_ID = "mysql/int@1";
|
|
3
|
-
const MYSQL_BIGINT_CODEC_ID = "mysql/bigint@1";
|
|
4
|
-
const MYSQL_TEXT_CODEC_ID = "mysql/text@1";
|
|
5
|
-
const MYSQL_DATETIME_CODEC_ID = "mysql/datetime@1";
|
|
6
|
-
const MYSQL_ENUM_CODEC_ID = "mysql/enum@1";
|
|
7
|
-
//#endregion
|
|
8
|
-
export { MYSQL_TEXT_CODEC_ID as a, MYSQL_INT_CODEC_ID as i, MYSQL_DATETIME_CODEC_ID as n, MYSQL_ENUM_CODEC_ID as r, MYSQL_BIGINT_CODEC_ID as t };
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=codec-ids-cjxtOcLM-vFeQhgPm.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-ids-cjxtOcLM-vFeQhgPm.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/codec-ids-cjxtOcLM.mjs"],"sourcesContent":["//#region src/core/codec-ids.ts\nconst MYSQL_INT_CODEC_ID = \"mysql/int@1\";\nconst MYSQL_BIGINT_CODEC_ID = \"mysql/bigint@1\";\nconst MYSQL_TEXT_CODEC_ID = \"mysql/text@1\";\nconst MYSQL_DATETIME_CODEC_ID = \"mysql/datetime@1\";\nconst MYSQL_ENUM_CODEC_ID = \"mysql/enum@1\";\n//#endregion\nexport { MYSQL_TEXT_CODEC_ID as a, MYSQL_INT_CODEC_ID as i, MYSQL_DATETIME_CODEC_ID as n, MYSQL_ENUM_CODEC_ID as r, MYSQL_BIGINT_CODEC_ID as t };\n\n//# sourceMappingURL=codec-ids-cjxtOcLM.mjs.map"],"mappings":";AACA,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;AAC9B,MAAM,sBAAsB;AAC5B,MAAM,0BAA0B;AAChC,MAAM,sBAAsB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../../../3-targets/mysql/1-target/dist/codec-ids-sMOU8F-B.d.mts
|
|
2
|
-
//#region src/core/codec-ids.d.ts
|
|
3
|
-
declare const MYSQL_INT_CODEC_ID: "mysql/int@1";
|
|
4
|
-
declare const MYSQL_BIGINT_CODEC_ID: "mysql/bigint@1";
|
|
5
|
-
declare const MYSQL_TEXT_CODEC_ID: "mysql/text@1";
|
|
6
|
-
declare const MYSQL_DATETIME_CODEC_ID: "mysql/datetime@1";
|
|
7
|
-
declare const MYSQL_ENUM_CODEC_ID: "mysql/enum@1";
|
|
8
|
-
//#endregion
|
|
9
|
-
export { MYSQL_TEXT_CODEC_ID as a, MYSQL_INT_CODEC_ID as i, MYSQL_DATETIME_CODEC_ID as n, MYSQL_ENUM_CODEC_ID as r, MYSQL_BIGINT_CODEC_ID as t };
|
|
10
|
-
//# sourceMappingURL=codec-ids-sMOU8F-B-BQbCq2dr.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-ids-sMOU8F-B-BQbCq2dr.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/codec-ids-sMOU8F-B.d.mts"],"mappings":";;cACc;cACA;cACA;cACA;cACA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { t as AdaptedMysqlCodecDescriptor } from "./codec-descriptor-DXyubAS6-siA0R8Ow.mjs";
|
|
2
|
-
import "./codec-descriptor-J3TP08l8-ekLvUVxW.mjs";
|
|
3
|
-
import { a as MysqlTextDescriptor, i as MysqlIntDescriptor, n as MysqlDatetimeDescriptor, r as MysqlEnumDescriptor, t as MysqlBigintDescriptor } from "./codecs-CO_VNEYU-CwAnKzRs.mjs";
|
|
4
|
-
import { ExtractCodecTypes } from "@prisma/orm-family-sql/relational-core/ast";
|
|
5
|
-
//#region ../../../3-targets/mysql/1-target/dist/codec-types-Bd7DL1Mr.d.mts
|
|
6
|
-
//#region src/exports/codec-types.d.ts
|
|
7
|
-
declare const codecDescriptorMap: {
|
|
8
|
-
readonly char: AdaptedMysqlCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlCharDescriptor>;
|
|
9
|
-
readonly varchar: AdaptedMysqlCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlVarcharDescriptor>;
|
|
10
|
-
readonly raw: AdaptedMysqlCodecDescriptor<import("@prisma/orm-family-sql/relational-core/ast").SqlRawDescriptor>;
|
|
11
|
-
readonly text: MysqlTextDescriptor;
|
|
12
|
-
readonly int: MysqlIntDescriptor;
|
|
13
|
-
readonly bigint: MysqlBigintDescriptor;
|
|
14
|
-
readonly datetime: MysqlDatetimeDescriptor;
|
|
15
|
-
readonly enum: MysqlEnumDescriptor;
|
|
16
|
-
};
|
|
17
|
-
type Resolve<T> = { readonly [K in keyof T]: { readonly [P in keyof T[K]]: T[K][P]; }; };
|
|
18
|
-
type CodecTypes = Resolve<ExtractCodecTypes<typeof codecDescriptorMap>>;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { CodecTypes as t };
|
|
21
|
-
//# sourceMappingURL=codec-types-Bd7DL1Mr-CZWNfnp9.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-Bd7DL1Mr-CZWNfnp9.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/codec-types-Bd7DL1Mr.d.mts"],"mappings":";;;;;;cAKc;WACH,MAAM,wEAAwE;WAC9E,SAAS,wEAAwE;WACjF,KAAK,wEAAwE;WAC7E,MAAM;WACN,KAAK;WACL,QAAQ;WACR,UAAU;WACV,MAAM;;KAEZ,QAAQ,iBAAiB,WAAW,gBAAgB,WAAW,EAAE,KAAK,EAAE,GAAG;KAC3E,aAAa,QAAQ,yBAAyB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./codec-types-Ja2kLzLS.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./codec-types-Bd7DL1Mr-CZWNfnp9.mjs";
|
package/dist/codecs-C00kjHgh.mjs
DELETED
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { i as mysqlCodec, n as buildMysqlCodecDescriptorRegistry, t as MysqlCodecDescriptor } from "./codec-descriptor-Du6DSz-3-ytBCu_mq.mjs";
|
|
2
|
-
import { a as MYSQL_TEXT_CODEC_ID, i as MYSQL_INT_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, r as MYSQL_ENUM_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID } from "./codec-ids-cjxtOcLM-vFeQhgPm.mjs";
|
|
3
|
-
import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-rvH_F2Yj-BQrO_--u.mjs";
|
|
4
|
-
import { a as mysqlDatetime, c as mysqlEnum, d as mysqlText, l as mysqlEnumParams, n as mysqlChar, o as mysqlDatetimeParams, p as mysqlVarchar, t as mysqlBigint, u as mysqlInt } from "./data-types-Dv9gwVRV-BZPzCWZk.mjs";
|
|
5
|
-
import { CodecImpl, decimalTextBigintLiteral, refuseJsonValue, renderTsLiteral } from "@prisma/orm-framework/components/codec";
|
|
6
|
-
import { CastExpr, SqlCharCodec, SqlRawCodec, SqlVarcharCodec, sqlCharDescriptor, sqlRawDescriptor, sqlVarcharDescriptor } from "@prisma/orm-family-sql/relational-core/ast";
|
|
7
|
-
import { sqlRawDataType } from "@prisma/orm-family-sql/contract/data-type";
|
|
8
|
-
import { extractCodecLookup } from "@prisma/orm-framework/components/control";
|
|
9
|
-
import { buildCodecDescriptorRegistry } from "@prisma/orm-family-sql/relational-core/codec-descriptor-registry";
|
|
10
|
-
//#region ../../../3-targets/mysql/1-target/dist/codecs.mjs
|
|
11
|
-
const DECIMAL_INTEGER = /^-?\d+$/;
|
|
12
|
-
const BIGINT_MIN = -(2n ** 63n);
|
|
13
|
-
const BIGINT_MAX = 2n ** 63n - 1n;
|
|
14
|
-
/** Projects a column whose JSON form, a number or a string, is what its `fromWire` reads. */
|
|
15
|
-
const identityJsonProjection = (expression) => expression;
|
|
16
|
-
/** Projects a bigint as its decimal text: a JSON number past 2^53 would lose digits when JavaScript parses the include. */
|
|
17
|
-
const textJsonProjection = (expression) => CastExpr.as(expression, "CHAR");
|
|
18
|
-
function decodeFailed(codecId, expected, received) {
|
|
19
|
-
throw mysqlError("RUNTIME.DECODE_FAILED", `${codecId} wire value must be ${expected}`, { meta: {
|
|
20
|
-
codecId,
|
|
21
|
-
received: String(received)
|
|
22
|
-
} });
|
|
23
|
-
}
|
|
24
|
-
function encodeFailed(codecId, expected, received) {
|
|
25
|
-
throw mysqlError("RUNTIME.ENCODE_FAILED", `${codecId} value must be ${expected}`, { meta: {
|
|
26
|
-
codecId,
|
|
27
|
-
received: String(received)
|
|
28
|
-
} });
|
|
29
|
-
}
|
|
30
|
-
const mysqlSqlCharDescriptor = mysqlCodec(sqlCharDescriptor, {
|
|
31
|
-
dataType: mysqlChar,
|
|
32
|
-
renderValueLiteral: renderTsLiteral,
|
|
33
|
-
jsonProjection: identityJsonProjection,
|
|
34
|
-
factory: (descriptor, dataType, params) => () => new SqlCharCodec(descriptor, dataType, params)
|
|
35
|
-
});
|
|
36
|
-
const mysqlSqlVarcharDescriptor = mysqlCodec(sqlVarcharDescriptor, {
|
|
37
|
-
dataType: mysqlVarchar,
|
|
38
|
-
renderValueLiteral: renderTsLiteral,
|
|
39
|
-
jsonProjection: identityJsonProjection,
|
|
40
|
-
factory: (descriptor, dataType, params) => () => new SqlVarcharCodec(descriptor, dataType, params)
|
|
41
|
-
});
|
|
42
|
-
const mysqlSqlRawDescriptor = mysqlCodec(sqlRawDescriptor, {
|
|
43
|
-
dataType: sqlRawDataType,
|
|
44
|
-
jsonProjection: () => {
|
|
45
|
-
throw mysqlQueryNotYetSupported("Reading a raw column inside an include");
|
|
46
|
-
},
|
|
47
|
-
factory: (descriptor, dataType, params) => () => new SqlRawCodec(descriptor, dataType, params)
|
|
48
|
-
});
|
|
49
|
-
var MysqlTextCodec = class extends CodecImpl {
|
|
50
|
-
async toWire(value, _ctx) {
|
|
51
|
-
return value;
|
|
52
|
-
}
|
|
53
|
-
async fromWire(wire, _ctx) {
|
|
54
|
-
return wire;
|
|
55
|
-
}
|
|
56
|
-
fromDataTypeValue(value) {
|
|
57
|
-
return value.value;
|
|
58
|
-
}
|
|
59
|
-
toDataTypeValue(input) {
|
|
60
|
-
return this.dataTypeValueOf(input);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var MysqlTextDescriptor = class extends MysqlCodecDescriptor {
|
|
64
|
-
dataType = mysqlText.id;
|
|
65
|
-
codecId = MYSQL_TEXT_CODEC_ID;
|
|
66
|
-
traits = [
|
|
67
|
-
"equality",
|
|
68
|
-
"order",
|
|
69
|
-
"textual"
|
|
70
|
-
];
|
|
71
|
-
paramsSchema = void 0;
|
|
72
|
-
renderValueLiteral(value) {
|
|
73
|
-
return renderTsLiteral(value);
|
|
74
|
-
}
|
|
75
|
-
jsonProjection(expression) {
|
|
76
|
-
return identityJsonProjection(expression);
|
|
77
|
-
}
|
|
78
|
-
factory() {
|
|
79
|
-
return () => new MysqlTextCodec(this, mysqlText);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const mysqlTextDescriptor = new MysqlTextDescriptor();
|
|
83
|
-
/** A MySQL `int` as a JavaScript number. A row carries it as decimal text, and an include's JSON as a number. */
|
|
84
|
-
var MysqlIntCodec = class extends CodecImpl {
|
|
85
|
-
async toWire(value, _ctx) {
|
|
86
|
-
if (!Number.isSafeInteger(value)) return encodeFailed(MYSQL_INT_CODEC_ID, "an integer", value);
|
|
87
|
-
return value;
|
|
88
|
-
}
|
|
89
|
-
async fromWire(wire, _ctx) {
|
|
90
|
-
if (typeof wire === "number") return wire;
|
|
91
|
-
if (!DECIMAL_INTEGER.test(wire)) return decodeFailed(MYSQL_INT_CODEC_ID, "the decimal text of an integer", wire);
|
|
92
|
-
return Number(wire);
|
|
93
|
-
}
|
|
94
|
-
fromDataTypeValue(value) {
|
|
95
|
-
return value.value;
|
|
96
|
-
}
|
|
97
|
-
toDataTypeValue(input) {
|
|
98
|
-
return this.dataTypeValueOf(input);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
var MysqlIntDescriptor = class extends MysqlCodecDescriptor {
|
|
102
|
-
dataType = mysqlInt.id;
|
|
103
|
-
codecId = MYSQL_INT_CODEC_ID;
|
|
104
|
-
traits = [
|
|
105
|
-
"equality",
|
|
106
|
-
"order",
|
|
107
|
-
"numeric"
|
|
108
|
-
];
|
|
109
|
-
paramsSchema = void 0;
|
|
110
|
-
renderValueLiteral(value) {
|
|
111
|
-
return renderTsLiteral(value);
|
|
112
|
-
}
|
|
113
|
-
jsonProjection(expression) {
|
|
114
|
-
return identityJsonProjection(expression);
|
|
115
|
-
}
|
|
116
|
-
factory() {
|
|
117
|
-
return () => new MysqlIntCodec(this, mysqlInt);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
const mysqlIntDescriptor = new MysqlIntDescriptor();
|
|
121
|
-
/** 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. */
|
|
122
|
-
var MysqlBigintCodec = class extends CodecImpl {
|
|
123
|
-
/** 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. */
|
|
124
|
-
async toWire(value, _ctx) {
|
|
125
|
-
if (typeof value !== "bigint" || value < BIGINT_MIN || value > BIGINT_MAX) return encodeFailed(MYSQL_BIGINT_CODEC_ID, `a bigint from ${BIGINT_MIN} to ${BIGINT_MAX}`, value);
|
|
126
|
-
return value;
|
|
127
|
-
}
|
|
128
|
-
async fromWire(wire, _ctx) {
|
|
129
|
-
if (typeof wire === "bigint") return wire;
|
|
130
|
-
if (!DECIMAL_INTEGER.test(wire)) return decodeFailed(MYSQL_BIGINT_CODEC_ID, "the decimal text of an integer", wire);
|
|
131
|
-
return BigInt(wire);
|
|
132
|
-
}
|
|
133
|
-
fromDataTypeValue(value) {
|
|
134
|
-
return BigInt(value.value);
|
|
135
|
-
}
|
|
136
|
-
toDataTypeValue(input) {
|
|
137
|
-
return this.dataTypeValueOf(input.toString());
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
var MysqlBigintDescriptor = class extends MysqlCodecDescriptor {
|
|
141
|
-
dataType = mysqlBigint.id;
|
|
142
|
-
codecId = MYSQL_BIGINT_CODEC_ID;
|
|
143
|
-
traits = [
|
|
144
|
-
"equality",
|
|
145
|
-
"order",
|
|
146
|
-
"numeric"
|
|
147
|
-
];
|
|
148
|
-
paramsSchema = void 0;
|
|
149
|
-
renderValueLiteral(value) {
|
|
150
|
-
return decimalTextBigintLiteral(value);
|
|
151
|
-
}
|
|
152
|
-
jsonProjection(expression) {
|
|
153
|
-
return textJsonProjection(expression);
|
|
154
|
-
}
|
|
155
|
-
factory() {
|
|
156
|
-
return () => new MysqlBigintCodec(this, mysqlBigint);
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
const mysqlBigintDescriptor = new MysqlBigintDescriptor();
|
|
160
|
-
const WIRE_DATETIME = /^(\d{4}-\d{2}-\d{2})[ T](\d{2}:\d{2}:\d{2}(?:\.\d+)?)$/;
|
|
161
|
-
/**
|
|
162
|
-
* 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.
|
|
163
|
-
*/
|
|
164
|
-
function decodeMysqlDatetime(wire) {
|
|
165
|
-
const match = WIRE_DATETIME.exec(wire);
|
|
166
|
-
const date = match === null ? void 0 : /* @__PURE__ */ new Date(`${match[1]}T${match[2]}Z`);
|
|
167
|
-
if (date === void 0 || Number.isNaN(date.getTime())) return decodeFailed(MYSQL_DATETIME_CODEC_ID, "a date and time as MySQL prints it", wire);
|
|
168
|
-
return date;
|
|
169
|
-
}
|
|
170
|
-
/** The text MySQL reads for an instant in UTC, with millisecond digits. */
|
|
171
|
-
function encodeMysqlDatetime(value) {
|
|
172
|
-
if (Number.isNaN(value.getTime())) return encodeFailed(MYSQL_DATETIME_CODEC_ID, "a valid Date", value);
|
|
173
|
-
return value.toISOString().replace("T", " ").replace("Z", "");
|
|
174
|
-
}
|
|
175
|
-
/** A MySQL `datetime` as a JavaScript `Date`, read and written in UTC. */
|
|
176
|
-
var MysqlDatetimeCodec = class extends CodecImpl {
|
|
177
|
-
async toWire(value, _ctx) {
|
|
178
|
-
return encodeMysqlDatetime(value);
|
|
179
|
-
}
|
|
180
|
-
async fromWire(wire, _ctx) {
|
|
181
|
-
return decodeMysqlDatetime(wire);
|
|
182
|
-
}
|
|
183
|
-
fromDataTypeValue(value) {
|
|
184
|
-
if (/[1-9]/.test(/\.(\d+)/.exec(value.value)?.[1]?.slice(3) ?? "")) return refuseJsonValue(this.id, `a datetime with no digits below a millisecond, which a Date drops: ${JSON.stringify(value.value)} has them`, value.value);
|
|
185
|
-
return /* @__PURE__ */ new Date(`${value.value}Z`);
|
|
186
|
-
}
|
|
187
|
-
toDataTypeValue(input) {
|
|
188
|
-
return this.dataTypeValueOf(input.toISOString().replace("Z", ""));
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
var MysqlDatetimeDescriptor = class extends MysqlCodecDescriptor {
|
|
192
|
-
dataType = mysqlDatetime.id;
|
|
193
|
-
codecId = MYSQL_DATETIME_CODEC_ID;
|
|
194
|
-
traits = ["equality", "order"];
|
|
195
|
-
paramsSchema = mysqlDatetimeParams;
|
|
196
|
-
jsonProjection(expression) {
|
|
197
|
-
return identityJsonProjection(expression);
|
|
198
|
-
}
|
|
199
|
-
factory(params) {
|
|
200
|
-
return () => new MysqlDatetimeCodec(this, mysqlDatetime, params);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
const mysqlDatetimeDescriptor = new MysqlDatetimeDescriptor();
|
|
204
|
-
/** A native MySQL enum column, whose value is the member's text. */
|
|
205
|
-
var MysqlEnumCodec = class extends CodecImpl {
|
|
206
|
-
async toWire(value, _ctx) {
|
|
207
|
-
return value;
|
|
208
|
-
}
|
|
209
|
-
async fromWire(wire, _ctx) {
|
|
210
|
-
return wire;
|
|
211
|
-
}
|
|
212
|
-
fromDataTypeValue(value) {
|
|
213
|
-
return value.value;
|
|
214
|
-
}
|
|
215
|
-
toDataTypeValue(input) {
|
|
216
|
-
return this.dataTypeValueOf(input);
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
var MysqlEnumDescriptor = class extends MysqlCodecDescriptor {
|
|
220
|
-
dataType = mysqlEnum.id;
|
|
221
|
-
codecId = MYSQL_ENUM_CODEC_ID;
|
|
222
|
-
traits = [
|
|
223
|
-
"equality",
|
|
224
|
-
"order",
|
|
225
|
-
"textual"
|
|
226
|
-
];
|
|
227
|
-
paramsSchema = mysqlEnumParams;
|
|
228
|
-
renderValueLiteral(value) {
|
|
229
|
-
return renderTsLiteral(value);
|
|
230
|
-
}
|
|
231
|
-
jsonProjection(expression) {
|
|
232
|
-
return identityJsonProjection(expression);
|
|
233
|
-
}
|
|
234
|
-
factory(params) {
|
|
235
|
-
return () => new MysqlEnumCodec(this, mysqlEnum, params);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
/** Every codec descriptor this target ships. */
|
|
239
|
-
const codecDescriptors = [
|
|
240
|
-
mysqlSqlCharDescriptor,
|
|
241
|
-
mysqlSqlVarcharDescriptor,
|
|
242
|
-
mysqlSqlRawDescriptor,
|
|
243
|
-
mysqlTextDescriptor,
|
|
244
|
-
mysqlIntDescriptor,
|
|
245
|
-
mysqlBigintDescriptor,
|
|
246
|
-
mysqlDatetimeDescriptor,
|
|
247
|
-
new MysqlEnumDescriptor()
|
|
248
|
-
];
|
|
249
|
-
/** Every codec descriptor `@internal/target-mysql` ships, for consumers that enumerate or look up a MySQL codec by id. ADR 208. */
|
|
250
|
-
const mysqlCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);
|
|
251
|
-
const mysqlCodecDescriptorRegistry = buildMysqlCodecDescriptorRegistry(codecDescriptors);
|
|
252
|
-
function descriptorsFrom(contributors) {
|
|
253
|
-
return contributors.flatMap((contributor) => contributor.types?.codecTypes?.codecDescriptors ?? []);
|
|
254
|
-
}
|
|
255
|
-
function buildMysqlCodecRegistry(descriptors) {
|
|
256
|
-
const descriptorRegistry = buildMysqlCodecDescriptorRegistry(descriptors);
|
|
257
|
-
const registry = {
|
|
258
|
-
...extractCodecLookup([{
|
|
259
|
-
id: "mysql-codecs",
|
|
260
|
-
types: { codecTypes: { codecDescriptors: Array.from(descriptorRegistry.values()) } }
|
|
261
|
-
}]),
|
|
262
|
-
descriptorFor: (codecId) => descriptorRegistry.descriptorFor(codecId),
|
|
263
|
-
values: () => descriptorRegistry.values()
|
|
264
|
-
};
|
|
265
|
-
return Object.freeze(registry);
|
|
266
|
-
}
|
|
267
|
-
/** The codec registry of a MySQL stack: the target's built-in codecs and those its extensions contribute. */
|
|
268
|
-
function assembleMysqlCodecRegistry(target, extensions) {
|
|
269
|
-
return buildMysqlCodecRegistry([
|
|
270
|
-
...descriptorsFrom([target]),
|
|
271
|
-
...mysqlCodecDescriptorRegistry.values(),
|
|
272
|
-
...descriptorsFrom(extensions)
|
|
273
|
-
]);
|
|
274
|
-
}
|
|
275
|
-
/** A codec registry of the MySQL built-in codecs only. */
|
|
276
|
-
function createMysqlBuiltinCodecLookup() {
|
|
277
|
-
return buildMysqlCodecRegistry([...mysqlCodecDescriptorRegistry.values()]);
|
|
278
|
-
}
|
|
279
|
-
//#endregion
|
|
280
|
-
export { mysqlCodecDescriptorRegistry as a, encodeMysqlDatetime as i, createMysqlBuiltinCodecLookup as n, mysqlCodecRegistry as o, decodeMysqlDatetime as r, assembleMysqlCodecRegistry as t };
|
|
281
|
-
|
|
282
|
-
//# sourceMappingURL=codecs-C00kjHgh.mjs.map
|