export default class VelociousDatabaseDriversBase {
    /**
     * Runs constructor.
     * @param {import("../../configuration-types.js").DatabaseConfigurationType} config - Configuration object.
     * @param {import("../../configuration.js").default} configuration - Configuration instance.
     */
    constructor(config: import("../../configuration-types.js").DatabaseConfigurationType, configuration: import("../../configuration.js").default);
    /**
     * Id seq.
      @type {number | undefined} */
    idSeq: number | undefined;
    /**
     * Narrows the runtime value to the documented type.
      @type {Array<Array<() => void | Promise<void>>>} */
    _afterCommitCallbackFrames: Array<Array<() => void | Promise<void>>>;
    /**
     * Narrows the runtime value to the documented type.
      @type {Map<string, Promise<?>>} */
    _schemaCache: Map<string, Promise<unknown>>;
    /**
     * Narrows the runtime value to the documented type.
      @type {(() => void) | undefined} */
    _schemaCacheInvalidator: (() => void) | undefined;
    /**
     * Narrows the runtime value to the documented type.
      @type {string | undefined} */
    _connectionCheckoutName: string | undefined;
    /**
     * Active query.
      @type {ActiveQueryState | null} */
    _activeQuery: ActiveQueryState | null;
    _args: import("../../configuration-types.js").DatabaseConfigurationType;
    configuration: import("../../configuration.js").default;
    mutex: Mutex;
    logger: Logger;
    _transactionsCount: number;
    _transactionsActionsMutex: Mutex;
    /**
     * Runs add foreign key.
     * @param {string} tableName - Table name.
     * @param {string} columnName - Column name.
     * @param {string} referencedTableName - Referenced table name.
     * @param {string} referencedColumnName - Referenced column name.
     * @param {object} args - Options object.
     * @returns {Promise<void>} - Resolves when complete.
     */
    addForeignKey(tableName: string, columnName: string, referencedTableName: string, referencedColumnName: string, args: object): Promise<void>;
    /**
     * Runs alter table sqls.
     * @abstract
     * @param {import("../table-data/index.js").default} _tableData - Table data.
     * @returns {Promise<string[]>} - Resolves with SQL statements.
     */
    alterTableSQLs(_tableData: import("../table-data/index.js").default): Promise<string[]>;
    /**
     * Runs connect.
     * @abstract
     * @returns {Promise<void>} - Resolves when complete.
     */
    connect(): Promise<void>;
    /**
     * Optional close hook for database drivers.
     * @returns {Promise<void>} - Resolves when complete.
     */
    close(): Promise<void>;
    /**
     * Runs set connection checkout name.
     * @param {string | undefined} name - Human-readable name for this active checkout.
     * @returns {Promise<void>} - Resolves when complete.
     */
    setConnectionCheckoutName(name: string | undefined): Promise<void>;
    _connectionCheckedOutAtUnixMs: number | undefined;
    /**
     * Runs clear connection checkout name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    clearConnectionCheckoutName(): Promise<void>;
    /**
     * Runs reconnect.
     * @returns {Promise<void>} - Resolves when complete.
     */
    reconnect(): Promise<void>;
    /**
     * Runs create database sql.
     * @abstract
     * @param {string} databaseName - Database name.
     * @param {object} [args] - Options object.
     * @param {boolean} [args.ifNotExists] - Whether if not exists.
     * @param {string} [args.databaseCharset] - Database-default character set (driver-specific; mysql/mariadb).
     * @param {string} [args.databaseCollation] - Database-default collation (driver-specific; mysql/mariadb).
     * @returns {string[]} - SQL statements.
     */
    createDatabaseSql(databaseName: string, args?: {
        ifNotExists?: boolean | undefined;
        databaseCharset?: string | undefined;
        databaseCollation?: string | undefined;
    }): string[];
    /**
     * Runs drop database sql.
     * @abstract
     * @param {string} databaseName - Database name.
     * @param {object} [args] - Options object.
     * @param {boolean} [args.ifExists] - Whether if exists.
     * @returns {string[]} - SQL statements.
     */
    dropDatabaseSql(databaseName: string, args?: {
        ifExists?: boolean | undefined;
    }): string[];
    /**
     * Runs create index sqls.
     * @abstract
     * @param {CreateIndexSqlArgs} indexData - Index data.
     * @returns {Promise<string[]>} - Resolves with SQL statements.
     */
    createIndexSQLs(indexData: CreateIndexSqlArgs): Promise<string[]>;
    /**
     * Runs create table.
     * @param {import("../table-data/index.js").default} tableData - Table data.
     * @returns {Promise<void>} - Resolves when complete.
     */
    createTable(tableData: import("../table-data/index.js").default): Promise<void>;
    /**
     * Runs create table sql.
     * @abstract
     * @param {import("../table-data/index.js").default} tableData - Table data.
     * @returns {Promise<string[]>} - Resolves with SQL statements.
     */
    createTableSql(tableData: import("../table-data/index.js").default): Promise<string[]>;
    /**
     * Runs delete.
     * @param {DeleteSqlArgsType} args - Options object.
     * @returns {Promise<void>} - Resolves when complete.
     */
    delete(args: DeleteSqlArgsType): Promise<void>;
    /**
     * Runs delete sql.
     * @abstract
     * @param {DeleteSqlArgsType} args - Options object.
     * @returns {string} - SQL string.
     */
    deleteSql(args: DeleteSqlArgsType): string;
    /**
     * Runs drop table.
     * @param {string} tableName - Table name.
     * @param {DropTableSqlArgsType} [args] - Options object.
     * @returns {Promise<void>} - Resolves when complete.
     */
    dropTable(tableName: string, args?: DropTableSqlArgsType): Promise<void>;
    /**
     * Runs drop table sqls.
     * @abstract
     * @param {string} tableName - Table name.
     * @param {DropTableSqlArgsType} [args] - Options object.
     * @returns {Promise<string[]>} - Resolves with SQL statements.
     */
    dropTableSQLs(tableName: string, args?: DropTableSqlArgsType): Promise<string[]>;
    /**
     * Runs escape.
     * @abstract
     * @param {?} value - Value to use.
     * @returns {?} - The escape.
     */
    escape(value: unknown): unknown;
    /**
     * Runs get args.
     * @returns {import("../../configuration-types.js").DatabaseConfigurationType} - The args.
     */
    getArgs(): import("../../configuration-types.js").DatabaseConfigurationType;
    /**
     * Runs get configuration.
     * @returns {import("../../configuration.js").default} - The configuration.
     */
    getConfiguration(): import("../../configuration.js").default;
    /**
     * Runs get id seq.
     * @returns {number | undefined} - The id seq.
     */
    getIdSeq(): number | undefined;
    /**
     * Clears cached schema metadata for this driver instance.
     * @returns {void} - No return value.
     */
    clearSchemaCache(): void;
    /**
     * Clears only the metadata cached on this driver instance.
     * @returns {void} - No return value.
     */
    _clearLocalSchemaCache(): void;
    /**
     * Runs set schema cache invalidator.
     * @param {() => void} invalidator - Callback used to clear schema caches that share this driver pool.
     * @returns {void} - No return value.
     */
    setSchemaCacheInvalidator(invalidator: () => void): void;
    /**
     * Runs schema cache enabled.
     * @returns {boolean} - Whether schema metadata caching is enabled.
     */
    _schemaCacheEnabled(): boolean;
    /**
     * Runs cached schema metadata.
     * @template T
     * @param {string} cacheKey - Schema cache key.
     * @param {() => Promise<T>} callback - Cache miss callback.
     * @returns {Promise<T>} - Resolves with the cached metadata.
     */
    _cachedSchemaMetadata<T>(cacheKey: string, callback: () => Promise<T>): Promise<T>;
    /**
     * Runs cached table schema metadata.
     * @template T
     * @param {string} tableName - Table name.
     * @param {string} metadataName - Metadata name.
     * @param {() => Promise<T>} callback - Cache miss callback.
     * @returns {Promise<T>} - Resolves with the cached table metadata.
     */
    _cachedTableSchemaMetadata<T>(tableName: string, metadataName: string, callback: () => Promise<T>): Promise<T>;
    /**
     * Runs schema cache return value.
     * @param {?} value - Cached value.
     * @returns {?} - Value returned to callers.
     */
    _schemaCacheReturnValue(value: unknown): unknown;
    /**
     * Runs get tables.
     * @abstract
     * @returns {Promise<Array<import("./base-table.js").default>>} - Resolves with the tables.
     */
    getTables(): Promise<Array<import("./base-table.js").default>>;
    /**
     * Runs structure sql.
     * @returns {Promise<string | null>} - Resolves with SQL string.
     */
    structureSql(): Promise<string | null>;
    /**
     * Runs get table by name.
     * @param {string} name - Name.
     * @param {object} [args] - Options object.
     * @param {boolean} args.throwError - Whether throw error.
     * @returns {Promise<import("./base-table.js").default | undefined>} - Resolves with the table by name.
     */
    getTableByName(name: string, args?: {
        throwError: boolean;
    }): Promise<import("./base-table.js").default | undefined>;
    /**
     * Runs missing table error message.
     * @param {string} name - Table name.
     * @param {string[]} tableNames - Available table names.
     * @returns {string} - Error message.
     */
    _missingTableErrorMessage(name: string, tableNames: string[]): string;
    /**
     * Runs get table by name or fail.
     * @param {string} name - Name.
     * @returns {Promise<import("./base-table.js").default>} - Resolves with the table by name or fail.
     */
    getTableByNameOrFail(name: string): Promise<import("./base-table.js").default>;
    /**
     * Runs get type.
     * @abstract
     * @returns {string} - The type.
     */
    getType(): string;
    /**
     * Runs insert.
     * @param {InsertSqlArgsType} args - Options object.
     * @returns {Promise<void>} - Resolves when complete.
     */
    insert(args: InsertSqlArgsType): Promise<void>;
    /**
     * Runs insert multiple.
     * @param {string} tableName - Table name.
     * @param {Array<string>} columns - Column names.
     * @param {Array<Array<?>>} rows - Rows to insert.
     * @returns {Promise<void>} - Resolves when complete.
     */
    insertMultiple(tableName: string, columns: Array<string>, rows: Array<Array<unknown>>): Promise<void>;
    /**
     * Runs insert sql.
     * @abstract
     * @param {InsertSqlArgsType} args - Options object.
     * @returns {string} - SQL string.
     */
    insertSql(args: InsertSqlArgsType): string;
    /**
     * Runs upsert.
     * @param {UpsertSqlArgsType} args - Options object.
     * @returns {Promise<void>} - Resolves when complete.
     */
    upsert(args: UpsertSqlArgsType): Promise<void>;
    /**
     * Runs last insert id.
     * @abstract
     * @returns {Promise<number>} - Resolves with the last insert id.
     */
    lastInsertID(): Promise<number>;
    /**
     * Runs convert value.
     * @param {?} value - Value to use.
     * @returns {?} - The convert value.
     */
    _convertValue(value: unknown): unknown;
    /**
     * Whether a value is a plain object or array that should be JSON-encoded for a
     * JSON/text column. Excludes Buffers and class instances (e.g. model records).
     * @param {?} value - Value to test.
     * @returns {boolean} - Whether to JSON-encode the value.
     */
    _isJsonEncodableValue(value: unknown): boolean;
    /**
     * Runs options.
     * @abstract
     * @returns {import("../query-parser/options.js").default} - The options options.
     */
    options(): import("../query-parser/options.js").default;
    /**
     * Runs quote.
     * @param {?} value - Value to use.
     * @returns {number | string} - The quote.
     */
    quote(value: unknown): number | string;
    /**
     * Runs quote column.
     * @param {string} columnName - Column name.
     * @returns {string} - The quote column.
     */
    quoteColumn(columnName: string): string;
    /**
     * Runs quote index.
     * @param {string} columnName - Column name.
     * @returns {string} - The quote index.
     */
    quoteIndex(columnName: string): string;
    /**
     * Runs quote table.
     * @param {string} tableName - Table name.
     * @returns {string} - The quote table.
     */
    quoteTable(tableName: string): string;
    /**
     * Runs new query.
     * @returns {Query} - The new query.
     */
    newQuery(): Query;
    /**
     * Runs select.
     * @param {string} tableName - Table name.
     * @returns {Promise<QueryResultType>} - Resolves with the select.
     */
    select(tableName: string): Promise<QueryResultType>;
    /**
     * Runs set id seq.
     * @param {number | undefined} newIdSeq - New id seq.
     * @returns {void} - No return value.
     */
    setIdSeq(newIdSeq: number | undefined): void;
    /**
     * Runs should set auto increment when primary key.
     * @abstract
     * @returns {boolean} - Whether set auto increment when primary key.
     */
    shouldSetAutoIncrementWhenPrimaryKey(): boolean;
    /**
     * Runs supports default primary key uuid.
     * @returns {boolean} - Whether supports default primary key uuid.
     */
    supportsDefaultPrimaryKeyUUID(): boolean;
    /**
     * Runs supports insert into returning.
     * @abstract
     * @returns {boolean} - Whether supports insert into returning.
     */
    supportsInsertIntoReturning(): boolean;
    /**
     * Runs table exists.
     * @param {string} tableName - Table name.
     * @returns {Promise<boolean>} - Resolves with Whether table exists.
     */
    tableExists(tableName: string): Promise<boolean>;
    /**
     * Runs transaction.
     * @param {() => Promise<void>} callback - Callback function.
     * @returns {Promise<?>} - Resolves with the transaction.
     */
    transaction(callback: () => Promise<void>): Promise<unknown>;
    /**
     * Runs a callback after the surrounding transaction commits.
     * If no transaction is active, the callback runs immediately.
     * @param {() => void | Promise<void>} callback - Callback.
     * @returns {Promise<void>} - Resolves when the callback has been registered or run.
     */
    afterCommit(callback: () => void | Promise<void>): Promise<void>;
    /**
     * Runs start transaction.
     * @returns {Promise<void>} - Resolves when complete.
     */
    startTransaction(): Promise<void>;
    /**
     * Runs start transaction action.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _startTransactionAction(): Promise<void>;
    /**
     * Runs commit transaction.
     * @returns {Promise<void>} - Resolves when complete.
     */
    commitTransaction(): Promise<void>;
    /**
     * Runs commit transaction action.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _commitTransactionAction(): Promise<void>;
    /**
     * Merges committed callbacks into the parent transaction frame or runs them when the outermost commit completes.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _commitAfterCommitCallbackFrame(): Promise<void>;
    /**
     * Runs query.
     * @param {string} sql - SQL string.
     * @param {QueryOptions} [options] - Query options.
     * @returns {Promise<QueryResultType>} - Resolves with the query.
     */
    query(sql: string, options?: QueryOptions): Promise<QueryResultType>;
    /**
     * Runs query actual with logging.
     * @param {object} args - Options object.
     * @param {string} args.originalSql - Original SQL string before process-list comments.
     * @param {string} args.querySql - SQL string sent to the database.
     * @param {QueryOptions} options - Query options.
     * @param {import("../../http-server/client/request-timing.js").default | undefined} requestTiming - Request timing.
     * @param {number} tries - Query attempt count.
     * @returns {Promise<QueryResultType>} - Resolves with the query.
     */
    _queryActualWithLogging({ originalSql, querySql }: {
        originalSql: string;
        querySql: string;
    }, options: QueryOptions, requestTiming: import("../../http-server/client/request-timing.js").default | undefined, tries: number): Promise<QueryResultType>;
    /**
     * Runs get debug snapshot.
     * @returns {DatabaseConnectionDebugSnapshot} - Diagnostic snapshot for this connection.
     */
    getDebugSnapshot(): DatabaseConnectionDebugSnapshot;
    /**
     * Runs debug sql preview.
     * @param {string} sql - SQL to preview.
     * @returns {string} - Normalized truncated SQL preview for diagnostics.
     */
    _debugSqlPreview(sql: string): string;
    /**
     * Runs query sql with process list comment.
     * @param {string} sql - SQL string.
     * @param {QueryOptions} options - Query options.
     * @returns {string} - SQL string with a leading process-list comment when annotations exist.
     */
    _querySqlWithProcessListComment(sql: string, options: QueryOptions): string;
    /**
     * Runs process list comment value.
     * @param {string} value - Raw process-list comment value.
     * @returns {string} - Sanitized process-list comment value.
     */
    _processListCommentValue(value: string): string;
    /**
     * Runs schema cache invalidating sql.
     * @param {string} sql - SQL string.
     * @returns {boolean} - Whether the SQL should invalidate schema metadata.
     */
    _schemaCacheInvalidatingSql(sql: string): boolean;
    /**
     * Runs query logging enabled.
     * @returns {boolean} - Whether query logging is enabled for this driver.
     */
    _queryLoggingEnabled(): boolean;
    /**
     * Runs log query.
     * @param {object} args - Options object.
     * @param {number} args.elapsedMs - Elapsed milliseconds.
     * @param {string} args.logName - Query log subject.
     * @param {string | undefined} args.sourceStack - Source stack.
     * @param {string} args.sql - SQL string.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _logQuery({ elapsedMs, logName, sourceStack, sql }: {
        elapsedMs: number;
        logName: string;
        sourceStack: string | undefined;
        sql: string;
    }): Promise<void>;
    /**
     * Runs query source line.
     * @param {string | undefined} sourceStack - Source stack.
     * @returns {string | undefined} - Source line when an application frame is available.
     */
    _querySourceLine(sourceStack: string | undefined): string | undefined;
    /**
     * Runs query actual.
     * @abstract
     * @param {string} sql - SQL string.
     * @returns {Promise<QueryResultType>} - Resolves with the query actual.
     */
    _queryActual(sql: string): Promise<QueryResultType>;
    /**
     * Runs query to sql.
     * @abstract
     * @param {Query} _query - Query instance.
     * @returns {string} - SQL string.
     */
    queryToSql(_query: Query): string;
    /**
     * Runs retryable database error.
     * @param {Error} _error - Error instance.
     * @returns {RetryableDatabaseErrorResult} - Retry info.
     */
    retryableDatabaseError(_error: Error): RetryableDatabaseErrorResult;
    /**
     * Runs assert writable query.
     * @param {string} sql - SQL string.
     * @returns {void} - No return value.
     */
    _assertWritableQuery(sql: string): void;
    /**
     * Runs assert not read only.
     * @returns {void} - No return value.
     */
    _assertNotReadOnly(): void;
    /**
     * Runs sql looks like write.
     * @param {string} sql - SQL string.
     * @returns {boolean} - SQL representation.
     */
    _sqlLooksLikeWrite(sql: string): boolean;
    /**
     * Runs is read only.
     * @returns {boolean} - Whether read only.
     */
    isReadOnly(): boolean;
    /**
     * Runs rollback transaction.
     * @returns {Promise<void>} - Resolves when complete.
     */
    rollbackTransaction(): Promise<void>;
    /**
     * Runs rollback transaction action.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _rollbackTransactionAction(): Promise<void>;
    /**
     * Runs generate save point name.
     * @returns {string} - The generate save point name.
     */
    generateSavePointName(): string;
    /**
     * Runs start save point.
     * @param {string} savePointName - Save point name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    startSavePoint(savePointName: string): Promise<void>;
    /**
     * Runs start save point action.
     * @param {string} savePointName - Save point name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _startSavePointAction(savePointName: string): Promise<void>;
    /**
     * Runs rename column.
     * @param {string} tableName - Table name.
     * @param {string} oldColumnName - Previous column name.
     * @param {string} newColumnName - New column name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    renameColumn(tableName: string, oldColumnName: string, newColumnName: string): Promise<void>;
    /**
     * Runs release save point.
     * @param {string} savePointName - Save point name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    releaseSavePoint(savePointName: string): Promise<void>;
    /**
     * Runs release save point action.
     * @param {string} savePointName - Save point name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _releaseSavePointAction(savePointName: string): Promise<void>;
    /**
     * Runs rollback save point.
     * @param {string} savePointName - Save point name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    rollbackSavePoint(savePointName: string): Promise<void>;
    /**
     * Runs rollback save point action.
     * @param {string} savePointName - Save point name.
     * @returns {Promise<void>} - Resolves when complete.
     */
    _rollbackSavePointAction(savePointName: string): Promise<void>;
    /**
     * Runs truncate all tables.
     * @returns {Promise<void>} - Resolves when complete.
     */
    truncateAllTables(): Promise<void>;
    /**
     * Runs update.
     * @param {UpdateSqlArgsType} args - Options object.
     * @returns {Promise<void>} - Resolves when complete.
     */
    update(args: UpdateSqlArgsType): Promise<void>;
    /**
     * Runs update sql.
     * @abstract
     * @param {UpdateSqlArgsType} args - Options object.
     * @returns {string} - SQL string.
     */
    updateSql(args: UpdateSqlArgsType): string;
    /**
     * Runs upsert sql.
     * @abstract
     * @param {UpsertSqlArgsType} args - Options object.
     * @returns {string} - SQL string.
     */
    upsertSql(args: UpsertSqlArgsType): string;
    /**
     * Runs disable foreign keys.
     * @abstract
     * @returns {Promise<void>} - Resolves when complete.
     */
    disableForeignKeys(): Promise<void>;
    /**
     * Runs enable foreign keys.
     * @abstract
     * @returns {Promise<void>} - Resolves when complete.
     */
    enableForeignKeys(): Promise<void>;
    /**
     * Runs with disabled foreign keys.
     * @param {function() : void} callback - Callback function.
     * @returns {Promise<?>} - Resolves with the with disabled foreign keys.
     */
    withDisabledForeignKeys(callback: () => void): Promise<unknown>;
    /**
     * Blocks until a named advisory lock is acquired on this connection.
     * Advisory locks are connection-scoped and do not interact with row or
     * table locks; they are purely cooperative between callers that use the
     * same name and let you serialize functionality without blocking readers
     * or writers that do not participate in the same lock.
     * @abstract
     * @param {string} name - Lock name.
     * @param {{timeoutMs?: number | null}} [_args] - Optional timeout in milliseconds; `null` or undefined blocks forever.
     * @returns {Promise<boolean>} - Resolves to true when the lock has been acquired, false if the timeout elapsed.
     */
    acquireAdvisoryLock(name: string, _args?: {
        timeoutMs?: number | null;
    }): Promise<boolean>;
    /**
     * Attempts to acquire a named advisory lock without blocking.
     * @abstract
     * @param {string} name - Lock name.
     * @returns {Promise<boolean>} - Resolves to true if the lock was acquired, false if it was already held.
     */
    tryAcquireAdvisoryLock(name: string): Promise<boolean>;
    /**
     * Releases a named advisory lock previously acquired on this connection.
     * @abstract
     * @param {string} name - Lock name.
     * @returns {Promise<boolean>} - Resolves to true if the lock was held by this session and has now been released.
     */
    releaseAdvisoryLock(name: string): Promise<boolean>;
    /**
     * Checks whether a named advisory lock is currently held by any session.
     * Intended as an introspection helper; callers who need to act on the
     * result should prefer `tryAcquireAdvisoryLock` to avoid a TOCTOU race.
     * @abstract
     * @param {string} name - Lock name.
     * @returns {Promise<boolean>} - Resolves to true if the lock is held by ? session.
     */
    isAdvisoryLockHeld(name: string): Promise<boolean>;
}
/**
 * CreateIndexSqlArgs type.
 */
