mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Hide Spatialite system tables
They were getting on my nerves.
This commit is contained in:
parent
cca8bf36fe
commit
d08a133140
2 changed files with 18 additions and 3 deletions
|
|
@ -372,6 +372,11 @@ def get_all_foreign_keys(conn):
|
|||
return table_to_foreign_keys
|
||||
|
||||
|
||||
def detect_spatialite(conn):
|
||||
rows = conn.execute('select 1 from sqlite_master where tbl_name = "geometry_columns"').fetchall()
|
||||
return len(rows) > 0
|
||||
|
||||
|
||||
def detect_fts(conn, table, return_sql=False):
|
||||
"Detect if table has a corresponding FTS virtual table and return it"
|
||||
rows = conn.execute(detect_fts_sql(table)).fetchall()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue