import { BaseObserver, DBAdapter, DBAdapterListener, DBLockOptions, LockContext, QueryResult, Transaction } from '@powersync/common';
import { NodeSQLOpenOptions } from './options.js';
export type BetterSQLite3LockContext = LockContext & {
    executeBatch(query: string, params?: any[][]): Promise<QueryResult>;
};
export type BetterSQLite3Transaction = Transaction & BetterSQLite3LockContext;
/**
 * Adapter for better-sqlite3
 */
export declare class WorkerConnectionPool extends BaseObserver<DBAdapterListener> implements DBAdapter {
    private readonly options;
    readonly name: string;
    private readConnections;
    private writeConnection;
    private readonly readQueue;
    private readonly writeQueue;
    constructor(options: NodeSQLOpenOptions);
    initialize(): Promise<void>;
    close(): Promise<void>;
    readLock<T>(fn: (tx: BetterSQLite3LockContext) => Promise<T>, _options?: DBLockOptions | undefined): Promise<T>;
    writeLock<T>(fn: (tx: BetterSQLite3LockContext) => Promise<T>, _options?: DBLockOptions | undefined): Promise<T>;
    readTransaction<T>(fn: (tx: BetterSQLite3Transaction) => Promise<T>, _options?: DBLockOptions | undefined): Promise<T>;
    writeTransaction<T>(fn: (tx: BetterSQLite3Transaction) => Promise<T>, _options?: DBLockOptions | undefined): Promise<T>;
    private internalTransaction;
    getAll<T>(sql: string, parameters?: any[]): Promise<T[]>;
    getOptional<T>(sql: string, parameters?: any[]): Promise<T | null>;
    get<T>(sql: string, parameters?: any[]): Promise<T>;
    execute(query: string, params?: any[] | undefined): Promise<QueryResult>;
    executeRaw(query: string, params?: any[] | undefined): Promise<any[][]>;
    executeBatch(query: string, params?: any[][]): Promise<QueryResult>;
    refreshSchema(): Promise<void>;
}
