{"html_url": "https://github.com/simonw/datasette/issues/466#issuecomment-491548189", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/466", "id": 491548189, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MTU0ODE4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-11T22:21:40Z", "updated_at": "2019-05-11T22:21:47Z", "author_association": "OWNER", "body": "This is a little bit tricky. This SQL looks like it may detect Spatialite tables:\r\n```sql\r\nselect * from sqlite_master where type = \"table\"\r\nand sql like \"%CREATE VIRTUAL TABLE%\"\r\nand sql like \"%USING VirtualSpatialIndex%\"\r\n```\r\nBut where to put it? I think this should go in a new \"checks\" mechanism, where we run checks against every connected database on Datasette startup.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443040665, "label": "Move \"no such module: VirtualSpatialIndex\" code elsewhere"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/466#issuecomment-491549929", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/466", "id": 491549929, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MTU0OTkyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-11T22:55:23Z", "updated_at": "2019-05-11T22:55:23Z", "author_association": "OWNER", "body": "To build a unit test for this I'm going to have to ship a small spatialite.db binary database as part of the git repo.\r\n\r\nThis is because I need the tests to run even when the spatialite module is not available - but you cannot create a spatialite database without having access to that module.\r\n\r\nI'll include a build script in the repo for constructing that database.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443040665, "label": "Move \"no such module: VirtualSpatialIndex\" code elsewhere"}, "performed_via_github_app": null}