import { LockContext, QueryResult } from '@powersync/common';
import { Remote } from 'comlink';
import { Worker } from 'node:worker_threads';
import { AsyncDatabase, AsyncDatabaseOpener, ProxiedQueryResult } from './AsyncDatabase.js';
/**
 * A PowerSync database connection implemented with RPC calls to a background worker.
 */
export declare class RemoteConnection implements LockContext {
    isBusy: boolean;
    private readonly worker;
    private readonly comlink;
    private readonly database;
    private readonly notifyWorkerClosed;
    constructor(worker: Worker, comlink: Remote<AsyncDatabaseOpener>, database: Remote<AsyncDatabase>);
    /**
     * Runs the inner function, but appends the stack trace where this function was called. This is useful for workers
     * because stack traces from worker errors are otherwise unrelated to the application issue that has caused them.
     */
    private withRemote;
    executeBatch(query: string, params?: any[][]): Promise<QueryResult>;
    execute(query: string, params?: any[] | undefined): Promise<QueryResult>;
    executeRaw(query: string, params?: any[] | undefined): Promise<any[][]>;
    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>;
    refreshSchema(): Promise<void>;
    close(): Promise<void>;
    static wrapQueryResult(result: ProxiedQueryResult): QueryResult;
}
