Skip to main content

FTS5_REGISTER_SQL

Constant FTS5_REGISTER_SQL 

Source
pub const FTS5_REGISTER_SQL: &str = "\
    CREATE VIRTUAL TABLE IF NOT EXISTS fts_messages USING fts5(\
        content, title, agent, workspace, source_path, \
        created_at UNINDEXED, \
        content='', tokenize='porter'\
    )";
Expand description

SQL to register the FTS5 virtual table on a frankensqlite connection.

FrankenSQLite skips virtual-table entries (rootpage=0) when loading sqlite_master from a stock-SQLite database. Executing this CREATE triggers the legacy FTS5 fallback path and materialises the table so subsequent FTS queries work.