/** * SQLite-backed implementation of the photon-core `MemoryBackend` interface. * * Each resolved namespace (typically a per-photon memory directory) gets its * own SQLite database at `{namespace}/.kv.sqlite` with a single `kv(key, value)` * table. Within a namespace, reads use a single SELECT and writes use * INSERT...ON CONFLICT UPDATE; range scans (`list(prefix)`) use a B-tree index * scan instead of a full directory walk. * * Opt-in: not installed by default. Consumers swap it in via * `setDefaultMemoryBackend(new SqliteMemoryBackend())` from `@portel/photon-core`. * Under Bun the backend uses `bun:sqlite` (zero install); under Node it falls * back to `better-sqlite3` via `./sqlite-runtime.ts`. */ import type { MemoryBackend } from '@portel/photon-core'; export declare class SqliteMemoryBackend implements MemoryBackend { private dbs; private updateLocks; private openDb; private withUpdateLock; get(namespace: string, key: string): Promise; set(namespace: string, key: string, value: any): Promise; delete(namespace: string, key: string): Promise; has(namespace: string, key: string): Promise; keys(namespace: string): Promise; clear(namespace: string): Promise; update(namespace: string, key: string, updater: (current: unknown) => unknown): Promise; list(namespace: string, prefix?: string): Promise>; /** * Close all open database handles. Call during shutdown or between tests. */ close(): Promise; } //# sourceMappingURL=memory-sqlite.d.ts.map