@nextlyhq/adapter-mysql 0.0.2-alpha.67 → 0.0.2-alpha.69

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.d.ts CHANGED
@@ -1,49 +1,11 @@
1
- import { DrizzleAdapter } from '@nextlyhq/adapter-drizzle';
2
- import { MySqlAdapterConfig, PoolStats, SqlParam, TransactionContext, TransactionOptions, DatabaseCapabilities, UpsertOptions, DatabaseError } from '@nextlyhq/adapter-drizzle/types';
3
- export { AdapterLogger, BaseAdapterConfig, DatabaseCapabilities, DatabaseError, DatabaseErrorKind, DeleteOptions, InsertOptions, JoinSpec, MySqlAdapterConfig, OrderBySpec, PoolConfig, PoolStats, SelectOptions, SqlParam, SslConfig, TransactionContext, TransactionOptions, UpdateOptions, UpsertOptions, WhereClause, WhereCondition, WhereOperator } from '@nextlyhq/adapter-drizzle/types';
4
- import { AnyRelations } from 'drizzle-orm';
5
- import { MySql2Database } from 'drizzle-orm/mysql2';
6
-
7
- /**
8
- * @nextlyhq/adapter-mysql
9
- *
10
- * MySQL database adapter for Nextly.
11
- * Extends DrizzleAdapter from @nextlyhq/adapter-drizzle to provide MySQL-specific functionality.
12
- *
13
- * @remarks
14
- * This adapter uses the mysql2 package for database connectivity and provides:
15
- * - Connection pooling via mysql2 Pool
16
- * - Full transaction support with isolation levels
17
- * - CRUD operations with workarounds for missing RETURNING clause
18
- * - MySQL-specific error classification
19
- * - Automatic retry for deadlocks (error 1213)
20
- *
21
- * @example
22
- * ```typescript
23
- * import { createMySqlAdapter } from '@nextlyhq/adapter-mysql';
24
- *
25
- * const adapter = createMySqlAdapter({
26
- * url: process.env.DATABASE_URL!,
27
- * });
28
- *
29
- * await adapter.connect();
30
- *
31
- * // Query data
32
- * const users = await adapter.select('users', {
33
- * where: { and: [{ column: 'status', op: '=', value: 'active' }] },
34
- * limit: 10,
35
- * });
36
- *
37
- * await adapter.disconnect();
38
- * ```
39
- *
40
- * @packageDocumentation
41
- */
42
-
1
+ import { DrizzleAdapter } from "@nextlyhq/adapter-drizzle";
2
+ import { AdapterLogger, BaseAdapterConfig, DatabaseCapabilities, DatabaseError, DatabaseErrorKind, DeleteOptions, InsertOptions, JoinSpec, MySqlAdapterConfig, OrderBySpec, PoolConfig, PoolStats, SelectOptions, SqlParam, SslConfig, TransactionContext, TransactionOptions, UpdateOptions, UpsertOptions, WhereClause, WhereCondition, WhereOperator } from "@nextlyhq/adapter-drizzle/types";
3
+ import { AnyRelations } from "drizzle-orm";
4
+ import { MySql2Database } from "drizzle-orm/mysql2";
43
5
  /**
44
6
  * Package version
45
7
  */
46
- declare const VERSION = "0.1.0";
8
+ export declare const VERSION = "0.1.0";
47
9
  /**
48
10
  * MySQL database adapter for Nextly.
49
11
  *
@@ -68,258 +30,259 @@ declare const VERSION = "0.1.0";
68
30
  * await adapter.connect();
69
31
  * ```
70
32
  */
