/** SQL statements for initializing the codemogger code index schema */ export declare const CREATE_CODEBASES_TABLE = "\nCREATE TABLE IF NOT EXISTS codebases (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n root_path TEXT NOT NULL UNIQUE,\n name TEXT NOT NULL DEFAULT '',\n indexed_at INTEGER NOT NULL DEFAULT 0\n)\n"; export declare const CREATE_CHUNKS_TABLE = "\nCREATE TABLE IF NOT EXISTS chunks (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n codebase_id INTEGER NOT NULL REFERENCES codebases(id),\n file_path TEXT NOT NULL,\n chunk_key TEXT NOT NULL UNIQUE,\n language TEXT NOT NULL,\n kind TEXT NOT NULL,\n name TEXT NOT NULL DEFAULT '',\n signature TEXT NOT NULL DEFAULT '',\n snippet TEXT NOT NULL,\n start_line INTEGER NOT NULL,\n end_line INTEGER NOT NULL,\n file_hash TEXT NOT NULL,\n indexed_at INTEGER NOT NULL,\n embedding BLOB,\n embedding_model TEXT DEFAULT ''\n)\n"; export declare const CREATE_FILES_TABLE = "\nCREATE TABLE IF NOT EXISTS indexed_files (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n codebase_id INTEGER NOT NULL REFERENCES codebases(id),\n file_path TEXT NOT NULL,\n file_hash TEXT NOT NULL,\n chunk_count INTEGER NOT NULL DEFAULT 0,\n indexed_at INTEGER NOT NULL,\n UNIQUE(codebase_id, file_path)\n)\n"; /** Generate DDL for a per-codebase FTS table */ export declare function ftsTableName(codebaseId: number): string; export declare function createFtsTableSQL(codebaseId: number): string; export declare function createFtsIndexSQL(codebaseId: number): string; export declare function dropFtsTableSQL(codebaseId: number): string; export declare function populateFtsSQL(codebaseId: number): string; /** Insert FTS entries for chunks of a single file (used by incremental update) */ export declare function populateFtsForFileSQL(codebaseId: number): string; export declare const ALL_SCHEMA: string[];