Hide idx_* tables if spatialite detected, closes #228

shape-array
Simon Willison 2018-04-25 20:25:21 -07:00
rodzic db7a57a9a6
commit d3a0069c54
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 17E2DEA2588B7F52
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -1284,6 +1284,15 @@ class Datasette:
'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():