71
- declare class MySqlAdapter extends DrizzleAdapter {
72
- private drizzleByRelations;
73
- private drizzleBare;
74
- /**
75
- * The database dialect - always 'mysql' for this adapter.
76
- */
77
- readonly dialect: "mysql";
78
- /**
79
- * Adapter configuration.
80
- */
81
- protected readonly config: MySqlAdapterConfig;
82
- /**
83
- * Connection pool instance.
84
- */
85
- private pool;
86
- /**
87
- * Connection state flag.
88
- */
89
- private connected;
90
- /**
91
- * Whether the server accepts `SELECT ... FOR SHARE`, read from its version
92
- * string at connect. Undefined until then, which callers treat as not known.
93
- */
94
- private sharedRowLock;
95
- /**
96
- * Creates a new MySQL adapter instance.
97
- *
98
- * @param config - Adapter configuration
99
- */
100
- constructor(config: MySqlAdapterConfig);
101
- /**
102
- * Connect to the MySQL database.
103
- * Creates a connection pool using mysql2.
104
- *
105
- * @remarks
106
- * This method initializes the connection pool and verifies connectivity
107
- * by executing a simple query. It is idempotent - calling it multiple
108
- * times will not create multiple pools.
109
- *
110
- * @throws {DatabaseError} If connection fails
111
- */
112
- connect(): Promise<void>;
113
- /**
114
- * Disconnect from the MySQL database.
115
- * Gracefully closes the connection pool.
116
- *
117
- * @remarks
118
- * This method is idempotent - calling it multiple times is safe.
119
- * It waits for all connections to be released before shutting down.
120
- */
121
- disconnect(): Promise<void>;
122
- /**
123
- * Check if connected to the database.
124
- */
125
- isConnected(): boolean;
126
- /**
127
- * Get connection pool statistics.
128
- * Returns null if not connected.
129
- *
130
- * @remarks
131
- * MySQL2 pool exposes different stats than pg:
132
- * - _allConnections: all connections
133
- * - _freeConnections: idle connections
134
- * - _connectionQueue: waiting requests
135
- */
136
- getPoolStats(): PoolStats | null;
137
- /**
138
- * Execute a raw SQL query.
139
- *
140
- * @param sql - SQL query string with ? placeholders
141
- * @param params - Query parameters
142
- * @returns Query results
143
- *
144
- * @throws {DatabaseError} If query execution fails
145
- */
146
- executeQuery<T = unknown>(sql: string, params?: SqlParam[]): Promise<T[]>;
147
- /**
148
- * Execute work within a transaction.
149
- *
150
- * @param work - Function containing transactional operations
151
- * @param options - Transaction options (isolation level, timeout, retry)
152
- * @returns Result of the work function
153
- *
154
- * @remarks
155
- * MySQL transactions support isolation levels. Automatic retry is
156
- * implemented for deadlocks (error 1213) when `retryCount` is specified.
157
- *
158
- * Note: Savepoints are disabled in this adapter for safety due to
159
- * MySQL's quirks with nested transactions.
160
- */
161
- transaction<T>(work: (tx: TransactionContext) => Promise<T>, options?: TransactionOptions): Promise<T>;
162
- /** The attempts `transaction` makes, each on a connection of its own. */
163
- private runTransactionAttempts;
164
- /**
165
- * Get MySQL database capabilities.
166
- *
167
- * @remarks
168
- * MySQL has some limitations:
169
- * - No JSONB (uses JSON)
170
- * - No arrays
171
- * - No native ILIKE
172
- * - No RETURNING clause
173
- * - Savepoints disabled for safety
174
- */
175
- getCapabilities(): DatabaseCapabilities;
176
- /**
177
- * Build a placeholder for MySQL (uses ? instead of $1, $2, etc.)
178
- *
179
- * @param _index - Parameter index (ignored for MySQL)
180
- * @returns The ? placeholder
181
- */
182
- protected buildPlaceholder(_index: number): string;
183
- /**
184
- * Build multiple placeholders for MySQL.
185
- *
186
- * @param count - Number of placeholders needed
187
- * @param _startIndex - Starting index (ignored for MySQL)
188
- * @returns Comma-separated ? placeholders
189
- */
190
- protected buildPlaceholders(count: number, _startIndex?: number): string;
191
- /**
192
- * Escape an identifier for MySQL (uses backticks instead of double quotes).
193
- *
194
- * @param identifier - The identifier to escape
195
- * @returns Escaped identifier with backticks
196
- */
197
- protected escapeIdentifier(identifier: string): string;
198
- /**
199
- * Ensures pool is connected and returns it.
200
- *
201
- * @throws {DatabaseError} If not connected
202
- */
203
- private ensurePool;
204
- /**
205
- * Return the typed Drizzle instance for MySQL.
206
- * Guarded for server-only usage and requires an active connection.
207
- *
208
- * @param schema - Optional schema for relational queries (db.query.*)
209
- * @returns Drizzle ORM instance wrapping the mysql2 pool connection
210
- * @throws {Error} If called in browser or not connected
211
- */
212
- getDrizzle<T = MySql2Database<AnyRelations>>(relations?: AnyRelations): T;
213
- /**
214
- * A Drizzle handle on the pool, for `getDrizzle`.
215
- *
216
- * Its `transaction` runs on a connection this adapter checks out and
217
- * returns itself (`pinDrizzleTransactions`): destroyed rather than pooled
218
- * when no ROLLBACK could be confirmed on it. And it counts for
219
- * `transactionOpenInFlow`, as the adapter's does.
220
- */
221
- private poolDrizzle;
222
- /**
223
- * Builds mysql2 Pool configuration from adapter config.
224
- */
225
- private buildPoolConfig;
226
- /**
227
- * Begins a transaction with the specified options, and returns what it
228
- * changed on the session for `restoreSession` to put back.
229
- */
230
- private beginTransaction;
231
- /**
232
- * Creates a TransactionContext for the given connection.
233
- *
234
- * @remarks
235
- * Note: Savepoint methods are not implemented (set to undefined)
236
- * as savepoints are disabled in this adapter per approved approach.
237
- */
238
- /**
239
- * Upsert with the meaning `INSERT … ON CONFLICT (target)` has on PostgreSQL
240
- * and SQLite, on the tables where MySQL can keep that promise.
241
- *
242
- * MySQL cannot limit a duplicate to one key: `ON DUPLICATE KEY UPDATE`
243
- * fires on a collision with ANY unique key, and a failed insert does not
244
- * say reliably which one. So the conflict target must be the table's only
245
- * unique key apart from its primary key, and any other table is refused
246
- * before anything is written. On such a table the row is inserted first —
247
- * its validation and triggers apply, as they do before `ON CONFLICT`
248
- * elsewhere — and a duplicate is resolved by a locking read of the target
249
- * key, which sees the latest committed row rather than the transaction's
250
- * snapshot. The row found is kept as it is when there is nothing to update
251
- * (a no-op assignment would still run its update triggers), or updated by
252
- * its key. No row there means the collision was on the primary key, and it
253
- * is refused as `ON CONFLICT (target)` refuses it.
254
- *
255
- * The steps run in the caller's transaction, or in one of their own, since a
256
- * locking read locks nothing past its statement under autocommit. Rows are
257
- * read back by their primary key, so a trigger that rewrites the conflict
258
- * value still returns the row stored. The conflict columns must also be
259
- * given values: MySQL cannot look a row up by a key the database would only
260
- * fill in itself. A conflict is resolved on the caller's key value: a
261
- * BEFORE INSERT trigger that moves the key onto another row's value is
262
- * refused as a unique violation rather than resolved onto that row. A failed insert rolls back only itself on MySQL, so a
263
- * caller's transaction stays usable.
264
- */
265
- upsert<T = unknown>(table: string, data: Record<string, unknown>, options: UpsertOptions, executor?: unknown): Promise<T>;
266
- /**
267
- * What an upsert is keyed on: the target's condition, and whether its key
268
- * holds a NULL. Refuses a target this dialect cannot keep to, and a conflict
269
- * column left for the database to fill — MySQL cannot look a row up by a key
270
- * value only the database would supply.
271
- */
272
- private upsertTarget;
273
- /**
274
- * The table's columns for a conflict target, refusing a target MySQL cannot
275
- * keep to: one that is not a primary or unique key, which an update could
276
- * spread over several rows, and one beside which the table has another
277
- * unique key, a collision on which MySQL would not tell apart.
278
- */
279
- private conflictKey;
280
- /** The update an upsert applies to an existing row: never its key. */
281
- private updateValues;
282
- /** The row matching `where`, by a locking (current) read. */
283
- private lockedRow;
284
- /**
285
- * Insert the row, or resolve a duplicate on the target key. The insert is
286
- * read back by the primary key it reports, not by the conflict key: a
287
- * BEFORE INSERT trigger may have rewritten the conflict value, and the row
288
- * stored is the one to return.
289
- *
290
- * A duplicate is resolved when a row holds the TARGET key, whichever unique
291
- * key MySQL names in its error. PostgreSQL checks the target's index before
292
- * any other, so a row colliding on the target and on another key resolves
293
- * on the target there too; refusing it here because MySQL happened to check
294
- * the other index first would answer that case differently. A target row
295
- * committed by another transaction after this insert failed is the order in
296
- * which that transaction ran first, where PostgreSQL also resolves on it.
297
- */
298
- private insertOrResolve;
299
- /**
300
- * Insert a row and read it back by its primary key: the value the caller
301
- * gave, or the one MySQL or the model generated, which `$returningId()`
302
- * reports and a given value it does not. Undefined when the table has no
303
- * primary key to read by.
304
- */
305
- private insertRow;
306
- /**
307
- * A row's primary key as a condition, from a record keyed as the model's
308
- * properties are. Undefined when the table has no primary key or the record
309
- * lacks part of it.
310
- */
311
- private byIdentity;
312
- /** A table-level `primaryKey({ columns })`, read through the MySQL table config. */
313
- protected compositePrimaryKey(tableObj: Record<string, unknown>): object[];
314
- private createTransactionContext;
315
- /**
316
- * Classifies a MySQL error into a DatabaseError.
317
- *
318
- * @param error - Original error from mysql2
319
- * @param sql - SQL statement that caused the error (optional)
320
- * @returns DatabaseError with proper classification
321
- */
322
- protected classifyError(error: unknown, sql?: string): DatabaseError;
33
+ export declare class MySqlAdapter extends DrizzleAdapter {
34
+ private drizzleByRelations;
35
+ private drizzleBare;
36
+ /**
37
+ * The database dialect - always 'mysql' for this adapter.
38
+ */
39
+ readonly dialect: "mysql";
40
+ /**
41
+ * Adapter configuration.
42
+ */
43
+ protected readonly config: MySqlAdapterConfig;
44
+ /**
45
+ * Connection pool instance.
46
+ */
47
+ private pool;
48
+ /**
49
+ * Connection state flag.
50
+ */
51
+ private connected;
52
+ /**
53
+ * Whether the server accepts `SELECT ... FOR SHARE`, read from its version
54
+ * string at connect. Undefined until then, which callers treat as not known.
55
+ */
56
+ private sharedRowLock;
57
+ /**
58
+ * Creates a new MySQL adapter instance.
59
+ *
60
+ * @param config - Adapter configuration
61
+ */
62
+ constructor(config: MySqlAdapterConfig);
63
+ /**
64
+ * Connect to the MySQL database.
65
+ * Creates a connection pool using mysql2.
66
+ *
67
+ * @remarks
68
+ * This method initializes the connection pool and verifies connectivity
69
+ * by executing a simple query. It is idempotent - calling it multiple
70
+ * times will not create multiple pools.
71
+ *
72
+ * @throws {DatabaseError} If connection fails
73
+ */
74
+ connect(): Promise<void>;
75
+ /**
76
+ * Disconnect from the MySQL database.
77
+ * Gracefully closes the connection pool.
78
+ *
79
+ * @remarks
80
+ * This method is idempotent - calling it multiple times is safe.
81
+ * It waits for all connections to be released before shutting down.
82
+ */
83
+ disconnect(): Promise<void>;
84
+ /**
85
+ * Check if connected to the database.
86
+ */
87
+ isConnected(): boolean;
88
+ /**
89
+ * Get connection pool statistics.
90
+ * Returns null if not connected.
91
+ *
92
+ * @remarks
93
+ * MySQL2 pool exposes different stats than pg:
94
+ * - _allConnections: all connections
95
+ * - _freeConnections: idle connections
96
+ * - _connectionQueue: waiting requests
97
+ */
98
+ getPoolStats(): PoolStats | null;
99
+ /**
100
+ * Execute a raw SQL query.
101
+ *
102
+ * @param sql - SQL query string with ? placeholders
103
+ * @param params - Query parameters
104
+ * @returns Query results
105
+ *
106
+ * @throws {DatabaseError} If query execution fails
107
+ */
108
+ executeQuery<T = unknown>(sql: string, params?: SqlParam[]): Promise<T[]>;
109
+ /**
110
+ * Execute work within a transaction.
111
+ *
112
+ * @param work - Function containing transactional operations
113
+ * @param options - Transaction options (isolation level, timeout, retry)
114
+ * @returns Result of the work function
115
+ *
116
+ * @remarks
117
+ * MySQL transactions support isolation levels. Automatic retry is
118
+ * implemented for deadlocks (error 1213) when `retryCount` is specified.
119
+ *
120
+ * Note: Savepoints are disabled in this adapter for safety due to
121
+ * MySQL's quirks with nested transactions.
122
+ */
123
+ transaction<T>(work: (tx: TransactionContext) => Promise<T>, options?: TransactionOptions): Promise<T>;
124
+ /** The attempts `transaction` makes, each on a connection of its own. */
125
+ private runTransactionAttempts;
126
+ /**
127
+ * Get MySQL database capabilities.
128
+ *
129
+ * @remarks
130
+ * MySQL has some limitations:
131
+ * - No JSONB (uses JSON)
132
+ * - No arrays
133
+ * - No native ILIKE
134
+ * - No RETURNING clause
135
+ * - Savepoints disabled for safety
136
+ */
137
+ getCapabilities(): DatabaseCapabilities;
138
+ /**
139
+ * Build a placeholder for MySQL (uses ? instead of $1, $2, etc.)
140
+ *
141
+ * @param _index - Parameter index (ignored for MySQL)
142
+ * @returns The ? placeholder
143
+ */
144
+ protected buildPlaceholder(_index: number): string;
145
+ /**
146
+ * Build multiple placeholders for MySQL.
147
+ *
148
+ * @param count - Number of placeholders needed
149
+ * @param _startIndex - Starting index (ignored for MySQL)
150
+ * @returns Comma-separated ? placeholders
151
+ */
152
+ protected buildPlaceholders(count: number, _startIndex?: number): string;
153
+ /**
154
+ * Escape an identifier for MySQL (uses backticks instead of double quotes).
155
+ *
156
+ * @param identifier - The identifier to escape
157
+ * @returns Escaped identifier with backticks
158
+ */
159
+ protected escapeIdentifier(identifier: string): string;
160
+ /**
161
+ * Ensures pool is connected and returns it.
162
+ *
163
+ * @throws {DatabaseError} If not connected
164
+ */
165
+ private ensurePool;
166
+ /**
167
+ * Return the typed Drizzle instance for MySQL.
168
+ * Guarded for server-only usage and requires an active connection.
169
+ *
170
+ * @param schema - Optional schema for relational queries (db.query.*)
171
+ * @returns Drizzle ORM instance wrapping the mysql2 pool connection
172
+ * @throws {Error} If called in browser or not connected
173
+ */
174
+ getDrizzle<T = MySql2Database<AnyRelations>>(relations?: AnyRelations): T;
175
+ /**
176
+ * A Drizzle handle on the pool, for `getDrizzle`.
177
+ *
178
+ * Its `transaction` runs on a connection this adapter checks out and
179
+ * returns itself (`pinDrizzleTransactions`): destroyed rather than pooled
180
+ * when no ROLLBACK could be confirmed on it. And it counts for
181
+ * `transactionOpenInFlow`, as the adapter's does.
182
+ */
183
+ private poolDrizzle;
184
+ /**
185
+ * Builds mysql2 Pool configuration from adapter config.
186
+ */
187
+ private buildPoolConfig;
188
+ /**
189
+ * Begins a transaction with the specified options, recording in `changed`
190
+ * each session setting it changes, as it changes it, for `restoreSession`
191
+ * to put back.
192
+ */
193
+ private beginTransaction;
194
+ /**
195
+ * Creates a TransactionContext for the given connection.
196
+ *
197
+ * @remarks
198
+ * Note: Savepoint methods are not implemented (set to undefined)
199
+ * as savepoints are disabled in this adapter per approved approach.
200
+ */
201
+ /**
202
+ * Upsert with the meaning `INSERT … ON CONFLICT (target)` has on PostgreSQL
203
+ * and SQLite, on the tables where MySQL can keep that promise.
204
+ *
205
+ * MySQL cannot limit a duplicate to one key: `ON DUPLICATE KEY UPDATE`
206
+ * fires on a collision with ANY unique key, and a failed insert does not
207
+ * say reliably which one. So the conflict target must be the table's only
208
+ * unique key apart from its primary key, and any other table is refused
209
+ * before anything is written. On such a table the row is inserted first —
210
+ * its validation and triggers apply, as they do before `ON CONFLICT`
211
+ * elsewhere — and a duplicate is resolved by a locking read of the target
212
+ * key, which sees the latest committed row rather than the transaction's
213
+ * snapshot. The row found is kept as it is when there is nothing to update
214
+ * (a no-op assignment would still run its update triggers), or updated by
215
+ * its key. No row there means the collision was on the primary key, and it
216
+ * is refused as `ON CONFLICT (target)` refuses it.
217
+ *
218
+ * The steps run in the caller's transaction, or in one of their own, since a
219
+ * locking read locks nothing past its statement under autocommit. Rows are
220
+ * read back by their primary key, so a trigger that rewrites the conflict
221
+ * value still returns the row stored. The conflict columns must also be
222
+ * given values: MySQL cannot look a row up by a key the database would only
223
+ * fill in itself. A conflict is resolved on the caller's key value: a
224
+ * BEFORE INSERT trigger that moves the key onto another row's value is
225
+ * refused as a unique violation rather than resolved onto that row. A failed insert rolls back only itself on MySQL, so a
226
+ * caller's transaction stays usable.
227
+ */
228
+ override upsert<T = unknown>(table: string, data: Record<string, unknown>, options: UpsertOptions, executor?: unknown): Promise<T>;
229
+ /**
230
+ * What an upsert is keyed on: the target's condition, and whether its key
231
+ * holds a NULL. Refuses a target this dialect cannot keep to, and a conflict
232
+ * column left for the database to fill — MySQL cannot look a row up by a key
233
+ * value only the database would supply.
234
+ */
235
+ private upsertTarget;
236
+ /**
237
+ * The table's columns for a conflict target, refusing a target MySQL cannot
238
+ * keep to: one that is not a primary or unique key, which an update could
239
+ * spread over several rows, and one beside which the table has another
240
+ * unique key, a collision on which MySQL would not tell apart.
241
+ */
242
+ private conflictKey;
243
+ /** The update an upsert applies to an existing row: never its key. */
244
+ private updateValues;
245
+ /** The row matching `where`, by a locking (current) read. */
246
+ private lockedRow;
247
+ /**
248
+ * Insert the row, or resolve a duplicate on the target key. The insert is
249
+ * read back by the primary key it reports, not by the conflict key: a
250
+ * BEFORE INSERT trigger may have rewritten the conflict value, and the row
251
+ * stored is the one to return.
252
+ *
253
+ * A duplicate is resolved when a row holds the TARGET key, whichever unique
254
+ * key MySQL names in its error. PostgreSQL checks the target's index before
255
+ * any other, so a row colliding on the target and on another key resolves
256
+ * on the target there too; refusing it here because MySQL happened to check
257
+ * the other index first would answer that case differently. A target row
258
+ * committed by another transaction after this insert failed is the order in
259
+ * which that transaction ran first, where PostgreSQL also resolves on it.
260
+ */
261
+ private insertOrResolve;
262
+ /**
263
+ * Insert a row and read it back by its primary key: the value the caller
264
+ * gave, or the one MySQL or the model generated, which `$returningId()`
265
+ * reports and a given value it does not. Undefined when the table has no
266
+ * primary key to read by.
267
+ */
268
+ private insertRow;
269
+ /**
270
+ * A row's primary key as a condition, from a record keyed as the model's
271
+ * properties are. Undefined when the table has no primary key or the record
272
+ * lacks part of it.
273
+ */
274
+ private byIdentity;
275
+ /** A table-level `primaryKey({ columns })`, read through the MySQL table config. */
276
+ protected override compositePrimaryKey(tableObj: Record<string, unknown>): object[];
277
+ private createTransactionContext;
278
+ /**
279
+ * Classifies a MySQL error into a DatabaseError.
280
+ *
281
+ * @param error - Original error from mysql2
282
+ * @param sql - SQL statement that caused the error (optional)
283
+ * @returns DatabaseError with proper classification
284
+ */
285
+ protected override classifyError(error: unknown, sql?: string): DatabaseError;
323
286
  }
324
287
  /**
325
288
  * Create a MySQL database adapter.
@@ -351,7 +314,7 @@ declare class MySqlAdapter extends DrizzleAdapter {
351
314
  * await adapter.connect();
352
315
  * ```
353
316
  */
354
- declare function createMySqlAdapter(config: MySqlAdapterConfig): MySqlAdapter;
317
+ export declare function createMySqlAdapter(config: MySqlAdapterConfig): MySqlAdapter;
355
318
  /**
356
319
  * Type guard to check if a value is a MySqlAdapter.
357
320
  *
@@ -366,6 +329,6 @@ declare function createMySqlAdapter(config: MySqlAdapterConfig): MySqlAdapter;
366
329
  * }
367
330
  * ```
368
331
  */
369
- declare function isMySqlAdapter(value: unknown): value is MySqlAdapter;
370
-
371
- export { MySqlAdapter, VERSION, createMySqlAdapter, isMySqlAdapter };
332
+ export declare function isMySqlAdapter(value: unknown): value is MySqlAdapter;
333
+ export type { AdapterLogger, BaseAdapterConfig, DatabaseCapabilities, DatabaseError, DatabaseErrorKind, DeleteOptions, InsertOptions, JoinSpec, MySqlAdapterConfig, OrderBySpec, PoolConfig, PoolStats, SelectOptions, SqlParam, SslConfig, TransactionContext, TransactionOptions, UpdateOptions, UpsertOptions, WhereClause, WhereCondition, WhereOperator };
334
+ //# sourceMappingURL=index.d.ts.map