import mysql from 'mysql'; import type { Pool } from 'mysql'; import type { PoolConnectionPromisify, RDSClientOptions, TransactionScope } from './types'; import { Operator } from './operator'; import { RDSConnection } from './connection'; import { RDSTransaction } from './transaction'; export * from './types'; interface PoolPromisify extends Omit { query(sql: string): Promise; getConnection(): Promise; end(): Promise; _acquiringConnections: any[]; _allConnections: any[]; _freeConnections: any[]; _connectionQueue: any[]; } export declare class RDSClient extends Operator { #private; static get literals(): { now: import("./literals").Literal; Literal: typeof import("./literals").Literal; }; static get escape(): typeof mysql.escape; static get escapeId(): typeof mysql.escapeId; static get format(): typeof mysql.format; static get raw(): typeof mysql.raw; constructor(options: RDSClientOptions); query(sql: string, values?: object | any[]): Promise; get pool(): PoolPromisify; get stats(): { acquiringConnections: number; allConnections: number; freeConnections: number; connectionQueue: number; busyConnections: number; }; waitPoolConnection(abortSignal: AbortSignal): Promise; getConnectionWithTimeout(): Promise; getConnection(): Promise; /** * Begin a transaction * * @return {RDSTransaction} transaction instance */ beginTransaction(): Promise; /** * Auto commit or rollback on a transaction scope * * @param scope - scope with code * @return {Object} - scope return result */ beginTransactionScope(scope: TransactionScope): Promise; /** * doomed to be rollbacked after transaction scope * useful on writing tests which are related with database * * @param scope - scope with code * @return {Object} - scope return result */ beginDoomedTransactionScope(scope: TransactionScope): Promise; end(): Promise; }