e.g. I found a table called Yesterday's ELRs by County
It threw an error inside the detect_fts() function attempting to run this SQL query:
select name from sqlite_master
where rootpage = 0
and (
sql like '%VIRTUAL TABLE%USING FTS%content="Yesterday's ELRs by County"%'
or sql like '%VIRTUAL TABLE%USING FTS%content=[Yesterday's ELRs by County]%'
or (
tbl_name = "Yesterday's ELRs by County"
and sql like '%VIRTUAL TABLE%USING FTS%'
)
)
Here's the code at fault:
|
def detect_fts_sql(table): |
|
return r""" |
|
select name from sqlite_master |
|
where rootpage = 0 |
|
and ( |
|
sql like '%VIRTUAL TABLE%USING FTS%content="{table}"%' |
|
or sql like '%VIRTUAL TABLE%USING FTS%content=[{table}]%' |
|
or ( |
|
tbl_name = "{table}" |
|
and sql like '%VIRTUAL TABLE%USING FTS%' |
|
) |
|
) |
|
""".format( |
|
table=table |
|
) |
e.g. I found a table called
Yesterday's ELRs by CountyIt threw an error inside the
detect_fts()function attempting to run this SQL query:Here's the code at fault:
datasette/datasette/utils/__init__.py
Lines 534 to 548 in 640ac70