export type CreateIndexSqlArgs = {
    /**
     * - Columns to include in the index.
     */
    columns: Array<string | import("./../table-data/table-column.js").default>;
    /**
     * - Skip creation if the index already exists.
     */
    ifNotExists?: boolean | undefined;
    /**
     * - Explicit index name to use.
     */
    name?: string | undefined;
    /**
     * - Whether the index should enforce uniqueness.
     */
    unique?: boolean | undefined;
    /**
     * - Name of the table to add the index to.
     */
    tableName: string;
};
/**
 * DropTableSqlArgsType type.
 */
export type DropTableSqlArgsType = {
    /**
     * - Whether dependent objects should be dropped too.
     */
    cascade?: boolean | undefined;
    /**
     * - Skip dropping if the table does not exist.
     */
    ifExists?: boolean | undefined;
};
/**
 * DeleteSqlArgsType type.
 */
export type DeleteSqlArgsType = {
    /**
     * - Table name to delete from.
     */
    tableName: string;
    /**
     * - Conditions used to build the delete WHERE clause.
     */
    conditions: {
        [key: string]: unknown;
    };
};
/**
 * InsertSqlArgsType type.
 */
export type InsertSqlArgsType = {
    /**
     * - Column names for `rows` inserts.
     */
    columns?: string[] | undefined;
    /**
     * - Column/value pairs for a single-row insert.
     */
    data?: {
        [key: string]: any;
    } | undefined;
    /**
     * - Whether this insert should be treated as multi-row.
     */
    multiple?: boolean | undefined;
    /**
     * - Column names to return after insert.
     */
    returnLastInsertedColumnNames?: string[] | undefined;
    /**
     * - Row values for a multi-row insert.
     */
    rows?: any[][] | undefined;
    /**
     * - Table name to insert into.
     */
    tableName: string;
};
/**
 * QueryRowType type.
 */
