@atscript/db-mysql 0.1.103 → 0.1.105

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/index.cjs CHANGED
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_plugin = require("./plugin-AzwuXV59.cjs");
3
2
  let _atscript_db = require("@atscript/db");
4
3
  let _atscript_db_sql_tools = require("@atscript/db-sql-tools");
5
4
  //#region src/sql-builder.ts
@@ -751,6 +750,7 @@ var MysqlAdapter = class MysqlAdapter extends _atscript_db.BaseDbAdapter {
751
750
  await this._exec().exec(ddl);
752
751
  }
753
752
  typeMapper(field) {
753
+ if (field.encrypted) return "TEXT";
754
754
  if (this._vectorFields.has(field.path)) {
755
755
  const vec = this._vectorFields.get(field.path);
756
756
  return this._supportsVector ? `VECTOR(${vec.dimensions})` : "JSON";
@@ -779,6 +779,10 @@ var MysqlAdapter = class MysqlAdapter extends _atscript_db.BaseDbAdapter {
779
779
  const sql = `DROP INDEX ${qi(name)} ON ${quoteTableName(this.resolveTableName())}`;
780
780
  this._log(sql);
781
781
  await this._exec().exec(sql);
782
+ },
783
+ warnUnsupportedTypes: {
784
+ adapter: "mysql",
785
+ types: ["geo"]
782
786
  }
783
787
  });
784
788
  }
@@ -1189,6 +1193,5 @@ function createAdapter(uri, options) {
1189
1193
  //#endregion
1190
1194
  exports.Mysql2Driver = Mysql2Driver;
1191
1195
  exports.MysqlAdapter = MysqlAdapter;
1192
- exports.MysqlPlugin = require_plugin.MysqlPlugin;
1193
1196
  exports.buildWhere = buildWhere;
1194
1197
  exports.createAdapter = createAdapter;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import { t as MysqlPlugin } from "./index-BLQr6loH.cjs";
2
1
  import { BaseDbAdapter, DbQuery, DbSpace, FilterExpr, TColumnDiff, TDbDefaultFn, TDbDeleteResult, TDbFieldMeta, TDbInsertManyResult, TDbInsertResult, TDbUpdateResult, TExistingColumn, TExistingTableOption, TFieldOps, TSearchIndexInfo, TSyncColumnResult, TTableOptionDiff, TValueFormatterPair } from "@atscript/db";
3
2
  import { TMetadataMap } from "@atscript/typescript/utils";
4
3
  import { FilterExpr as FilterExpr$1 } from "@uniqu/core";
@@ -268,4 +267,4 @@ declare function buildWhere(filter: FilterExpr$1): TSqlFragment$1;
268
267
  */
269
268
  declare function createAdapter(uri: string, options?: Record<string, unknown>): DbSpace;
270
269
  //#endregion
271
- export { Mysql2Driver, MysqlAdapter, MysqlPlugin, type TMysqlConnection, type TMysqlDriver, type TMysqlRunResult, type TSqlFragment, buildWhere, createAdapter };
270
+ export { Mysql2Driver, MysqlAdapter, type TMysqlConnection, type TMysqlDriver, type TMysqlRunResult, type TSqlFragment, buildWhere, createAdapter };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- import { t as MysqlPlugin } from "./index-BLQr6loH.mjs";
2
1
  import { BaseDbAdapter, DbQuery, DbSpace, FilterExpr, TColumnDiff, TDbDefaultFn, TDbDeleteResult, TDbFieldMeta, TDbInsertManyResult, TDbInsertResult, TDbUpdateResult, TExistingColumn, TExistingTableOption, TFieldOps, TSearchIndexInfo, TSyncColumnResult, TTableOptionDiff, TValueFormatterPair } from "@atscript/db";
3
2
  import { TSqlFragment, TSqlFragment as TSqlFragment$1 } from "@atscript/db-sql-tools";
4
3
  import { TMetadataMap } from "@atscript/typescript/utils";
@@ -268,4 +267,4 @@ declare function buildWhere(filter: FilterExpr$1): TSqlFragment$1;
268
267
  */
269
268
  declare function createAdapter(uri: string, options?: Record<string, unknown>): DbSpace;
270
269
  //#endregion
271
- export { Mysql2Driver, MysqlAdapter, MysqlPlugin, type TMysqlConnection, type TMysqlDriver, type TMysqlRunResult, type TSqlFragment, buildWhere, createAdapter };
270
+ export { Mysql2Driver, MysqlAdapter, type TMysqlConnection, type TMysqlDriver, type TMysqlRunResult, type TSqlFragment, buildWhere, createAdapter };
package/dist/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import { t as MysqlPlugin } from "./plugin-CPJY5K_I.mjs";
2
1
  import { AtscriptDbView, BaseDbAdapter, DbError, DbSpace } from "@atscript/db";
3
2
  import { buildAggregateCount, buildAggregateSelect, buildCreateView, buildDelete, buildInsert, buildSelect, buildUpdate, buildWhere as buildWhere$1, defaultValueForType, defaultValueToSqlLiteral, parseRegexString, refActionToSql, toSqlValue } from "@atscript/db-sql-tools";
4
3
  //#region src/sql-builder.ts
@@ -750,6 +749,7 @@ var MysqlAdapter = class MysqlAdapter extends BaseDbAdapter {
750
749
  await this._exec().exec(ddl);
751
750
  }
752
751
  typeMapper(field) {
752
+ if (field.encrypted) return "TEXT";
753
753
  if (this._vectorFields.has(field.path)) {
754
754
  const vec = this._vectorFields.get(field.path);
755
755
  return this._supportsVector ? `VECTOR(${vec.dimensions})` : "JSON";
@@ -778,6 +778,10 @@ var MysqlAdapter = class MysqlAdapter extends BaseDbAdapter {
778
778
  const sql = `DROP INDEX ${qi(name)} ON ${quoteTableName(this.resolveTableName())}`;
779
779
  this._log(sql);
780
780
  await this._exec().exec(sql);
781
+ },
782
+ warnUnsupportedTypes: {
783
+ adapter: "mysql",
784
+ types: ["geo"]
781
785
  }
782
786
  });
783
787
  }
