import { SqliteConnection } from "./connection.js"; //#region src/fts-integrity.d.ts /** * The FTS tables the integrity guard covers. Exported so the * coverage self-check test can diff this list against the `%_fts` * tables of a fully-migrated database - a new FTS index that is not * registered here fails the test instead of silently escaping the * integrity check. * * @internal */ declare function listCheckedFtsTables(): ReadonlyArray; /** One FTS table's integrity finding. */ interface FtsIntegrityReport { /** The FTS table inspected. */ readonly table: string; /** FTS rows whose `rowid` matches no row in the base table. */ readonly orphanRows: number; } /** * Count orphaned FTS rows (rowids with no matching base row) for every FTS * table that exists. An empty array means every FTS index is consistent with * its base table. A non-empty result is a sign of rowid drift - most likely a * hand-run `VACUUM` - and means search may return the wrong records. * * Tables absent from the schema (e.g. before their migration has run) are * skipped rather than reported. * * @stable */ declare function checkFtsIntegrity(conn: SqliteConnection): FtsIntegrityReport[]; /** * Format an {@link checkFtsIntegrity} result as a single warning line, or * `null` when the indexes are consistent. Used at store-open time. */ declare function formatFtsIntegrityWarning(reports: ReadonlyArray): string | null; //#endregion export { FtsIntegrityReport, checkFtsIntegrity, formatFtsIntegrityWarning, listCheckedFtsTables }; //# sourceMappingURL=fts-integrity.d.ts.map