{"html_url": "https://github.com/simonw/datasette/pull/200#issuecomment-380951474", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/200", "id": 380951474, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDk1MTQ3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-12T21:34:39Z", "updated_at": "2018-04-12T21:34:39Z", "author_association": "OWNER", "body": "Nice, thanks very much.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313494458, "label": "Hide Spatialite system tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/200#issuecomment-380608372", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/200", "id": 380608372, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDYwODM3Mg==", "user": {"value": 45057, "label": "russss"}, "created_at": "2018-04-11T21:55:46Z", "updated_at": "2018-04-11T21:55:46Z", "author_association": "CONTRIBUTOR", "body": "> I think the most reliable way to detect spatialite is to run `SELECT AddGeometryColumn(1, 2, 3, 4, 5);` against a `:memory:` database and see if it throws an exception\r\n\r\nOr just see if there's a `geometry_columns` table? I think that's quite unlikely to be added by accident (and it's an OGC standard). It also tells you if Spatialite is installed in the database rather than just loaded.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313494458, "label": "Hide Spatialite system tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/200#issuecomment-380606998", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/200", "id": 380606998, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDYwNjk5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-11T21:50:14Z", "updated_at": "2018-04-11T21:50:14Z", "author_association": "OWNER", "body": "We should only do this if we're certain the spatialite module has been loaded. I could imagine someone having a `sql_statements_log` table of their own without using spatialite for example.\r\n\r\nI think the most reliable way to detect spatialite is to run `SELECT AddGeometryColumn(1, 2, 3, 4, 5);` against a `:memory:` database and see if it throws an exception - similar to how we detect FTS. We could add this as a `detect_spatialite()` function in `utils.py` and call it once on startup.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313494458, "label": "Hide Spatialite system tables"}, "performed_via_github_app": null}