Fixed bug with FTS against tables with hyphens in the name

This commit is contained in:
Simon Willison 2017-11-19 21:59:53 -08:00
commit 523c6f9e3a
No known key found for this signature in database
GPG key ID: FBB38AFE227189DB

View file

@ -456,7 +456,7 @@ class TableView(BaseView):
search = special_args.get('_search')
if search and fts_table:
where_clauses.append(
'rowid in (select rowid from {fts_table} where {fts_table} match :search)'.format(
'rowid in (select rowid from [{fts_table}] where [{fts_table}] match :search)'.format(
fts_table=fts_table
)
)