export interface RemoteWriterConfig { url: string; authToken?: string | (() => Promise); remoteEncryptionKey?: string; } /** * Manages remote write routing using Session from @tursodatabase/serverless. * For standalone writes (not in txn), creates a temporary Session per write. * For transactions, reuses Session (baton-based) across all statements. */ export declare class RemoteWriter { private session; private _inRemoteTxn; private config; constructor(config: RemoteWriterConfig); private resolveAuthToken; private createSession; /** * Execute single SQL on remote. Creates temp session if not in txn. */ execute(sql: string, args?: any[]): Promise<{ columns: string[]; rows: any[]; rowsAffected: number; lastInsertRowid: number | undefined; }>; /** * Execute multi-statement SQL on remote (for exec() path). */ sequence(sql: string): Promise; /** * Begin a remote transaction. Creates a session and sends BEGIN. */ beginTransaction(mode: string): Promise; /** * Commit the remote transaction. Sends COMMIT and closes the session. */ commitTransaction(): Promise; /** * Rollback the remote transaction. Sends ROLLBACK and closes the session. */ rollbackTransaction(): Promise; /** * Execute SQL on remote with auto-detection of BEGIN/COMMIT/ROLLBACK. * Manages session lifecycle based on SQL category. */ execRemote(sql: string, category: string): Promise<{ shouldPull: boolean; }>; get isInTransaction(): boolean; close(): Promise; } //# sourceMappingURL=remote-writer.d.ts.map