home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 273248366 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 4

issue 1

  • Enforce pagination (or at least limits) for arbitrary custom SQL · 4 ✖

author_association 1

  • OWNER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
344048656 https://github.com/simonw/datasette/issues/69#issuecomment-344048656 https://api.github.com/repos/simonw/datasette/issues/69 MDEyOklzc3VlQ29tbWVudDM0NDA0ODY1Ng== simonw 9599 2017-11-13T20:32:47Z 2017-11-13T20:32:47Z OWNER

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce pagination (or at least limits) for arbitrary custom SQL 273248366  
344019631 https://github.com/simonw/datasette/issues/69#issuecomment-344019631 https://api.github.com/repos/simonw/datasette/issues/69 MDEyOklzc3VlQ29tbWVudDM0NDAxOTYzMQ== simonw 9599 2017-11-13T18:53:13Z 2017-11-13T18:53:13Z OWNER

I'm going with a page size of 100 and a max limit of 1000

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce pagination (or at least limits) for arbitrary custom SQL 273248366  
343780039 https://github.com/simonw/datasette/issues/69#issuecomment-343780039 https://api.github.com/repos/simonw/datasette/issues/69 MDEyOklzc3VlQ29tbWVudDM0Mzc4MDAzOQ== simonw 9599 2017-11-13T00:05:27Z 2017-11-13T00:05:27Z OWNER

I think the only safe way to do this is using SQLite .fetchmany(1000) - I can't guarantee that the user has not entered SQL that will outfox a limit in some way. So instead of attempting to edit their SQL, I'll always return 1001 records and let them know if they went over 1000 or not.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce pagination (or at least limits) for arbitrary custom SQL 273248366  
343752579 https://github.com/simonw/datasette/issues/69#issuecomment-343752579 https://api.github.com/repos/simonw/datasette/issues/69 MDEyOklzc3VlQ29tbWVudDM0Mzc1MjU3OQ== simonw 9599 2017-11-12T17:22:39Z 2017-11-12T17:22:39Z OWNER

By default I'll allow LIMIT and OFFSET up to a maximum of X (where X is let's say 50,000 to start with, but can be custom configured to a larger number or set to None for no limit).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce pagination (or at least limits) for arbitrary custom SQL 273248366  

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