import type { Connection } from 'mysql2'; import type { Pool, PoolConnection, Connection as PromiseConnection } from 'mysql2/promise'; import { AsyncDatabase, type TransactionOptions } from '../core/Database.js'; import type { AsyncDriver, AsyncStatement, BatchedQuery, PrepareOptions } from '../core/Driver.js'; type Queryable = PromiseConnection | Pool | PoolConnection; declare class PreparedStatement implements AsyncStatement { #private; private client; private sql; private name?; constructor(client: Queryable, sql: string, name?: string | undefined); all(params: Array): Promise>; run(params: Array): Promise; get(params: Array): Promise; values(params: Array): Promise>>; free(): void; } export declare class Mysql2Driver implements AsyncDriver { private client; private depth; parsesJson: boolean; supportsTransactions: boolean; constructor(client: Queryable, depth?: number); exec(query: string): Promise; prepare(sql: string, options?: PrepareOptions): PreparedStatement; close(): Promise; batch(queries: Array): Promise>>; transaction(run: (inner: AsyncDriver) => Promise, options: TransactionOptions['mysql']): Promise; } export declare function connect(client: Queryable | Connection): AsyncDatabase<'mysql'>; export {};