Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If spatialite detected, mark idx_XXX_Geometry tables as hidden #228

Closed
simonw opened this issue Apr 19, 2018 · 1 comment
Closed

If spatialite detected, mark idx_XXX_Geometry tables as hidden #228

simonw opened this issue Apr 19, 2018 · 1 comment
Labels

Comments

@simonw
Copy link
Owner

simonw commented Apr 19, 2018

https://timezones-api.now.sh/timezones-faf26d0

2018-04-19 at 1 36 pm

Need to update this logic:

datasette/datasette/app.py

Lines 1276 to 1288 in e2750c7

if detect_spatialite(conn):
# Also hide Spatialite internal tables
hidden_tables += [
'ElementaryGeometries', 'SpatialIndex', 'geometry_columns',
'spatial_ref_sys', 'spatialite_history', 'sql_statements_log',
'sqlite_sequence', 'views_geometry_columns', 'virts_geometry_columns'
]
for t in tables.keys():
for hidden_table in hidden_tables:
if t == hidden_table or t.startswith(hidden_table):
tables[t]['hidden'] = True
continue

@simonw simonw added the small label Apr 19, 2018
@simonw
Copy link
Owner Author

simonw commented Apr 20, 2018

Hiding tables with the idx_ prefix should be good enough here, since false positives aren't very harmful.

@simonw simonw closed this as completed in d3a0069 Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant