import mysql from 'mysql2/promise';
import { DatasourceService } from '../../datasource.service';
import { Driver } from '../driver';
import { MySqlConnectionCredentialsOptions } from './my-sql-connection-credentials.options';
import { MySqlConnectionOptions } from './my-sql-connection.options';
import { MySqlQueryRunner } from './my-sql.query-runner';
export declare class MySqlConnectionDriver implements Driver {
    options: MySqlConnectionOptions;
    connection: DatasourceService;
    /**
     * Connection pool.
     */
    pool: mysql.Pool;
    /**
     * Master database used to perform all write queries.
     */
    database: string;
    /**
     * Version of MySQL. Requires a SQL query to the DB, so it is not always set
     */
    version?: string;
    constructor(connection: DatasourceService);
    connect(): Promise<void>;
    afterConnect(): Promise<void>;
    disconnect(): Promise<void>;
    /**
     * Creates a new connection pool for a given database credentials.
     */
    protected createConnectionOptions(options: MySqlConnectionOptions, credentials: MySqlConnectionCredentialsOptions): mysql.PoolOptions;
    /**
     * Creates a new connection pool for a given database credentials.
     */
    protected createPool(connectionOptions: mysql.PoolOptions): Promise<mysql.Pool>;
    /**
     * Obtains a new database connection to a master server.
     * Used for replication.
     * If replication is not setup then returns default connection's database connection.
     */
    obtainConnection(): Promise<mysql.PoolConnection>;
    /**
     * Creates a query runner used to execute database queries.
     */
    createQueryRunner(): MySqlQueryRunner;
}
