Skip to content

Commit

Permalink
?_search=x now works directly against fts virtual table
Browse files Browse the repository at this point in the history
Closes #135
  • Loading branch information
simonw committed Nov 20, 2017
1 parent 771b0ee commit 0331666
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datasette/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0331666

Please sign in to comment.