{"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} {"html_url": "https://github.com/simonw/datasette/issues/184#issuecomment-380608340", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/184", "id": 380608340, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDYwODM0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-11T21:55:41Z", "updated_at": "2018-04-11T21:55:41Z", "author_association": "OWNER", "body": "Yuck, nasty - OK I get it, this happens with ANY non-existent table name. Let's fix that - these should clearly return an HTTP 404.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 292011379, "label": "500 from missing table name"}, "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/issues/193#issuecomment-380619851", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/193", "id": 380619851, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDYxOTg1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-11T22:48:19Z", "updated_at": "2018-04-11T22:48:19Z", "author_association": "OWNER", "body": "I can clean this up further with the mechanism I'm using for #184", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 310882100, "label": "Cleaner mechanism for handling custom errors"}, "performed_via_github_app": null}