issue_comments
7 rows where author_association = "OWNER", issue = 1430797211 and user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Figure out design for JSON errors (consider RFC 7807) · 7 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1314620086 | https://github.com/simonw/datasette/issues/1875#issuecomment-1314620086 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5OW4K2 | simonw 9599 | 2022-11-15T01:09:56Z | 2022-11-15T01:09:56Z | OWNER | Rough initial prototype: ```diff diff --git a/datasette/views/table.py b/datasette/views/table.py index 8b987221..518ac578 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -1103,19 +1103,30 @@ class TableInsertView(BaseView): except json.JSONDecodeError as e: return _errors(["Invalid JSON: {}".format(e)]) if not isinstance(data, dict): - return _errors(["JSON must be a dictionary"]) + return _errors([{"detail": "JSON must be a dictionary", "pointer": "#/"}]) keys = data.keys()
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 | |
1314615592 | https://github.com/simonw/datasette/issues/1875#issuecomment-1314615592 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5OW3Eo | simonw 9599 | 2022-11-15T01:04:28Z | 2022-11-15T01:04:28Z | OWNER | Worth noting this bit in RFC 7807:
So the list of It fits what I need to do though, so I'm inclined to stick with it anyway. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 | |
1314545407 | https://github.com/simonw/datasette/issues/1875#issuecomment-1314545407 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5OWl7_ | simonw 9599 | 2022-11-14T23:30:34Z | 2022-11-14T23:30:34Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 | ||
1314491884 | https://github.com/simonw/datasette/issues/1875#issuecomment-1314491884 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5OWY3s | simonw 9599 | 2022-11-14T22:26:11Z | 2022-11-14T22:26:54Z | OWNER | Spec looks pretty simple:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 | |
1314491150 | https://github.com/simonw/datasette/issues/1875#issuecomment-1314491150 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5OWYsO | simonw 9599 | 2022-11-14T22:25:20Z | 2022-11-14T22:25:20Z | OWNER | That's using JSON Pointer: https://www.rfc-editor.org/rfc/rfc6901 There's a Python library for that here https://github.com/stefankoegl/python-json-pointer/blob/master/jsonpointer.py - which looks simple and clean and well maintained and documented, but it only handles the "what is at this pointer within this JSON object" case - I need to generate the correct JSON pointer to explain where my error is. So I think I'll end up hand-rolling this. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 | |
1314488010 | https://github.com/simonw/datasette/issues/1875#issuecomment-1314488010 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5OWX7K | simonw 9599 | 2022-11-14T22:21:43Z | 2022-11-14T22:21:43Z | OWNER | Here's the most relevant example from the RFC spec:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 | |
1313114283 | https://github.com/simonw/datasette/issues/1875#issuecomment-1313114283 | https://api.github.com/repos/simonw/datasette/issues/1875 | IC_kwDOBm6k_c5ORIir | simonw 9599 | 2022-11-14T05:20:00Z | 2022-11-14T05:20:00Z | OWNER | I started a conversation about JSON error standards on Mastodon here: https://fedi.simonwillison.net/web/@simon/109338725610487457 Quite a few people pointed to this RFC independently. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Figure out design for JSON errors (consider RFC 7807) 1430797211 |
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]);
user 1