mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Hide FTS tables that have content=
* Hide FTS tables that have content=, closes #2477
This commit is contained in:
parent
f6446b3095
commit
f2485dce9c
4 changed files with 67 additions and 26 deletions
|
|
@ -578,10 +578,22 @@ class Database:
|
|||
SELECT name FROM fts3_shadow_tables
|
||||
)
|
||||
SELECT name FROM final ORDER BY 1
|
||||
|
||||
"""
|
||||
)
|
||||
]
|
||||
# Also hide any FTS tables that have a content= argument
|
||||
hidden_tables += [
|
||||
x[0]
|
||||
for x in await self.execute(
|
||||
"""
|
||||
SELECT name
|
||||
FROM sqlite_master
|
||||
WHERE sql LIKE '%VIRTUAL TABLE%'
|
||||
AND sql LIKE '%USING FTS%'
|
||||
AND sql LIKE '%content=%'
|
||||
"""
|
||||
)
|
||||
]
|
||||
|
||||
has_spatialite = await self.execute_fn(detect_spatialite)
|
||||
if has_spatialite:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue