{"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/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\n1\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/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/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/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-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-813134386", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1293", "id": 813134386, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMzEzNDM4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-05T01:20:28Z", "updated_at": "2021-08-13T00:42:30Z", "author_association": "OWNER", "body": "... that output might also provide a better way to extract variables than the current mechanism using a regular expression, by looking for the `Variable` opcodes.\r\n\r\n[UPDATE: it did indeed do that, see #1421]", "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/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/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/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/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/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/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} {"html_url": "https://github.com/simonw/datasette/issues/1287#issuecomment-812665092", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1287", "id": 812665092, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjY2NTA5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-02T18:54:29Z", "updated_at": "2021-04-02T18:54:29Z", "author_association": "OWNER", "body": "`python:3.9.3-slim-buster` isn't on Docker Hub yet either.", "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/1286#issuecomment-812664443", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1286", "id": 812664443, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjY2NDQ0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-02T18:52:45Z", "updated_at": "2021-04-02T18:52:51Z", "author_association": "OWNER", "body": "Idea: default to displaying single-dimension JSON arrays of strings as a comma-separated list but show the comma in a different colour - something like this:\r\n\r\n\"fixtures__facetable__15_rows\"\r\n\r\nI used this HTML for the prototype (re-using `.type-int` just to get the colour):\r\n```html\r\ntag1, tag2\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/1286#issuecomment-812663107", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1286", "id": 812663107, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjY2MzEwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-02T18:49:22Z", "updated_at": "2021-04-02T18:49:22Z", "author_association": "OWNER", "body": "This makes senses - showing an array as `[\"blah\", \"blah2\", \"blah3\"]` isn't particularly human-friendly!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-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/1287#issuecomment-812662583", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1287", "id": 812662583, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjY2MjU4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-02T18:47:59Z", "updated_at": "2021-04-02T18:47:59Z", "author_association": "OWNER", "body": "Once again having tests for the Dockerfile as seen in #1272 would be useful here.", "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/1287#issuecomment-812662026", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1287", "id": 812662026, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjY2MjAyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-02T18:46:20Z", "updated_at": "2021-04-02T18:46:20Z", "author_association": "OWNER", "body": "https://devcenter.heroku.com/articles/python-support#supported-runtimes looks like Heroku still only have 3.9.2 for the moment.", "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/1287#issuecomment-812661269", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1287", "id": 812661269, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMjY2MTI2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-04-02T18:45:08Z", "updated_at": "2021-04-02T18:45:19Z", "author_association": "OWNER", "body": "A few places:\r\n\r\nhttps://github.com/simonw/datasette/blob/7b1a9a1999eb9326ce8ec830d75ac200e5279c46/Dockerfile#L1\r\n\r\nhttps://github.com/simonw/datasette/blob/8e18c7943181f228ce5ebcea48deb59ce50bee1f/datasette/utils/__init__.py#L350\r\n\r\nhttps://github.com/simonw/datasette/blob/8e18c7943181f228ce5ebcea48deb59ce50bee1f/tests/test_package.py#L14\r\n\r\nhttps://github.com/simonw/datasette/blob/8e18c7943181f228ce5ebcea48deb59ce50bee1f/datasette/publish/heroku.py#L177-L178", "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/1284#issuecomment-810740486", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1284", "id": 810740486, "node_id": "MDEyOklzc3VlQ29tbWVudDgxMDc0MDQ4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-31T03:57:55Z", "updated_at": "2021-03-31T03:57:55Z", "author_association": "OWNER", "body": "You're right, doing this is really hard at the moment - I'm not sure I know how I would tackle this either, and it's something I've wanted in the past!\r\n\r\nI'll have a think about this one.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 845794436, "label": "Feature or Documentation Request: Individual table as home page template"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1282#issuecomment-809670294", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1282", "id": 809670294, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTY3MDI5NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T19:57:29Z", "updated_at": "2021-03-29T19:57:29Z", "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": 843739658, "label": "Fix little typo"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/696#issuecomment-809548363", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/696", "id": 809548363, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTU0ODM2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T17:04:19Z", "updated_at": "2021-03-29T17:04:19Z", "author_association": "OWNER", "body": "I tried this just now against Datasette 0.56 with the new Dockerfile from #1249 (that uses SQLite and SpatiaLite installed with `apt-get install`) and the tests all passed.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576722115, "label": "Single failing unit test when run inside the Docker image"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1031#issuecomment-809010713", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1031", "id": 809010713, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAxMDcxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:46:45Z", "updated_at": "2021-03-29T01:46:45Z", "author_association": "OWNER", "body": "Sorry I didn't get to this PR sooner. I've joint-credited you in the release notes for this fix: https://docs.datasette.io/en/stable/changelog.html#v0-56", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724369025, "label": "Fallback to databases in inspect-data.json when no -i options are passed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-809009580", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 809009580, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAwOTU4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:41:48Z", "updated_at": "2021-03-29T01:41:48Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/runs/2214871602?check_suite_focus=true worked:\r\n\r\n\"Banners_and_Alerts_and_Actions_\u00b7_simonw_datasette\"\r\n\r\nHere's the 0.56 image on Docker Hub: https://hub.docker.com/layers/datasetteproject/datasette/0.56/images/sha256-701fc0f299a0ea79434a4852c46dab351254b9ac25dbe3c5f36fd5360caf52f9?context=explore", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-809008760", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 809008760, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAwODc2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:38:21Z", "updated_at": "2021-03-29T01:38:21Z", "author_association": "OWNER", "body": "Got this error:\r\n```\r\n\"docker tag\" requires exactly 2 arguments.\r\nSee 'docker tag --help'.\r\n\r\nUsage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]\r\n\r\nCreate a tag TARGET_IMAGE that refers to SOURCE_IMAGE\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-809007255", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 809007255, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAwNzI1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:32:18Z", "updated_at": "2021-03-29T01:32:18Z", "author_association": "OWNER", "body": "I'm going to build a new GitHub Actions workflow for this that lets me manually specify a tag to build and push as a Docker image.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-809001653", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 809001653, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAwMTY1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:08:31Z", "updated_at": "2021-03-29T01:08:31Z", "author_association": "OWNER", "body": "I'm going to attempt to fix this manually for the 0.56 release, by building and tagging it by hand and then pushing the 0.56 tag to Docker Hub.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-809001273", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 809001273, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAwMTI3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:06:45Z", "updated_at": "2021-03-29T01:06:45Z", "author_association": "OWNER", "body": "https://docs.docker.com/engine/reference/commandline/push/#push-all-tags-of-an-image\r\n\r\n> Use the `-a` (or `--all-tags`) option to push all tags of a local image.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-809000903", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 809000903, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAwMDkwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:05:10Z", "updated_at": "2021-03-29T01:05:10Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/runs/1763835467?check_suite_focus=true for Datasette 0.54 worked, and the output included this:\r\n\r\n```\r\nSuccessfully tagged ***/datasette:0.54\r\nThe push refers to repository [docker.io/***/datasette]\r\naedd33c6b161: Preparing\r\n...\r\naedd33c6b161: Pushed\r\n0.54: digest: sha256:65c7e579d1c29755dac5c1ca86b1e97fa88c48bd3d724ac3e02988d0da296140 size: 2005\r\naedd33c6b161: Preparing\r\n...\r\n5dacd731af1b: Layer already exists\r\nlatest: digest: sha256:65c7e579d1c29755dac5c1ca86b1e97fa88c48bd3d724ac3e02988d0da296140 size: 2005\r\n```\r\nHere's that same section of output from the 0.56 release:\r\n```\r\nSuccessfully tagged ***/datasette:0.56\r\nUsing default tag: latest\r\nThe push refers to repository [docker.io/***/datasette]\r\n4d4a9976adcc: Preparing\r\n...\r\n9b2132a0d5cf: Pushed\r\nlatest: digest: sha256:2250d0fbe57b1d615a8d6df0c9d43deb9533532e00bac68854773d8ff8dcf00a size: 1793\r\n```\r\nThe difference here is the \"Using default tag: latest\" bit.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1281#issuecomment-808999525", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1281", "id": 808999525, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk5OTUyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:00:38Z", "updated_at": "2021-03-29T01:00:38Z", "author_association": "OWNER", "body": "Here's the diff between `Dockerfile` in 0.54.1 and 0.56: https://github.com/simonw/datasette/compare/0.54.1...0.56#diff-551d1fcf87f78cc3bc18a7b332a4dc5d8773a512062df881c5aba28a6f5c48d7\r\n\r\n\"Banners_and_Alerts_and_Comparing_0_54_1___0_56_\u00b7_simonw_datasette\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842881221, "label": "Latest Datasette tags missing from Docker Hub"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-808998719", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 808998719, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk5ODcxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:57:13Z", "updated_at": "2021-03-29T00:57:13Z", "author_association": "OWNER", "body": "I just shipped Datasette 0.56 - here's the CI run: https://github.com/simonw/datasette/runs/2214701802?check_suite_focus=true\r\n\r\nIt pushed a new `latest` tag to https://hub.docker.com/r/datasetteproject/datasette/tags?page=1&ordering=last_updated\r\n\r\n docker pull datasetteproject/datasette:latest\r\n\r\nAnd then:\r\n\r\n docker run datasetteproject/datasette:latest datasette \\\r\n --load-extension=spatialite \\\r\n --get /-/versions.json | jq .sqlite\r\n\r\nOutputs:\r\n```json\r\n{\r\n \"version\": \"3.27.2\",\r\n \"fts_versions\": [\r\n \"FTS5\",\r\n \"FTS4\",\r\n \"FTS3\"\r\n ],\r\n \"extensions\": {\r\n \"json1\": null,\r\n \"spatialite\": \"5.0.1\"\r\n },\r\n \"compile_options\": [\r\n \"COMPILER=gcc-8.3.0\",\r\n \"ENABLE_COLUMN_METADATA\",\r\n \"ENABLE_DBSTAT_VTAB\",\r\n \"ENABLE_FTS3\",\r\n \"ENABLE_FTS3_PARENTHESIS\",\r\n \"ENABLE_FTS3_TOKENIZER\",\r\n \"ENABLE_FTS4\",\r\n \"ENABLE_FTS5\",\r\n \"ENABLE_JSON1\",\r\n \"ENABLE_LOAD_EXTENSION\",\r\n \"ENABLE_PREUPDATE_HOOK\",\r\n \"ENABLE_RTREE\",\r\n \"ENABLE_SESSION\",\r\n \"ENABLE_STMTVTAB\",\r\n \"ENABLE_UNLOCK_NOTIFY\",\r\n \"ENABLE_UPDATE_DELETE_LIMIT\",\r\n \"HAVE_ISNAN\",\r\n \"LIKE_DOESNT_MATCH_BLOBS\",\r\n \"MAX_SCHEMA_RETRY=25\",\r\n \"MAX_VARIABLE_NUMBER=250000\",\r\n \"OMIT_LOOKASIDE\",\r\n \"SECURE_DELETE\",\r\n \"SOUNDEX\",\r\n \"TEMP_STORE=1\",\r\n \"THREADSAFE=1\",\r\n \"USE_URI\"\r\n ]\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": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1031#issuecomment-808989067", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1031", "id": 808989067, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4OTA2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:23:41Z", "updated_at": "2021-03-29T00:23:41Z", "author_association": "OWNER", "body": "This bug should have been fixed in #1229 - let me know if that's not the case!\r\n\r\nThanks", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724369025, "label": "Fallback to databases in inspect-data.json when no -i options are passed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1260#issuecomment-808988697", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1260", "id": 808988697, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4ODY5Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:22:21Z", "updated_at": "2021-03-29T00:22:21Z", "author_association": "OWNER", "body": "This is interesting!\r\n\r\nI've decided to apply a subset of these - the `if` and `elif` blocks are a deliberate style choice from me, because I find code clearer when it has if/else as opposed to relying on early termination. Likewise the iteration against `.keys()` on dictionaries.\r\n\r\nI like the other fixes though, I'm about to land them in a separate commit that credits you.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 831163537, "label": "Fix: code quality issues"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1229#issuecomment-808987304", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1229", "id": 808987304, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4NzMwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:17:13Z", "updated_at": "2021-03-29T00:17:13Z", "author_association": "OWNER", "body": "Thanks for figuring this out!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 810507413, "label": "ensure immutable databses when starting in configuration directory mode with"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1252#issuecomment-808986495", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1252", "id": 808986495, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4NjQ5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:13:59Z", "updated_at": "2021-03-29T00:13:59Z", "author_association": "OWNER", "body": "Neat fix, thank you!", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 1, \"eyes\": 0}", "issue": {"value": 825217564, "label": "Add back styling to lists within table cells (fixes #1141)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1279#issuecomment-808986036", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1279", "id": 808986036, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4NjAzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:11:50Z", "updated_at": "2021-03-29T00:11:50Z", "author_association": "OWNER", "body": "Thanks for the fix.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842556944, "label": "Minor Docs Update. Added `--app` to fly install command."}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1280#issuecomment-808983160", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1280", "id": 808983160, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4MzE2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-28T23:59:28Z", "updated_at": "2021-03-29T00:10:05Z", "author_association": "OWNER", "body": "Might be easier to do this using https://github.com/coleifer/pysqlite3 rather than try to replace the system `sqlite3` on the Ubuntu GitHub Actions instances.\r\n\r\nThese instructions should help: https://github.com/coleifer/pysqlite3#building-a-statically-linked-library", "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/issues/1276#issuecomment-808981968", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1276", "id": 808981968, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4MTk2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-28T23:52:31Z", "updated_at": "2021-03-28T23:52:31Z", "author_association": "OWNER", "body": "Testing this on Glitch by adding `https://github.com/simonw/datasette/archive/48d5e0e6ac8975cfd869d4e8c69c64ca0c65e29e.zip` as a dependency. That fixed it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841456306, "label": "Invalid SQL: \"no such table: pragma_database_list\" on database page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1276#issuecomment-808979608", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1276", "id": 808979608, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk3OTYwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-28T23:38:34Z", "updated_at": "2021-03-28T23:38:34Z", "author_association": "OWNER", "body": "Aha! https://www.sqlite.org/pragma.html says:\r\n\r\n> The table-valued functions for PRAGMA feature was added in SQLite version 3.16.0 (2017-01-02). Prior versions of SQLite cannot use this feature. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841456306, "label": "Invalid SQL: \"no such table: pragma_database_list\" on database page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1276#issuecomment-808979218", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1276", "id": 808979218, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk3OTIxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-28T23:35:53Z", "updated_at": "2021-03-28T23:36:26Z", "author_association": "OWNER", "body": "Here's where I run that: https://github.com/simonw/datasette/blob/6f41c8a2bef309a66588b2875c3e24d26adb4850/datasette/database.py#L249-L253\r\n\r\nThat's from when I added the `--crossdb` option in #1232: https://github.com/simonw/datasette/commit/6f41c8a2bef309a66588b2875c3e24d26adb4850#diff-4e20309c969326a0008dc9237f6807f48d55783315fbfc1e7dfa480b550e16f9R249", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841456306, "label": "Invalid SQL: \"no such table: pragma_database_list\" on database page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1276#issuecomment-808979049", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1276", "id": 808979049, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk3OTA0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-28T23:34:38Z", "updated_at": "2021-03-28T23:34:38Z", "author_association": "OWNER", "body": "The Glitch server logs showed:\r\n\r\n> `ERROR: conn=, sql = 'select seq, name, file from pragma_database_list() where seq > 0', params = None: no such table: pragma_database_list`\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841456306, "label": "Invalid SQL: \"no such table: pragma_database_list\" on database page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1276#issuecomment-808978808", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1276", "id": 808978808, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk3ODgwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-28T23:32:58Z", "updated_at": "2021-03-28T23:33:58Z", "author_association": "OWNER", "body": "I just managed to replicate this bug on Glitch: https://nicar-2020.glitch.me/data\r\n\r\n> Invalid SQL\r\n> no such table: pragma_database_list\r\n\r\nhttps://nicar-2020.glitch.me/-/versions says:\r\n\r\n```json\r\n{\r\n \"python\": {\r\n \"version\": \"3.7.10\",\r\n \"full\": \"3.7.10 (default, Feb 20 2021, 21:21:24) \\n[GCC 5.4.0 20160609]\"\r\n },\r\n \"datasette\": {\r\n \"version\": \"0.55\"\r\n },\r\n \"asgi\": \"3.0\",\r\n \"uvicorn\": \"0.13.4\",\r\n \"sqlite\": {\r\n \"version\": \"3.11.0\",\r\n \"fts_versions\": [\r\n \"FTS4\",\r\n \"FTS3\"\r\n ],\r\n \"extensions\": {\r\n \"json1\": null\r\n },\r\n \"compile_options\": [\r\n \"ENABLE_COLUMN_METADATA\",\r\n \"ENABLE_DBSTAT_VTAB\",\r\n \"ENABLE_FTS3\",\r\n \"ENABLE_FTS3_PARENTHESIS\",\r\n \"ENABLE_JSON1\",\r\n \"ENABLE_LOAD_EXTENSION\",\r\n \"ENABLE_RTREE\",\r\n \"ENABLE_UNLOCK_NOTIFY\",\r\n \"ENABLE_UPDATE_DELETE_LIMIT\",\r\n \"HAVE_ISNAN\",\r\n \"LIKE_DOESNT_MATCH_BLOBS\",\r\n \"MAX_SCHEMA_RETRY=25\",\r\n \"OMIT_LOOKASIDE\",\r\n \"SECURE_DELETE\",\r\n \"SOUNDEX\",\r\n \"SYSTEM_MALLOC\",\r\n \"TEMP_STORE=1\",\r\n \"THREADSAFE=1\"\r\n ]\r\n }\r\n}\r\n```\r\nThat's [SQLite 3.11.0 from 2016-02-15](https://www.sqlite.org/releaselog/3_11_0.html) with no FTS5.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841456306, "label": "Invalid SQL: \"no such table: pragma_database_list\" on database page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1273#issuecomment-808759984", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1273", "id": 808759984, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODc1OTk4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T16:43:17Z", "updated_at": "2021-03-27T16:43:17Z", "author_association": "OWNER", "body": "That rivers example in the tutorial would work a lot better with a live demo.", "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/1273#issuecomment-808757721", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1273", "id": 808757721, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODc1NzcyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T16:25:48Z", "updated_at": "2021-03-27T16:25:48Z", "author_association": "OWNER", "body": "> This will give you back an additional column of GeoJSON. You can copy and paste GeoJSON from this column into the debugging tool at geojson.io to visualize it on a map.\r\n\r\nThat should promote `datasette-leaflet-geojson` instead.", "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/1090#issuecomment-808757659", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1090", "id": 808757659, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODc1NzY1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T16:25:25Z", "updated_at": "2021-03-27T16:25:25Z", "author_association": "OWNER", "body": "Related feature request: ability to set default values for canned queries: #1258", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 741862364, "label": "Custom widgets for canned query forms"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1090#issuecomment-808757155", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1090", "id": 808757155, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODc1NzE1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T16:21:43Z", "updated_at": "2021-03-27T16:21:43Z", "author_association": "OWNER", "body": "Idea for these: imitate https://django-sql-dashboard.readthedocs.io/en/latest/widgets.html#custom-widgets and drive them with templates.\r\n\r\nSo a custom widget type of `textarea` would look for a template called `widgets/textarea.html` - which means users could define brand new custom widgets just by creating their own template files.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 741862364, "label": "Custom widgets for canned query forms"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1273#issuecomment-808756921", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1273", "id": 808756921, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODc1NjkyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T16:19:45Z", "updated_at": "2021-03-27T16:26:28Z", "author_association": "OWNER", "body": "I have a better recipe for using spatial indexes now on https://simonwillison.net/2021/Jan/24/drawing-shapes-spatialite/\r\n```sql\r\nselect\r\n AsGeoJSON(geometry), *\r\nfrom\r\n CPAD_2020a_SuperUnits\r\nwhere\r\n PARK_NAME like '%mini%' and\r\n Intersects(GeomFromGeoJSON(:freedraw), geometry) = 1\r\n and CPAD_2020a_SuperUnits.rowid in (\r\n select\r\n rowid\r\n from\r\n SpatialIndex\r\n where\r\n f_table_name = 'CPAD_2020a_SuperUnits'\r\n and search_frame = GeomFromGeoJSON(:freedraw)\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": 838382890, "label": "Refresh SpatiaLite documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1278#issuecomment-808756366", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1278", "id": 808756366, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODc1NjM2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T16:15:47Z", "updated_at": "2021-03-27T16:15:47Z", "author_association": "OWNER", "body": "https://timezones-api.datasette.io/ is now up and running on Cloud Run.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842416110, "label": "SpatiaLite timezones demo is broken"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1278#issuecomment-808652008", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1278", "id": 808652008, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY1MjAwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:47:17Z", "updated_at": "2021-03-27T04:47:17Z", "author_association": "OWNER", "body": "https://github.com/simonw/timezones-api is that project, it's pretty old now. I'll try to get it running on Cloud Run.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842416110, "label": "SpatiaLite timezones demo is broken"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1258#issuecomment-808651088", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1258", "id": 808651088, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY1MTA4OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:41:52Z", "updated_at": "2021-03-27T04:42:14Z", "author_association": "OWNER", "body": "Right now they look like this:\r\n```yaml\r\ndatabases:\r\n fixtures:\r\n queries:\r\n neighborhood_search:\r\n params:\r\n - text\r\n```\r\nIn addition to being able to specify defaults, I'd also like to add other things in the future - most significantly the ability to specify a different input widget (e.g. textarea v.s. single-line input)\r\n\r\nSo maybe this looks like:\r\n```yaml\r\nparams:\r\n- name: text\r\n default: \"\"\r\n- name: age\r\n widget: number\r\n```", "reactions": "{\"total_count\": 3, \"+1\": 3, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 828858421, "label": "Allow canned query params to specify default values"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1258#issuecomment-808650266", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1258", "id": 808650266, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY1MDI2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:37:07Z", "updated_at": "2021-03-27T04:37:07Z", "author_association": "OWNER", "body": "I like that idea.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 828858421, "label": "Allow canned query params to specify default values"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-808649480", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 808649480, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY0OTQ4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:32:10Z", "updated_at": "2021-03-27T04:32:10Z", "author_association": "OWNER", "body": "I'll close this issue after I ship Datasette 0.56 and confirm that the Dockerfile was correctly built and published to Docker Hub.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-808649322", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 808649322, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY0OTMyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:31:28Z", "updated_at": "2021-03-27T04:31:28Z", "author_association": "OWNER", "body": "One last test of that Dockerfile:\r\n```\r\n(datasette) datasette % docker build -f Dockerfile -t datasetteproject/datasette:0.55a --build-arg VERSION=0.55 .\r\n(datasette) datasette % docker run datasetteproject/datasette:0.55a datasette --get '/-/versions.json' | jq\r\n{\r\n \"python\": {\r\n \"version\": \"3.9.2\",\r\n \"full\": \"3.9.2 (default, Feb 19 2021, 17:23:45) \\n[GCC 8.3.0]\"\r\n },\r\n \"datasette\": {\r\n \"version\": \"0.55\"\r\n },\r\n \"asgi\": \"3.0\",\r\n \"uvicorn\": \"0.13.4\",\r\n \"sqlite\": {\r\n \"version\": \"3.27.2\",\r\n \"fts_versions\": [\r\n \"FTS5\",\r\n \"FTS4\",\r\n \"FTS3\"\r\n ],\r\n \"extensions\": {\r\n \"json1\": null\r\n },\r\n \"compile_options\": [\r\n \"COMPILER=gcc-8.3.0\",\r\n \"ENABLE_COLUMN_METADATA\",\r\n \"ENABLE_DBSTAT_VTAB\",\r\n \"ENABLE_FTS3\",\r\n \"ENABLE_FTS3_PARENTHESIS\",\r\n \"ENABLE_FTS3_TOKENIZER\",\r\n \"ENABLE_FTS4\",\r\n \"ENABLE_FTS5\",\r\n \"ENABLE_JSON1\",\r\n \"ENABLE_LOAD_EXTENSION\",\r\n \"ENABLE_PREUPDATE_HOOK\",\r\n \"ENABLE_RTREE\",\r\n \"ENABLE_SESSION\",\r\n \"ENABLE_STMTVTAB\",\r\n \"ENABLE_UNLOCK_NOTIFY\",\r\n \"ENABLE_UPDATE_DELETE_LIMIT\",\r\n \"HAVE_ISNAN\",\r\n \"LIKE_DOESNT_MATCH_BLOBS\",\r\n \"MAX_SCHEMA_RETRY=25\",\r\n \"MAX_VARIABLE_NUMBER=250000\",\r\n \"OMIT_LOOKASIDE\",\r\n \"SECURE_DELETE\",\r\n \"SOUNDEX\",\r\n \"TEMP_STORE=1\",\r\n \"THREADSAFE=1\",\r\n \"USE_URI\"\r\n ]\r\n }\r\n}\r\n(datasette) datasette % docker run datasetteproject/datasette:0.55a datasette --get '/-/versions.json' --load-extension=spatialite | jq\r\n{\r\n \"python\": {\r\n \"version\": \"3.9.2\",\r\n \"full\": \"3.9.2 (default, Feb 19 2021, 17:23:45) \\n[GCC 8.3.0]\"\r\n },\r\n \"datasette\": {\r\n \"version\": \"0.55\"\r\n },\r\n \"asgi\": \"3.0\",\r\n \"uvicorn\": \"0.13.4\",\r\n \"sqlite\": {\r\n \"version\": \"3.27.2\",\r\n \"fts_versions\": [\r\n \"FTS5\",\r\n \"FTS4\",\r\n \"FTS3\"\r\n ],\r\n \"extensions\": {\r\n \"json1\": null,\r\n \"spatialite\": \"5.0.1\"\r\n },\r\n \"compile_options\": [\r\n \"COMPILER=gcc-8.3.0\",\r\n \"ENABLE_COLUMN_METADATA\",\r\n \"ENABLE_DBSTAT_VTAB\",\r\n \"ENABLE_FTS3\",\r\n \"ENABLE_FTS3_PARENTHESIS\",\r\n \"ENABLE_FTS3_TOKENIZER\",\r\n \"ENABLE_FTS4\",\r\n \"ENABLE_FTS5\",\r\n \"ENABLE_JSON1\",\r\n \"ENABLE_LOAD_EXTENSION\",\r\n \"ENABLE_PREUPDATE_HOOK\",\r\n \"ENABLE_RTREE\",\r\n \"ENABLE_SESSION\",\r\n \"ENABLE_STMTVTAB\",\r\n \"ENABLE_UNLOCK_NOTIFY\",\r\n \"ENABLE_UPDATE_DELETE_LIMIT\",\r\n \"HAVE_ISNAN\",\r\n \"LIKE_DOESNT_MATCH_BLOBS\",\r\n \"MAX_SCHEMA_RETRY=25\",\r\n \"MAX_VARIABLE_NUMBER=250000\",\r\n \"OMIT_LOOKASIDE\",\r\n \"SECURE_DELETE\",\r\n \"SOUNDEX\",\r\n \"TEMP_STORE=1\",\r\n \"THREADSAFE=1\",\r\n \"USE_URI\"\r\n ]\r\n }\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": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1272#issuecomment-808648974", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1272", "id": 808648974, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY0ODk3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:29:42Z", "updated_at": "2021-03-27T04:29:42Z", "author_association": "OWNER", "body": "I'm skipping this for the moment because the new Dockerfile shape introduced in https://github.com/simonw/datasette/issues/1249#issuecomment-804404544 isn't compatible with this technique, since it installs Datasette from PyPI rather than directly from the repo.\r\n\r\nWill need to change that if I want to do this unit tests thing.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 838245338, "label": "Unit tests for the Dockerfile"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1272#issuecomment-808647937", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1272", "id": 808647937, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY0NzkzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T04:23:19Z", "updated_at": "2021-03-27T04:23:36Z", "author_association": "OWNER", "body": "Part of the challenge here is only running if a Docker daemon is available. I think this pattern works, in `tests/test_dockerfile.py`:\r\n```python\r\nimport httpx\r\nimport pathlib\r\nimport pytest\r\nimport subprocess\r\n\r\nroot = pathlib.Path(__file__).parent.parent\r\n\r\ndef docker_is_available():\r\n try:\r\n client = httpx.Client(\r\n transport=httpx.HTTPTransport(uds=\"/var/run/docker.sock\")\r\n )\r\n client.get(\"http://docker/info\")\r\n return True\r\n except httpx.ConnectError:\r\n return False\r\n\r\n\r\n@pytest.fixture\r\ndef build_container():\r\n assert (root / \"Dockerfile\").exists()\r\n subprocess.check_call([\r\n \"docker\", \"build\", str(root), \"-t\", \"datasette-dockerfile-test\"\r\n ])\r\n\r\n\r\n@pytest.mark.skipif(not docker_is_available(),\r\n reason=\"Docker is not available\"\r\n)\r\ndef test_dockerfile(build_container):\r\n output = subprocess.check_output([\r\n \"docker\", \"run\", \"datasette-dockerfile-test\", \"datasette\", \"--get\", \"/_memory?sql=select+1&shape=_array\"\r\n ])\r\n assert False, \"Implement better assertion here\"\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 838245338, "label": "Unit tests for the Dockerfile"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1276#issuecomment-808642405", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1276", "id": 808642405, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY0MjQwNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T03:53:18Z", "updated_at": "2021-03-27T03:53:18Z", "author_association": "OWNER", "body": "That's really odd. What version of SQLite are you using on the server? You can tell by visiting `https://your-site/-/versions`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841456306, "label": "Invalid SQL: \"no such table: pragma_database_list\" on database page"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1277#issuecomment-808641846", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1277", "id": 808641846, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODY0MTg0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-27T03:49:34Z", "updated_at": "2021-03-27T03:49:34Z", "author_association": "OWNER", "body": "I fixed this already, it's a duplicate of #1239", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842212586, "label": "Facet by array breaks if table name contains a space"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/252#issuecomment-808302971", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/252", "id": 808302971, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODMwMjk3MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-26T15:21:38Z", "updated_at": "2021-03-26T15:21:38Z", "author_association": "OWNER", "body": "Already got that! It's the `--nl` option - works for both importing and exporting data: https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-json-data", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 842062949, "label": "Support json-line files"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/251#issuecomment-807647791", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/251", "id": 807647791, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNzY0Nzc5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-25T22:42:48Z", "updated_at": "2021-03-25T22:44:31Z", "author_association": "OWNER", "body": "Idea: enhance `lambda` to allow it to return a dictionary of values, which will then be used to populate new columns. Use a `--multicolumn` option to indicate this:\r\n\r\n sqlite-utils convert lambda mydb.db mytable mycolumn \\\r\n --code '{\"first_name\": value.split()[0], \"last_name\": value.split()[1]}' \\\r\n --multicolumn --drop\r\n\r\nThe `--drop` means \"drop the `mycolumn` column after making this change\".\r\n\r\nMaybe `--multi` is a better name than `--multicolumn` here, since either way it's going to need additional explanation somewhere.\r\n\r\nWould this overlap with #239 at all?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 841377702, "label": "\"sqlite-utils convert\" command to replace the separate \"sqlite-transform\" tool"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/251#issuecomment-807642041", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/251", "id": 807642041, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNzY0MjA0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-25T22:39:22Z", "updated_at": "2021-03-25T22:39:22Z", "author_association": "OWNER", "body": "Here's the full current implementation of that tool: https://github.com/simonw/sqlite-transform/blob/0.5/sqlite_transform/cli.py\r\n\r\nMy current plan is to make this functionality available as the following:\r\n\r\n sqlite-utils convert jsonsplit mydb.db mytable mycolumn\r\n sqlite-utils convert parsedatetime mydb.db mytable mycolumn\r\n sqlite-utils convert parsedate mydb.db mytable mycolumn\r\n sqlite-utils convert lambda mydb.db mytable mycolumn --code='str(value).upper()'\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": 841377702, "label": "\"sqlite-utils convert\" command to replace the separate \"sqlite-transform\" tool"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/741#issuecomment-806166575", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/741", "id": 806166575, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNjE2NjU3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-24T20:30:33Z", "updated_at": "2021-03-24T20:30:33Z", "author_association": "OWNER", "body": "`datasette package` is a mostly unmaintained feature at this point - it has a bit of test coverage but I've not made any improvements to it in a few years, and I don't use it for my own projects.\r\n\r\nI'll make this change to `package` at the same time as I land it for `publish` though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607223136, "label": "Replace \"datasette publish --extra-options\" with \"--setting\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1274#issuecomment-805216038", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1274", "id": 805216038, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTIxNjAzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T20:14:53Z", "updated_at": "2021-03-23T20:14:53Z", "author_association": "OWNER", "body": "Yes this is one of the main reasons I'm planning to switch to encouraging YAML be default instead of JSON (while still supporting JSON) - YAML supports comments and multi-line strings.\r\n\r\nSee #1153 for YAML by default in the documentation.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 839008371, "label": "Might there be some way to comment metadata.json?"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805109341", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805109341, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTEwOTM0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T17:55:48Z", "updated_at": "2021-03-23T18:41:57Z", "author_association": "OWNER", "body": "Beginnings of a UI element for switching between them:\r\n```html\r\n
\r\nJSON\r\nYAML\r\n
\r\n```\r\n\"Metadata_\u2014_Datasette_documentation\"\r\n\r\nThat `
` has a padding of 12px, so using 12px padding on the tab links should get them to line up better.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-805033155", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 805033155, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTAzMzE1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:12:13Z", "updated_at": "2021-03-23T16:12:13Z", "author_association": "OWNER", "body": "Don't forget to update this bit of the docs: https://docs.datasette.io/en/0.55/spatialite.html#building-spatialite-from-source\r\n\r\n> The packaged versions of SpatiaLite usually provide SpatiaLite 4.3.0a. For an example of how to build the most recent unstable version, 4.4.0-RC0 (which includes the powerful [VirtualKNN module](https://www.gaia-gis.it/fossil/libspatialite/wiki?name=KNN)), take a look at the [Datasette Dockerfile](https://github.com/simonw/datasette/blob/master/Dockerfile).\r\n\r\nSee also #1273", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1270#issuecomment-805058241", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1270", "id": 805058241, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA1ODI0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:45:39Z", "updated_at": "2021-03-23T16:45:39Z", "author_association": "OWNER", "body": "I managed to build SpatiaLite such that this isn't necessary any more. I'm still interested in pursuing this further though - it feels like it could be a more robust way of implementing timeouts, but I need to prove to myself that it's better (maybe better performance, or handles more edge-cases?). Not sure how to prove that yet.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 837350092, "label": "Try implementing SQLite timeouts using .interrupt() instead of using .set_progress_handler()"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805056806", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805056806, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA1NjgwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:43:38Z", "updated_at": "2021-03-23T16:43:38Z", "author_association": "OWNER", "body": "I used this code to get that:\r\n```javascript\r\nvar jsonVersion = JSON.stringify(window.jsyaml.load(document.querySelector('.highlight-yaml').textContent), null, 4);\r\ndiv.querySelector('.highlight pre').innerText = jsonVersion;\r\ndiv.querySelector('.highlight pre').style.whiteSpace = 'pre-wrap'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805055291", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805055291, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA1NTI5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:41:31Z", "updated_at": "2021-03-23T16:41:31Z", "author_association": "OWNER", "body": "One downside of doing this conversion in JavaScript: it's much harder to get the same JSON syntax highlighting as that provided by Sphinx:\r\n\r\n\"Metadata_\u2014_Datasette_documentation\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805050163", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805050163, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA1MDE2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:34:35Z", "updated_at": "2021-03-23T16:35:32Z", "author_association": "OWNER", "body": "https://docs.datasette.io/en/stable/metadata.html has this example:\r\n```yaml\r\ntitle: Demonstrating Metadata from YAML\r\ndescription_html: |-\r\n  

This description includes a long HTML string

\r\n
    \r\n
  • YAML is better for embedding HTML strings than JSON!
  • \r\n
\r\nlicense: ODbL\r\nlicense_url: https://opendatacommons.org/licenses/odbl/\r\ndatabases:\r\n fixtures:\r\n tables:\r\n no_primary_key:\r\n hidden: true\r\n queries:\r\n neighborhood_search:\r\n sql: |-\r\n select neighborhood, facet_cities.name, state\r\n from facetable join facet_cities on facetable.city_id = facet_cities.id\r\n where neighborhood like '%' || :text || '%' order by neighborhood;\r\n title: Search neighborhoods\r\n description_html: |-\r\n

This demonstrates basic LIKE search\r\n```\r\n\r\nI ran this in the browser dev tools:\r\n```javascript\r\nvar s = document.createElement('script')\r\ns.src = 'https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.0.0/js-yaml.min.js'\r\ndocument.head.appendChild(s)\r\nvar yamlExample = document.querySelector('.highlight-yaml').textContent);\r\nconsole.log(JSON.stringify(window.jsyaml.load(yamlExample), null, 4))\r\n```\r\nAnd got:\r\n```json\r\n{\r\n \"title\": \"Demonstrating Metadata from YAML\",\r\n \"description_html\": \"

This description includes a long HTML string

\\n
    \\n
  • YAML is better for embedding HTML strings than JSON!
  • \\n
\",\r\n \"license\": \"ODbL\",\r\n \"license_url\": \"https://opendatacommons.org/licenses/odbl/\",\r\n \"databases\": {\r\n \"fixtures\": {\r\n \"tables\": {\r\n \"no_primary_key\": {\r\n \"hidden\": true\r\n }\r\n },\r\n \"queries\": {\r\n \"neighborhood_search\": {\r\n \"sql\": \"select neighborhood, facet_cities.name, state\\nfrom facetable join facet_cities on facetable.city_id = facet_cities.id\\nwhere neighborhood like '%' || :text || '%' order by neighborhood;\",\r\n \"title\": \"Search neighborhoods\",\r\n \"description_html\": \"

This demonstrates basic LIKE search\"\r\n }\r\n }\r\n }\r\n }\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": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805047117", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805047117, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA0NzExNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:30:15Z", "updated_at": "2021-03-23T16:46:06Z", "author_association": "OWNER", "body": "https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.0.0/js-yaml.min.js is only 12.5KB zipped, 38KB total - so that's not a bad option.\r\n\r\nhttps://github.com/nodeca/js-yaml", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805042880", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805042880, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA0Mjg4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:24:32Z", "updated_at": "2021-03-23T16:24:32Z", "author_association": "OWNER", "body": "... actually I think I would do that conversion in Python. The client-side YAML parsers all look a little bit heavy to me in terms of additional page weight.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1153#issuecomment-805041522", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1153", "id": 805041522, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNTA0MTUyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T16:22:46Z", "updated_at": "2021-03-23T16:22:46Z", "author_association": "OWNER", "body": "That's a good idea. I could do that with JavaScript - loading YAML and converting it to JSON in JavaScript shouldn't be hard, and it's better than JSON-to-YAML because there's only one correct JSON representation of a YAML file whereas you can represent a JSON document in YAML in a bunch of different ways.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771202454, "label": "Use YAML examples in documentation by default, not JSON"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/163#issuecomment-804540869", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/163", "id": 804540869, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNDU0MDg2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-23T02:44:33Z", "updated_at": "2021-03-23T02:44:33Z", "author_association": "OWNER", "body": "Comments welcome!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 279547886, "label": "Document the querystring argument for setting a different time limit"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-804406675", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 804406675, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNDQwNjY3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-22T21:26:27Z", "updated_at": "2021-03-22T21:26:27Z", "author_association": "OWNER", "body": "(Without the `apt-get update ...` SpatiaLite line it's 125MB)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-804404544", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 804404544, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNDQwNDU0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-22T21:22:56Z", "updated_at": "2021-03-22T21:24:24Z", "author_association": "OWNER", "body": "Final version of Dockerfile which installs the specified version from GitHub:\r\n\r\n docker build . -t datasette-spatialite --build-arg VERSION=0.55\r\n\r\n```dockerfile\r\nFROM python:3.9.2-slim-buster as build\r\n\r\n# Version of Datasette to install, e.g. 0.55\r\n# docker build . -t datasette --build-arg VERSION=0.55\r\nARG VERSION\r\n\r\n# software-properties-common provides add-apt-repository\r\n# which we need in order to install a more recent release\r\n# of libsqlite3-mod-spatialite from the sid distribution\r\nRUN apt-get update && \\\r\n apt-get -y --no-install-recommends install software-properties-common && \\\r\n add-apt-repository \"deb http://httpredir.debian.org/debian sid main\" && \\\r\n apt-get update && \\\r\n apt-get -t sid install -y --no-install-recommends libsqlite3-mod-spatialite && \\\r\n apt-get remove -y software-properties-common && \\\r\n apt clean && \\\r\n rm -rf /var/lib/apt && \\\r\n rm -rf /var/lib/dpkg\r\n\r\nRUN pip install https://github.com/simonw/datasette/archive/refs/tags/${VERSION}.zip && \\\r\n find /usr/local/lib -name '__pycache__' | xargs rm -r && \\\r\n rm -rf /root/.cache/pip\r\n\r\nEXPOSE 8001\r\nCMD [\"datasette\"]\r\n```\r\nRun against 0.55 this produces an image of 262MB", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-804338678", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 804338678, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNDMzODY3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-22T19:33:43Z", "updated_at": "2021-03-22T19:33:43Z", "author_association": "OWNER", "body": "Replacing `rm -rf /var/lib/{apt,dpkg,cache,log}/` with \r\n```\r\n rm -rf /var/lib/apt && \\\r\n rm -rf /var/lib/dpkg\r\n```\r\nGot the size down to 305MB.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-804318314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 804318314, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNDMxODMxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-22T19:04:30Z", "updated_at": "2021-03-22T19:04:30Z", "author_association": "OWNER", "body": "Considering the image on Docker Hub right now is `383MB` this is actually an improvement.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1249#issuecomment-804317545", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1249", "id": 804317545, "node_id": "MDEyOklzc3VlQ29tbWVudDgwNDMxNzU0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-22T19:03:22Z", "updated_at": "2021-03-22T19:03:22Z", "author_association": "OWNER", "body": "This Dockerfile:\r\n```dockerfile\r\nFROM python:3.9.2-slim-buster as build\r\n\r\n# software-properties-common provides add-apt-repository\r\nRUN apt-get update && \\\r\n apt-get -y install software-properties-common && \\\r\n add-apt-repository \"deb http://httpredir.debian.org/debian sid main\" && \\\r\n apt-get update && \\\r\n apt-get -t sid install -y libsqlite3-mod-spatialite && \\\r\n apt clean && \\\r\n rm -rf /var/lib/{apt,dpkg,cache,log}/\r\n\r\nRUN pip install datasette\r\n\r\nEXPOSE 8001\r\nCMD [\"datasette\"]\r\n```\r\nProduces a 344MB image that includes a working SpatiaLite 5.0 module. And weirdly... it doesn't exhibit the hanging bug!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 824064069, "label": "Updated Dockerfile with SpatiaLite version 5.0"}, "performed_via_github_app": null}