issue_comments
8,358 rows where author_association = "OWNER" sorted by updated_at descending
This data as json, CSV (advanced)
user 1
- simonw 4,990
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
902191150 | https://github.com/simonw/datasette/issues/1442#issuecomment-902191150 | https://api.github.com/repos/simonw/datasette/issues/1442 | IC_kwDOBm6k_c41xlgu | simonw 9599 | 2021-08-19T19:43:05Z | 2021-08-19T19:43:59Z | OWNER | Maybe as simple as teaching https://github.com/simonw/datasette/blob/main/.github/workflows/deploy-latest.yml to run on pushes to ALL branches: And then quit early if the branch is not in some allow-list. If it IS in the allow-list, use the name of the branch to dynamically construct the name of the Cloud Run service here: https://github.com/simonw/datasette/blob/adb5b70de5cec3c3dd37184defe606a082c232cf/.github/workflows/deploy-latest.yml#L60 Need to skip the documentation build and deployment stuff for other branches though. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Mechanism to cause specific branches to deploy their own demos 974987856 | |
901475812 | https://github.com/simonw/datasette/issues/1293#issuecomment-901475812 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41u23k | simonw 9599 | 2021-08-18T22:41:19Z | 2021-08-18T22:41:19Z | OWNER |
I'm going to do this, and call the Python library |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
901452199 | https://github.com/simonw/sqlite-utils/issues/37#issuecomment-901452199 | https://api.github.com/repos/simonw/sqlite-utils/issues/37 | IC_kwDOCGYnMM41uxGn | simonw 9599 | 2021-08-18T21:48:57Z | 2021-08-18T21:48:57Z | OWNER | I did a bunch of work on this in #266. The library is now pretty thoroughly typed, and I even found a couple of bugs using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Experiment with type hints 465815372 | |
901440752 | https://github.com/simonw/sqlite-utils/issues/318#issuecomment-901440752 | https://api.github.com/repos/simonw/sqlite-utils/issues/318 | IC_kwDOCGYnMM41uuTw | simonw 9599 | 2021-08-18T21:25:30Z | 2021-08-18T21:25:30Z | OWNER | Some questions:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Research: handle gzipped CSV directly 974067156 | |
901440207 | https://github.com/simonw/sqlite-utils/issues/318#issuecomment-901440207 | https://api.github.com/repos/simonw/sqlite-utils/issues/318 | IC_kwDOCGYnMM41uuLP | simonw 9599 | 2021-08-18T21:24:28Z | 2021-08-18T21:24:49Z | OWNER | Something like this then:
Maybe add a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Research: handle gzipped CSV directly 974067156 | |
901403298 | https://github.com/simonw/sqlite-utils/issues/295#issuecomment-901403298 | https://api.github.com/repos/simonw/sqlite-utils/issues/295 | IC_kwDOCGYnMM41ulKi | simonw 9599 | 2021-08-18T20:19:04Z | 2021-08-18T20:19:04Z | OWNER | Thanks, this was a bug. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Insert with --tsv and --no-headers give error about --nl arguments 934123448 | |
901399139 | https://github.com/simonw/sqlite-utils/issues/296#issuecomment-901399139 | https://api.github.com/repos/simonw/sqlite-utils/issues/296 | IC_kwDOCGYnMM41ukJj | simonw 9599 | 2021-08-18T20:12:34Z | 2021-08-18T20:13:12Z | OWNER | Documentation for In the API reference: https://sqlite-utils.datasette.io/en/latest/reference.html#sqlite_utils.db.Table.search And for the CLI |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option 944326512 | |
901398216 | https://github.com/simonw/sqlite-utils/issues/296#issuecomment-901398216 | https://api.github.com/repos/simonw/sqlite-utils/issues/296 | IC_kwDOCGYnMM41uj7I | simonw 9599 | 2021-08-18T20:11:01Z | 2021-08-18T20:11:01Z | OWNER | ``` % sqlite-utils search fixtures.db searchable 'dog"' Error: malformed MATCH expression: [dog"] Try running this again with the --quote option ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option 944326512 | |
901390635 | https://github.com/simonw/sqlite-utils/issues/296#issuecomment-901390635 | https://api.github.com/repos/simonw/sqlite-utils/issues/296 | IC_kwDOCGYnMM41uiEr | simonw 9599 | 2021-08-18T19:58:53Z | 2021-08-18T19:58:53Z | OWNER |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option 944326512 | |
901379930 | https://github.com/simonw/sqlite-utils/issues/296#issuecomment-901379930 | https://api.github.com/repos/simonw/sqlite-utils/issues/296 | IC_kwDOCGYnMM41ufda | simonw 9599 | 2021-08-18T19:40:38Z | 2021-08-18T19:40:38Z | OWNER | Also add |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option 944326512 | |
901353345 | https://github.com/simonw/sqlite-utils/issues/246#issuecomment-901353345 | https://api.github.com/repos/simonw/sqlite-utils/issues/246 | IC_kwDOCGYnMM41uY-B | simonw 9599 | 2021-08-18T18:57:13Z | 2021-08-18T18:57:13Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Escaping FTS search strings 831751367 | ||
901338841 | https://github.com/simonw/sqlite-utils/issues/296#issuecomment-901338841 | https://api.github.com/repos/simonw/sqlite-utils/issues/296 | IC_kwDOCGYnMM41uVbZ | simonw 9599 | 2021-08-18T18:33:26Z | 2021-08-18T18:45:12Z | OWNER | I think I'll do this as an optional Actually I'll do |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option 944326512 | |
901345800 | https://github.com/simonw/sqlite-utils/issues/246#issuecomment-901345800 | https://api.github.com/repos/simonw/sqlite-utils/issues/246 | IC_kwDOCGYnMM41uXII | simonw 9599 | 2021-08-18T18:44:48Z | 2021-08-18T18:44:48Z | OWNER | The I'll be adding further improvements relating to this (a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Escaping FTS search strings 831751367 | |
901338988 | https://github.com/simonw/sqlite-utils/pull/247#issuecomment-901338988 | https://api.github.com/repos/simonw/sqlite-utils/issues/247 | IC_kwDOCGYnMM41uVds | simonw 9599 | 2021-08-18T18:33:39Z | 2021-08-18T18:33:39Z | OWNER | This was also requested in #296. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
FTS quote functionality from datasette 832687563 | |
901338356 | https://github.com/simonw/sqlite-utils/issues/296#issuecomment-901338356 | https://api.github.com/repos/simonw/sqlite-utils/issues/296 | IC_kwDOCGYnMM41uVT0 | simonw 9599 | 2021-08-18T18:32:39Z | 2021-08-18T18:32:39Z | OWNER | This is a good call. I have a fix for this in Datasette but it's not in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`table.search(..., quote=True)` parameter and `sqlite-utils search --quote` option 944326512 | |
901337305 | https://github.com/simonw/sqlite-utils/issues/317#issuecomment-901337305 | https://api.github.com/repos/simonw/sqlite-utils/issues/317 | IC_kwDOCGYnMM41uVDZ | simonw 9599 | 2021-08-18T18:30:59Z | 2021-08-18T18:30:59Z | OWNER | I'm just going to remove this - I added it when the library was mostly undocumented, but it has comprehensive documentation now. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Link to a better example on docs index 972827346 | |
900715375 | https://github.com/simonw/datasette/issues/1439#issuecomment-900715375 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r9Nv | simonw 9599 | 2021-08-18T00:15:28Z | 2021-08-18T00:15:28Z | OWNER | Maybe I should use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900714630 | https://github.com/simonw/datasette/issues/1439#issuecomment-900714630 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r9CG | simonw 9599 | 2021-08-18T00:13:33Z | 2021-08-18T00:13:33Z | OWNER | The documentation should definitely cover how table names become URLs, in case any third party code needs to be able to calculate this themselves. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900712981 | https://github.com/simonw/datasette/issues/1439#issuecomment-900712981 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r8oV | simonw 9599 | 2021-08-18T00:09:59Z | 2021-08-18T00:12:32Z | OWNER | So given the original examples, a table called
And if for some horific reason you had a table with the name
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900711967 | https://github.com/simonw/datasette/issues/1439#issuecomment-900711967 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r8Yf | simonw 9599 | 2021-08-18T00:08:09Z | 2021-08-18T00:08:09Z | OWNER | Here's an alternative I just made up which I'm calling "dot dash" encoding: ```python def dot_dash_encode(s): return s.replace("-", "--").replace(".", "-.") def dot_dash_decode(s):
return s.replace("-.", ".").replace("--", "-")
hello.csv hello-.csv True hello-and-so-on.csv hello--and--so--on-.csv True hello-.csv hello---.csv True hello--and--so--on-.csv hello----and----so----on---.csv True hello.csv. hello-.csv-. True hello.csv.- hello-.csv-.-- True hello.csv.-- hello-.csv-.---- True ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900709703 | https://github.com/simonw/datasette/issues/1439#issuecomment-900709703 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r71H | simonw 9599 | 2021-08-18T00:03:09Z | 2021-08-18T00:03:09Z | OWNER | But... what if I invent my own escaping scheme? I actually did this once before, in https://github.com/simonw/datasette/commit/9fdb47ca952b93b7b60adddb965ea6642b1ff523 - while I was working on porting Datasette to ASGI in https://github.com/simonw/datasette/issues/272#issuecomment-494192779 because ASGI didn't yet have the I could bring that back - it looked like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900705226 | https://github.com/simonw/datasette/issues/1439#issuecomment-900705226 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r6vK | simonw 9599 | 2021-08-17T23:50:32Z | 2021-08-17T23:50:47Z | OWNER | An alternative solution would be to use some form of escaping for the characters that form the name of the table. The obvious way to do this would be URL-encoding - but it doesn't hold for ``` Against Cloud Run:curl -s 'https://datasette.io/-/asgi-scope/foo/bar%2Fbaz%2E' | rg path 'path': '/-/asgi-scope/foo/bar/baz.', 'raw_path': b'/-/asgi-scope/foo/bar%2Fbaz.', 'root_path': '', Against Vercel:curl -s 'https://til.simonwillison.net/-/asgi-scope/foo/bar%2Fbaz%2E' | rg path 'path': '/-/asgi-scope/foo/bar%2Fbaz%2E', 'raw_path': b'/-/asgi-scope/foo/bar%2Fbaz%2E', 'root_path': '', ``` Surprisingly in this case Vercel DOES keep it intact, but Cloud Run does not. It's still no good though: I need a solution that works on Vercel, Cloud Run and every other potential hosting provider too. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900699670 | https://github.com/simonw/datasette/issues/1439#issuecomment-900699670 | https://api.github.com/repos/simonw/datasette/issues/1439 | IC_kwDOBm6k_c41r5YW | simonw 9599 | 2021-08-17T23:34:23Z | 2021-08-17T23:34:23Z | OWNER | The challenge comes down to telling the difference between the following:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047 | |
900690998 | https://github.com/simonw/datasette/issues/1438#issuecomment-900690998 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41r3Q2 | simonw 9599 | 2021-08-17T23:11:16Z | 2021-08-17T23:12:25Z | OWNER | I have completely failed to replicate this initial bug - but it's still there on the
Whit outputs this:
It looks like, rather than being URL-encoded, the original query string is somehow making it through to Jinja and then being auto-escaped there. The weird thing is that the equivalent query executed against my
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | |
900681413 | https://github.com/simonw/datasette/issues/1438#issuecomment-900681413 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41r07F | simonw 9599 | 2021-08-17T22:47:44Z | 2021-08-17T22:47:44Z | OWNER | I deployed another copy of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | |
900518343 | https://github.com/simonw/datasette/issues/1438#issuecomment-900518343 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41rNHH | simonw 9599 | 2021-08-17T18:04:42Z | 2021-08-17T18:04:42Z | OWNER | Here's how |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | |
900516826 | https://github.com/simonw/datasette/issues/1438#issuecomment-900516826 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41rMva | simonw 9599 | 2021-08-17T18:02:27Z | 2021-08-17T18:02:27Z | OWNER | The key difference I can spot between Vercel and Cloud Run is that Vercel~ % curl -s 'https://til.simonwillison.net/-/asgi-scope?sql=select++from+tunes+where+name+like+%22%25wise+maid%25%22%0D%0A' | rg 'query_string' -C 2 'method': 'GET', 'path': '/-/asgi-scope', 'query_string': b'sql=select%20%20from%20tunes%20where%20name%20like%20%22%25' b'wise%20maid%25%22%0D%0A', 'raw_path': b'/-/asgi-scope', Cloud Run~ % curl -s 'https://latest-with-plugins.datasette.io/-/asgi-scope?sql=select++from+tunes+where+name+like+%22%25wise+maid%25%22%0D%0A' | rg 'query_string' -C 2 'method': 'GET', 'path': '/-/asgi-scope', 'query_string': b'sql=select++from+tunes+where+name+like+%22%25wise+maid%25%2' b'2%0D%0A', 'raw_path': b'/-/asgi-scope', ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | |
900513267 | https://github.com/simonw/datasette/issues/1438#issuecomment-900513267 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41rL3z | simonw 9599 | 2021-08-17T17:57:05Z | 2021-08-17T17:57:05Z | OWNER | I'm having trouble replicating this bug outside of Vercel. Against Cloud Run: view-source:https://latest.datasette.io/fixtures?sql=select+*+from+searchable+where+text1+like+%22%25cat%25%22 The HTML here is: ```html ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | |
900502364 | https://github.com/simonw/datasette/issues/1438#issuecomment-900502364 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41rJNc | simonw 9599 | 2021-08-17T17:40:41Z | 2021-08-17T17:40:41Z | OWNER | Bug is likely in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | |
900500824 | https://github.com/simonw/datasette/issues/1438#issuecomment-900500824 | https://api.github.com/repos/simonw/datasette/issues/1438 | IC_kwDOBm6k_c41rI1Y | simonw 9599 | 2021-08-17T17:38:16Z | 2021-08-17T17:38:16Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions 972918533 | ||
899915829 | https://github.com/simonw/datasette/issues/1293#issuecomment-899915829 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41o6A1 | simonw 9599 | 2021-08-17T01:02:35Z | 2021-08-17T01:02:35Z | OWNER | New approach: this time I'm building a simplified executor for the bytecode operations themselves.
{'registers': {1: ('String', 'hello'),
2: ('Integer', 55),
3: ('rowid', {'table': 0}),
4: ('rowid', {'table': 0}),
5: ('column', {'cursor': 0, 'column_offset': 1}),
6: ('column', {'cursor': 0, 'column_offset': 2}),
7: ('column', {'cursor': 0, 'column_offset': 3})},
'cursors': {0: ('database_table', {'rootpage': 32, 'connection': 0})},
'result_row': [('String', 'hello'),
('Integer', 55),
('rowid', {'table': 0}),
('rowid', {'table': 0}),
('column', {'cursor': 0, 'column_offset': 1}),
('column', {'cursor': 0, 'column_offset': 2}),
('column', {'cursor': 0, 'column_offset': 3})]}
{'registers': {1: ('column', {'cursor': 4, 'column_offset': 0}),
2: ('MakeRecord', {'registers': [0, 1, 2, 3]}),
3: ('column', {'cursor': 0, 'column_offset': 1}),
4: ('column', {'cursor': 3, 'column_offset': 0})},
'cursors': {3: ('ephemeral',
{'num_columns': 1,
'index_keys': [('MakeRecord', {'registers': [0, 1]}),
('MakeRecord', {'registers': [0, 1]}),
('MakeRecord', {'registers': [0, 1, 2, 3]})]}),
2: ('database_table', {'rootpage': 44, 'connection': 0}),
4: ('database_table', {'rootpage': 24, 'connection': 0}),
0: ('database_table', {'rootpage': 42, 'connection': 0})},
'result_row': [('column', {'cursor': 3, 'column_offset': 0})]}
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
899749881 | https://github.com/simonw/datasette/issues/1423#issuecomment-899749881 | https://api.github.com/repos/simonw/datasette/issues/1423 | IC_kwDOBm6k_c41oRf5 | simonw 9599 | 2021-08-16T19:07:02Z | 2021-08-16T19:07:02Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show count of facet values if ?_facet_size=max 962391325 | ||
899744109 | https://github.com/simonw/datasette/issues/1423#issuecomment-899744109 | https://api.github.com/repos/simonw/datasette/issues/1423 | IC_kwDOBm6k_c41oQFt | simonw 9599 | 2021-08-16T18:58:29Z | 2021-08-16T18:58:29Z | OWNER | I didn't bother with the tooltip, just the visible display if |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show count of facet values if ?_facet_size=max 962391325 | |
898961535 | https://github.com/simonw/datasette/issues/1293#issuecomment-898961535 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41lRB_ | simonw 9599 | 2021-08-14T21:37:24Z | 2021-08-14T21:37:24Z | OWNER | Did some more research into building SQLite custom versions via |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898936068 | https://github.com/simonw/datasette/issues/1293#issuecomment-898936068 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41lK0E | simonw 9599 | 2021-08-14T17:44:54Z | 2021-08-14T17:44:54Z | OWNER | Another interesting query to consider: https://latest.datasette.io/fixtures?sql=explain+select+*+from++pragma_table_info%28+%27123_starts_with_digits%27%29 That one shows |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898933865 | https://github.com/simonw/datasette/issues/1293#issuecomment-898933865 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41lKRp | simonw 9599 | 2021-08-14T17:27:16Z | 2021-08-14T17:28:29Z | OWNER | Maybe I split this out into a separate Python library that gets tested against every SQLite release I can possibly try it against, and then bakes out the supported release versions into the library code itself? Datasette could depend on that library. The library could be released independently of Datasette any time a new SQLite version comes out. I could even run a separate git scraper repo that checks for new SQLite releases and submits PRs against the library when a new release comes out. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898913629 | https://github.com/simonw/datasette/issues/1293#issuecomment-898913629 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41lFVd | simonw 9599 | 2021-08-14T16:14:12Z | 2021-08-14T16:14:12Z | OWNER | I would feel a lot more comfortable about all of this if I had a robust mechanism for running the Datasette test suite against multiple versions of SQLite itself. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898913554 | https://github.com/simonw/datasette/issues/1293#issuecomment-898913554 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41lFUS | simonw 9599 | 2021-08-14T16:13:40Z | 2021-08-14T16:13:40Z | OWNER | I think I need to care about the following:
That might be enough. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898824020 | https://github.com/simonw/sqlite-utils/issues/316#issuecomment-898824020 | https://api.github.com/repos/simonw/sqlite-utils/issues/316 | IC_kwDOCGYnMM41kvdU | simonw 9599 | 2021-08-14T05:12:23Z | 2021-08-14T05:12:23Z | OWNER | No visible backticks on https://sqlite-utils.datasette.io/en/latest/reference.html any more. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Fix visible backticks on reference page 970320615 | |
898788262 | https://github.com/simonw/datasette/issues/1293#issuecomment-898788262 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41kmum | simonw 9599 | 2021-08-14T01:22:26Z | 2021-08-14T01:51:08Z | OWNER | Tried a more complicated query:
0 Init 0 41 0 00 Start at 41 Frustratingly SQLite seems to be able to figure that out just fine, see the column of comments on the right hand side - but I only get those in the Maybe the key to that is this section:
IdxInsert:
IdxLE:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898760808 | https://github.com/simonw/datasette/issues/1293#issuecomment-898760808 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41kgBo | simonw 9599 | 2021-08-13T23:03:01Z | 2021-08-13T23:03:01Z | OWNER | Another idea: strip out any |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898760020 | https://github.com/simonw/datasette/issues/1293#issuecomment-898760020 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41kf1U | simonw 9599 | 2021-08-13T23:00:28Z | 2021-08-13T23:01:27Z | OWNER | New theory: this is all about 0 Init 0 25 0 00 Start at 25 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898576097 | https://github.com/simonw/datasette/issues/1293#issuecomment-898576097 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jy7h | simonw 9599 | 2021-08-13T16:19:57Z | 2021-08-13T16:19:57Z | OWNER | I think I need to look out for After all of that I'll be able to resolve that "table 3" reference. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898572065 | https://github.com/simonw/datasette/issues/1293#issuecomment-898572065 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jx8h | simonw 9599 | 2021-08-13T16:13:16Z | 2021-08-13T16:13:16Z | OWNER | Aha! That So if the This is really convoluted. I'm no longer confident I can get this to work in a sensible way, especially since I've not started exploring what complex nested tables with CTEs and sub-selects do yet. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898569319 | https://github.com/simonw/datasette/issues/1293#issuecomment-898569319 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jxRn | simonw 9599 | 2021-08-13T16:09:01Z | 2021-08-13T16:10:48Z | OWNER | Need to figure out what column 2 of that pseudo-table is. I think the answer is here:
In which case column 2 would be But the debug code said "r[8]=state". |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898567974 | https://github.com/simonw/datasette/issues/1293#issuecomment-898567974 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jw8m | simonw 9599 | 2021-08-13T16:07:00Z | 2021-08-13T16:07:00Z | OWNER | So this line:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898564705 | https://github.com/simonw/datasette/issues/1293#issuecomment-898564705 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jwJh | simonw 9599 | 2021-08-13T16:02:12Z | 2021-08-13T16:04:06Z | OWNER | More debug output:
It looks like that
Python code:
``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898554859 | https://github.com/simonw/datasette/issues/1293#issuecomment-898554859 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jtvr | simonw 9599 | 2021-08-13T15:46:18Z | 2021-08-13T15:46:18Z | OWNER | So it looks like the bug is in the code that populates |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898554427 | https://github.com/simonw/datasette/issues/1293#issuecomment-898554427 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jto7 | simonw 9599 | 2021-08-13T15:45:32Z | 2021-08-13T15:45:32Z | OWNER | Some useful debug output:
Python code:
``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898545815 | https://github.com/simonw/datasette/issues/1293#issuecomment-898545815 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jriX | simonw 9599 | 2021-08-13T15:31:53Z | 2021-08-13T15:31:53Z | OWNER | My hunch here is that registers or columns are being reused in a way that makes my code break - my code is pretty dumb, there are places in it where maybe the first mention of a register wins instead of the last one? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898541972 | https://github.com/simonw/datasette/issues/1293#issuecomment-898541972 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jqmU | simonw 9599 | 2021-08-13T15:26:06Z | 2021-08-13T15:29:06Z | OWNER | ResultRow:
Column:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898541543 | https://github.com/simonw/datasette/issues/1293#issuecomment-898541543 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jqfn | simonw 9599 | 2021-08-13T15:25:26Z | 2021-08-13T15:25:26Z | OWNER | But the debug output here seems to be saying what we want it to say:
Why then are we seeing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898540260 | https://github.com/simonw/datasette/issues/1293#issuecomment-898540260 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jqLk | simonw 9599 | 2021-08-13T15:23:28Z | 2021-08-13T15:23:28Z | OWNER | SorterInsert:
SorterData:
OpenPseudo:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898536181 | https://github.com/simonw/datasette/issues/1293#issuecomment-898536181 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jpL1 | simonw 9599 | 2021-08-13T15:17:20Z | 2021-08-13T15:20:33Z | OWNER | Documentation for Running 0 Init 0 15 0 00 Start at 15 0 Init 0 25 0 00 Start at 25 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898527525 | https://github.com/simonw/datasette/issues/1293#issuecomment-898527525 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jnEl | simonw 9599 | 2021-08-13T15:08:03Z | 2021-08-13T15:08:03Z | OWNER | Am I going to need to look at the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898524057 | https://github.com/simonw/datasette/issues/1293#issuecomment-898524057 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jmOZ | simonw 9599 | 2021-08-13T15:06:37Z | 2021-08-13T15:06:37Z | OWNER | Comparing the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898519924 | https://github.com/simonw/datasette/issues/1293#issuecomment-898519924 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jlN0 | simonw 9599 | 2021-08-13T15:03:36Z | 2021-08-13T15:03:36Z | OWNER | Weird edge-case: adding an Without order by this gets it right: With order by: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898517872 | https://github.com/simonw/datasette/issues/1293#issuecomment-898517872 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jktw | simonw 9599 | 2021-08-13T15:00:50Z | 2021-08-13T15:00:50Z | OWNER | The primary key column (or type | name | tbl_name | rootpage | sql -- | -- | -- | -- | -- table | simple_primary_key | simple_primary_key | 2 | CREATE TABLE simple_primary_key ( id varchar(30) primary key, content text ) index | sqlite_autoindex_simple_primary_key_1 | simple_primary_key | 3 | |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898506647 | https://github.com/simonw/datasette/issues/1293#issuecomment-898506647 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41jh-X | simonw 9599 | 2021-08-13T14:43:19Z | 2021-08-13T14:43:19Z | OWNER | Work will continue in PR #1434. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898185944 | https://github.com/simonw/datasette/issues/1429#issuecomment-898185944 | https://api.github.com/repos/simonw/datasette/issues/1429 | IC_kwDOBm6k_c41iTrY | simonw 9599 | 2021-08-13T04:37:41Z | 2021-08-13T04:37:41Z | OWNER | If a count is available and the count is less than 1,000 it could say "Show all" instead. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
UI for setting `?_size=max` on table page 969548935 | |
898084675 | https://github.com/simonw/datasette/issues/1432#issuecomment-898084675 | https://api.github.com/repos/simonw/datasette/issues/1432 | IC_kwDOBm6k_c41h69D | simonw 9599 | 2021-08-13T01:11:30Z | 2021-08-13T01:11:30Z | OWNER | It's only |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rename Datasette.__init__(config=) parameter to settings= 969855774 | |
898079507 | https://github.com/simonw/datasette/issues/1432#issuecomment-898079507 | https://api.github.com/repos/simonw/datasette/issues/1432 | IC_kwDOBm6k_c41h5sT | simonw 9599 | 2021-08-13T01:08:42Z | 2021-08-13T01:09:41Z | OWNER | This is going to break some plugins: https://ripgrep.datasette.io/-/ripgrep?pattern=config%3D&literal=on&glob=%21datasette%2F**
I should fix those as soon as this goes out in a release. I won't close this issue until then. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rename Datasette.__init__(config=) parameter to settings= 969855774 | |
898074849 | https://github.com/simonw/datasette/issues/1432#issuecomment-898074849 | https://api.github.com/repos/simonw/datasette/issues/1432 | IC_kwDOBm6k_c41h4jh | simonw 9599 | 2021-08-13T01:03:40Z | 2021-08-13T01:03:40Z | OWNER | Also this method: https://github.com/simonw/datasette/blob/77f46297a88ac7e49dad2139410b01ee56d5f99c/datasette/app.py#L422-L424 And the places that use it: Which is used in this template: https://github.com/simonw/datasette/blob/77f46297a88ac7e49dad2139410b01ee56d5f99c/datasette/templates/table.html#L204 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Rename Datasette.__init__(config=) parameter to settings= 969855774 | |
898072940 | https://github.com/simonw/datasette/issues/1431#issuecomment-898072940 | https://api.github.com/repos/simonw/datasette/issues/1431 | IC_kwDOBm6k_c41h4Fs | simonw 9599 | 2021-08-13T00:58:40Z | 2021-08-13T00:58:40Z | OWNER | While I'm doing this I should rename this internal variable to avoid confusion in the future: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`--help-config` should be called `--help-settings` 969840302 | |
813134386 | https://github.com/simonw/datasette/issues/1293#issuecomment-813134386 | https://api.github.com/repos/simonw/datasette/issues/1293 | MDEyOklzc3VlQ29tbWVudDgxMzEzNDM4Ng== | simonw 9599 | 2021-04-05T01:20:28Z | 2021-08-13T00:42:30Z | OWNER | ... that output might also provide a better way to extract variables than the current mechanism using a regular expression, by looking for the [UPDATE: it did indeed do that, see #1421] |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898066466 | https://github.com/simonw/datasette/issues/1293#issuecomment-898066466 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41h2gi | simonw 9599 | 2021-08-13T00:40:24Z | 2021-08-13T00:40:24Z | OWNER | It figures out renamed columns too: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898065948 | https://github.com/simonw/datasette/issues/1293#issuecomment-898065948 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41h2Yc | simonw 9599 | 2021-08-13T00:38:58Z | 2021-08-13T00:38:58Z | OWNER | Trying to run |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898065011 | https://github.com/simonw/datasette/issues/1293#issuecomment-898065011 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41h2Jz | simonw 9599 | 2021-08-13T00:36:30Z | 2021-08-13T00:36:30Z | OWNER |
Here's what it does for that: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898063815 | https://github.com/simonw/datasette/issues/1293#issuecomment-898063815 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41h13H | simonw 9599 | 2021-08-13T00:33:17Z | 2021-08-13T00:33:17Z | OWNER | Improved version of that function:
```diff diff --git a/datasette/templates/query.html b/datasette/templates/query.html index 75f7f1b..9fe1d4f 100644 --- a/datasette/templates/query.html +++ b/datasette/templates/query.html @@ -67,6 +67,8 @@ </form>+extra_column_info: {{ extra_column_info }} + {% if display_rows %} This data as {% for name, url in renderers.items() %}{{ name }}{{ ", " if not loop.last }}{% endfor %}, CSV <table class="rows-and-columns">
diff --git a/datasette/views/database.py b/datasette/views/database.py
index 7c36034..02f8039 100644
--- a/datasette/views/database.py
+++ b/datasette/views/database.py
@@ -10,6 +10,7 @@ import markupsafe
from datasette.utils import (
await_me_maybe,
check_visibility,
+ columns_for_query,
derive_named_parameters,
to_css_class,
validate_sql_select,
@@ -248,6 +249,8 @@ class QueryView(DataView):
query_error = None
+ extra_column_info = None
+
# Execute query - as write or as read
if write:
if request.method == "POST":
@@ -334,6 +337,10 @@ class QueryView(DataView):
database, sql, params_for_query, truncate=True, **extra_args
)
columns = [r[0] for r in results.description]
+
+ # Try to figure out extra column information
+ db = self.ds.get_database(database)
+ extra_column_info = await db.execute_fn(lambda conn: columns_for_query(conn, sql))
except sqlite3.DatabaseError as e:
query_error = e
results = None
@@ -462,6 +469,7 @@ class QueryView(DataView):
"show_hide_text": show_hide_text,
"show_hide_hidden": markupsafe.Markup(show_hide_hidden),
"hide_sql": hide_sql,
+ "extra_column_info": extra_column_info,
}
return (
``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898056013 | https://github.com/simonw/datasette/issues/1293#issuecomment-898056013 | https://api.github.com/repos/simonw/datasette/issues/1293 | IC_kwDOBm6k_c41hz9N | simonw 9599 | 2021-08-13T00:12:09Z | 2021-08-13T00:12:09Z | OWNER | Having added column metadata in #1430 (ref #942) I could also include a definition list at the top of the query results page exposing the column descriptions for any columns, using the same EXPLAIN mechanism. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Show column metadata plus links for foreign keys on arbitrary query results 849978964 | |
898051645 | https://github.com/simonw/datasette/issues/942#issuecomment-898051645 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hy49 | simonw 9599 | 2021-08-13T00:02:25Z | 2021-08-13T00:02:25Z | OWNER | And on mobile: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | |
898050457 | https://github.com/simonw/datasette/issues/942#issuecomment-898050457 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hymZ | simonw 9599 | 2021-08-12T23:59:53Z | 2021-08-12T23:59:53Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | ||
898037650 | https://github.com/simonw/datasette/issues/942#issuecomment-898037650 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hveS | simonw 9599 | 2021-08-12T23:23:54Z | 2021-08-12T23:23:54Z | OWNER | I like this enough that I'm going to ship it as an alpha and try it out on a couple of live projects. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | |
898037456 | https://github.com/simonw/datasette/issues/942#issuecomment-898037456 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hvbQ | simonw 9599 | 2021-08-12T23:23:34Z | 2021-08-12T23:23:34Z | OWNER | Prototype with a ```diff diff --git a/datasette/static/app.css b/datasette/static/app.css index c6be1e9..bf068fd 100644 --- a/datasette/static/app.css +++ b/datasette/static/app.css @@ -836,6 +841,16 @@ svg.dropdown-menu-icon { background-repeat: no-repeat; } +dl.column-descriptions dt { + font-weight: bold; +} +dl.column-descriptions dd { + padding-left: 1.5em; + white-space: pre-wrap; + line-height: 1.1em; + color: #666; +} + .anim-scale-in { animation-name: scale-in; animation-duration: 0.15s; diff --git a/datasette/templates/table.html b/datasette/templates/table.html index 211352b..466e8a4 100644 --- a/datasette/templates/table.html +++ b/datasette/templates/table.html @@ -51,6 +51,14 @@ {% block description_source_license %}{% include "_description_source_license.html" %}{% endblock %} +{% if metadata.columns %} +<dl class="column-descriptions"> + {% for column_name, column_description in metadata.columns.items() %} + <dt>{{ column_name }}</dt><dd>{{ column_description }}</dd> + {% endfor %} +</dl> +{% endif %} + {% if filtered_table_rows_count or human_description_en %} {% if filtered_table_rows_count or filtered_table_rows_count == 0 %}{{ "{:,}".format(filtered_table_rows_count) }} row{% if filtered_table_rows_count == 1 %}{% else %}s{% endif %}{% endif %} {% if human_description_en %}{{ human_description_en }}{% endif %} ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | |
898022235 | https://github.com/simonw/datasette/issues/942#issuecomment-898022235 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hrtb | simonw 9599 | 2021-08-12T22:52:23Z | 2021-08-12T22:52:23Z | OWNER | I like this. Need to solve for mobile though where the cog menu isn't visible - I think I'll do that with a definition list at the top of the page. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | |
898021895 | https://github.com/simonw/datasette/issues/942#issuecomment-898021895 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hroH | simonw 9599 | 2021-08-12T22:51:36Z | 2021-08-12T22:51:36Z | OWNER | Prototype:
var DROPDOWN_ICON_SVG = ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | |
897996296 | https://github.com/simonw/datasette/issues/942#issuecomment-897996296 | https://api.github.com/repos/simonw/datasette/issues/942 | IC_kwDOBm6k_c41hlYI | simonw 9599 | 2021-08-12T22:01:36Z | 2021-08-12T22:01:36Z | OWNER | I'm going with If I decide to make I'm OK with having both |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Support column descriptions in metadata.json 681334912 | |
897960049 | https://github.com/simonw/datasette/issues/1429#issuecomment-897960049 | https://api.github.com/repos/simonw/datasette/issues/1429 | IC_kwDOBm6k_c41hchx | simonw 9599 | 2021-08-12T20:53:04Z | 2021-08-12T20:53:04Z | OWNER | Maybe something like this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
UI for setting `?_size=max` on table page 969548935 | |
896381184 | https://github.com/simonw/sqlite-utils/issues/311#issuecomment-896381184 | https://api.github.com/repos/simonw/sqlite-utils/issues/311 | IC_kwDOCGYnMM41bbEA | simonw 9599 | 2021-08-10T23:33:33Z | 2021-08-10T23:33:33Z | OWNER | Now live at https://sqlite-utils.datasette.io/en/latest/reference.html TIL from what I learned today here: https://til.simonwillison.net/sphinx/sphinx-autodoc |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference documentation generated from docstrings 965102534 | |
896369551 | https://github.com/simonw/sqlite-utils/issues/314#issuecomment-896369551 | https://api.github.com/repos/simonw/sqlite-utils/issues/314 | IC_kwDOCGYnMM41bYOP | simonw 9599 | 2021-08-10T23:06:41Z | 2021-08-10T23:06:41Z | OWNER | I took a big bite out of this when I annotated the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Type signatures for `.create_table()` and `.create_table_sql()` and `.create()` and `Table.__init__` 965210966 | |
896344833 | https://github.com/simonw/sqlite-utils/issues/314#issuecomment-896344833 | https://api.github.com/repos/simonw/sqlite-utils/issues/314 | IC_kwDOCGYnMM41bSMB | simonw 9599 | 2021-08-10T22:07:34Z | 2021-08-10T22:07:34Z | OWNER | Also the I should probably define reusable types for things like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Type signatures for `.create_table()` and `.create_table_sql()` and `.create()` and `Table.__init__` 965210966 | |
896339144 | https://github.com/simonw/sqlite-utils/issues/315#issuecomment-896339144 | https://api.github.com/repos/simonw/sqlite-utils/issues/315 | IC_kwDOCGYnMM41bQzI | simonw 9599 | 2021-08-10T21:55:41Z | 2021-08-10T21:55:41Z | OWNER | Or should we raise an error if you attempt to call |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.delete_where()` returns `[]` when it should return self 965440017 | |
896284722 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896284722 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41bDgy | simonw 9599 | 2021-08-10T20:08:03Z | 2021-08-10T20:08:21Z | OWNER | Spotted a rogue backtick: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896200682 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896200682 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41au_q | simonw 9599 | 2021-08-10T18:03:40Z | 2021-08-10T18:03:40Z | OWNER | Adding type signatures to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896186025 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896186025 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41arap | simonw 9599 | 2021-08-10T17:42:51Z | 2021-08-10T17:42:51Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | ||
896182934 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896182934 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41aqqW | simonw 9599 | 2021-08-10T17:38:44Z | 2021-08-10T17:38:44Z | OWNER | From https://docs.readthedocs.io/en/stable/config-file/v2.html#packages it looks like I can tell Read The Docs to run ```yaml version: 2 sphinx: configuration: docs/conf.py python: version: "3.9" install: - method: pip path: . extra_requirements: - docs ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896180956 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896180956 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41aqLc | simonw 9599 | 2021-08-10T17:35:51Z | 2021-08-10T17:35:51Z | OWNER | Reading the rest of https://sphinx-rtd-tutorial.readthedocs.io/en/latest/sphinx-config.html#autodoc-configuration it suggests using a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896175438 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896175438 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41ao1O | simonw 9599 | 2021-08-10T17:28:19Z | 2021-08-10T17:28:19Z | OWNER | https://sphinx-rtd-tutorial.readthedocs.io/en/latest/sphinx-config.html#autodoc-configuration says do something like this at the top of
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896174456 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896174456 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41aol4 | simonw 9599 | 2021-08-10T17:27:01Z | 2021-08-10T17:27:01Z | OWNER | Docs are now building at https://sqlite-utils.datasette.io/en/autodoc/reference.html But there's a problem! The page is semi-blank: I need to teach Read The Docs how to ensure |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896156971 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896156971 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41akUr | simonw 9599 | 2021-08-10T17:04:22Z | 2021-08-10T17:05:59Z | OWNER | I'm going to get Read The Docs to build the docs for this branch too - on https://readthedocs.org/projects/sqlite-utils/versions/ I am clicking this button: I then set it to "active" (so pushes to the branch will build it) and "hidden" (so it wouldn't show up in search or in the navigation menu). https://docs.readthedocs.io/en/stable/versions.html#version-states |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896154028 | https://github.com/simonw/sqlite-utils/pull/312#issuecomment-896154028 | https://api.github.com/repos/simonw/sqlite-utils/issues/312 | IC_kwDOCGYnMM41ajms | simonw 9599 | 2021-08-10T17:01:06Z | 2021-08-10T17:01:06Z | OWNER | On Python 3.6:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference page to documentation using Sphinx autodoc 965143346 | |
896152812 | https://github.com/simonw/sqlite-utils/issues/311#issuecomment-896152812 | https://api.github.com/repos/simonw/sqlite-utils/issues/311 | IC_kwDOCGYnMM41ajTs | simonw 9599 | 2021-08-10T16:59:34Z | 2021-08-10T16:59:34Z | OWNER | Work will continue in PR #312. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference documentation generated from docstrings 965102534 | |
896149590 | https://github.com/simonw/sqlite-utils/issues/311#issuecomment-896149590 | https://api.github.com/repos/simonw/sqlite-utils/issues/311 | IC_kwDOCGYnMM41aihW | simonw 9599 | 2021-08-10T16:55:36Z | 2021-08-10T16:55:36Z | OWNER | I'm going to use this as an excuse to add a bunch more type signatures too, refs #266. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference documentation generated from docstrings 965102534 | |
896131902 | https://github.com/simonw/sqlite-utils/issues/311#issuecomment-896131902 | https://api.github.com/repos/simonw/sqlite-utils/issues/311 | IC_kwDOCGYnMM41aeM- | simonw 9599 | 2021-08-10T16:31:51Z | 2021-08-10T16:31:51Z | OWNER |
Fix was to change it to this:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Add reference documentation generated from docstrings 965102534 | |
895622908 | https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895622908 | https://api.github.com/repos/simonw/sqlite-utils/issues/309 | IC_kwDOCGYnMM41Yh78 | simonw 9599 | 2021-08-09T23:40:29Z | 2021-08-09T23:40:29Z | OWNER | TIL about how the stack inspection works: https://til.simonwillison.net/python/find-local-variables-in-exception-traceback |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert errors should show SQL and parameters, if possible 963897111 | |
895581038 | https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895581038 | https://api.github.com/repos/simonw/sqlite-utils/issues/309 | IC_kwDOCGYnMM41YXtu | simonw 9599 | 2021-08-09T22:03:54Z | 2021-08-09T23:39:53Z | OWNER | Steps to reproduce:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert errors should show SQL and parameters, if possible 963897111 | |
895592507 | https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895592507 | https://api.github.com/repos/simonw/sqlite-utils/issues/309 | IC_kwDOCGYnMM41Yag7 | simonw 9599 | 2021-08-09T22:26:28Z | 2021-08-09T22:33:48Z | OWNER | Demo:
```
$ echo '{"v": 34223049823094832094802398430298048240}' | sqlite-utils insert /tmp/blah.db row - sql = INSERT INTO [row] ([v]) VALUES (?); parameters = [34223049823094832094802398430298048240] ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert errors should show SQL and parameters, if possible 963897111 | |
895587441 | https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895587441 | https://api.github.com/repos/simonw/sqlite-utils/issues/309 | IC_kwDOCGYnMM41YZRx | simonw 9599 | 2021-08-09T22:15:45Z | 2021-08-09T22:15:45Z | OWNER | ``` OverflowError: Python int too large to convert to SQLite INTEGER
|
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert errors should show SQL and parameters, if possible 963897111 | |
895587282 | https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895587282 | https://api.github.com/repos/simonw/sqlite-utils/issues/309 | IC_kwDOCGYnMM41YZPS | simonw 9599 | 2021-08-09T22:15:25Z | 2021-08-09T22:15:25Z | OWNER | I'm going to use a bit of a dirty trick for this one: I'm going to recursively inspect the stack on an error and try to find the That way I can handle this all at the CLI layer without changing the exceptions that are being raised by the Python library. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert errors should show SQL and parameters, if possible 963897111 | |
895577012 | https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895577012 | https://api.github.com/repos/simonw/sqlite-utils/issues/309 | IC_kwDOCGYnMM41YWu0 | simonw 9599 | 2021-08-09T21:55:52Z | 2021-08-09T21:59:03Z | OWNER | Yeah this error message could certainly be more helpful. I thought |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
sqlite-utils insert errors should show SQL and parameters, if possible 963897111 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
issue >30