home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 893890496 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 5

issue 1

  • ?_facet_size=X to increase number of facets results on the page · 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
849761894 https://github.com/simonw/datasette/issues/1332#issuecomment-849761894 https://api.github.com/repos/simonw/datasette/issues/1332 MDEyOklzc3VlQ29tbWVudDg0OTc2MTg5NA== simonw 9599 2021-05-27T16:13:07Z 2021-05-27T16:13:07Z OWNER

Added ?_facet_size=max in #1337 and made the ... truncated note link to that - here's a demo: https://fivethirtyeight.datasettes.com/fivethirtyeight/antiquities-act%2Factions_under_antiquities_act?_facet=states&_facet=current_agency&_facet=pres_or_congress

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_facet_size=X to increase number of facets results on the page 893890496  
846481801 https://github.com/simonw/datasette/issues/1332#issuecomment-846481801 https://api.github.com/repos/simonw/datasette/issues/1332 MDEyOklzc3VlQ29tbWVudDg0NjQ4MTgwMQ== simonw 9599 2021-05-23T00:36:20Z 2021-05-23T00:36:20Z OWNER

Documentation:

  • https://docs.datasette.io/en/latest/facets.html#facets-in-query-strings at the bottom of the section
  • https://docs.datasette.io/en/latest/json_api.html#special-table-arguments at the bottom of the list of arguments
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_facet_size=X to increase number of facets results on the page 893890496  
846479730 https://github.com/simonw/datasette/issues/1332#issuecomment-846479730 https://api.github.com/repos/simonw/datasette/issues/1332 MDEyOklzc3VlQ29tbWVudDg0NjQ3OTczMA== simonw 9599 2021-05-23T00:11:31Z 2021-05-23T00:11:31Z OWNER

Here's the code in question: https://github.com/simonw/datasette/blob/5e9672c9bb33e41686472db4aa427168f9e67dbe/datasette/facets.py#L187-L210

It has access to the current request object as self.request.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_facet_size=X to increase number of facets results on the page 893890496  
846479212 https://github.com/simonw/datasette/issues/1332#issuecomment-846479212 https://api.github.com/repos/simonw/datasette/issues/1332 MDEyOklzc3VlQ29tbWVudDg0NjQ3OTIxMg== simonw 9599 2021-05-23T00:07:46Z 2021-05-23T00:07:46Z OWNER

?_facet_size=50 seems like a very reasonable thing to support - I'll cap it at whatever the max_returned_rows setting is (which defaults to 1000).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_facet_size=X to increase number of facets results on the page 893890496  
846479062 https://github.com/simonw/datasette/issues/1332#issuecomment-846479062 https://api.github.com/repos/simonw/datasette/issues/1332 MDEyOklzc3VlQ29tbWVudDg0NjQ3OTA2Mg== simonw 9599 2021-05-23T00:06:34Z 2021-05-23T00:06:34Z OWNER

A URL parameter to modify that facet size is a really good idea.

I thought I had an issue open for "..." linking to more results but I can't find it now.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_facet_size=X to increase number of facets results on the page 893890496  

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 19.029ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows