{"html_url": "https://github.com/simonw/datasette/issues/467#issuecomment-492883561", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/467", "id": 492883561, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Mjg4MzU2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T01:40:09Z", "updated_at": "2019-05-16T01:40:09Z", "author_association": "OWNER", "body": "I'm setting X to 30 because the fixtures database currently has 26 tables (22 visible, 4 hidden) and I want to display counts for it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 444711254, "label": "Index page row counts only for DBs with < 30 tables (10ms count limit per table)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/467#issuecomment-492898241", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/467", "id": 492898241, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Mjg5ODI0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T03:02:27Z", "updated_at": "2019-05-16T03:02:27Z", "author_association": "OWNER", "body": "I'm going to be lazy and skip the unit test for this, because I don't currently have a neat way of mocking a SQL interrupted exception to simulate a query taking too long (at least for these counts).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 444711254, "label": "Index page row counts only for DBs with < 30 tables (10ms count limit per table)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/460#issuecomment-492898595", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/460", "id": 492898595, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Mjg5ODU5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T03:04:29Z", "updated_at": "2019-05-16T03:04:29Z", "author_association": "OWNER", "body": "One last thing before I close this: sort tables by number of inbound/outbound foreign keys.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443020810, "label": "Design changes to homepage to support mutable files"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/460#issuecomment-492899100", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/460", "id": 492899100, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Mjg5OTEwMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T03:07:41Z", "updated_at": "2019-05-16T03:07:41Z", "author_association": "OWNER", "body": "I'm going to sort by row counts first, but if row counts aren't available I'll fall back to number of inbound/outbound foreign keys.\r\n\r\nTo make unit testing easier, I'll accept an undocumented ?_sort=relationships parameter", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443020810, "label": "Design changes to homepage to support mutable files"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/419#issuecomment-492903398", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/419", "id": 492903398, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MjkwMzM5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T03:33:01Z", "updated_at": "2019-05-16T03:33:01Z", "author_association": "OWNER", "body": "@russss sorry I only just spotted your comment here.\r\n\r\nI think I have an alternative suggestion for what you need to do here. It sounds to me like you need to calculate a specific piece of information against a specific database. Instead of doing this in inspect, how about having a separate tool which runs this once against the database file and writes the result into a database file there?\r\n\r\nI've been thinking about this pattern a bit as part of the sqlite-utils work I've been doing. It's already something that's needed for SQLite FTS support - it's no good just creating a FTS index, you have to populate it as well. In sqlite-utils world you do that like this: https://sqlite-utils.readthedocs.io/en/latest/cli.html#configuring-full-text-search\r\n\r\n $ sqlite-utils enable-fts mydb.db documents title summary\r\n\r\nBut then later if you've inserted new records you have to call this:\r\n\r\n $ sqlite-utils populate-fts mydb.db documents title summary\r\n\r\nSo one option here could be for `datasette-geo` to know to look for a special `datasette_geo_bounding_box` database table and, if it's missing, to calculate at runtime (probably once on startup and then cache it).\r\n\r\nAnother option: Datasette now has an option to open a database file in \"immutable\" mode, using `datasette -i mydatabase.db`. When you do that we calculate counts on startup - and we'll also be able to load counts from the `inspect-data.json` file (that's pretty much all that will be in there). I'm open to making this available as a plugin hook - all kinds of optimizations could be run against these `-i` databases. It would essentially be what we have with inspect today but just for databases opened in that specific mode.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 421551434, "label": "Default to opening files in mutable mode, special option for immutable files"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/460#issuecomment-492903581", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/460", "id": 492903581, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MjkwMzU4MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T03:34:08Z", "updated_at": "2019-05-16T03:34:08Z", "author_association": "OWNER", "body": "Demo of above: https://latest.datasette.io/?_sort=relationships compared to https://latest.datasette.io/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443020810, "label": "Design changes to homepage to support mutable files"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/465#issuecomment-492904704", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/465", "id": 492904704, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MjkwNDcwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T03:41:27Z", "updated_at": "2019-05-16T03:41:27Z", "author_association": "OWNER", "body": "The main use-case for this endpoint now is going to be [Datasette Registry](https://github.com/simonw/datasette-registry) (which really needs some more love).\r\n\r\nThat tool needs to be able to query a Datasette and find out:\r\n\r\n* What tables are available\r\n* What their columns are\r\n* Ideally, their row counts\r\n\r\nA single `/-/inspect` call is no good here because with Datasette Library #417 I'm going to be encouraging MUCH larger Datasette instances, potentially with hundreds of attached databases and thousands of attached tables. So pagination will be essential.\r\n\r\nMaybe a smarter approach will be the older idea of having a separate inspect for each database (and maybe each table):\r\n\r\n* `/mydatabase/-/inspect`\r\n* `/mydatabase/mytable/-/inspect`\r\n\r\nEither way, I'm going to decouple this from milestone 0.28.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443038584, "label": "Decide what to do about /-/inspect"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/464#issuecomment-492917925", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/464", "id": 492917925, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MjkxNzkyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T05:04:35Z", "updated_at": "2019-05-16T05:04:35Z", "author_association": "OWNER", "body": "https://datasette.readthedocs.io/en/latest/getting_started.html#glitch", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443034218, "label": "Add Glitch to Getting Started docs section"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/471#issuecomment-493102841", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/471", "id": 493102841, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MzEwMjg0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T14:56:50Z", "updated_at": "2019-05-16T15:10:11Z", "author_association": "OWNER", "body": "This is a good opportunity to add some missing test coverage for this feature.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 445003029, "label": "?_hash=1 and --config hash_urls:1 should only work for immutable databases"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/418#issuecomment-493109347", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/418", "id": 493109347, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MzEwOTM0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T15:12:26Z", "updated_at": "2019-05-16T15:12:26Z", "author_association": "OWNER", "body": "I'm ready to close this now thanks to fixing #471 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 421548881, "label": "Hashed URLs should be optional"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/419#issuecomment-493110184", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/419", "id": 493110184, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5MzExMDE4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-16T15:14:31Z", "updated_at": "2019-05-16T15:14:31Z", "author_association": "OWNER", "body": "This is done bar the documentation, which is tracked in #421 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 421551434, "label": "Default to opening files in mutable mode, special option for immutable files"}, "performed_via_github_app": null}