/** * Write-Ahead Log (WAL) implementation. * * The WAL provides durability by recording all operations before * they are applied to the main data file. On recovery, the WAL * is scanned to rebuild the in-memory index. */ import type { WalEntry } from './types'; export declare class Wal { private readonly filePath; private readonly readOnly; private fileHandle; constructor(filePath: string, readOnly?: boolean); /** * Append a WAL entry and sync to disk. * This is the commit point - once this returns, the operation is durable. */ append(entry: WalEntry): Promise; /** * Append multiple WAL entries and sync once. * This is more efficient than calling append() multiple times. * @returns The number of entries written */ appendBatch(entries: WalEntry[]): Promise; /** * Recover WAL entries from disk. * Yields valid entries in order, stopping at the first corrupted entry. */ recover(): AsyncGenerator; /** * Close the WAL file handle. */ close(): Promise; /** * Get the file path for this WAL. */ getFilePath(): string; } //# sourceMappingURL=wal.d.ts.map