@dbmason/mysql 0.1.0-alpha.1

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.mjs ADDED
@@ -0,0 +1,583 @@
1
+ import { createPool as f } from "mysql2/promise";
2
+ import { internalDefineTable as _, resolveColumn as M, internalDefineView as O, internalDefineProcedure as d, internalDefineFunction as L, internalDefineTrigger as h, internalDefineCron as S } from "@dbmason/core";
3
+ import { DbOperation as Re, DbmasonContext as Ie, RoleReference as Ce, TableReference as fe } from "@dbmason/core";
4
+ class I {
5
+ constructor(e) {
6
+ this.connection = null, this.pool = f(e);
7
+ }
8
+ async connect() {
9
+ this.connection = await this.pool.getConnection();
10
+ }
11
+ async close() {
12
+ this.connection && (this.connection.release(), this.connection = null), await this.pool.end();
13
+ }
14
+ async query(e, n) {
15
+ if (!this.connection) throw new Error("Driver not connected");
16
+ const [t] = await this.connection.query(e, n);
17
+ return t;
18
+ }
19
+ async beginTransaction() {
20
+ if (!this.connection) throw new Error("Driver not connected");
21
+ await this.connection.beginTransaction();
22
+ }
23
+ async commitTransaction() {
24
+ if (!this.connection) throw new Error("Driver not connected");
25
+ await this.connection.commit();
26
+ }
27
+ async rollbackTransaction() {
28
+ if (!this.connection) throw new Error("Driver not connected");
29
+ await this.connection.rollback();
30
+ }
31
+ }
32
+ class R {
33
+ static emit(e) {
34
+ let n = e.type.toUpperCase();
35
+ n === "BOOLEAN" && (n = "TINYINT(1)"), n === "VARCHAR" && e.length && (n = `VARCHAR(${e.length})`), n === "CHAR" && e.length && (n = `CHAR(${e.length})`), n === "UUID" && (n = "CHAR(36)");
36
+ let t = `\`${e.name}\` ${n}`;
37
+ return e.unsigned && (t += " UNSIGNED"), e.notNull && (t += " NOT NULL"), e.default !== void 0 && (t += ` DEFAULT ${e.default}`), e.autoIncrement && (t += " AUTO_INCREMENT"), t;
38
+ }
39
+ }
40
+ class p {
41
+ static emit(e, n, t) {
42
+ switch (e) {
43
+ case "create":
44
+ return this.emitCreate(n);
45
+ case "alter":
46
+ return this.emitAlter(n, t);
47
+ case "drop":
48
+ return `DROP TABLE IF EXISTS \`${n.name}\`;`;
49
+ default:
50
+ return "";
51
+ }
52
+ }
53
+ static emitCreate(e) {
54
+ let t = [...Object.values(e.columns).map((a) => R.emit(a))];
55
+ const i = Object.values(e.columns).filter((a) => a.primaryKey).map((a) => `\`${a.name}\``);
56
+ i.length > 0 && t.push(`PRIMARY KEY (${i.join(", ")})`);
57
+ for (const a of Object.values(e.columns)) {
58
+ const T = a;
59
+ if (T.references) {
60
+ const m = T.references.table, C = T.references.column;
61
+ let l = `CONSTRAINT \`fk_${e.name}_${a.name}\` FOREIGN KEY (\`${a.name}\`) REFERENCES \`${m}\`(\`${C}\`)`;
62
+ T.references.onDelete && (l += ` ON DELETE ${T.references.onDelete}`), T.references.onUpdate && (l += ` ON UPDATE ${T.references.onUpdate}`), t.push(l);
63
+ }
64
+ }
65
+ for (const a of e.indexes) {
66
+ let T = "";
67
+ a.method === "fulltext" ? T = "FULLTEXT " : a.method === "spatial" ? T = "SPATIAL " : a.unique && (T = "UNIQUE "), t.push(`${T}KEY \`${a.name}\` (${a.columns.map((m) => `\`${m}\``).join(", ")})`);
68
+ }
69
+ for (const a of e.constraints)
70
+ a.type === "check" && t.push(`CONSTRAINT \`${a.name}\` CHECK (${a.definition})`);
71
+ const o = e.options, s = (o == null ? void 0 : o.engine) || "InnoDB", c = (o == null ? void 0 : o.charset) || "utf8mb4", N = o != null && o.collate ? ` COLLATE=${o.collate}` : "", A = o != null && o.comment ? ` COMMENT='${o.comment}'` : "";
72
+ return `CREATE TABLE \`${e.name}\` (
73
+ ${t.join(`,
74
+ `)}
75
+ ) ENGINE=${s} DEFAULT CHARSET=${c}${N}${A};`;
76
+ }
77
+ static emitAlter(e, n) {
78
+ const t = [], i = n == null ? void 0 : n.old;
79
+ for (const [o, s] of Object.entries(e.columns))
80
+ i.columns[o] || t.push(`ADD COLUMN ${R.emit(s)}`);
81
+ return t.length === 0 ? "" : `ALTER TABLE \`${e.name}\`
82
+ ${t.join(`,
83
+ `)};`;
84
+ }
85
+ }
86
+ class w {
87
+ static emit(e) {
88
+ return `CREATE OR REPLACE VIEW \`${e.name}\` AS ${e.query};
89
+ `;
90
+ }
91
+ }
92
+ class D {
93
+ static emit(e) {
94
+ const n = Object.entries(e.args).map(([t, i]) => `${t} ${i}`).join(", ");
95
+ return `DELIMITER //
96
+ CREATE PROCEDURE \`${e.name}\`(${n})
97
+ BEGIN
98
+ ${e.body}
99
+ END //
100
+ DELIMITER ;
101
+ `;
102
+ }
103
+ }
104
+ class y {
105
+ static emit(e) {
106
+ const n = Object.entries(e.args).map(([t, i]) => `${t} ${i}`).join(", ");
107
+ return `DELIMITER //
108
+ CREATE FUNCTION \`${e.name}\`(${n}) RETURNS ${e.returns}
109
+ BEGIN
110
+ ${e.body}
111
+ END //
112
+ DELIMITER ;
113
+ `;
114
+ }
115
+ }
116
+ class U {
117
+ static emit(e) {
118
+ const n = e.events.join(" OR ");
119
+ return `DELIMITER //
120
+ CREATE TRIGGER \`${e.name}\` ${e.when} ${n} ON \`${e.table}\`
121
+ FOR EACH ROW
122
+ BEGIN
123
+ ${e.body}
124
+ END //
125
+ DELIMITER ;
126
+ `;
127
+ }
128
+ }
129
+ class $ {
130
+ static emit(e) {
131
+ return `CREATE EVENT \`${e.name}\`
132
+ ON SCHEDULE ${e.schedule}
133
+ DO
134
+ ${e.command};
135
+ `;
136
+ }
137
+ }
138
+ class b {
139
+ static emit(e) {
140
+ let n = `-- Generated by @dbmason/mysql
141
+
142
+ `;
143
+ for (const t of e)
144
+ switch (t.node.kind) {
145
+ case "Table":
146
+ n += p.emit(t.action, t.node, t.diff) + `
147
+
148
+ `;
149
+ break;
150
+ case "View":
151
+ n += w.emit(t.node) + `
152
+
153
+ `;
154
+ break;
155
+ case "Procedure":
156
+ n += D.emit(t.node) + `
157
+
158
+ `;
159
+ break;
160
+ case "Function":
161
+ n += y.emit(t.node) + `
162
+
163
+ `;
164
+ break;
165
+ case "Trigger":
166
+ n += U.emit(t.node) + `
167
+
168
+ `;
169
+ break;
170
+ case "Cron":
171
+ n += $.emit(t.node) + `
172
+
173
+ `;
174
+ break;
175
+ default:
176
+ console.warn(`Unsupported node kind for MySQL: ${t.node.kind}`);
177
+ }
178
+ return n;
179
+ }
180
+ }
181
+ class g {
182
+ static async introspect(e) {
183
+ const n = {}, i = (await e.query("SELECT DATABASE() as db"))[0].db, o = await e.query(`
184
+ SELECT TABLE_NAME
185
+ FROM information_schema.TABLES
186
+ WHERE TABLE_SCHEMA = '${i}'
187
+ AND TABLE_TYPE = 'BASE TABLE'
188
+ `);
189
+ for (const s of o) {
190
+ const c = s.TABLE_NAME, N = await this.introspectColumns(e, i, c), A = await this.introspectIndexes(e, i, c), a = await this.introspectConstraints(e, i, c);
191
+ n[c] = {
192
+ kind: "Table",
193
+ name: c,
194
+ module: "global",
195
+ // MySQL database maps to global scope in Dbmason usually
196
+ columns: N,
197
+ indexes: A,
198
+ constraints: a,
199
+ policies: [],
200
+ triggers: []
201
+ };
202
+ }
203
+ return n;
204
+ }
205
+ static async introspectColumns(e, n, t) {
206
+ const i = await e.query(`
207
+ SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT, EXTRA, COLUMN_TYPE
208
+ FROM information_schema.COLUMNS
209
+ WHERE TABLE_SCHEMA = '${n}' AND TABLE_NAME = '${t}'
210
+ ORDER BY ORDINAL_POSITION
211
+ `), o = {};
212
+ for (const c of i)
213
+ o[c.COLUMN_NAME] = {
214
+ kind: "Column",
215
+ name: c.COLUMN_NAME,
216
+ type: c.DATA_TYPE.toUpperCase(),
217
+ notNull: c.IS_NULLABLE === "NO",
218
+ default: c.COLUMN_DEFAULT || void 0,
219
+ primaryKey: c.COLUMN_KEY === "PRI",
220
+ // Actually PRI comes from a different column sometimes, better check EXTRA or use another query
221
+ options: c.EXTRA.includes("auto_increment") ? { identity: !0 } : void 0
222
+ };
223
+ const s = await e.query(`
224
+ SELECT COLUMN_NAME
225
+ FROM information_schema.KEY_COLUMN_USAGE
226
+ WHERE CONSTRAINT_NAME = 'PRIMARY'
227
+ AND TABLE_SCHEMA = '${n}' AND TABLE_NAME = '${t}'
228
+ `);
229
+ for (const c of s)
230
+ o[c.COLUMN_NAME] && (o[c.COLUMN_NAME].primaryKey = !0);
231
+ return o;
232
+ }
233
+ static async introspectIndexes(e, n, t) {
234
+ const i = await e.query(`
235
+ SELECT INDEX_NAME, COLUMN_NAME, NON_UNIQUE
236
+ FROM information_schema.STATISTICS
237
+ WHERE TABLE_SCHEMA = '${n}' AND TABLE_NAME = '${t}'
238
+ ORDER BY INDEX_NAME, SEQ_IN_INDEX
239
+ `), o = /* @__PURE__ */ new Map();
240
+ for (const s of i)
241
+ s.INDEX_NAME !== "PRIMARY" && (o.has(s.INDEX_NAME) || o.set(s.INDEX_NAME, {
242
+ kind: "Index",
243
+ name: s.INDEX_NAME,
244
+ table: t,
245
+ columns: [],
246
+ unique: s.NON_UNIQUE === 0
247
+ }), o.get(s.INDEX_NAME).columns.push(s.COLUMN_NAME));
248
+ return Array.from(o.values());
249
+ }
250
+ static async introspectConstraints(e, n, t) {
251
+ const i = [], o = await e.query(`
252
+ SELECT
253
+ CONSTRAINT_NAME,
254
+ COLUMN_NAME,
255
+ REFERENCED_TABLE_NAME,
256
+ REFERENCED_COLUMN_NAME
257
+ FROM information_schema.KEY_COLUMN_USAGE
258
+ WHERE TABLE_SCHEMA = '${n}' AND TABLE_NAME = '${t}'
259
+ AND REFERENCED_TABLE_NAME IS NOT NULL
260
+ `);
261
+ for (const N of o) {
262
+ const A = `FOREIGN KEY (\`${N.COLUMN_NAME}\`) REFERENCES \`${N.REFERENCED_TABLE_NAME}\`(\`${N.REFERENCED_COLUMN_NAME}\`)`;
263
+ i.push({
264
+ kind: "Constraint",
265
+ type: "foreign_key",
266
+ definition: A,
267
+ name: N.CONSTRAINT_NAME,
268
+ table: t
269
+ });
270
+ }
271
+ try {
272
+ const N = await e.query(`
273
+ SELECT CONSTRAINT_NAME, CHECK_CLAUSE
274
+ FROM information_schema.CHECK_CONSTRAINTS
275
+ WHERE CONSTRAINT_SCHEMA = '${n}'
276
+ -- Note: CHECK_CONSTRAINTS doesn't always have TABLE_NAME directly in all versions,
277
+ -- sometimes joined with TABLE_CONSTRAINTS
278
+ `), A = await e.query(`
279
+ SELECT tc.CONSTRAINT_NAME, cc.CHECK_CLAUSE
280
+ FROM information_schema.TABLE_CONSTRAINTS tc
281
+ JOIN information_schema.CHECK_CONSTRAINTS cc ON tc.CONSTRAINT_NAME = cc.CONSTRAINT_NAME
282
+ WHERE tc.TABLE_SCHEMA = '${n}' AND tc.TABLE_NAME = '${t}'
283
+ AND tc.CONSTRAINT_TYPE = 'CHECK'
284
+ `);
285
+ for (const a of A)
286
+ i.push({
287
+ kind: "Constraint",
288
+ type: "check",
289
+ name: a.CONSTRAINT_NAME,
290
+ table: t,
291
+ definition: `CHECK (${a.CHECK_CLAUSE})`
292
+ });
293
+ } catch {
294
+ }
295
+ const s = await e.query(`
296
+ SELECT tc.CONSTRAINT_NAME, kcu.COLUMN_NAME
297
+ FROM information_schema.TABLE_CONSTRAINTS tc
298
+ JOIN information_schema.KEY_COLUMN_USAGE kcu ON tc.CONSTRAINT_NAME = kcu.CONSTRAINT_NAME
299
+ WHERE tc.TABLE_SCHEMA = '${n}' AND tc.TABLE_NAME = '${t}'
300
+ AND tc.CONSTRAINT_TYPE = 'UNIQUE'
301
+ `), c = /* @__PURE__ */ new Map();
302
+ for (const N of s)
303
+ c.has(N.CONSTRAINT_NAME) || c.set(N.CONSTRAINT_NAME, []), c.get(N.CONSTRAINT_NAME).push(N.COLUMN_NAME);
304
+ for (const [N, A] of c)
305
+ i.push({
306
+ kind: "Constraint",
307
+ type: "unique",
308
+ name: N,
309
+ table: t,
310
+ definition: `UNIQUE (${A.map((a) => `\`${a}\``).join(", ")})`
311
+ });
312
+ return i;
313
+ }
314
+ }
315
+ class k {
316
+ static async introspect(e) {
317
+ const n = {}, i = (await e.query("SELECT DATABASE() as db"))[0].db, o = await e.query(`
318
+ SELECT TABLE_NAME, VIEW_DEFINITION
319
+ FROM information_schema.VIEWS
320
+ WHERE TABLE_SCHEMA = '${i}'
321
+ `);
322
+ for (const s of o)
323
+ n[s.TABLE_NAME] = {
324
+ kind: "View",
325
+ name: s.TABLE_NAME,
326
+ query: s.VIEW_DEFINITION
327
+ };
328
+ return { views: n, materializedViews: {} };
329
+ }
330
+ }
331
+ class B {
332
+ static async introspect(e) {
333
+ const n = {}, t = {}, o = (await e.query("SELECT DATABASE() as db"))[0].db, s = await e.query(`
334
+ SELECT ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER, ROUTINE_DEFINITION, EXTERNAL_LANGUAGE
335
+ FROM information_schema.ROUTINES
336
+ WHERE ROUTINE_SCHEMA = '${o}'
337
+ `);
338
+ for (const c of s) {
339
+ const N = c.ROUTINE_NAME, A = c.ROUTINE_TYPE, a = await e.query(`
340
+ SELECT PARAMETER_NAME, DATA_TYPE, PARAMETER_MODE
341
+ FROM information_schema.PARAMETERS
342
+ WHERE SPECIFIC_SCHEMA = '${o}' AND ROUTINE_NAME = '${N}'
343
+ ORDER BY ORDINAL_POSITION
344
+ `), T = {};
345
+ for (const m of a)
346
+ m.PARAMETER_NAME && (T[m.PARAMETER_NAME] = m.DATA_TYPE);
347
+ A === "FUNCTION" ? n[N] = {
348
+ kind: "Function",
349
+ name: N,
350
+ args: T,
351
+ returns: c.DTD_IDENTIFIER,
352
+ language: c.EXTERNAL_LANGUAGE || "SQL",
353
+ body: c.ROUTINE_DEFINITION
354
+ } : t[N] = {
355
+ kind: "Procedure",
356
+ name: N,
357
+ args: T,
358
+ returns: "void",
359
+ language: c.EXTERNAL_LANGUAGE || "SQL",
360
+ body: c.ROUTINE_DEFINITION
361
+ };
362
+ }
363
+ return { functions: n, procedures: t };
364
+ }
365
+ }
366
+ class F {
367
+ static async introspect(e) {
368
+ const n = {}, i = (await e.query("SELECT DATABASE() as db"))[0].db, o = await e.query(`
369
+ SELECT TRIGGER_NAME, EVENT_OBJECT_TABLE, ACTION_TIMING, EVENT_MANIPULATION, ACTION_STATEMENT
370
+ FROM information_schema.TRIGGERS
371
+ WHERE TRIGGER_SCHEMA = '${i}'
372
+ `);
373
+ for (const s of o)
374
+ n[s.TRIGGER_NAME] = {
375
+ kind: "Trigger",
376
+ name: s.TRIGGER_NAME,
377
+ table: s.EVENT_OBJECT_TABLE,
378
+ events: [s.EVENT_MANIPULATION.toLowerCase()],
379
+ functionName: "inline",
380
+ // MySQL triggers are inline SQL
381
+ when: s.ACTION_TIMING.toLowerCase(),
382
+ forEach: "ROW",
383
+ // MySQL triggers are always FOR EACH ROW
384
+ body: s.ACTION_STATEMENT
385
+ };
386
+ return n;
387
+ }
388
+ }
389
+ class H {
390
+ async introspect(e) {
391
+ const n = new I(e);
392
+ await n.connect();
393
+ try {
394
+ const t = await g.introspect(n), { views: i, materializedViews: o } = await k.introspect(n), { functions: s, procedures: c } = await B.introspect(n), N = await F.introspect(n);
395
+ return {
396
+ tables: t,
397
+ procedures: c,
398
+ functions: s,
399
+ views: i,
400
+ materializedViews: o,
401
+ types: {},
402
+ // MySQL ENUMs are column-level
403
+ crons: {},
404
+ extensions: {},
405
+ roles: {},
406
+ grants: {},
407
+ policies: {},
408
+ triggers: N,
409
+ hashes: {}
410
+ };
411
+ } finally {
412
+ await n.close();
413
+ }
414
+ }
415
+ }
416
+ class q {
417
+ constructor() {
418
+ this.name = "mysql", this.introspector = new H();
419
+ }
420
+ setContext(e) {
421
+ this.ctx = e;
422
+ }
423
+ analyzeTable(e) {
424
+ return {
425
+ ...e,
426
+ indexes: e.indexes,
427
+ dependencies: [],
428
+ rls: { enabled: !1, policies: [] }
429
+ };
430
+ }
431
+ emit(e) {
432
+ return b.emit(e);
433
+ }
434
+ getDriver(e) {
435
+ return new I(e);
436
+ }
437
+ }
438
+ function u(E) {
439
+ return E.map((e) => M(e).column);
440
+ }
441
+ const x = (...E) => ({
442
+ kind: "Index",
443
+ name: "",
444
+ table: "",
445
+ columns: u(E),
446
+ method: "btree"
447
+ }), K = (...E) => ({
448
+ kind: "Index",
449
+ name: "",
450
+ table: "",
451
+ columns: u(E),
452
+ method: "hash"
453
+ }), V = (...E) => ({
454
+ kind: "Index",
455
+ name: "",
456
+ table: "",
457
+ columns: u(E),
458
+ method: "fulltext"
459
+ }), W = (...E) => ({
460
+ kind: "Index",
461
+ name: "",
462
+ table: "",
463
+ columns: u(E),
464
+ method: "spatial"
465
+ });
466
+ class r {
467
+ constructor(e) {
468
+ this.node = e;
469
+ }
470
+ primaryKey() {
471
+ return new r({ ...this.node, primaryKey: !0, notNull: !0 });
472
+ }
473
+ notNull() {
474
+ return new r({ ...this.node, notNull: !0 });
475
+ }
476
+ unique() {
477
+ return new r({ ...this.node, unique: !0 });
478
+ }
479
+ default(e) {
480
+ return new r({ ...this.node, default: e });
481
+ }
482
+ autoIncrement() {
483
+ return new r({ ...this.node, autoIncrement: !0 });
484
+ }
485
+ unsigned() {
486
+ return new r({ ...this.node, unsigned: !0 });
487
+ }
488
+ onUpdateCurrentTimestamp() {
489
+ return new r({ ...this.node, onUpdate: "CURRENT_TIMESTAMP" });
490
+ }
491
+ charset(e) {
492
+ return new r({ ...this.node, charset: e });
493
+ }
494
+ collate(e) {
495
+ return new r({ ...this.node, collate: e });
496
+ }
497
+ check(e) {
498
+ return new r({ ...this.node, check: e });
499
+ }
500
+ references(e, n, t) {
501
+ let i, o, s;
502
+ return typeof e != "string" ? (i = e.tableName, o = e.columnName, s = n) : (i = e, o = n, s = t), new r({
503
+ ...this.node,
504
+ references: {
505
+ module: e.moduleName,
506
+ table: i,
507
+ column: o,
508
+ onDelete: s == null ? void 0 : s.onDelete,
509
+ onUpdate: s == null ? void 0 : s.onUpdate
510
+ }
511
+ });
512
+ }
513
+ build() {
514
+ return this.node;
515
+ }
516
+ }
517
+ const P = () => new r({ kind: "Column", name: "", type: "INT" }), j = P, v = () => new r({ kind: "Column", name: "", type: "TINYINT" }), X = () => new r({ kind: "Column", name: "", type: "SMALLINT" }), Q = () => new r({ kind: "Column", name: "", type: "MEDIUMINT" }), J = () => new r({ kind: "Column", name: "", type: "BIGINT" }), z = (E = 255) => new r({ kind: "Column", name: "", type: "VARCHAR", length: E }), Z = () => new r({ kind: "Column", name: "", type: "TEXT" }), ee = (E = 1) => new r({ kind: "Column", name: "", type: "CHAR", length: E }), ne = () => new r({ kind: "Column", name: "", type: "DATE" }), te = () => new r({ kind: "Column", name: "", type: "DATETIME" }), oe = () => new r({ kind: "Column", name: "", type: "TIMESTAMP" }), se = () => new r({ kind: "Column", name: "", type: "TIME" }), Ee = () => new r({ kind: "Column", name: "", type: "YEAR" }), ie = () => new r({ kind: "Column", name: "", type: "BOOLEAN" }), ce = () => new r({ kind: "Column", name: "", type: "JSON" });
518
+ function ae(E, e, n) {
519
+ return _(E, e, n, (t) => {
520
+ const i = {};
521
+ for (const [o, s] of Object.entries(t))
522
+ if (s instanceof r) {
523
+ const c = s.build();
524
+ c.name = o, i[o] = c;
525
+ } else typeof s == "string" ? i[o] = { kind: "Column", name: o, type: s } : i[o] = { ...s, name: o };
526
+ return i;
527
+ });
528
+ }
529
+ function re(E, e, n) {
530
+ O(E, e, n);
531
+ }
532
+ function Ne(E, e, n, t) {
533
+ d(E, e, { args: n, body: t, language: "SQL" });
534
+ }
535
+ function Te(E, e, n, t, i) {
536
+ L(E, e, { args: n, returns: t, body: i, language: "SQL" });
537
+ }
538
+ function Ae(E, e, n) {
539
+ h(E, n.table, e, {
540
+ when: n.timing,
541
+ events: [n.event],
542
+ body: n.body,
543
+ forEach: "ROW"
544
+ });
545
+ }
546
+ function me(E, e, n, t) {
547
+ S(E, e, n, t);
548
+ }
549
+ export {
550
+ Re as DbOperation,
551
+ Ie as DbmasonContext,
552
+ r as MysqlColumnBuilder,
553
+ q as MysqlDialect,
554
+ Ce as RoleReference,
555
+ fe as TableReference,
556
+ J as bigint,
557
+ ie as boolean,
558
+ x as btree,
559
+ ee as char,
560
+ ne as date,
561
+ te as datetime,
562
+ me as defineEvent,
563
+ Te as defineFunction,
564
+ Ne as defineProcedure,
565
+ ae as defineTable,
566
+ Ae as defineTrigger,
567
+ re as defineView,
568
+ V as fulltext,
569
+ K as hash,
570
+ P as int,
571
+ j as integer,
572
+ ce as json,
573
+ Q as mediumint,
574
+ X as smallint,
575
+ W as spatial,
576
+ Z as text,
577
+ se as time,
578
+ oe as timestamp,
579
+ v as tinyint,
580
+ z as varchar,
581
+ Ee as year
582
+ };
583
+ //# sourceMappingURL=index.mjs.map