export type QueryRowType = Record<string, unknown>;
/**
 * QueryRowType type.
 */
export type QueryResultType = Array<QueryRowType>;
/**
 * RetryableDatabaseErrorResult type.
 */
export type RetryableDatabaseErrorResult = {
    /**
     * - Whether the error should be retried.
     */
    retry: boolean;
    /**
     * - Whether to reconnect before retrying.
     */
    reconnect: boolean;
    /**
     * - Override the max retry attempts.
     */
    maxTries?: number | undefined;
    /**
     * - Wait time before retrying in milliseconds.
     */
    waitMs?: number | undefined;
};
/**
 * QueryOptions type.
 */
export type QueryOptions = {
    /**
     * - Query log subject.
     */
    logName?: string | undefined;
    /**
     * - Whether to log the query.
     */
    logQuery?: boolean | undefined;
    /**
     * - Whether to add process-list comments to the query.
     */
    processListComment?: boolean | undefined;
    /**
     * - Stack captured at the caller boundary.
     */
    sourceStack?: string | undefined;
};
/**
 * ActiveQueryDebugSnapshot type.
 */
export type ActiveQueryDebugSnapshot = {
    /**
     * - Database annotations active when the query started.
     */
    annotations: string[];
    /**
     * - Query log name.
     */
    logName: string;
    /**
     * - Query start timestamp.
     */
    startedAtUnixMs: number;
    /**
     * - Query runtime in milliseconds.
     */
    runningMs: number;
    /**
     * - Truncated SQL preview.
     */
    sqlPreview: string;
};
/**
 * DatabaseConnectionDebugSnapshot type.
 */
