home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where author_association = "OWNER" and "updated_at" is on date 2021-11-28 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • Complete refactor of TableView and table.html template 3
  • Add `Link: rel="alternate"` header pointing to JSON for a table/query 1
  • Maybe return JSON from HTML pages if `Accept: application/json` is sent 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
981172801 https://github.com/simonw/datasette/issues/1518#issuecomment-981172801 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c46e4JB simonw 9599 2021-11-28T23:23:51Z 2021-11-28T23:23:51Z OWNER

(I could experiment with merging the two tables by adding a temporary undocumented ?_sql= parameter to the in-progress table view that sets an alternative query instead of select cols from table - added bonus, this will force me to use introspection against the returned columns rather than mixing in the known columns for the specified table)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
981172385 https://github.com/simonw/datasette/issues/1518#issuecomment-981172385 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c46e4Ch simonw 9599 2021-11-28T23:21:26Z 2021-11-28T23:21:26Z OWNER

Aside: is there any reason this work can't complete the long-running goal of merging the TableView and QueryView, such that most of the features available for tables become available for arbitrary queries too?

I had already mentally committed to implementing facets for queries, but I just realized that filters could work too - using either a CTE or a nested query.

Pagination is the one holdout here, since table pagination uses keyset pagination over a known order. But maybe arbitrary queries can only be paginated off you order them first?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
981153186 https://github.com/simonw/datasette/issues/1518#issuecomment-981153186 https://api.github.com/repos/simonw/datasette/issues/1518 IC_kwDOBm6k_c46ezWi simonw 9599 2021-11-28T21:13:50Z 2021-11-28T21:13:50Z OWNER

I'm also going to use the new datasette-table Web Component to help guide the design of the new API, which relates directly to this issue too:

  • 1532

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Complete refactor of TableView and table.html template 1058072543  
981149531 https://github.com/simonw/datasette/issues/1534#issuecomment-981149531 https://api.github.com/repos/simonw/datasette/issues/1534 IC_kwDOBm6k_c46eydb simonw 9599 2021-11-28T20:48:54Z 2021-11-28T20:48:54Z OWNER

If I'm going to do this, is there value in also spotting Accept: text/csv and returning CSV for that? I'm pretty sure no client has EVER implemented this though, so it feels like it would be showboating.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Maybe return JSON from HTML pages if `Accept: application/json` is sent 1065432388  
981149039 https://github.com/simonw/datasette/issues/1533#issuecomment-981149039 https://api.github.com/repos/simonw/datasette/issues/1533 IC_kwDOBm6k_c46eyVv simonw 9599 2021-11-28T20:45:36Z 2021-11-28T20:45:36Z OWNER

I built an initial prototype of this in a branch: https://github.com/simonw/datasette/commit/e0a84691c2959f2d1d76948574c9c4a910c7556c - which exposed even more flaws in the way TableView is structured (adding custom HTTP headers to the response is way harder than it should be) which I should address in the refactor in #617.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add `Link: rel="alternate"` header pointing to JSON for a table/query 1065431383  

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 470.511ms · About: github-to-sqlite