@@ -1186,4 +1190,4 @@ function createAdapter(uri, options) {
1186
1190
  return new DbSpace(() => new MysqlAdapter(driver));
1187
1191
  }
1188
1192
  //#endregion
1189
- export { Mysql2Driver, MysqlAdapter, MysqlPlugin, buildWhere, createAdapter };
1193
+ export { Mysql2Driver, MysqlAdapter, buildWhere, createAdapter };
package/dist/plugin.cjs CHANGED
@@ -1,3 +1,94 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_plugin = require("./plugin-AzwuXV59.cjs");
3
- exports.MysqlPlugin = require_plugin.MysqlPlugin;
2
+ let _atscript_core = require("@atscript/core");
3
+ //#region src/plugin/annotations.ts
4
+ /**
5
+ * MySQL-specific annotations.
6
+ *
7
+ * Merged into the global config under `{ db: { mysql: ... } }` so they
8
+ * live alongside core's `@db.table`, `@db.index.*`, etc.
9
+ *
10
+ * These annotations opt-in to MySQL-specific behavior. Files using only
11
+ * portable `@db.*` annotations remain adapter-agnostic.
12
+ */
13
+ const annotations = {
14
+ engine: new _atscript_core.AnnotationSpec({
15
+ description: "Specifies the MySQL storage engine.\n\n**Default:** `\"InnoDB\"`\n\n```atscript\n@db.mysql.engine \"MyISAM\"\nexport interface Logs { ... }\n```",
16
+ nodeType: ["interface"],
17
+ multiple: false,
18
+ argument: {
19
+ name: "engine",
20
+ type: "string",
21
+ values: [
22
+ "InnoDB",
23
+ "MyISAM",
24
+ "MEMORY",
25
+ "CSV",
26
+ "ARCHIVE"
27
+ ],
28
+ description: "MySQL storage engine name."
29
+ }
30
+ }),
31
+ charset: new _atscript_core.AnnotationSpec({
32
+ description: "Specifies the character set for the table or column.\n\n**Default:** `\"utf8mb4\"`\n\n```atscript\n@db.mysql.charset \"latin1\"\nexport interface Legacy { ... }\n```",
33
+ nodeType: ["interface", "prop"],
34
+ multiple: false,
35
+ argument: {
36
+ name: "charset",
37
+ type: "string",
38
+ values: [
39
+ "utf8mb4",
40
+ "utf8",
41
+ "latin1",
42
+ "ascii",
43
+ "binary"
44
+ ],
45
+ description: "MySQL character set name."
46
+ }
47
+ }),
48
+ collate: new _atscript_core.AnnotationSpec({
49
+ description: "Specifies a native MySQL collation (overrides portable `@db.column.collate`).\n\n```atscript\n@db.mysql.collate \"utf8mb4_turkish_ci\"\nname: string\n```",
50
+ nodeType: ["interface", "prop"],
51
+ multiple: false,
52
+ argument: {
53
+ name: "collation",
54
+ type: "string",
55
+ description: "Native MySQL collation name (e.g., \"utf8mb4_turkish_ci\")."
56
+ }
57
+ }),
58
+ unsigned: new _atscript_core.AnnotationSpec({
59
+ description: "Adds the UNSIGNED modifier to an integer column.\n\n```atscript\n@db.mysql.unsigned\nage: number.int\n```",
60
+ nodeType: ["prop"],
61
+ multiple: false
62
+ }),
63
+ type: new _atscript_core.AnnotationSpec({
64
+ description: "Overrides the native MySQL column type.\n\n```atscript\n@db.mysql.type \"MEDIUMTEXT\"\nbio: string\n```",
65
+ nodeType: ["prop"],
66
+ multiple: false,
67
+ argument: {
68
+ name: "type",
69
+ type: "string",
70
+ description: "Native MySQL column type (e.g., \"MEDIUMTEXT\", \"TINYTEXT\")."
71
+ }
72
+ }),
73
+ onUpdate: new _atscript_core.AnnotationSpec({
74
+ description: "Sets the MySQL ON UPDATE clause for a column.\n\n```atscript\n@db.mysql.onUpdate \"CURRENT_TIMESTAMP\"\nupdatedAt: number.timestamp\n```",
75
+ nodeType: ["prop"],
76
+ multiple: false,
77
+ argument: {
78
+ name: "expression",
79
+ type: "string",
80
+ values: ["CURRENT_TIMESTAMP"],
81
+ description: "Expression to evaluate on row update."
82
+ }
83
+ })
84
+ };
85
+ //#endregion
86
+ //#region src/plugin/index.ts
87
+ const MysqlPlugin = () => ({
88
+ name: "mysql",
89
+ config() {
90
+ return { annotations: { db: { mysql: annotations } } };
91
+ }
92
+ });
93
+ //#endregion
94
+ exports.MysqlPlugin = MysqlPlugin;
package/dist/plugin.d.cts CHANGED
@@ -1,2 +1,6 @@
1
- import { t as MysqlPlugin } from "./index-BLQr6loH.cjs";
1
+ import { TAtscriptPlugin } from "@atscript/core";
2
+
3
+ //#region src/plugin/index.d.ts
4
+ declare const MysqlPlugin: () => TAtscriptPlugin;
5
+ //#endregion
2
6
  export { MysqlPlugin };
