Hide FTS tables that have content=

* Hide FTS tables that have content=, closes #2477
This commit is contained in:
Simon Willison 2025-04-16 21:44:09 -07:00 committed by GitHub
commit f2485dce9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 67 additions and 26 deletions

View file

@ -722,6 +722,25 @@ async def test_hidden_tables(app_client):
"r_rowid",
]
# A fts virtual table with a content table should be hidden too
await db.execute("create virtual table f2_fts using fts5(a, content='f')")
assert await db.hidden_table_names() == [
"_hideme",
"f2_fts_config",
"f2_fts_data",
"f2_fts_docsize",
"f2_fts_idx",
"f_config",
"f_content",
"f_data",
"f_docsize",
"f_idx",
"r_node",
"r_parent",
"r_rowid",
"f2_fts",
]
@pytest.mark.asyncio
async def test_replace_database(tmpdir):