issue_comments
28 rows where author_association = "OWNER", "created_at" is on date 2021-08-09, reactions = "{"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}" and user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: issue_url, created_at (date), updated_at (date)
user 1
- simonw · 28 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
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 | |
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 | |
895572309 | https://github.com/simonw/sqlite-utils/issues/310#issuecomment-895572309 | https://api.github.com/repos/simonw/sqlite-utils/issues/310 | IC_kwDOCGYnMM41YVlV | simonw 9599 | 2021-08-09T21:46:15Z | 2021-08-09T21:46:15Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --flatten` option to flatten nested JSON 964400482 | ||
895571420 | https://github.com/simonw/sqlite-utils/issues/310#issuecomment-895571420 | https://api.github.com/repos/simonw/sqlite-utils/issues/310 | IC_kwDOCGYnMM41YVXc | simonw 9599 | 2021-08-09T21:44:38Z | 2021-08-09T21:44:38Z | OWNER | When I ship this I should update the TILs at https://til.simonwillison.net/cloudrun/tailing-cloud-run-request-logs and https://til.simonwillison.net/jq/flatten-nested-json-objects-jq to reference it. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --flatten` option to flatten nested JSON 964400482 | |
895522818 | https://github.com/simonw/datasette/issues/1426#issuecomment-895522818 | https://api.github.com/repos/simonw/datasette/issues/1426 | IC_kwDOBm6k_c41YJgC | simonw 9599 | 2021-08-09T20:34:10Z | 2021-08-09T20:34:10Z | OWNER | At the very least Datasette should serve a blank |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Manage /robots.txt in Datasette core, block robots by default 964322136 | |
895510773 | https://github.com/simonw/datasette/issues/1426#issuecomment-895510773 | https://api.github.com/repos/simonw/datasette/issues/1426 | IC_kwDOBm6k_c41YGj1 | simonw 9599 | 2021-08-09T20:14:50Z | 2021-08-09T20:19:22Z | OWNER | https://twitter.com/mal/status/1424825895139876870
That's another aspect of this: if you DO want your site crawled, teaching the Annoyingly it looks like you need to configure an auth token of some sort in order to use their API though, which is likely too much hassle to be worth building into Datasette itself: https://developers.google.com/search/apis/indexing-api/v3/using-api ``` curl -X POST https://indexing.googleapis.com/v3/urlNotifications:publish -d '{ "url": "https://careers.google.com/jobs/google/technical-writer", "type": "URL_UPDATED" }' -H "Content-Type: application/json" { "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "status": "UNAUTHENTICATED" } } ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Manage /robots.txt in Datasette core, block robots by default 964322136 | |
895509536 | https://github.com/simonw/datasette/issues/1426#issuecomment-895509536 | https://api.github.com/repos/simonw/datasette/issues/1426 | IC_kwDOBm6k_c41YGQg | simonw 9599 | 2021-08-09T20:12:57Z | 2021-08-09T20:12:57Z | OWNER | I could try out the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Manage /robots.txt in Datasette core, block robots by default 964322136 | |
895500565 | https://github.com/simonw/datasette/issues/1426#issuecomment-895500565 | https://api.github.com/repos/simonw/datasette/issues/1426 | IC_kwDOBm6k_c41YEEV | simonw 9599 | 2021-08-09T20:00:04Z | 2021-08-09T20:00:04Z | OWNER | A few options for how this would work:
Options could be:
The "limited" mode is particularly interesting. Could even make it the default, but I think that may be a bit too confusing. Idea would be to get the key pages indexed but use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Manage /robots.txt in Datasette core, block robots by default 964322136 | |
894930013 | https://github.com/simonw/datasette/issues/1421#issuecomment-894930013 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4xd | simonw 9599 | 2021-08-09T03:38:06Z | 2021-08-09T03:38:06Z | OWNER | Amusing edge-case: if you run this against a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894929769 | https://github.com/simonw/datasette/issues/1421#issuecomment-894929769 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4tp | simonw 9599 | 2021-08-09T03:36:49Z | 2021-08-09T03:36:49Z | OWNER | SQLite carries a warning about using
I think that's OK here, because of the regular expression fallback. If the format changes in the future in a way that breaks the query the error should be caught and the regex-captured parameters should be returned instead. Hmmm... actually that's not entirely true: https://github.com/simonw/datasette/blob/b1fed48a95516ae84c0f020582303ab50ab817e2/datasette/utils/init.py#L1084-L1091 If the format changes such that the same columns are returned but the I'm going to take that risk for the moment, but I'll actively watch out for problems in the future. If this does turn out to be bad I can always go back to the pure regular expression mechanism. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894929080 | https://github.com/simonw/datasette/issues/1421#issuecomment-894929080 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4i4 | simonw 9599 | 2021-08-09T03:33:02Z | 2021-08-09T03:33:02Z | OWNER | Fixed! Fantastic, this one has been bothering me for years. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894927185 | https://github.com/simonw/datasette/issues/1421#issuecomment-894927185 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V4FR | simonw 9599 | 2021-08-09T03:25:01Z | 2021-08-09T03:25:01Z | OWNER | One catch with this approach: if the SQL query is invalid, the parameters will not be extracted and shown as form fields. Maybe that's completely fine? Why display a form if it's going to break when the user actually runs the query? But it does bother me. I worry that someone who is still iterating on and editing their query before actually starting to use it might find the behaviour confusing. So maybe if the query raises an exception it could fall back on the regular expression results? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894925914 | https://github.com/simonw/datasette/issues/1421#issuecomment-894925914 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V3xa | simonw 9599 | 2021-08-09T03:20:42Z | 2021-08-09T03:20:42Z | OWNER | I think this works! ```python re_named_parameter = re.compile(":([a-zA-Z0-9]+)") async def derive_named_parameters(db, sql): explain = 'explain {}'.format(sql.strip().rstrip(";")) possible_params = _re_named_parameter.findall(sql) try: results = await db.execute(explain, {p: None for p in possible_params}) return [row["p4"].lstrip(":") for row in results if row["opcode"] == "Variable"] except sqlite3.DatabaseError: return [] ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894925437 | https://github.com/simonw/datasette/issues/1421#issuecomment-894925437 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V3p9 | simonw 9599 | 2021-08-09T03:19:00Z | 2021-08-09T03:19:00Z | OWNER | This may not work:
The I could try using the regex to pull out candidates and passing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894922703 | https://github.com/simonw/datasette/issues/1421#issuecomment-894922703 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V2_P | simonw 9599 | 2021-08-09T03:09:29Z | 2021-08-09T03:09:29Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | ||
894922145 | https://github.com/simonw/datasette/issues/1421#issuecomment-894922145 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V22h | simonw 9599 | 2021-08-09T03:07:38Z | 2021-08-09T03:07:38Z | OWNER | I hoped this would work:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894921512 | https://github.com/simonw/datasette/issues/1421#issuecomment-894921512 | https://api.github.com/repos/simonw/datasette/issues/1421 | IC_kwDOBm6k_c41V2so | simonw 9599 | 2021-08-09T03:05:26Z | 2021-08-09T03:05:26Z | OWNER | I may have a way to work around this, using
But... if I run addr | opcode | p1 | p2 | p3 | p4 | p5 | comment -- | -- | -- | -- | -- | -- | -- | -- 20 | ResultRow | 6 | 10 | 0 | | 0 | 21 | Next | 0 | 3 | 0 | | 1 | 22 | Halt | 0 | 0 | 0 | | 0 | 23 | Transaction | 0 | 0 | 35 | 0 | 1 | 24 | Variable | 1 | 2 | 0 | :state | 0 | 25 | Variable | 2 | 3 | 0 | :on_earth | 0 | 26 | String8 | 0 | 4 | 0 | 00:04 | 0 | 27 | Goto | 0 | 1 | 0 | | 0 | Could it be as simple as pulling out those |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
"Query parameters" form shows wrong input fields if query contains "03:31" style times 959999095 | |
894900267 | https://github.com/simonw/datasette/issues/1425#issuecomment-894900267 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41Vxgr | simonw 9599 | 2021-08-09T01:31:22Z | 2021-08-09T01:31:22Z | OWNER | I used this to build a new plugin: https://github.com/simonw/datasette-query-links |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894893319 | https://github.com/simonw/datasette/issues/1425#issuecomment-894893319 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41Vv0H | simonw 9599 | 2021-08-09T01:08:56Z | 2021-08-09T01:09:12Z | OWNER | Demo: https://latest.datasette.io/fixtures/simple_primary_key shows |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894884874 | https://github.com/simonw/datasette/issues/1425#issuecomment-894884874 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41VtwK | simonw 9599 | 2021-08-09T00:38:20Z | 2021-08-09T00:38:20Z | OWNER | I'm trying the version where I remove |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894883664 | https://github.com/simonw/datasette/issues/1425#issuecomment-894883664 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41VtdQ | simonw 9599 | 2021-08-09T00:33:56Z | 2021-08-09T00:33:56Z | OWNER | I could extract that code out and write my own function which implements the equivalent of calling That's pretty nasty. Could I instead call the plugin hook normally, but then have additional logic which says "if I await it and it returns I could remove the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894882642 | https://github.com/simonw/datasette/issues/1425#issuecomment-894882642 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41VtNS | simonw 9599 | 2021-08-09T00:29:57Z | 2021-08-09T00:29:57Z | OWNER | Here's the code in
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894882123 | https://github.com/simonw/datasette/issues/1425#issuecomment-894882123 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41VtFL | simonw 9599 | 2021-08-09T00:27:43Z | 2021-08-09T00:27:43Z | OWNER | Good news: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894881448 | https://github.com/simonw/datasette/issues/1425#issuecomment-894881448 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41Vs6o | simonw 9599 | 2021-08-09T00:24:25Z | 2021-08-09T00:24:39Z | OWNER | My hunch is that the "skip this Could that be because Pluggy handles the "do the next if This would suggest that all of the Still don't see why it would pass on my laptop but fail in CI though. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 | |
894881016 | https://github.com/simonw/datasette/issues/1425#issuecomment-894881016 | https://api.github.com/repos/simonw/datasette/issues/1425 | IC_kwDOBm6k_c41Vsz4 | simonw 9599 | 2021-08-09T00:21:53Z | 2021-08-09T00:21:53Z | OWNER | Still one test failure: ``` def test_hook_render_cell_link_from_json(app_client): sql = """ select '{"href": "http://example.com/", "label":"Example"}' """.strip() path = "/fixtures?" + urllib.parse.urlencode({"sql": sql}) response = app_client.get(path) td = Soup(response.body, "html.parser").find("table").find("tbody").find("td") a = td.find("a")
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
render_cell() hook should support returning an awaitable 963528457 |
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 5