package/dist/plugin.d.mts CHANGED
@@ -1,2 +1,6 @@
1
- import { t as MysqlPlugin } from "./index-BLQr6loH.mjs";
1
+ import { TAtscriptPlugin } from "@atscript/core";
2
+
3
+ //#region src/plugin/index.d.ts
4
+ declare const MysqlPlugin: () => TAtscriptPlugin;
5
+ //#endregion
2
6
  export { MysqlPlugin };
package/dist/plugin.mjs CHANGED
@@ -1,2 +1,93 @@
1
- import { t as MysqlPlugin } from "./plugin-CPJY5K_I.mjs";
1
+ import { AnnotationSpec } from "@atscript/core";
2
+ //#region src/plugin/annotations.ts
3
+ /**
4
+ * MySQL-specific annotations.
5
+ *
6
+ * Merged into the global config under `{ db: { mysql: ... } }` so they
7
+ * live alongside core's `@db.table`, `@db.index.*`, etc.
8
+ *
9
+ * These annotations opt-in to MySQL-specific behavior. Files using only
10
+ * portable `@db.*` annotations remain adapter-agnostic.
11
+ */
12
+ const annotations = {
13
+ engine: new AnnotationSpec({
14
+ description: "Specifies the MySQL storage engine.\n\n**Default:** `\"InnoDB\"`\n\n```atscript\n@db.mysql.engine \"MyISAM\"\nexport interface Logs { ... }\n```",
15
+ nodeType: ["interface"],
16
+ multiple: false,
17
+ argument: {
18
+ name: "engine",
19
+ type: "string",
20
+ values: [
21
+ "InnoDB",
22
+ "MyISAM",
23
+ "MEMORY",
24
+ "CSV",
25
+ "ARCHIVE"
26
+ ],
27
+ description: "MySQL storage engine name."
28
+ }
29
+ }),
30
+ charset: new AnnotationSpec({
31
+ description: "Specifies the character set for the table or column.\n\n**Default:** `\"utf8mb4\"`\n\n```atscript\n@db.mysql.charset \"latin1\"\nexport interface Legacy { ... }\n```",
32
+ nodeType: ["interface", "prop"],
33
+ multiple: false,
34
+ argument: {
35
+ name: "charset",
36
+ type: "string",
37
+ values: [
38
+ "utf8mb4",
39
+ "utf8",
40
+ "latin1",
41
+ "ascii",
42
+ "binary"
43
+ ],
44
+ description: "MySQL character set name."
45
+ }
46
+ }),
47
+ collate: new AnnotationSpec({
48
+ description: "Specifies a native MySQL collation (overrides portable `@db.column.collate`).\n\n```atscript\n@db.mysql.collate \"utf8mb4_turkish_ci\"\nname: string\n```",
49
+ nodeType: ["interface", "prop"],
50
+ multiple: false,
51
+ argument: {
52
+ name: "collation",
53
+ type: "string",
54
+ description: "Native MySQL collation name (e.g., \"utf8mb4_turkish_ci\")."
55
+ }
56
+ }),
57
+ unsigned: new AnnotationSpec({
58
+ description: "Adds the UNSIGNED modifier to an integer column.\n\n```atscript\n@db.mysql.unsigned\nage: number.int\n```",
59
+ nodeType: ["prop"],
60
+ multiple: false
61
+ }),
62
+ type: new AnnotationSpec({
63
+ description: "Overrides the native MySQL column type.\n\n```atscript\n@db.mysql.type \"MEDIUMTEXT\"\nbio: string\n```",
64
+ nodeType: ["prop"],
65
+ multiple: false,
66
+ argument: {
67
+ name: "type",
68
+ type: "string",
69
+ description: "Native MySQL column type (e.g., \"MEDIUMTEXT\", \"TINYTEXT\")."
70
+ }
71
+ }),
72
+ onUpdate: new AnnotationSpec({
73
+ description: "Sets the MySQL ON UPDATE clause for a column.\n\n```atscript\n@db.mysql.onUpdate \"CURRENT_TIMESTAMP\"\nupdatedAt: number.timestamp\n```",
74
+ nodeType: ["prop"],
75
+ multiple: false,
76
+ argument: {
77
+ name: "expression",
78
+ type: "string",
79
+ values: ["CURRENT_TIMESTAMP"],
80
+ description: "Expression to evaluate on row update."
81
+ }
82
+ })
83
+ };
84
+ //#endregion
85
+ //#region src/plugin/index.ts
86
+ const MysqlPlugin = () => ({
87
+ name: "mysql",
88
+ config() {
89
+ return { annotations: { db: { mysql: annotations } } };
90
+ }
91
+ });
92
+ //#endregion
2
93
  export { MysqlPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-mysql",
3
- "version": "0.1.103",
3
+ "version": "0.1.105",
4
4
  "description": "MySQL adapter for @atscript/db with mysql2 driver support.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -41,19 +41,19 @@
41
41
  "access": "public"
42
42
  },
