?_search=x now works directly against fts virtual table

Closes #135
This commit is contained in:
Simon Willison 2017-11-19 22:18:07 -08:00
commit 0331666e34
No known key found for this signature in database
GPG key ID: FBB38AFE227189DB

View file

@ -221,8 +221,11 @@ def detect_fts_sql(table):
return r'''
select name from sqlite_master
where rootpage = 0
and sql like '%VIRTUAL TABLE%USING FTS%content="{}"%';
'''.format(table)
and (
sql like '%VIRTUAL TABLE%USING FTS%content="{table}"%'
or tbl_name = "{table}"
)
'''.format(table=table)
class Filter: