{"html_url": "https://github.com/simonw/datasette/issues/1332#issuecomment-846479730", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1332", "id": 846479730, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NjQ3OTczMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-23T00:11:31Z", "updated_at": "2021-05-23T00:11:31Z", "author_association": "OWNER", "body": "Here's the code in question: https://github.com/simonw/datasette/blob/5e9672c9bb33e41686472db4aa427168f9e67dbe/datasette/facets.py#L187-L210\r\n\r\nIt has access to the current request object as `self.request`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893890496, "label": "?_facet_size=X to increase number of facets results on the page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1332#issuecomment-846479212", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1332", "id": 846479212, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NjQ3OTIxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-23T00:07:46Z", "updated_at": "2021-05-23T00:07:46Z", "author_association": "OWNER", "body": "`?_facet_size=50` seems like a very reasonable thing to support - I'll cap it at whatever the `max_returned_rows` setting is (which defaults to 1000).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893890496, "label": "?_facet_size=X to increase number of facets results on the page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1332#issuecomment-846479062", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1332", "id": 846479062, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NjQ3OTA2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-23T00:06:34Z", "updated_at": "2021-05-23T00:06:34Z", "author_association": "OWNER", "body": "A URL parameter to modify that facet size is a really good idea.\r\n\r\nI thought I had an issue open for \"...\" linking to more results but I can't find it now.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893890496, "label": "?_facet_size=X to increase number of facets results on the page"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/pull/59#issuecomment-846413174", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/59", "id": 846413174, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NjQxMzE3NA==", "user": {"value": 631242, "label": "frosencrantz"}, "created_at": "2021-05-22T14:06:19Z", "updated_at": "2021-05-22T14:06:19Z", "author_association": "CONTRIBUTOR", "body": "Thanks Simon!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771872303, "label": "Remove unneeded exists=True for -a/--auth flag."}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1325#issuecomment-846138580", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1325", "id": 846138580, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NjEzODU4MA==", "user": {"value": 4312421, "label": "stonebig"}, "created_at": "2021-05-21T18:00:10Z", "updated_at": "2021-05-21T18:00:10Z", "author_association": "NONE", "body": "would be nice to have ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 890073989, "label": "Update itsdangerous requirement from ~=1.1 to >=1.1,<3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-846137332", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 846137332, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NjEzNzMzMg==", "user": {"value": 4312421, "label": "stonebig"}, "created_at": "2021-05-21T17:57:53Z", "updated_at": "2021-05-21T17:57:53Z", "author_association": "NONE", "body": "I'm stuck also because datasette wants itsdangerous~=1.1 instead of allowing itsdangerous-2.0.0", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/856#issuecomment-845985439", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/856", "id": 845985439, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NTk4NTQzOQ==", "user": {"value": 5268174, "label": "bram2000"}, "created_at": "2021-05-21T14:22:41Z", "updated_at": "2021-05-21T14:22:41Z", "author_association": "NONE", "body": "Thanks Simon this is working very well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 642296989, "label": "Consider pagination of canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-844970776", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 844970776, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NDk3MDc3Ng==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-05-20T10:40:25Z", "updated_at": "2021-05-20T10:40:25Z", "author_association": "NONE", "body": "Any chance you could push a new datasette release with the updated dependencies in the setup.py, @simonw?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/pull/59#issuecomment-844250232", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/59", "id": 844250232, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NDI1MDIzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T16:08:10Z", "updated_at": "2021-05-19T16:08:10Z", "author_association": "MEMBER", "body": "Thanks for catching this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771872303, "label": "Remove unneeded exists=True for -a/--auth flag."}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/pull/61#issuecomment-844249385", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/61", "id": 844249385, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NDI0OTM4NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T16:07:06Z", "updated_at": "2021-05-19T16:07:06Z", "author_association": "MEMBER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 797108702, "label": "fixing typo in get cli help text"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1335#issuecomment-844007155", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1335", "id": 844007155, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NDAwNzE1NQ==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-19T11:21:45Z", "updated_at": "2021-05-19T11:21:45Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1335?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1335](https://codecov.io/gh/simonw/datasette/pull/1335?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (d91c18d) into [main](https://codecov.io/gh/simonw/datasette/commit/9b3b7e280ca718254b4ca15d40864297146a85b3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (9b3b7e2) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1335/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/1335?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 #1335 +/- ##\n=======================================\n Coverage 91.53% 91.53% \n=======================================\n Files 34 34 \n Lines 4255 4255 \n=======================================\n Hits 3895 3895 \n Misses 360 360 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1335?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/1335?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [9b3b7e2...d91c18d](https://codecov.io/gh/simonw/datasette/pull/1335?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": 895315478, "label": "Fix small typo"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/253#issuecomment-843718859", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/253", "id": 843718859, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcxODg1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T03:31:47Z", "updated_at": "2021-05-19T03:31:47Z", "author_association": "OWNER", "body": "Fixed: https://simonwillison.net/2020/Sep/23/sqlite-advanced-alter-table/", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 847423559, "label": "fixtures.db example error in sql-utils blog post"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/253#issuecomment-843716042", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/253", "id": 843716042, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcxNjA0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T03:29:04Z", "updated_at": "2021-05-19T03:29:04Z", "author_association": "OWNER", "body": "Thanks for pointing this out - the problem here is that these days the `https://latest.datasette.io/fixtures.db` example database includes a test for generated columns, which are a brand new feature in SQLite. Your local SQLite is an older version.\r\n\r\nI'm going to update the blog post to instead use a copy of `fixtures.db` that doesn't use that feature.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 847423559, "label": "fixtures.db example error in sql-utils blog post"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/259#issuecomment-843715502", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/259", "id": 843715502, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcxNTUwMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T03:27:33Z", "updated_at": "2021-05-19T03:27:33Z", "author_association": "OWNER", "body": "```\r\n % sqlite-utils insert test-big.db text big.json \r\nError: table text has no column named colun\r\n\r\nTry using --alter to add additional columns\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 894948100, "label": "Suggest the --alter option if a new column cannot be added"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/256#issuecomment-843715308", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/256", "id": 843715308, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcxNTMwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T03:26:54Z", "updated_at": "2021-05-19T03:26:54Z", "author_association": "OWNER", "body": "I decided to treat this as a usability bug: there's a workaround, which is adding `--alter` - but it's not at all obvious that you should do that. I addressed this in #259.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 861622839, "label": "inserting with --nl errors with: sqlite3.OperationalError: table has no column named "}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/256#issuecomment-843708246", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/256", "id": 843708246, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcwODI0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T03:06:02Z", "updated_at": "2021-05-19T03:06:02Z", "author_association": "OWNER", "body": "Did you try running this with the `--alter` command-line option? That seems to work when I try it on a sample file here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 861622839, "label": "inserting with --nl errors with: sqlite3.OperationalError: table
has no column named "}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/244#issuecomment-843705806", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/244", "id": 843705806, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcwNTgwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T02:58:18Z", "updated_at": "2021-05-19T02:58:18Z", "author_association": "OWNER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 820468864, "label": "Typo in upsert example"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/245#issuecomment-843705721", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/245", "id": 843705721, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcwNTcyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T02:58:01Z", "updated_at": "2021-05-19T02:58:01Z", "author_association": "OWNER", "body": "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": 830803173, "label": "Correct some typos"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/254#issuecomment-843705533", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/254", "id": 843705533, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcwNTUzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T02:57:22Z", "updated_at": "2021-05-19T02:57:22Z", "author_association": "OWNER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 857280617, "label": "Fix incorrect create-table cli description"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/258#issuecomment-843702392", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/258", "id": 843702392, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzcwMjM5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-19T02:47:37Z", "updated_at": "2021-05-19T02:47:37Z", "author_association": "OWNER", "body": "I'm going to merge this and add a test - thanks!", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 868191959, "label": "Fixing insert from JSON containing strings with non-ascii characters \u2026"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/856#issuecomment-843291675", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/856", "id": 843291675, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzI5MTY3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-18T15:56:45Z", "updated_at": "2021-05-18T15:56:45Z", "author_association": "OWNER", "body": "Tables and views get \"stream all rows\" at the moment, so one workaround is to define a SQL view for your query - this only works for queries that don't take any parameters though (although you may be able to define a view and then pass it extra fields using the Datasette table interface, like on https://latest.datasette.io/fixtures/paginated_view?content_extra__contains=9)\r\n\r\nI've explored this problem in a bit more detail in https://githu.com/simonw/django-sql-dashboard and I think I have a pattern that could work.\r\n\r\nFor your canned query, you could implement the pattern yourself by setting up two canned queries that look something like this:\r\n\r\nhttps://github-to-sqlite.dogsheep.net/github?sql=select+rowid%2C+sha%2C+author_date+from+commits+order+by+rowid+limit+1000\r\n\r\n```sql\r\nselect rowid, sha, author_date from commits order by rowid limit 1000\r\n```\r\nThat gets you the first set of 1,000 results. The important thing here is to order by a unique column, in this case `rowid` - because then subsequent pages can be loaded by a separate canned query that looks like this:\r\n```sql\r\nselect rowid, sha, author_date from commits where rowid > :after order by rowid limit 1000\r\n```\r\nhttps://github-to-sqlite.dogsheep.net/github?sql=select+rowid%2C+sha%2C+author_date+from+commits+where+rowid+%3E+%3Aafter+order+by+rowid+limit+1000&after=1000\r\n\r\nYou then need to write code which knows how to generate these queries - start with the first query with no `where` clause (or if you are using `rowid` you can just use the second query and pass it `?after=0` for the first call) - then keep calling the query passing in the last rowid you recieved as the `after` parameter.\r\n\r\nBasically this is an implementation of keyset pagination with a smart client. When Datasette grows the ability to do this itself it will work by executing this mechanism inside the Python code, which is how the \"stream all rows\" option for tables works at the moment.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 1, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 642296989, "label": "Consider pagination of canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/856#issuecomment-843065142", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/856", "id": 843065142, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MzA2NTE0Mg==", "user": {"value": 5268174, "label": "bram2000"}, "created_at": "2021-05-18T10:49:11Z", "updated_at": "2021-05-18T10:49:29Z", "author_association": "NONE", "body": "Hi Simon, I'm using a canned query to do some geospatial stuff, but it maxes out at 1000 rows returned. I can't see any `Link` headers to follow to get the next page of data. Is there any way currently to work around this 1000 row limit for canned queries?\r\n\r\nThanks,\r\nJon", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 642296989, "label": "Consider pagination of canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1236#issuecomment-842798043", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1236", "id": 842798043, "node_id": "MDEyOklzc3VlQ29tbWVudDg0Mjc5ODA0Mw==", "user": {"value": 192568, "label": "mroswell"}, "created_at": "2021-05-18T03:28:25Z", "updated_at": "2021-05-18T03:28:25Z", "author_association": "CONTRIBUTOR", "body": "That corner handle looks like a hamburger menu to me. Note that the default resize handle is not limited to two-way resize: http://jsfiddle.net/LLrh7Lte/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 812228314, "label": "Ability to increase size of the SQL editor window"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1323#issuecomment-839763331", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1323", "id": 839763331, "node_id": "MDEyOklzc3VlQ29tbWVudDgzOTc2MzMzMQ==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-12T13:14:50Z", "updated_at": "2021-05-17T17:25:17Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1323?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1323](https://codecov.io/gh/simonw/datasette/pull/1323?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (cd69502) into [main](https://codecov.io/gh/simonw/datasette/commit/5e60bad40460f68122006ce704cfc163d6076f34?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (5e60bad) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1323/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/1323?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 #1323 +/- ##\n==========================================\n+ Coverage 91.51% 91.53% +0.02% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3895 +1 \n+ Misses 361 360 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1323?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| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1323/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.31% <0.00%> (+0.17%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1323?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/1323?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [9b3b7e2...cd69502](https://codecov.io/gh/simonw/datasette/pull/1323?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": 890073888, "label": "Update click requirement from ~=7.1.1 to >=7.1.1,<8.1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842499728", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842499728, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5OTcyOA==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-05-17T17:24:30Z", "updated_at": "2021-05-17T17:24:30Z", "author_association": "NONE", "body": "> I wonder if there are any new 3.0 features we should be taking advantage of here that would justify pinning to 3.0 minimum?\r\n\r\nThe changelog reads like bug fixes and removal of deprecated parts to me", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842497125", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842497125, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5NzEyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-17T17:20:15Z", "updated_at": "2021-05-17T17:20:15Z", "author_association": "OWNER", "body": "I wonder if there are any new 3.0 features we should be taking advantage of here that would justify pinning to 3.0 minimum?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842495820", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842495820, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5NTgyMA==", "user": {"value": 475613, "label": "MarkusH"}, "created_at": "2021-05-17T17:18:05Z", "updated_at": "2021-05-17T17:18:05Z", "author_association": "NONE", "body": "Wow, you are _fast_!\r\n\r\nI didn't notice dependabot had opened a PR already. I was about to.\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842495346", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842495346, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5NTM0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-17T17:17:19Z", "updated_at": "2021-05-17T17:17:19Z", "author_association": "OWNER", "body": "The tests are passing on #1324 so this may not require any code changes at all!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1324#issuecomment-842494844", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1324", "id": 842494844, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5NDg0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-17T17:16:36Z", "updated_at": "2021-05-17T17:16:36Z", "author_association": "OWNER", "body": "Refs #1331.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 890073940, "label": "Update jinja2 requirement from <2.12.0,>=2.10.3 to >=2.10.3,<3.1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1331#issuecomment-842494332", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1331", "id": 842494332, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjQ5NDMzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-17T17:15:45Z", "updated_at": "2021-05-17T17:16:04Z", "author_association": "OWNER", "body": "Datasette uses async templates which evidently have been improved in Jinja 2 3.0.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 893537744, "label": "Add support for Jinja2 version 3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1330#issuecomment-842312696", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1330", "id": 842312696, "node_id": "MDEyOklzc3VlQ29tbWVudDg0MjMxMjY5Ng==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-17T13:11:54Z", "updated_at": "2021-05-17T13:11:54Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1330?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1330](https://codecov.io/gh/simonw/datasette/pull/1330?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (cc1b504) into [main](https://codecov.io/gh/simonw/datasette/commit/1b697539f5b53cec3fe13c0f4ada13ba655c88c7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1b69753) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1330/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/1330?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 #1330 +/- ##\n==========================================\n+ Coverage 91.51% 91.53% +0.02% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3895 +1 \n+ Misses 361 360 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1330?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| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1330/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.31% <0.00%> (+0.17%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1330?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/1330?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [1b69753...cc1b504](https://codecov.io/gh/simonw/datasette/pull/1330?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": 893314402, "label": "Update aiofiles requirement from <0.7,>=0.4 to >=0.4,<0.8"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1324#issuecomment-839763280", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1324", "id": 839763280, "node_id": "MDEyOklzc3VlQ29tbWVudDgzOTc2MzI4MA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-12T13:14:44Z", "updated_at": "2021-05-12T13:14:44Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1324?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1324](https://codecov.io/gh/simonw/datasette/pull/1324?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (177456e) into [main](https://codecov.io/gh/simonw/datasette/commit/1b697539f5b53cec3fe13c0f4ada13ba655c88c7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1b69753) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1324/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/1324?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 #1324 +/- ##\n==========================================\n+ Coverage 91.51% 91.53% +0.02% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3895 +1 \n+ Misses 361 360 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1324?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| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1324/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.31% <0.00%> (+0.17%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1324?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/1324?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [1b69753...177456e](https://codecov.io/gh/simonw/datasette/pull/1324?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": 890073940, "label": "Update jinja2 requirement from <2.12.0,>=2.10.3 to >=2.10.3,<3.1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1325#issuecomment-839763094", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1325", "id": 839763094, "node_id": "MDEyOklzc3VlQ29tbWVudDgzOTc2MzA5NA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-12T13:14:29Z", "updated_at": "2021-05-12T13:14:29Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1325?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1325](https://codecov.io/gh/simonw/datasette/pull/1325?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (4dea180) into [main](https://codecov.io/gh/simonw/datasette/commit/1b697539f5b53cec3fe13c0f4ada13ba655c88c7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1b69753) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1325/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/1325?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 #1325 +/- ##\n==========================================\n+ Coverage 91.51% 91.53% +0.02% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3895 +1 \n+ Misses 361 360 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1325?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| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1325/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.31% <0.00%> (+0.17%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1325?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/1325?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [1b69753...4dea180](https://codecov.io/gh/simonw/datasette/pull/1325?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": 890073989, "label": "Update itsdangerous requirement from ~=1.1 to >=1.1,<3.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1321#issuecomment-838458014", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1321", "id": 838458014, "node_id": "MDEyOklzc3VlQ29tbWVudDgzODQ1ODAxNA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-11T13:18:12Z", "updated_at": "2021-05-11T13:18:12Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1321?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1321](https://codecov.io/gh/simonw/datasette/pull/1321?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (966ced8) into [main](https://codecov.io/gh/simonw/datasette/commit/1b697539f5b53cec3fe13c0f4ada13ba655c88c7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1b69753) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1321/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/1321?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 #1321 +/- ##\n==========================================\n+ Coverage 91.51% 91.53% +0.02% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3895 +1 \n+ Misses 361 360 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1321?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| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1321/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.31% <0.00%> (+0.17%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1321?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/1321?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [1b69753...966ced8](https://codecov.io/gh/simonw/datasette/pull/1321?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": 887241681, "label": "Bump black from 21.4b2 to 21.5b1"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1318#issuecomment-838449572", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1318", "id": 838449572, "node_id": "MDEyOklzc3VlQ29tbWVudDgzODQ0OTU3Mg==", "user": {"value": 49699333, "label": "dependabot[bot]"}, "created_at": "2021-05-11T13:12:30Z", "updated_at": "2021-05-11T13:12:30Z", "author_association": "CONTRIBUTOR", "body": "Superseded by #1321.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 876431852, "label": "Bump black from 21.4b2 to 21.5b0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1280#issuecomment-837166862", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1280", "id": 837166862, "node_id": "MDEyOklzc3VlQ29tbWVudDgzNzE2Njg2Mg==", "user": {"value": 10801138, "label": "blairdrummond"}, "created_at": "2021-05-10T19:07:46Z", "updated_at": "2021-05-10T19:07:46Z", "author_association": "CONTRIBUTOR", "body": "Do you have a list of sqlite versions you want to test against?\r\n\r\nOne cool thing I saw recently (that we started using) was using `import docker` within python, and then writing pytest functions which executed against the container\r\n\r\n[setup](https://github.com/StatCan/kubeflow-containers/blob/3c7dcfb5e7188982fb8ebcded82e84292720f720/conftest.py#L85)\r\n\r\n[example](https://github.com/StatCan/kubeflow-containers/blob/master/tests/jupyterlab-cpu/test_julia.py#L8-L18)\r\n\r\nThe inspiration for this came from the [jupyter docker-stacks](https://github.com/jupyter/docker-stacks/blob/09fb66007615ea68d9bce8f8e1a2cf9402f1e432/test/test_packages.py#L107)\r\n\r\nSo off the top of my head, could look at building the container with different sqlite versions as a build-arg, then run tests against the containers. Just brainstorming though", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842862708, "label": "Ability to run CI against multiple SQLite versions"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1296#issuecomment-835491318", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1296", "id": 835491318, "node_id": "MDEyOklzc3VlQ29tbWVudDgzNTQ5MTMxOA==", "user": {"value": 10801138, "label": "blairdrummond"}, "created_at": "2021-05-08T19:59:01Z", "updated_at": "2021-05-08T19:59:01Z", "author_association": "CONTRIBUTOR", "body": "I have also found that ubuntu has fewer vulnerabilities than the buster based images.\r\n\r\n```\r\n\u279c ~ docker pull python:3-buster\r\n\u279c ~ trivy image python:3-buster | head \r\n2021-04-28T17:14:29.313-0400 INFO Detecting Debian vulnerabilities...\r\n2021-04-28T17:14:29.393-0400 INFO Trivy skips scanning programming language libraries because no supported file was detected\r\npython:3-buster (debian 10.9)\r\n=============================\r\nTotal: 1621 (UNKNOWN: 13, LOW: 1106, MEDIUM: 343, HIGH: 145, CRITICAL: 14)\r\n+------------------------------+---------------------+----------+------------------------------+---------------+--------------------------------------------------------------+\r\n| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |\r\n+------------------------------+---------------------+----------+------------------------------+---------------+--------------------------------------------------------------+\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855446829, "label": "Dockerfile: use Ubuntu 20.10 as base"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1168#issuecomment-834636796", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1168", "id": 834636796, "node_id": "MDEyOklzc3VlQ29tbWVudDgzNDYzNjc5Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-07T17:22:52Z", "updated_at": "2021-05-07T17:22:52Z", "author_association": "OWNER", "body": "Related: Here's an implementation of a `get_metadata()` plugin hook by @brandonrobertz https://github.com/next-LI/datasette/commit/3fd8ce91f3108c82227bf65ff033929426c60437", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 777333388, "label": "Mechanism for storing metadata in _metadata tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1300#issuecomment-833132571", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1300", "id": 833132571, "node_id": "MDEyOklzc3VlQ29tbWVudDgzMzEzMjU3MQ==", "user": {"value": 3243482, "label": "abdusco"}, "created_at": "2021-05-06T00:16:50Z", "updated_at": "2021-05-06T00:18:05Z", "author_association": "CONTRIBUTOR", "body": "I ended up using some JS as a workaround. \r\n\r\nFirst, add a JS file in `metadata.yaml`:\r\n\r\n```yaml\r\nextra_js_urls:\r\n - '/static/app.js'\r\n```\r\nthen inside the script, find the blob download links and replace `.blob` extension in the url with `.jpg` and replace the links with `` elements. \r\nYou need to add an output formatter to serve `BLOB` columns as JPG. You can find the code in the first post.\r\n~~Replacing `.blob` -> `.jpg` might not even be necessary, because browsers only care about the mime type, so you only need to serve the binary content with the right `content-type` header.~~. You need to replace the extension, otherwise the output renderer will not run.\r\n\r\n```js\r\nwindow.addEventListener('DOMContentLoaded', () => {\r\n function renderBlobImages() {\r\n document.querySelectorAll('a[href*=\".blob\"]').forEach(el => {\r\n const img = document.createElement('img');\r\n img.className = 'blob-image';\r\n img.loading = 'lazy';\r\n img.src = el.href.replace('.blob', '.jpg');\r\n el.parentElement.replaceChild(img, el);\r\n });\r\n }\r\n\r\n renderBlobImages();\r\n});\r\n```\r\n\r\nwhile this does the job, I'd prefer handling this in Python where it belongs.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 860625833, "label": "Make row available to `render_cell` plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1318#issuecomment-832676649", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1318", "id": 832676649, "node_id": "MDEyOklzc3VlQ29tbWVudDgzMjY3NjY0OQ==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-05-05T13:13:45Z", "updated_at": "2021-05-05T13:13:45Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1318?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1318](https://codecov.io/gh/simonw/datasette/pull/1318?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (e06c099) into [main](https://codecov.io/gh/simonw/datasette/commit/1b697539f5b53cec3fe13c0f4ada13ba655c88c7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (1b69753) will **increase** coverage by `0.02%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1318/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/1318?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 #1318 +/- ##\n==========================================\n+ Coverage 91.51% 91.53% +0.02% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3895 +1 \n+ Misses 361 360 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1318?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| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.31% <0.00%> (+0.17%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1318?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/1318?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [1b69753...e06c099](https://codecov.io/gh/simonw/datasette/pull/1318?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": 876431852, "label": "Bump black from 21.4b2 to 21.5b0"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/genome-to-sqlite/issues/1#issuecomment-831004775", "issue_url": "https://api.github.com/repos/dogsheep/genome-to-sqlite/issues/1", "id": 831004775, "node_id": "MDEyOklzc3VlQ29tbWVudDgzMTAwNDc3NQ==", "user": {"value": 25372415, "label": "cobiadigital"}, "created_at": "2021-05-03T03:46:23Z", "updated_at": "2021-05-03T03:46:23Z", "author_association": "NONE", "body": "RS1800955 is related to novelty seeking and ADHD\r\nhttps://www.snpedia.com/index.php/Rs1800955\r\n\r\n`select rsid, genotype, case genotype\r\n when 'CC' then 'increased susceptibility to novelty seeking'\r\n when 'CT' then 'increased susceptibility to novelty seeking'\r\n when 'TT' then 'normal'\r\nend as interpretation from genome where rsid = 'rs1800955'`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 496415321, "label": "Figure out some interesting example SQL queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1310#issuecomment-829885904", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1310", "id": 829885904, "node_id": "MDEyOklzc3VlQ29tbWVudDgyOTg4NTkwNA==", "user": {"value": 3747136, "label": "ColinMaudry"}, "created_at": "2021-04-30T06:58:46Z", "updated_at": "2021-04-30T07:26:11Z", "author_association": "NONE", "body": "I made it work with openpyxl. I'm not sure all the code under `@hookimpl` is necessary... but it works :)\r\n\r\n```python\r\nfrom datasette import hookimpl\r\nfrom datasette.utils.asgi import Response\r\nfrom openpyxl import Workbook\r\nfrom openpyxl.writer.excel import save_virtual_workbook\r\nfrom openpyxl.cell import WriteOnlyCell\r\nfrom openpyxl.styles import Alignment, Font, PatternFill\r\nfrom tempfile import NamedTemporaryFile\r\n\r\ndef render_spreadsheet(rows):\r\n wb = Workbook(write_only=True)\r\n ws = wb.create_sheet()\r\n ws = wb.active\r\n ws.title = \"decp\"\r\n\r\n columns = rows[0].keys()\r\n headers = []\r\n for col in columns :\r\n c = WriteOnlyCell(ws, col)\r\n c.fill = PatternFill(\"solid\", fgColor=\"DDEFFF\")\r\n headers.append(c)\r\n ws.append(headers)\r\n\r\n for row in rows:\r\n wsRow = []\r\n for col in columns:\r\n c = WriteOnlyCell(ws, row[col])\r\n if col == \"objet\" :\r\n c.alignment = Alignment(wrapText = True)\r\n wsRow.append(c)\r\n ws.append(wsRow)\r\n\r\n with NamedTemporaryFile() as tmp:\r\n wb.save(tmp.name)\r\n tmp.seek(0)\r\n return Response(\r\n tmp.read(),\r\n headers={\r\n 'Content-Disposition': 'attachment; filename=decp.xlsx',\r\n 'Content-type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\r\n }\r\n )\r\n\r\n@hookimpl\r\ndef register_output_renderer():\r\n return {\"extension\": \"xlsx\",\r\n \"render\": render_spreadsheet,\r\n \"can_render\": lambda: False}\r\n\r\n```\r\n\r\nThe key part was to find the right function to wrap the spreadsheet object `wb`. `NamedTemporaryFile()` did it!\r\n\r\nI'll update this issue when the plugin is packaged and ready for broader use.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 870125126, "label": "I'm creating a plugin to export a spreadsheet file (.ods or .xlsx)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1313#issuecomment-829352402", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1313", "id": 829352402, "node_id": "MDEyOklzc3VlQ29tbWVudDgyOTM1MjQwMg==", "user": {"value": 27856297, "label": "dependabot-preview[bot]"}, "created_at": "2021-04-29T15:47:23Z", "updated_at": "2021-04-29T15:47:23Z", "author_association": "CONTRIBUTOR", "body": "This pull request will no longer be automatically closed when a new version is found as this pull request was created by Dependabot Preview and this repo is using a `version: 2` config file. You can close this pull request and let Dependabot re-create it the next time it checks for updates.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 871046111, "label": "Bump black from 20.8b1 to 21.4b2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1314#issuecomment-829349118", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1314", "id": 829349118, "node_id": "MDEyOklzc3VlQ29tbWVudDgyOTM0OTExOA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-29T15:43:32Z", "updated_at": "2021-04-29T15:43:32Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1314?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1314](https://codecov.io/gh/simonw/datasette/pull/1314?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (98eea0b) into [main](https://codecov.io/gh/simonw/datasette/commit/a4bb2abce0764d49d255e5379f9e9c70981834ca?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (a4bb2ab) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1314/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/1314?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 #1314 +/- ##\n=======================================\n Coverage 91.51% 91.51% \n=======================================\n Files 34 34 \n Lines 4255 4255 \n=======================================\n Hits 3894 3894 \n Misses 361 361 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1314?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/1314?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [a4bb2ab...98eea0b](https://codecov.io/gh/simonw/datasette/pull/1314?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": 871157602, "label": "Upgrade to GitHub-native Dependabot"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1313#issuecomment-829265979", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1313", "id": 829265979, "node_id": "MDEyOklzc3VlQ29tbWVudDgyOTI2NTk3OQ==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-29T14:04:13Z", "updated_at": "2021-04-29T14:04:13Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1313?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1313](https://codecov.io/gh/simonw/datasette/pull/1313?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (3cd7ad4) into [main](https://codecov.io/gh/simonw/datasette/commit/a4bb2abce0764d49d255e5379f9e9c70981834ca?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (a4bb2ab) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1313/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/1313?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 #1313 +/- ##\n=======================================\n Coverage 91.51% 91.51% \n=======================================\n Files 34 34 \n Lines 4255 4255 \n=======================================\n Hits 3894 3894 \n Misses 361 361 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1313?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/1313?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [a4bb2ab...3cd7ad4](https://codecov.io/gh/simonw/datasette/pull/1313?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": 871046111, "label": "Bump black from 20.8b1 to 21.4b2"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1311#issuecomment-829260725", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1311", "id": 829260725, "node_id": "MDEyOklzc3VlQ29tbWVudDgyOTI2MDcyNQ==", "user": {"value": 27856297, "label": "dependabot-preview[bot]"}, "created_at": "2021-04-29T13:58:08Z", "updated_at": "2021-04-29T13:58:08Z", "author_association": "CONTRIBUTOR", "body": "Superseded by #1313.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 870227815, "label": "Bump black from 20.8b1 to 21.4b1"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1311#issuecomment-828683322", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1311", "id": 828683322, "node_id": "MDEyOklzc3VlQ29tbWVudDgyODY4MzMyMg==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-28T18:30:49Z", "updated_at": "2021-04-28T18:30:49Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1311?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1311](https://codecov.io/gh/simonw/datasette/pull/1311?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (baf3030) into [main](https://codecov.io/gh/simonw/datasette/commit/a4bb2abce0764d49d255e5379f9e9c70981834ca?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (a4bb2ab) will **increase** coverage by `0.07%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1311/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/1311?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 #1311 +/- ##\n==========================================\n+ Coverage 91.51% 91.58% +0.07% \n==========================================\n Files 34 34 \n Lines 4255 4255 \n==========================================\n+ Hits 3894 3897 +3 \n+ Misses 361 358 -3 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1311?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| [datasette/database.py](https://codecov.io/gh/simonw/datasette/pull/1311/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2RhdGFiYXNlLnB5) | `93.68% <0.00%> (+0.74%)` | :arrow_up: |\n| [datasette/views/index.py](https://codecov.io/gh/simonw/datasette/pull/1311/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2luZGV4LnB5) | `98.18% <0.00%> (+1.81%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1311?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/1311?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [a4bb2ab...baf3030](https://codecov.io/gh/simonw/datasette/pull/1311?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": 870227815, "label": "Bump black from 20.8b1 to 21.4b1"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1309#issuecomment-828679943", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1309", "id": 828679943, "node_id": "MDEyOklzc3VlQ29tbWVudDgyODY3OTk0Mw==", "user": {"value": 27856297, "label": "dependabot-preview[bot]"}, "created_at": "2021-04-28T18:26:03Z", "updated_at": "2021-04-28T18:26:03Z", "author_association": "CONTRIBUTOR", "body": "Superseded by #1311.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 869237023, "label": "Bump black from 20.8b1 to 21.4b0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1310#issuecomment-828670621", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1310", "id": 828670621, "node_id": "MDEyOklzc3VlQ29tbWVudDgyODY3MDYyMQ==", "user": {"value": 3747136, "label": "ColinMaudry"}, "created_at": "2021-04-28T18:12:08Z", "updated_at": "2021-04-28T18:12:08Z", "author_association": "NONE", "body": "Apparently, beside a string, Reponse could also [work with bytes](https://github.com/simonw/datasette/blob/master/datasette/utils/asgi.py#L338).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 870125126, "label": "I'm creating a plugin to export a spreadsheet file (.ods or .xlsx)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1309#issuecomment-827911909", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1309", "id": 827911909, "node_id": "MDEyOklzc3VlQ29tbWVudDgyNzkxMTkwOQ==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-27T20:35:15Z", "updated_at": "2021-04-27T20:35:15Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1309?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1309](https://codecov.io/gh/simonw/datasette/pull/1309?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (20fc3fe) into [main](https://codecov.io/gh/simonw/datasette/commit/a4bb2abce0764d49d255e5379f9e9c70981834ca?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (a4bb2ab) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1309/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/1309?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 #1309 +/- ##\n=======================================\n Coverage 91.51% 91.51% \n=======================================\n Files 34 34 \n Lines 4255 4255 \n=======================================\n Hits 3894 3894 \n Misses 361 361 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1309?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/1309?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [a4bb2ab...20fc3fe](https://codecov.io/gh/simonw/datasette/pull/1309?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": 869237023, "label": "Bump black from 20.8b1 to 21.4b0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/173#issuecomment-826784306", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/173", "id": 826784306, "node_id": "MDEyOklzc3VlQ29tbWVudDgyNjc4NDMwNg==", "user": {"value": 3747136, "label": "ColinMaudry"}, "created_at": "2021-04-26T12:10:01Z", "updated_at": "2021-04-26T12:10:01Z", "author_association": "NONE", "body": "I found a neat tutorial to set up gettext with jinja2: http://siongui.github.io/2016/01/17/i18n-python-web-application-by-gettext-jinja2/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 281110295, "label": "I18n and L10n support"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1308#issuecomment-826041458", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1308", "id": 826041458, "node_id": "MDEyOklzc3VlQ29tbWVudDgyNjA0MTQ1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-24T06:07:01Z", "updated_at": "2021-04-24T06:07:01Z", "author_association": "OWNER", "body": "I can use `td.type-pk` instead - here's the existing HTML:\r\n```html\r\n\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 866668415, "label": "Columns named \"link\" display in bold"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1308#issuecomment-826040909", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1308", "id": 826040909, "node_id": "MDEyOklzc3VlQ29tbWVudDgyNjA0MDkwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-24T06:01:21Z", "updated_at": "2021-04-24T06:01:21Z", "author_association": "OWNER", "body": "Demo:\r\n```\r\necho '{\"link\": \"https://example.com/\"}' | sqlite-utils insert link.db link -\r\n```\r\n\"link__link__1_row\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 866668415, "label": "Columns named \"link\" display in bold"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1308#issuecomment-826040676", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1308", "id": 826040676, "node_id": "MDEyOklzc3VlQ29tbWVudDgyNjA0MDY3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-24T05:58:35Z", "updated_at": "2021-04-24T05:58:35Z", "author_association": "OWNER", "body": "Here's why: https://github.com/simonw/datasette/blob/6ed9238178a56da5fb019f37fb1e1e15886be1d1/datasette/static/app.css#L435-L437", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 866668415, "label": "Columns named \"link\" display in bold"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1306#issuecomment-824866566", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1306", "id": 824866566, "node_id": "MDEyOklzc3VlQ29tbWVudDgyNDg2NjU2Ng==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-22T13:59:04Z", "updated_at": "2021-04-22T13:59:04Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1306?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1306](https://codecov.io/gh/simonw/datasette/pull/1306?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (115332c) into [main](https://codecov.io/gh/simonw/datasette/commit/6ed9238178a56da5fb019f37fb1e1e15886be1d1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (6ed9238) will **increase** coverage by `0.00%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1306/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/1306?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 #1306 +/- ##\n=======================================\n Coverage 91.51% 91.51% \n=======================================\n Files 34 34 \n Lines 4255 4256 +1 \n=======================================\n+ Hits 3894 3895 +1 \n Misses 361 361 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1306?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| [datasette/views/index.py](https://codecov.io/gh/simonw/datasette/pull/1306/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2luZGV4LnB5) | `96.42% <100.00%> (+0.06%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1306?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/1306?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [6ed9238...115332c](https://codecov.io/gh/simonw/datasette/pull/1306?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": 864979486, "label": "Avoid error sorting by relationships if related tables are not allowed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/173#issuecomment-823961091", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/173", "id": 823961091, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMzk2MTA5MQ==", "user": {"value": 3747136, "label": "ColinMaudry"}, "created_at": "2021-04-21T10:37:05Z", "updated_at": "2021-04-21T10:37:36Z", "author_association": "NONE", "body": "I have the feeling that the text visible to users is 95% present in template files ([datasette/templates](https://github.com/simonw/datasette/tree/main/datasette/templates)). The python code mainly contains error messages.\r\n\r\nIn the current situation, the best way to provide a localized frontend is to translate the templates and [configure datasette to use them](https://docs.datasette.io/en/stable/custom_templates.html). I think I'm going to do it for French.\r\n\r\nIf we want localization to be better integrated, for the python code, I think [gettext](https://docs.python.org/3/library/gettext.html#localizing-your-application) is the way to go. The .po can be translated in user-friendly tools such as Transifex and Crowdin.\r\n\r\nFor the templates, I'm not sure how we could do it cleanly and easy to maintain. Maybe the tools above could parse HTML and detect the strings to be translated.\r\n\r\nIn any case, localization implementing l10n is just the first step: a continuous process must be setup to maintain the translations and produce new ones while datasette keeps getting new features.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 281110295, "label": "I18n and L10n support"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1298#issuecomment-823102978", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1298", "id": 823102978, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMzEwMjk3OA==", "user": {"value": 154364, "label": "dracos"}, "created_at": "2021-04-20T08:51:23Z", "updated_at": "2021-04-20T08:51:23Z", "author_association": "NONE", "body": "2. Max height would still let you scroll the page to underneath the facets to the table, but would mean the table would never take up more than your window size, so the horizontal scrollbar would be visible as soon as the table took up the size of the window.\r\n3. Yes, this wouldn't be for mobile :) It'd be desktop-only styling. On mobile you can scroll much more easily with touch, anyway. In your case, perhaps better would be the whole top half would be facets, bottom left quadrant chart, bottom right table. Depends upon the particular use case, as you say.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855476501, "label": "improve table horizontal scroll experience"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1298#issuecomment-823093669", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1298", "id": 823093669, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMzA5MzY2OQ==", "user": {"value": 192568, "label": "mroswell"}, "created_at": "2021-04-20T08:38:10Z", "updated_at": "2021-04-20T08:40:22Z", "author_association": "CONTRIBUTOR", "body": "@dracos I appreciate your ideas!\r\n\r\n1. Ooh, I like this: https://codepen.io/astro87/pen/LYRQNbd?editors=1100 (That's the codepen from your linked stackoverflow.)\r\n2. I worry that a max height will be a problem when my facets are open. (I've got 35 active ingredients, and so I've set the default_facet_size to 35.)\r\n3. I don't understand this one. I'm observing the screenshot... very helpful! (Ah, okay, TR = Top Right and BR = Bottom Right. Absolute grid refers to position style.) All the scroll bars look a little wonky to me. I've also got a lot of facets, and prefer the extra horizontal space so that not as many facets disappear below the fold. My site also has end users... some will be on mobile... not sure what the absolute grid would do there... \r\n4. (I still think a hover-arrow that scrolls upon click would help, too...)\r\n\r\nBut meanwhile, I'm going to go ahead and see if I can apply that shadow. (Never would've thought of that.) Hmmm... I'm not an SCSS person. This looks helpful! https://jsonformatter.org/scss-to-css", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855476501, "label": "improve table horizontal scroll experience"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1298#issuecomment-823064725", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1298", "id": 823064725, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMzA2NDcyNQ==", "user": {"value": 154364, "label": "dracos"}, "created_at": "2021-04-20T07:57:14Z", "updated_at": "2021-04-20T07:57:14Z", "author_association": "NONE", "body": "My suggestions, originally made on twitter, but might be better here now:\r\n\r\n1. Could have a CSS shadow (one of the comments on https://stackoverflow.com/questions/44793453/how-do-i-add-a-top-and-bottom-shadow-while-scrolling-but-only-when-needed is a codepen for horizontal instead of vertical);\r\n\r\n2. Could give the table a max-height (either the window or work out the available space) so that it is both vertically/horizontally scrollable and you don't have to scroll to the bottom in order to see this;\r\n\r\n3. On a desktop browser, what I think I'd want is an absolute grid to work with - left query/filters, TR chart (or map), BR table. No problem with scrolling then. Here is a mockup I made when this was about the map plugin:\r\n![image](https://user-images.githubusercontent.com/154364/115358389-82c47e00-a1b5-11eb-8a63-0ca14fd23d32.png)\r\n![image](https://user-images.githubusercontent.com/154364/115358454-97087b00-a1b5-11eb-9501-cf884ae72d7c.png)\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855476501, "label": "improve table horizontal scroll experience"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1303#issuecomment-822486113", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1303", "id": 822486113, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMjQ4NjExMw==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-19T13:55:24Z", "updated_at": "2021-04-19T13:55:24Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1303?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1303](https://codecov.io/gh/simonw/datasette/pull/1303?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (c348ff1) into [main](https://codecov.io/gh/simonw/datasette/commit/0a7621f96f8ad14da17e7172e8a7bce24ef78966?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (0a7621f) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1303/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/1303?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 #1303 +/- ##\n=======================================\n Coverage 91.51% 91.51% \n=======================================\n Files 34 34 \n Lines 4255 4255 \n=======================================\n Hits 3894 3894 \n Misses 361 361 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1303?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/1303?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [0a7621f...c348ff1](https://codecov.io/gh/simonw/datasette/pull/1303?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": 861331159, "label": "Update pytest-asyncio requirement from <0.15,>=0.10 to >=0.10,<0.16"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1300#issuecomment-821971059", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1300", "id": 821971059, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMTk3MTA1OQ==", "user": {"value": 3243482, "label": "abdusco"}, "created_at": "2021-04-18T10:42:19Z", "updated_at": "2021-04-18T10:42:19Z", "author_association": "CONTRIBUTOR", "body": "If there's a simpler way to generate a URL for a specific row, I'm all ears", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 860625833, "label": "Make row available to `render_cell` plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1300#issuecomment-821970965", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1300", "id": 821970965, "node_id": "MDEyOklzc3VlQ29tbWVudDgyMTk3MDk2NQ==", "user": {"value": 3243482, "label": "abdusco"}, "created_at": "2021-04-18T10:41:15Z", "updated_at": "2021-04-18T10:41:15Z", "author_association": "CONTRIBUTOR", "body": "If I change the hookspec and add a row parameter, it works\r\n\r\nhttps://github.com/simonw/datasette/blob/7a2ed9f8a119e220b66d67c7b9e07cbab47b1196/datasette/hookspecs.py#L58\r\n\r\n```\r\ndef render_cell(value, column, row, table, database, datasette):\r\n```\r\n\r\nBut to generate a URL, I need the primary keys, but I can't call `pks = await db.primary_keys(table)` inside a sync function. I can't call `datasette.utils.detect_primary_keys` either, because the db connection is not publicly exposed (AFAICT).\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 860625833, "label": "Make row available to `render_cell` plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1196#issuecomment-819775388", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1196", "id": 819775388, "node_id": "MDEyOklzc3VlQ29tbWVudDgxOTc3NTM4OA==", "user": {"value": 1219001, "label": "robroc"}, "created_at": "2021-04-14T19:28:38Z", "updated_at": "2021-04-14T19:28:38Z", "author_association": "NONE", "body": "@QAInsights I'm having a similar problem when publishing to Cloud Run on Windows. It's not able to access certain packages in my conda environment where Datasette is installed. Can you explain how you got it to work in WSL? Were you able to access the .db file in the Windows file system? Thank you.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 791237799, "label": "Access Denied Error in Windows"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1296#issuecomment-819467759", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1296", "id": 819467759, "node_id": "MDEyOklzc3VlQ29tbWVudDgxOTQ2Nzc1OQ==", "user": {"value": 295329, "label": "camallen"}, "created_at": "2021-04-14T12:07:37Z", "updated_at": "2021-04-14T12:11:36Z", "author_association": "CONTRIBUTOR", "body": "> Removing /var/lib/apt and /var/lib/dpkg makes apt and dpkg unusable in\r\nimages based on this one. Running `apt-get clean` and removing\r\n/var/lib/apt/lists achieves similar size savings.\r\n\r\nthis PR helps me as removing the /var/lib/apt and /var/lib/dpkg directories breaks my ability to add packages when using `datasetteproject/datasette:0.56` as a base image.\r\n\r\n\r\n---- \r\nShorterm workaround for me was to use this in my Dockerfile\r\n```\r\nFROM datasetteproject/datasette:0.56\r\n\r\nRUN mkdir -p /var/lib/apt\r\nRUN mkdir -p /var/lib/dpkg\r\nRUN mkdir -p /var/lib/dpkg/updates\r\nRUN mkdir -p /var/lib/dpkg/info\r\nRUN touch /var/lib/dpkg/status\r\n\r\nRUN apt-get update # and install your packages etc\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855446829, "label": "Dockerfile: use Ubuntu 20.10 as base"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/830#issuecomment-817414881", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/830", "id": 817414881, "node_id": "MDEyOklzc3VlQ29tbWVudDgxNzQxNDg4MQ==", "user": {"value": 192568, "label": "mroswell"}, "created_at": "2021-04-12T01:06:34Z", "updated_at": "2021-04-12T01:07:27Z", "author_association": "CONTRIBUTOR", "body": "Related: #1285, including arguments for natural breaks, equal interval, etc. modeled after choropleth map legends.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 636511683, "label": "Redesign register_facet_classes plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1295#issuecomment-817301355", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1295", "id": 817301355, "node_id": "MDEyOklzc3VlQ29tbWVudDgxNzMwMTM1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-11T12:40:25Z", "updated_at": "2021-04-11T12:41:06Z", "author_association": "OWNER", "body": "I could have a page about error codes in the docs, then have `https://datasette.io/E123` style URLs for each error core which are shown when that error occurs and redirect to the corresponding documentation section.\r\n\r\nCan enforce these with a documentation unit test.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 855296937, "label": "Errors should have links to further information"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1286#issuecomment-815978405", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1286", "id": 815978405, "node_id": "MDEyOklzc3VlQ29tbWVudDgxNTk3ODQwNQ==", "user": {"value": 192568, "label": "mroswell"}, "created_at": "2021-04-08T16:47:29Z", "updated_at": "2021-04-10T03:59:00Z", "author_association": "CONTRIBUTOR", "body": "This worked for me: \r\n``\r\n\r\nI'm sure there is a prettier (and more flexible) way, but for now, this is ever-so-much more pleasant to look at. \r\n\r\n------ AFTER:\r\n\"Screen\r\n\r\n------ BEFORE:\r\n\"Screen\r\n\r\n\r\n\r\n(Note: I didn't figure out how to have one item have no semicolon, while multi-items close with a semicolon, but this is good enough for now. I also didn't figure out how to set up a new jinja filter. I don't want to add to /datasette/utils/__init__.py as I assume that would get overwritten when upgrading datasette. Having a starter guide on creating jinja filters in datasette would be helpful. (The jinja documentation isn't datasette-specific enough for me to quite nail it.)\r\n", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849220154, "label": "Better default display of arrays of items"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813480043", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813480043, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzQ4MDA0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T16:16:17Z", "updated_at": "2021-04-05T16:16:17Z", "author_association": "OWNER", "body": "https://latest.datasette.io/fixtures?sql=explain+select+*+from+paginated_view will be an interesting test query - because `paginated_view` is defined like this:\r\n\r\n```sql\r\nCREATE VIEW paginated_view AS\r\n SELECT\r\n content,\r\n '- ' || content || ' -' AS content_extra\r\n FROM no_primary_key;\r\n```\r\nSo this will help test that the mechanism isn't confused by output columns that are created through a concatenation expression.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813445512", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813445512, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzQ0NTUxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T15:11:40Z", "updated_at": "2021-04-05T15:11:40Z", "author_association": "OWNER", "body": "Here's some older example code that works with opcodes from Python, in this case to output indexes used by a query: https://github.com/plasticityai/supersqlite/blob/master/supersqlite/idxchk.py", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813438771", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813438771, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzQzODc3MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T14:58:48Z", "updated_at": "2021-04-05T14:58:48Z", "author_association": "OWNER", "body": "I may need to do something special for rowid columns - there is a `RowId` opcode that might come into play here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-photos/issues/35#issuecomment-813249000", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-photos/issues/35", "id": 813249000, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzI0OTAwMA==", "user": {"value": 1151557, "label": "ligurio"}, "created_at": "2021-04-05T07:37:57Z", "updated_at": "2021-04-05T07:37:57Z", "author_association": "NONE", "body": "There are trained ML models used in Photoprism:\r\n- https://dl.photoprism.org/tensorflow/nasnet.zip\r\n- https://dl.photoprism.org/tensorflow/nsfw.zip", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842695374, "label": "Support to annotate photos on other than macOS OSes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/620#issuecomment-813167335", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/620", "id": 813167335, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzE2NzMzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T03:57:22Z", "updated_at": "2021-04-05T03:57:22Z", "author_association": "OWNER", "body": "This may be obsoleted by #1293 - it looks like I may be able to auto-detect these foreign keys for arbitrary queries after all.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520667773, "label": "Mechanism for indicating foreign key relationships in the table and query page URLs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813164282", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813164282, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzE2NDI4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T03:42:26Z", "updated_at": "2021-04-05T03:42:36Z", "author_association": "OWNER", "body": "Extracting variables with this trick appears to work OK, but you have to pass the correct variables to the `explain select...` query. Using `defaultdict` seems to work there:\r\n\r\n```pycon\r\n>>> rows = conn.execute('explain select * from repos where id = :id', defaultdict(int))\r\n>>> [dict(r) for r in rows if r['opcode'] == 'Variable']\r\n[{'addr': 2,\r\n 'opcode': 'Variable',\r\n 'p1': 1,\r\n 'p2': 1,\r\n 'p3': 0,\r\n 'p4': ':id',\r\n 'p5': 0,\r\n 'comment': None}]\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813162622", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813162622, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzE2MjYyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T03:34:24Z", "updated_at": "2021-04-05T03:40:35Z", "author_association": "OWNER", "body": "This almost works, but throws errors with some queries (anything with a `rowid` column for example) - it needs a bunch of test coverage.\r\n```python\r\ndef columns_for_query(conn, sql):\r\n rows = conn.execute('explain ' + sql).fetchall()\r\n table_rootpage_by_register = {r['p1']: r['p2'] for r in rows if r['opcode'] == 'OpenRead'}\r\n names_by_rootpage = dict(\r\n conn.execute(\r\n 'select rootpage, name from sqlite_master where rootpage in ({})'.format(\r\n ', '.join(map(str, table_rootpage_by_register.values()))\r\n )\r\n )\r\n )\r\n columns_by_column_register = {}\r\n for row in rows:\r\n if row['opcode'] == 'Column':\r\n addr, opcode, table_id, cid, column_register, p4, p5, comment = row\r\n table = names_by_rootpage[table_rootpage_by_register[table_id]]\r\n columns_by_column_register[column_register] = (table, cid)\r\n result_row = [dict(r) for r in rows if r['opcode'] == 'ResultRow'][0]\r\n registers = list(range(result_row[\"p1\"], result_row[\"p1\"] + result_row[\"p2\"] - 1))\r\n all_column_names = {}\r\n for table in names_by_rootpage.values():\r\n table_xinfo = conn.execute('pragma table_xinfo({})'.format(table)).fetchall()\r\n for row in table_xinfo:\r\n all_column_names[(table, row[\"cid\"])] = row[\"name\"]\r\n final_output = []\r\n for r in registers:\r\n try:\r\n table, cid = columns_by_column_register[r]\r\n final_output.append((table, all_column_names[table, cid]))\r\n except KeyError:\r\n final_output.append((None, None))\r\n return final_output\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813134637", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813134637, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzEzNDYzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T01:21:59Z", "updated_at": "2021-04-05T01:21:59Z", "author_association": "OWNER", "body": "http://www.sqlite.org/draft/lang_explain.html says:\r\n\r\n> Applications should not use EXPLAIN or EXPLAIN QUERY PLAN since their exact behavior is variable and only partially documented.\r\n\r\nI'm going to keep exploring this though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813134227", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813134227, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzEzNDIyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T01:19:31Z", "updated_at": "2021-04-05T01:19:31Z", "author_association": "OWNER", "body": "| addr | opcode | p1 | p2 | p3 | p4 | p5 | comment |\r\n|--------|---------------|------|------|------|-----------------------|------|-----------|\r\n| 0 | Init | 0 | 47 | 0 | | 00 | |\r\n| 1 | OpenRead | 0 | 51 | 0 | 15 | 00 | |\r\n| 2 | Integer | 15 | 2 | 0 | | 00 | |\r\n| 3 | Once | 0 | 15 | 0 | | 00 | |\r\n| 4 | OpenEphemeral | 2 | 1 | 0 | k(1,) | 00 | |\r\n| 5 | VOpen | 1 | 0 | 0 | vtab:3E692C362158 | 00 | |\r\n| 6 | String8 | 0 | 5 | 0 | CPAD_2020a_SuperUnits | 00 | |\r\n| 7 | SCopy | 7 | 6 | 0 | | 00 | |\r\n| 8 | Integer | 2 | 3 | 0 | | 00 | |\r\n| 9 | Integer | 2 | 4 | 0 | | 00 | |\r\n| 10 | VFilter | 1 | 15 | 3 | | 00 | |\r\n| 11 | Rowid | 1 | 8 | 0 | | 00 | |\r\n| 12 | MakeRecord | 8 | 1 | 9 | C | 00 | |\r\n| 13 | IdxInsert | 2 | 9 | 8 | 1 | 00 | |\r\n| 14 | VNext | 1 | 11 | 0 | | 00 | |\r\n| 15 | Return | 2 | 0 | 0 | | 00 | |\r\n| 16 | Rewind | 2 | 46 | 0 | | 00 | |\r\n| 17 | Column | 2 | 0 | 1 | | 00 | |\r\n| 18 | IsNull | 1 | 45 | 0 | | 00 | |\r\n| 19 | SeekRowid | 0 | 45 | 1 | | 00 | |\r\n| 20 | Column | 0 | 2 | 11 | | 00 | |\r\n| 21 | Function0 | 1 | 10 | 9 | like(2) | 02 | |\r\n| 22 | IfNot | 9 | 45 | 1 | | 00 | |\r\n| 23 | Column | 0 | 14 | 13 | | 00 | |\r\n| 24 | Function0 | 1 | 12 | 9 | intersects(2) | 02 | |\r\n| 25 | Ne | 14 | 45 | 9 | | 51 | |\r\n| 26 | Column | 0 | 14 | 9 | | 00 | |\r\n| 27 | Function0 | 0 | 9 | 15 | asgeojson(1) | 01 | |\r\n| 28 | Rowid | 0 | 16 | 0 | | 00 | |\r\n| 29 | Column | 0 | 1 | 17 | | 00 | |\r\n| 30 | Column | 0 | 2 | 18 | | 00 | |\r\n| 31 | Column | 0 | 3 | 19 | | 00 | |\r\n| 32 | Column | 0 | 4 | 20 | | 00 | |\r\n| 33 | Column | 0 | 5 | 21 | | 00 | |\r\n| 34 | Column | 0 | 6 | 22 | | 00 | |\r\n| 35 | Column | 0 | 7 | 23 | | 00 | |\r\n| 36 | Column | 0 | 8 | 24 | | 00 | |\r\n| 37 | Column | 0 | 9 | 25 | | 00 | |\r\n| 38 | Column | 0 | 10 | 26 | | 00 | |\r\n| 39 | Column | 0 | 11 | 27 | | 00 | |\r\n| 40 | RealAffinity | 27 | 0 | 0 | | 00 | |\r\n| 41 | Column | 0 | 12 | 28 | | 00 | |\r\n| 42 | Column | 0 | 13 | 29 | | 00 | |\r\n| 43 | Column | 0 | 14 | 30 | | 00 | |\r\n| 44 | ResultRow | 15 | 16 | 0 | | 00 | |\r\n| 45 | Next | 2 | 17 | 0 | | 00 | |\r\n| 46 | Halt | 0 | 0 | 0 | | 00 | |\r\n| 47 | Transaction | 0 | 0 | 265 | 0 | 01 | |\r\n| 48 | Variable | 1 | 31 | 0 | :freedraw | 00 | |\r\n| 49 | Function0 | 1 | 31 | 7 | geomfromgeojson(1) | 01 | |\r\n| 50 | String8 | 0 | 10 | 0 | %mini% | 00 | |\r\n| 51 | Variable | 1 | 32 | 0 | :freedraw | 00 | |\r\n| 52 | Function0 | 1 | 32 | 12 | geomfromgeojson(1) | 01 | |\r\n| 53 | Integer | 1 | 14 | 0 | | 00 | |\r\n| 54 | Goto | 0 | 1 | 0 | | 00 | |\r\n\r\nEssential documentation for understanding that output: https://www.sqlite.org/opcode.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813134072", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813134072, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzEzNDA3Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T01:18:37Z", "updated_at": "2021-04-05T01:18:37Z", "author_association": "OWNER", "body": "Had a fantastic suggestion on the SQLite forum: it might be possible to get what I want by interpreting the opcodes output by `explain select ...`.\r\n\r\nCopying the reply I posted to this thread:\r\n\r\nThat's really useful, thanks! It looks like it _might_ be possible for me to reconstruct where each column came from using the `explain select` output.\r\n\r\nHere's a complex example: \r\n\r\nIt looks like the opcodes I need to inspect are `OpenRead`, `Column` and `ResultRow`.\r\n\r\n`OpenRead` tells me which tables are being opened - the `p2` value (in this case 51) corresponds to the `rootpage` column in `sqlite_master` here: - it gets assigned to the register in `p1`.\r\n\r\nThe `Column` opcodes tell me which columns are being read - `p1` is that table reference, and `p2` is the `cid` of the column within that table.\r\n\r\nThe `ResultRow` opcode then tells me which columns are used in the results. `15 16` means start at the 15th and then read the next 16 columns.\r\n\r\nI think this might work!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813116177", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813116177, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExNjE3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:31:00Z", "updated_at": "2021-04-04T23:31:00Z", "author_association": "OWNER", "body": "Sadly it doesn't do what I need. This query should only return one column, but instead I get back every column that was consulted by the query:\r\n\r\n\"sql-metadata_-_Jupyter_Notebook\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813115607", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813115607, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExNTYwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:25:15Z", "updated_at": "2021-04-04T23:25:15Z", "author_association": "OWNER", "body": "Oh wow, I just spotted https://github.com/macbre/sql-metadata\r\n\r\n> Uses tokenized query returned by python-sqlparse and generates query metadata. Extracts column names and tables used by the query. Provides a helper for normalization of SQL queries and tables aliases resolving.\r\n\r\nIt's for MySQL, PostgreSQL and Hive right now but maybe getting it working with SQLite wouldn't be too hard?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813115414", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813115414, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExNTQxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:23:34Z", "updated_at": "2021-04-04T23:23:34Z", "author_association": "OWNER", "body": "The other approach I considered for this was to have my own SQL query parser running in Python, which could pick apart a complex query and figure out which column was sourced from which table. I dropped this idea because it felt that the moment `select *` came into play a pure parsing approach wouldn't work - I'd need knowledge of the schema in order to resolve the `*`.\r\n\r\nA Python parser approach might be good enough to handle a subset of queries - those that don't use `select *` for example - and maybe that would be worth shipping? The feature doesn't have to be perfect for it to be useful.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813114933", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813114933, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExNDkzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:19:22Z", "updated_at": "2021-04-04T23:19:22Z", "author_association": "OWNER", "body": "I asked about this on the SQLite forum: https://sqlite.org/forum/forumpost/0180277fb7", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813113653", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813113653, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExMzY1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:10:49Z", "updated_at": "2021-04-04T23:10:49Z", "author_association": "OWNER", "body": "One option I've not fully explored yet: could I write my own custom SQLite C extension which exposes this functionality as a callable function?\r\n\r\nThen I could load that extension and run a SQL query something like this:\r\n\r\n```\r\nselect database, table, column from analyze_query(:sql_query)\r\n```\r\nWhere `analyze_query(...)` would be a fancy virtual table function of some sort that uses the underlying `sqlite3_column_database_name()` C functions to analyze the SQL query and return details of what it would return.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813113403", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813113403, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExMzQwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:08:48Z", "updated_at": "2021-04-04T23:08:48Z", "author_association": "OWNER", "body": "Worth noting that adding `limit 0` to the query still causes it to conduct the permission checks, hopefully while avoiding doing any of the actual work of executing the query:\r\n```pycon\r\nIn [20]: db.execute('select * from compound_primary_key join facetable on facetable.rowid = compound_primary_key.rowid limit 0').fetchall()\r\n ...: \r\nargs (21, None, None, None, None) kwargs {}\r\nargs (20, 'compound_primary_key', 'pk1', 'main', None) kwargs {}\r\nargs (20, 'compound_primary_key', 'pk2', 'main', None) kwargs {}\r\nargs (20, 'compound_primary_key', 'content', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'pk', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'created', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'planet_int', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'on_earth', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'state', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'city_id', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'neighborhood', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'tags', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'complex_array', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'distinct_some_null', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'pk', 'main', None) kwargs {}\r\nargs (20, 'compound_primary_key', 'ROWID', 'main', None) kwargs {}\r\nOut[20]: []\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813113218", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813113218, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExMzIxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:07:25Z", "updated_at": "2021-04-04T23:07:25Z", "author_association": "OWNER", "body": "Here are all of the available constants:\r\n```pycon\r\nIn [3]: for k in dir(sqlite3):\r\n ...: if k.startswith(\"SQLITE_\"):\r\n ...: print(k, getattr(sqlite3, k))\r\n ...: \r\nSQLITE_ALTER_TABLE 26\r\nSQLITE_ANALYZE 28\r\nSQLITE_ATTACH 24\r\nSQLITE_CREATE_INDEX 1\r\nSQLITE_CREATE_TABLE 2\r\nSQLITE_CREATE_TEMP_INDEX 3\r\nSQLITE_CREATE_TEMP_TABLE 4\r\nSQLITE_CREATE_TEMP_TRIGGER 5\r\nSQLITE_CREATE_TEMP_VIEW 6\r\nSQLITE_CREATE_TRIGGER 7\r\nSQLITE_CREATE_VIEW 8\r\nSQLITE_CREATE_VTABLE 29\r\nSQLITE_DELETE 9\r\nSQLITE_DENY 1\r\nSQLITE_DETACH 25\r\nSQLITE_DONE 101\r\nSQLITE_DROP_INDEX 10\r\nSQLITE_DROP_TABLE 11\r\nSQLITE_DROP_TEMP_INDEX 12\r\nSQLITE_DROP_TEMP_TABLE 13\r\nSQLITE_DROP_TEMP_TRIGGER 14\r\nSQLITE_DROP_TEMP_VIEW 15\r\nSQLITE_DROP_TRIGGER 16\r\nSQLITE_DROP_VIEW 17\r\nSQLITE_DROP_VTABLE 30\r\nSQLITE_FUNCTION 31\r\nSQLITE_IGNORE 2\r\nSQLITE_INSERT 18\r\nSQLITE_OK 0\r\nSQLITE_PRAGMA 19\r\nSQLITE_READ 20\r\nSQLITE_RECURSIVE 33\r\nSQLITE_REINDEX 27\r\nSQLITE_SAVEPOINT 32\r\nSQLITE_SELECT 21\r\nSQLITE_TRANSACTION 22\r\nSQLITE_UPDATE 23\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813113175", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813113175, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExMzE3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:07:01Z", "updated_at": "2021-04-04T23:07:01Z", "author_association": "OWNER", "body": "A more promising route I found involved the `db.set_authorizer` method. This can be used to log the permission checks that SQLite uses, including checks for permission to access specific columns of specific tables. For a while I thought this could work!\r\n\r\n```pycon\r\n>>> def print_args(*args, **kwargs):\r\n... print(\"args\", args, \"kwargs\", kwargs)\r\n... return sqlite3.SQLITE_OK\r\n\r\n>>> db = sqlite3.connect(\"fixtures.db\")\r\n>>> db.execute('select * from compound_primary_key join facetable on rowid').fetchall()\r\nargs (21, None, None, None, None) kwargs {}\r\nargs (20, 'compound_primary_key', 'pk1', 'main', None) kwargs {}\r\nargs (20, 'compound_primary_key', 'pk2', 'main', None) kwargs {}\r\nargs (20, 'compound_primary_key', 'content', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'pk', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'created', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'planet_int', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'on_earth', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'state', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'city_id', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'neighborhood', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'tags', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'complex_array', 'main', None) kwargs {}\r\nargs (20, 'facetable', 'distinct_some_null', 'main', None) kwargs {}\r\n```\r\nThose `20` values (where 20 is `SQLITE_READ`) looked like they were checking permissions for the columns in the order they would be returned!\r\n\r\nThen I found a snag:\r\n\r\n```pycon\r\nIn [18]: db.execute('select 1 + 1 + (select max(rowid) from facetable)')\r\nargs (21, None, None, None, None) kwargs {}\r\nargs (31, None, 'max', None, None) kwargs {}\r\nargs (20, 'facetable', 'pk', 'main', None) kwargs {}\r\nargs (21, None, None, None, None) kwargs {}\r\nargs (20, 'facetable', '', None, None) kwargs {}\r\n```\r\nOnce a subselect is involved the order of the `20` checks no longer matches the order in which the columns are returned from the query.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1293#issuecomment-813112546", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813112546, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzExMjU0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T23:02:45Z", "updated_at": "2021-04-04T23:02:45Z", "author_association": "OWNER", "body": "I've done various pieces of research into this over the past few years. Capturing what I've discovered in this ticket.\r\n\r\nThe SQLite C API has functions that can help with this: https://www.sqlite.org/c3ref/column_database_name.html details those. But they're not exposed in the Python SQLite library.\r\n\r\nMaybe it would be possible to use them via `ctypes`? My hunch is that I would have to re-implement the full `sqlite3` module with `ctypes`, which sounds daunting.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849978964, "label": "Show column metadata plus links for foreign keys on arbitrary query results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1292#issuecomment-813109789", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1292", "id": 813109789, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzEwOTc4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T22:37:47Z", "updated_at": "2021-04-04T22:37:47Z", "author_association": "OWNER", "body": "Could maybe replace this code: https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/utils/__init__.py#L1021-L1026", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849975810, "label": "Research ctypes.util.find_library('spatialite')"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1273#issuecomment-813061516", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1273", "id": 813061516, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzA2MTUxNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-04T16:32:40Z", "updated_at": "2021-04-04T16:32:40Z", "author_association": "OWNER", "body": "Useful tutorial series from 2012: https://northredoubt.com/n/2012/01/20/spatialite-speed-test/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 838382890, "label": "Refresh SpatiaLite documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/916#issuecomment-812941818", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/916", "id": 812941818, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjk0MTgxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T23:43:11Z", "updated_at": "2021-04-03T23:43:11Z", "author_association": "OWNER", "body": "Relevant code is some of the most complex in all of Datasette.\r\n\r\nhttps://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/views/table.py#L530-L594\r\n\r\nAnd\r\n\r\nhttps://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/views/table.py#L743-L771\r\n\r\nI'll need to think hard about how to refactor this out into something more understandable before implementing previous links.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 672421411, "label": "Support reverse pagination (previous page, has-previous-items)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/916#issuecomment-812941340", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/916", "id": 812941340, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjk0MTM0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T23:38:37Z", "updated_at": "2021-04-03T23:38:37Z", "author_association": "OWNER", "body": "Same query again with `a, d, v` returns 0 results, which is also as we would want: it signifies that we are back to the very first page: https://latest.datasette.io/fixtures?sql=select+pk1%2C+pk2%2C+pk3%2C+content+from+compound_three_primary_keys+where+%28%28pk1+%3C+%3Ap0%29%0D%0A++or%0D%0A%28pk1+%3D+%3Ap0+and+pk2+%3C+%3Ap1%29%0D%0A++or%0D%0A%28pk1+%3D+%3Ap0+and+pk2+%3D+%3Ap1+and+pk3+%3C+%3Ap2%29%29+order+by+pk1+desc%2C+pk2+desc%2C+pk3+desc+limit+1+offset+99&p0=a&p1=d&p2=v", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 672421411, "label": "Support reverse pagination (previous page, has-previous-items)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/916#issuecomment-812941112", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/916", "id": 812941112, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjk0MTExMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T23:35:55Z", "updated_at": "2021-04-03T23:35:55Z", "author_association": "OWNER", "body": "I tried flipping the direction of the sort and the comparison operators and got this: https://latest.datasette.io/fixtures?sql=select+pk1%2C+pk2%2C+pk3%2C+content+from+compound_three_primary_keys+where+%28%28pk1+%3C+%3Ap0%29%0D%0A++or%0D%0A%28pk1+%3D+%3Ap0+and+pk2+%3C+%3Ap1%29%0D%0A++or%0D%0A%28pk1+%3D+%3Ap0+and+pk2+%3D+%3Ap1+and+pk3+%3C+%3Ap2%29%29+order+by+pk1+desc%2C+pk2+desc%2C+pk3+desc+limit+1+offset+99&p0=a&p1=h&p2=r\r\n\r\n```sql\r\nselect pk1, pk2, pk3, content from compound_three_primary_keys where ((pk1 < :p0)\r\n or\r\n(pk1 = :p0 and pk2 < :p1)\r\n or\r\n(pk1 = :p0 and pk2 = :p1 and pk3 < :p2)) order by pk1 desc, pk2 desc, pk3 desc limit 1 offset 99\r\n```\r\nWhich returned `a-d-v` as desired. I messed around with it to find the `limit 1 offset 99` values.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 672421411, "label": "Support reverse pagination (previous page, has-previous-items)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/916#issuecomment-812940907", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/916", "id": 812940907, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjk0MDkwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T23:33:41Z", "updated_at": "2021-04-03T23:33:41Z", "author_association": "OWNER", "body": "Let's figure out the SQL for this. The most complex case is probably this one: https://latest.datasette.io/fixtures/compound_three_primary_keys?_next=a%2Ch%2Cr\r\n\r\nHere's the SQL for that page: https://latest.datasette.io/fixtures?sql=select+pk1%2C+pk2%2C+pk3%2C+content+from+compound_three_primary_keys+where+%28%28pk1+%3E+%3Ap0%29%0A++or%0A%28pk1+%3D+%3Ap0+and+pk2+%3E+%3Ap1%29%0A++or%0A%28pk1+%3D+%3Ap0+and+pk2+%3D+%3Ap1+and+pk3+%3E+%3Ap2%29%29+order+by+pk1%2C+pk2%2C+pk3+limit+101&p0=a&p1=h&p2=r\r\n\r\n```sql\r\nselect pk1, pk2, pk3, content from compound_three_primary_keys where ((pk1 > :p0)\r\n or\r\n(pk1 = :p0 and pk2 > :p1)\r\n or\r\n(pk1 = :p0 and pk2 = :p1 and pk3 > :p2)) order by pk1, pk2, pk3 limit 101\r\n```\r\nWhere `p0` is `a`, `p1` is `h` and `p2` is `r`.\r\n\r\nGiven the above, how would I figure out the correct previous link? It should be https://latest.datasette.io/fixtures/compound_three_primary_keys?_next=a%2Cd%2Cv - `a`, `d`, `v`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 672421411, "label": "Support reverse pagination (previous page, has-previous-items)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/916#issuecomment-812940457", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/916", "id": 812940457, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjk0MDQ1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T23:28:40Z", "updated_at": "2021-04-03T23:28:40Z", "author_association": "OWNER", "body": "I think my ideal implementation for this would be to reverse the order, grab the previous page-size-plus-one items, then return a `?_next=x` token that would provide the previous page sorted back in the expected default order.\r\n\r\nThe alternative would be to have a `?_previous=x` token which can be used to paginate backwards in reverse order, but I think this would be confusing as it would result in \"hit next page, then hit previous page\" returning you to a new state which features rows in the reverse order.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 672421411, "label": "Support reverse pagination (previous page, has-previous-items)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1287#issuecomment-812935384", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1287", "id": 812935384, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjkzNTM4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T22:38:33Z", "updated_at": "2021-04-03T22:38:33Z", "author_association": "OWNER", "body": "https://twitter.com/llanga/status/1378431719934681094 looks like I should wait for 3.9.4, out in a few days.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849396758, "label": "Upgrade to Python 3.9.4"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/502#issuecomment-812813732", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/502", "id": 812813732, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjgxMzczMg==", "user": {"value": 5413548, "label": "louispotok"}, "created_at": "2021-04-03T05:16:54Z", "updated_at": "2021-04-03T05:16:54Z", "author_association": "CONTRIBUTOR", "body": "For what it's worth, if anyone finds this in the future, I was having the same issue. \r\n\r\nAfter digging through the code, it turned out that the database download is only available if it the db served in immutable mode, so `datasette serve -i xyz.db` rather than the doc's quickstart recommendation of `datasette serve xyz.db`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 453131917, "label": "Exporting sqlite database(s)?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/916#issuecomment-812804998", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/916", "id": 812804998, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjgwNDk5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T03:47:45Z", "updated_at": "2021-04-03T03:47:45Z", "author_association": "OWNER", "body": "I found one example of an implementation of reversed keyset pagination here: https://github.com/tvainika/objection-keyset-pagination/blob/cb21a493c96daa6e63c302efae6718d09aa11661/index.js#L74-L79", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 672421411, "label": "Support reverse pagination (previous page, has-previous-items)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1290#issuecomment-812804178", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1290", "id": 812804178, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjgwNDE3OA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-04-03T03:39:16Z", "updated_at": "2021-04-03T03:41:29Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1290?src=pr&el=h1) Report\n> Merging [#1290](https://codecov.io/gh/simonw/datasette/pull/1290?src=pr&el=desc) (2fb1e42) into [main](https://codecov.io/gh/simonw/datasette/commit/87b583a128986982552421d2510e467e74ac5046?el=desc) (87b583a) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1290/graphs/tree.svg?width=650&height=150&src=pr&token=eSahVY7kw1)](https://codecov.io/gh/simonw/datasette/pull/1290?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## main #1290 +/- ##\n=======================================\n Coverage 91.51% 91.51% \n=======================================\n Files 34 34 \n Lines 4255 4255 \n=======================================\n Hits 3894 3894 \n Misses 361 361 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1290?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1290?src=pr&el=footer). Last update [87b583a...2fb1e42](https://codecov.io/gh/simonw/datasette/pull/1290?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849568079, "label": "Use pytest-xdist to speed up tests"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1289#issuecomment-812803256", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1289", "id": 812803256, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjgwMzI1Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T03:29:25Z", "updated_at": "2021-04-03T03:29:25Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/actions/runs/713207828 ran with `pytest-xdist` in 4m22s:\r\n\r\n\"Run_tests_in_CI_using_pytest-xdist__refs__1289_\u00b7_simonw_datasette_d63fc61\"\r\n\r\nHere's the test suite running on regular `pytest` in 5m13s:\r\n\r\n\"\u00a9_2017-2021_\u00b7_simonw_datasette_59ef4a2\"\r\n\r\nNot a huge speed-up because there are only 2 available cores in the GitHub Actions environment, but still worthwhile - especially since this lets people run in parallel on their own laptops.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849543502, "label": "Speed up tests with pytest-xdist"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1289#issuecomment-812768915", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1289", "id": 812768915, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjc2ODkxNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T00:59:15Z", "updated_at": "2021-04-03T00:59:26Z", "author_association": "OWNER", "body": "Looks like `-n auto` only detected two cores on GitHub Actions: https://github.com/simonw/datasette/runs/2257597137?check_suite_focus=true\r\n```\r\n============================= test session starts ==============================\r\nplatform linux -- Python 3.7.10, pytest-6.2.2, py-1.10.0, pluggy-0.13.1\r\nSQLite: 3.31.1\r\nrootdir: /home/runner/work/datasette/datasette, configfile: pytest.ini\r\nplugins: xdist-2.2.1, timeout-1.4.2, forked-1.3.0, asyncio-0.14.0\r\ngw0 I / gw1 I\r\ngw0 [878] / gw1 [878]\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849543502, "label": "Speed up tests with pytest-xdist"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1289#issuecomment-812767460", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1289", "id": 812767460, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjc2NzQ2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-03T00:48:26Z", "updated_at": "2021-04-03T00:48:26Z", "author_association": "OWNER", "body": "On my Mac `pytest-xdist` ran the test suite (minus two tests) in 59s, as opposed to 2m23s without xdist.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 849543502, "label": "Speed up tests with pytest-xdist"}, "performed_via_github_app": null}
{{ cell.value | replace('\", \"','; ') | replace('[\\\"','') | replace('\\\"]','')}}