43
43
  "devDependencies": {
44
- "@atscript/core": "^0.1.75",
45
- "@atscript/typescript": "^0.1.75",
44
+ "@atscript/core": "^0.1.76",
45
+ "@atscript/typescript": "^0.1.76",
46
46
  "@uniqu/core": "^0.1.6",
47
47
  "mysql2": "^3.11.0",
48
- "unplugin-atscript": "^0.1.75"
48
+ "unplugin-atscript": "^0.1.76"
49
49
  },
50
50
  "peerDependencies": {
51
- "@atscript/core": "^0.1.75",
52
- "@atscript/typescript": "^0.1.75",
51
+ "@atscript/core": "^0.1.76",
52
+ "@atscript/typescript": "^0.1.76",
53
53
  "@uniqu/core": "^0.1.6",
54
54
  "mysql2": ">=3.0.0",
55
- "@atscript/db": "^0.1.103",
56
- "@atscript/db-sql-tools": "^0.1.103"
55
+ "@atscript/db": "^0.1.105",
56
+ "@atscript/db-sql-tools": "^0.1.105"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "mysql2": {
@@ -1,6 +0,0 @@
1
- import { TAtscriptPlugin } from "@atscript/core";
2
-
3
- //#region src/plugin/index.d.ts
4
- declare const MysqlPlugin: () => TAtscriptPlugin;
5
- //#endregion
6
- export { MysqlPlugin as t };
@@ -1,6 +0,0 @@
1
- import { TAtscriptPlugin } from "@atscript/core";
2
-
3
- //#region src/plugin/index.d.ts
4
- declare const MysqlPlugin: () => TAtscriptPlugin;
5
- //#endregion
6
- export { MysqlPlugin as t };
@@ -1,98 +0,0 @@
1
- let _atscript_core = require("@atscript/core");
2
- //#region src/plugin/annotations.ts
3
- /**
4
- * MySQL-specific annotations.
5
- *
6
- * Merged into the global config under `{ db: { mysql: ... } }` so they
7
- * live alongside core's `@db.table`, `@db.index.*`, etc.
8
- *
9
- * These annotations opt-in to MySQL-specific behavior. Files using only
10
- * portable `@db.*` annotations remain adapter-agnostic.
11
- */
12
- const annotations = {
13
- engine: new _atscript_core.AnnotationSpec({
14
- description: "Specifies the MySQL storage engine.\n\n**Default:** `\"InnoDB\"`\n\n```atscript\n@db.mysql.engine \"MyISAM\"\nexport interface Logs { ... }\n```",
15
- nodeType: ["interface"],
16
- multiple: false,
17
- argument: {
18
- name: "engine",
19
- type: "string",
20
- values: [
21
- "InnoDB",
22
- "MyISAM",
23
- "MEMORY",
24
- "CSV",
25
- "ARCHIVE"
26
- ],
27
- description: "MySQL storage engine name."
28
- }
29
- }),
30
- charset: new _atscript_core.AnnotationSpec({
31
- description: "Specifies the character set for the table or column.\n\n**Default:** `\"utf8mb4\"`\n\n```atscript\n@db.mysql.charset \"latin1\"\nexport interface Legacy { ... }\n```",
32
- nodeType: ["interface", "prop"],
33
- multiple: false,
34
- argument: {
35
- name: "charset",
36
- type: "string",
37
- values: [
38
- "utf8mb4",
39
- "utf8",
40
- "latin1",
41
- "ascii",
42
- "binary"
43
- ],
44
- description: "MySQL character set name."
45
- }
46
- }),
47
- collate: new _atscript_core.AnnotationSpec({
48
- description: "Specifies a native MySQL collation (overrides portable `@db.column.collate`).\n\n```atscript\n@db.mysql.collate \"utf8mb4_turkish_ci\"\nname: string\n```",
49
- nodeType: ["interface", "prop"],
50
- multiple: false,
51
- argument: {
52
- name: "collation",
53
- type: "string",
54
- description: "Native MySQL collation name (e.g., \"utf8mb4_turkish_ci\")."
55
- }
56
- }),
57
- unsigned: new _atscript_core.AnnotationSpec({
58
- description: "Adds the UNSIGNED modifier to an integer column.\n\n```atscript\n@db.mysql.unsigned\nage: number.int\n```",
59
- nodeType: ["prop"],
60
- multiple: false
61
- }),
62
- type: new _atscript_core.AnnotationSpec({
63
- description: "Overrides the native MySQL column type.\n\n```atscript\n@db.mysql.type \"MEDIUMTEXT\"\nbio: string\n```",
64
- nodeType: ["prop"],
65
- multiple: false,
66
- argument: {
67
- name: "type",
68
- type: "string",
69
- description: "Native MySQL column type (e.g., \"MEDIUMTEXT\", \"TINYTEXT\")."
70
- }
71
- }),
72
- onUpdate: new _atscript_core.AnnotationSpec({
73
- description: "Sets the MySQL ON UPDATE clause for a column.\n\n```atscript\n@db.mysql.onUpdate \"CURRENT_TIMESTAMP\"\nupdatedAt: number.timestamp\n```",
74
- nodeType: ["prop"],
75
- multiple: false,
76
- argument: {
77
- name: "expression",
78
- type: "string",
79
- values: ["CURRENT_TIMESTAMP"],
80
- description: "Expression to evaluate on row update."
81
- }
82
- })
83
- };
84
- //#endregion
85
- //#region src/plugin/index.ts
86
- const MysqlPlugin = () => ({
87
- name: "mysql",
88
- config() {
89
- return { annotations: { db: { mysql: annotations } } };
90
- }
91
- });
92
- //#endregion
93
- Object.defineProperty(exports, "MysqlPlugin", {
94
- enumerable: true,
95
- get: function() {
96
- return MysqlPlugin;
97
- }
98
- });
@@ -1,93 +0,0 @@
1
- import { AnnotationSpec } from "@atscript/core";
2
- //#region src/plugin/annotations.ts
3
- /**
4
- * MySQL-specific annotations.
5
- *
6
- * Merged into the global config under `{ db: { mysql: ... } }` so they
7
- * live alongside core's `@db.table`, `@db.index.*`, etc.
8
- *
9
- * These annotations opt-in to MySQL-specific behavior. Files using only
10
- * portable `@db.*` annotations remain adapter-agnostic.
11
- */
12
- const annotations = {
13
- engine: new AnnotationSpec({
14
- description: "Specifies the MySQL storage engine.\n\n**Default:** `\"InnoDB\"`\n\n```atscript\n@db.mysql.engine \"MyISAM\"\nexport interface Logs { ... }\n```",
15
- nodeType: ["interface"],
16
- multiple: false,
17
- argument: {
18
- name: "engine",
19
- type: "string",
20
- values: [
21
- "InnoDB",
22
- "MyISAM",
23
- "MEMORY",
24
- "CSV",
25
- "ARCHIVE"
26
- ],
27
- description: "MySQL storage engine name."
28
- }
29
- }),
30
- charset: new AnnotationSpec({
31
- description: "Specifies the character set for the table or column.\n\n**Default:** `\"utf8mb4\"`\n\n```atscript\n@db.mysql.charset \"latin1\"\nexport interface Legacy { ... }\n```",
32
- nodeType: ["interface", "prop"],
33
- multiple: false,
34
- argument: {
35
- name: "charset",
36
- type: "string",
37
- values: [
38
- "utf8mb4",
39
- "utf8",
40
- "latin1",
41
- "ascii",
42
- "binary"
43
- ],
44
- description: "MySQL character set name."
45
- }
46
- }),
47
- collate: new AnnotationSpec({
48
- description: "Specifies a native MySQL collation (overrides portable `@db.column.collate`).\n\n```atscript\n@db.mysql.collate \"utf8mb4_turkish_ci\"\nname: string\n```",
49
- nodeType: ["interface", "prop"],
50
- multiple: false,
51
- argument: {
52
- name: "collation",
53
- type: "string",
54
- description: "Native MySQL collation name (e.g., \"utf8mb4_turkish_ci\")."
55
- }
56
- }),
57
- unsigned: new AnnotationSpec({
58
- description: "Adds the UNSIGNED modifier to an integer column.\n\n```atscript\n@db.mysql.unsigned\nage: number.int\n```",
59
- nodeType: ["prop"],
60
- multiple: false
61
- }),
62
- type: new AnnotationSpec({
63
- description: "Overrides the native MySQL column type.\n\n```atscript\n@db.mysql.type \"MEDIUMTEXT\"\nbio: string\n```",
64
- nodeType: ["prop"],
65
- multiple: false,
66
- argument: {
67
- name: "type",
68
- type: "string",
69
- description: "Native MySQL column type (e.g., \"MEDIUMTEXT\", \"TINYTEXT\")."
70
- }
71
- }),
72
- onUpdate: new AnnotationSpec({
73
- description: "Sets the MySQL ON UPDATE clause for a column.\n\n```atscript\n@db.mysql.onUpdate \"CURRENT_TIMESTAMP\"\nupdatedAt: number.timestamp\n```",
74
- nodeType: ["prop"],
75
- multiple: false,
76
- argument: {
77
- name: "expression",
78
- type: "string",
79
- values: ["CURRENT_TIMESTAMP"],
80
- description: "Expression to evaluate on row update."
81
- }
82
- })
83
- };
84
- //#endregion
85
- //#region src/plugin/index.ts
86
- const MysqlPlugin = () => ({
87
- name: "mysql",
88
- config() {
89
- return { annotations: { db: { mysql: annotations } } };
90
- }
91
- });
92
- //#endregion
93
- export { MysqlPlugin as t };