export type DatabaseConnectionDebugSnapshot = {
    /**
     * - Currently running query, if any.
     */
    activeQuery: ActiveQueryDebugSnapshot | null;
    /**
     * - Checkout start timestamp for active checkouts.
     */
    checkedOutAtUnixMs: number | undefined;
    /**
     * - Active checkout age in milliseconds.
     */
    checkoutAgeMs: number | undefined;
    /**
     * - Human-readable checkout name.
     */
    checkoutName: string | undefined;
    /**
     * - Driver class name.
     */
    driverClass: string;
    /**
     * - Pool checkout ID sequence.
     */
    idSeq: number | undefined;
    /**
     * - Number of open transaction frames.
     */
    openTransactions: number;
    /**
     * - Number of cached schema metadata entries.
     */
    schemaCacheEntries: number;
};
/**
 * ActiveQueryState type.
 */
export type ActiveQueryState = {
    /**
     * - Database annotations active when the query started.
     */
    annotations: string[];
    /**
     * - Query log name.
     */
    logName: string;
    /**
     * - Query start timestamp.
     */
    startedAtUnixMs: number;
    /**
     * - Truncated SQL preview.
     */
    sqlPreview: string;
};
/**
 * UpdateSqlArgsType type.
 */
export type UpdateSqlArgsType = {
    /**
     * - Conditions used to build the update WHERE clause.
     */
    conditions: object;
    /**
     * - Column/value pairs to update.
     */
    data: object;
    /**
     * - Table name to update.
     */
    tableName: string;
};
/**
 * UpsertSqlArgsType type.
 */
export type UpsertSqlArgsType = {
    /**
     * - Columns that define a conflict.
     */
    conflictColumns: string[];
    /**
     * - Column/value pairs to insert.
     */
    data: object;
    /**
     * - Table name to upsert into.
     */
    tableName: string;
    /**
     * - Columns to update on conflict.
     */
    updateColumns: string[];
};
import Mutex from "epic-locks/build/mutex.js";
import Logger from "../../logger.js";
import Query from "../query/index.js";
//# sourceMappingURL=base.d.ts.map