Closed simonw closed 1 year ago
Datasette has code relating to this, to figure out which tables should be hidden tables:
It's pretty complex, especially when SpatiaLite gets involved.
I'm thinking about dropping the --all
feature entirely, but it's REALLY useful to have that.
So maybe I do port across that Datasette code.
This code in particular:
# Also mark as hidden any tables which start with the name of a hidden table
# e.g. "searchable_fts" implies "searchable_fts_content" should be hidden
for table_name in await self.table_names():
for hidden_table in hidden_tables[:]:
if table_name.startswith(hidden_table):
hidden_tables.append(table_name)
continue
Cleanest solution would be to move this logic into sqlite-utils
and add that as a dependency here. For the moment though I'm going to copy in a subset of the function (I'll ignore SpatiaLite for the moment).
Got this error: