import { DatabaseSync } from "node:sqlite"; /** * SQLite 打开、PRAGMA 与 migration。 */ export interface OpenDbOptions { dataHome?: string; dbPath?: string; readonly?: boolean; } export interface SchemaMeta { schemaVersion: string; chunkerVersion: string; policyVersion: string; ftsProjectionVersion: string; ftsGeneration: number; } /** * 打开(或创建)索引数据库并完成 migration。 */ export declare function openDatabase(options?: OpenDbOptions): DatabaseSync; /** * 执行 schema migration 与 FTS 创建。 */ export declare function migrate(db: DatabaseSync): void; /** * 读取 schema_meta。 */ export declare function readSchemaMeta(db: DatabaseSync): SchemaMeta; /** * FTS projection 是否可用(版本 + status + chunk/FTS 计数)。 */ export declare function isProjectionAvailable(db: DatabaseSync): boolean; /** * bump FTS generation(rebuild/purge 后)。 */ export declare function bumpFtsGeneration(db: DatabaseSync): number; /** * 关闭数据库。 */ export declare function closeDatabase(db: DatabaseSync): void; //# sourceMappingURL=db.d.ts.map