home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where "updated_at" is on date 2018-07-12 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 2

  • Sanely handle Infinity/-Infinity values in JSON using ?_json_infinity=1 4
  • Expose SANIC_RESPONSE_TIMEOUT config option in a sensible way 1

user 1

  • simonw · 5 ✖

author_association 1

  • OWNER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
404574598 https://github.com/simonw/datasette/issues/332#issuecomment-404574598 https://api.github.com/repos/simonw/datasette/issues/332 MDEyOklzc3VlQ29tbWVudDQwNDU3NDU5OA== simonw 9599 2018-07-12T16:39:51Z 2018-07-12T16:39:51Z OWNER

Since my data is all flat lists of values I don't think I need to customize the JSON encoder itself (no need to deal with nested values). I'll fix the data on its way into the encoder instead. This will also help if I decide to move to uJSON for better performance #48

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Sanely handle Infinity/-Infinity values in JSON using ?_json_infinity=1 337141108  
404569003 https://github.com/simonw/datasette/issues/332#issuecomment-404569003 https://api.github.com/repos/simonw/datasette/issues/332 MDEyOklzc3VlQ29tbWVudDQwNDU2OTAwMw== simonw 9599 2018-07-12T16:20:06Z 2018-07-12T16:20:06Z OWNER

And here's how django-rest-framework did it: https://github.com/encode/django-rest-framework/pull/4918/files

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Sanely handle Infinity/-Infinity values in JSON using ?_json_infinity=1 337141108  
404567587 https://github.com/simonw/datasette/issues/332#issuecomment-404567587 https://api.github.com/repos/simonw/datasette/issues/332 MDEyOklzc3VlQ29tbWVudDQwNDU2NzU4Nw== simonw 9599 2018-07-12T16:15:29Z 2018-07-12T16:17:54Z OWNER

Here's how plotly handled this issue: https://github.com/plotly/plotly.py/pull/203 - see also https://github.com/plotly/plotly.py/blob/213602df6c89b45ce2b811ed2591171c961408e7/plotly/utils.py#L137

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Sanely handle Infinity/-Infinity values in JSON using ?_json_infinity=1 337141108  
402243153 https://github.com/simonw/datasette/issues/332#issuecomment-402243153 https://api.github.com/repos/simonw/datasette/issues/332 MDEyOklzc3VlQ29tbWVudDQwMjI0MzE1Mw== simonw 9599 2018-07-03T17:58:50Z 2018-07-12T16:10:39Z OWNER

I think I'm going to return null in the JSON for infinity/nan values by default, but if you send _nan=1 I will instead return invalid JSON with Infinity or NaN in it (since you have opted in to getting those and hence should be able to handle them).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Sanely handle Infinity/-Infinity values in JSON using ?_json_infinity=1 337141108  
404565566 https://github.com/simonw/datasette/issues/339#issuecomment-404565566 https://api.github.com/repos/simonw/datasette/issues/339 MDEyOklzc3VlQ29tbWVudDQwNDU2NTU2Ng== simonw 9599 2018-07-12T16:08:42Z 2018-07-12T16:08:42Z OWNER

I'm going to turn this into an issue about better supporting the above option.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Expose SANIC_RESPONSE_TIMEOUT config option in a sensible way 340396247  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 579.379ms · About: github-to-sqlite