Skip to content

Commit

Permalink
Hide idx_* tables if spatialite detected, closes #228
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Apr 26, 2018
1 parent db7a57a commit d3a0069
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions datasette/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,15 @@ def inspect(self):
'ElementaryGeometries', 'SpatialIndex', 'geometry_columns',
'spatial_ref_sys', 'spatialite_history', 'sql_statements_log',
'sqlite_sequence', 'views_geometry_columns', 'virts_geometry_columns'
] + [
r['name']
for r in conn.execute(
'''
select name from sqlite_master
where name like "idx_%"
and type = "table"
'''
)
]

for t in tables.keys():
Expand Down

0 comments on commit d3a0069

Please sign in to comment.