{"html_url": "https://github.com/simonw/sqlite-utils/issues/79#issuecomment-1029683977", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/79", "id": 1029683977, "node_id": "IC_kwDOCGYnMM49X7sJ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T05:58:15Z", "updated_at": "2022-02-04T05:58:15Z", "author_association": "OWNER", "body": "Documentation: https://sqlite-utils.datasette.io/en/latest/python-api.html#spatialite-helpers", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 557842245, "label": "Helper methods for working with SpatiaLite"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/79#issuecomment-1029703503", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/79", "id": 1029703503, "node_id": "IC_kwDOCGYnMM49YAdP", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T06:46:32Z", "updated_at": "2022-02-04T06:46:32Z", "author_association": "OWNER", "body": "Shipped in 3.23: https://sqlite-utils.datasette.io/en/stable/changelog.html#v3-23", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 557842245, "label": "Helper methods for working with SpatiaLite"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1080#issuecomment-1029691693", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1080", "id": 1029691693, "node_id": "IC_kwDOBm6k_c49X9kt", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T06:16:45Z", "updated_at": "2022-02-04T06:16:45Z", "author_association": "OWNER", "body": "Had a new, different idea for how this could work: support a `?_group_count=colname` parameter to the table view, which turns the page into a `select colname, count(*) ... group by colname` query - but keeps things like the filter interface, facet selection, search box and so on.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 734777631, "label": "\"View all\" option for facets, to provide a (paginated) list of ALL of the facet counts plus a link to view them"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1080#issuecomment-1029695083", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1080", "id": 1029695083, "node_id": "IC_kwDOBm6k_c49X-Zr", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T06:24:40Z", "updated_at": "2022-02-04T06:25:18Z", "author_association": "OWNER", "body": "An initial prototype of that in my local `group-count` branch quickly started running into problems:\r\n```diff\r\ndiff --git a/datasette/views/table.py b/datasette/views/table.py\r\nindex be9e9c3..d30efe1 100644\r\n--- a/datasette/views/table.py\r\n+++ b/datasette/views/table.py\r\n@@ -105,8 +105,12 @@ class RowTableShared(DataView):\r\n type_ = \"integer\"\r\n notnull = 0\r\n else:\r\n- type_ = column_details[r[0]].type\r\n- notnull = column_details[r[0]].notnull\r\n+ try:\r\n+ type_ = column_details[r[0]].type\r\n+ notnull = column_details[r[0]].notnull\r\n+ except KeyError: # Probably count(*)\r\n+ type_ = \"integer\"\r\n+ notnull = False\r\n columns.append(\r\n {\r\n \"name\": r[0],\r\n@@ -613,6 +617,15 @@ class TableView(RowTableShared):\r\n offset=offset,\r\n )\r\n \r\n+ # If ?_group_count we convert the SQL query here\r\n+ group_count = request.args.getlist(\"_group_count\")\r\n+ if group_count:\r\n+ wrapped_sql = \"select {cols}, count(*) from ({sql}) group by {cols}\".format(\r\n+ cols=\", \".join(group_count),\r\n+ sql=sql,\r\n+ )\r\n+ sql = wrapped_sql\r\n+\r\n if request.args.get(\"_timelimit\"):\r\n extra_args[\"custom_time_limit\"] = int(request.args.get(\"_timelimit\"))\r\n```\r\nResulted in errors like this one:\r\n```\r\n pk_path = path_from_row_pks(row, pks, not pks, False)\r\n File \"/Users/simon/Dropbox/Development/datasette/datasette/utils/__init__.py\", line 82, in path_from_row_pks\r\n bits = [\r\n File \"/Users/simon/Dropbox/Development/datasette/datasette/utils/__init__.py\", line 83, in \r\n row[pk][\"value\"] if isinstance(row[pk], dict) else row[pk] for pk in pks\r\nIndexError: No item with that key\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 734777631, "label": "\"View all\" option for facets, to provide a (paginated) list of ALL of the facet counts plus a link to view them"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/385#issuecomment-1029177700", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/385", "id": 1029177700, "node_id": "IC_kwDOCGYnMM49WAFk", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-02-03T16:38:45Z", "updated_at": "2022-02-04T05:52:39Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#385](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (af86b17) into [main](https://codecov.io/gh/simonw/sqlite-utils/commit/74586d3cb26fa3cc3412721985ecdc1864c2a31d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (74586d3) will **decrease** coverage by `0.61%`.\n> The diff coverage is `28.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/sqlite-utils/pull/385/graphs/tree.svg?width=650&height=150&src=pr&token=O0X3703L9P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n```diff\n@@ Coverage Diff @@\n## main #385 +/- ##\n==========================================\n- Coverage 96.52% 95.91% -0.62% \n==========================================\n Files 6 6 \n Lines 2389 2421 +32 \n==========================================\n+ Hits 2306 2322 +16 \n- Misses 83 99 +16 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage \u0394 | |\n|---|---|---|\n| [sqlite\\_utils/cli.py](https://codecov.io/gh/simonw/sqlite-utils/pull/385/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2NsaS5weQ==) | `95.69% <\u00f8> (+0.15%)` | :arrow_up: |\n| [sqlite\\_utils/db.py](https://codecov.io/gh/simonw/sqlite-utils/pull/385/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2RiLnB5) | `96.29% <15.00%> (-1.40%)` | :arrow_down: |\n| [sqlite\\_utils/utils.py](https://codecov.io/gh/simonw/sqlite-utils/pull/385/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL3V0aWxzLnB5) | `94.59% <80.00%> (\u00f8)` | |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [74586d3...af86b17](https://codecov.io/gh/simonw/sqlite-utils/pull/385?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102899312, "label": "Add new spatialite helper methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/385#issuecomment-1029682294", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/385", "id": 1029682294, "node_id": "IC_kwDOCGYnMM49X7R2", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T05:53:26Z", "updated_at": "2022-02-04T05:53:26Z", "author_association": "OWNER", "body": "This looks fantastic, thanks for all of the work you put into this!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102899312, "label": "Add new spatialite helper methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/385#issuecomment-1029703216", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/385", "id": 1029703216, "node_id": "IC_kwDOCGYnMM49YAYw", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T06:45:43Z", "updated_at": "2022-02-04T06:45:43Z", "author_association": "OWNER", "body": "Shipped this as `sqlite-utils` 3.23: https://sqlite-utils.datasette.io/en/stable/changelog.html#v3-23", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102899312, "label": "Add new spatialite helper methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/385#issuecomment-1030002502", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/385", "id": 1030002502, "node_id": "IC_kwDOCGYnMM49ZJdG", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2022-02-04T13:50:19Z", "updated_at": "2022-02-04T13:50:19Z", "author_association": "CONTRIBUTOR", "body": "Awesome. Thanks for your help getting it in. Will now look at adding CLI versions of this. It's going to be super helpful on a bunch of my projects.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1102899312, "label": "Add new spatialite helper methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/395#issuecomment-1029686150", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/395", "id": 1029686150, "node_id": "IC_kwDOCGYnMM49X8OG", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-04T06:03:51Z", "updated_at": "2022-02-04T06:03:51Z", "author_association": "OWNER", "body": "I'm just going to run the SpatiaLite tests on Ubuntu.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1123849278, "label": "\"apt-get: command not found\" error on macOS"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1629#issuecomment-1029980337", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1629", "id": 1029980337, "node_id": "IC_kwDOBm6k_c49ZECx", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-02-04T13:21:09Z", "updated_at": "2022-02-04T13:21:09Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1629?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1629](https://codecov.io/gh/simonw/datasette/pull/1629?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1c0d848) into [main](https://codecov.io/gh/simonw/datasette/commit/1af1041f91a9b91b321078d354132d1df5204660?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1af1041) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1629/graphs/tree.svg?width=650&height=150&src=pr&token=eSahVY7kw1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/datasette/pull/1629?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n```diff\n@@ Coverage Diff @@\n## main #1629 +/- ##\n=======================================\n Coverage 92.16% 92.16% \n=======================================\n Files 34 34 \n Lines 4531 4531 \n=======================================\n Hits 4176 4176 \n Misses 355 355 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1629?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1629?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [1af1041...1c0d848](https://codecov.io/gh/simonw/datasette/pull/1629?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1124191982, "label": "Update pytest requirement from <6.3.0,>=5.2.2 to >=5.2.2,<7.1.0"}, "performed_via_github_app": null}