/** * @module minions-sdk/index-layer/sqlite * SQLite-backed index adapter using `sql.js` (official SQLite compiled to WASM). * * Uses `sql.js` as an optional peer dependency. Unlike native addons, sql.js * works everywhere — Node.js, Deno, Bun, and browsers — with zero compilation. * * **Important:** Use the async factory `SqliteIndexAdapter.create()` instead * of calling the constructor directly — the WASM module must be loaded first. * * @example * ```typescript * import { SqliteIndexAdapter } from 'minions-sdk/node'; * * const index = await SqliteIndexAdapter.create('./data/minions.index.db'); * const minions = new Minions({ storage, index }); * ``` */ import type { StorageFilter } from '../storage/StorageAdapter.js'; import type { IndexAdapter, IndexEntry } from './IndexAdapter.js'; /** * SQLite-backed index adapter using the official SQLite (via sql.js WASM). * * Always use the async factory method: * ```ts * const adapter = await SqliteIndexAdapter.create(':memory:'); * ``` */ export declare class SqliteIndexAdapter implements IndexAdapter { private db; private dbPath; private hasFts; private constructor(); /** * Create a new SQLite index adapter. * * @param dbPath - Path to the SQLite database file, or `:memory:` for * in-memory mode. When a file path is given, the database is loaded from * disk (if it exists) and persisted back on every write. */ static create(dbPath?: string): Promise; private initTables; private persist; private rowsToEntries; private fromRow; upsert(entry: IndexEntry): Promise; remove(id: string): Promise; list(filter?: StorageFilter): Promise; search(query: string): Promise; count(filter?: StorageFilter): Promise; clear(): Promise; /** * Close the SQLite database connection. * Call this when you're done with the adapter. */ close(): void; } //# sourceMappingURL=SqliteIndexAdapter.d.ts.map