home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "OWNER" and issue = 1898927976 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 2

issue 1

  • Mechanism for register_output_renderer hooks to access full count · 2 ✖

author_association 1

  • OWNER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1721742055 https://github.com/simonw/datasette/issues/2186#issuecomment-1721742055 https://api.github.com/repos/simonw/datasette/issues/2186 IC_kwDOBm6k_c5mn7Ln simonw 9599 2023-09-15T19:27:59Z 2023-09-15T19:27:59Z OWNER

This feels like it might be quite a nice pattern generally - providing optional arguments to plugins and views that can be await get_x() called to run an extra calculation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for register_output_renderer hooks to access full count 1898927976  
1721740872 https://github.com/simonw/datasette/issues/2186#issuecomment-1721740872 https://api.github.com/repos/simonw/datasette/issues/2186 IC_kwDOBm6k_c5mn65I simonw 9599 2023-09-15T19:26:51Z 2023-09-15T19:27:19Z OWNER

Here's where it's called at the moment: https://github.com/simonw/datasette/blob/16f0b6d8222d06682a31b904d0a402c391ae1c1c/datasette/views/base.py#L297-L313

And the docs: https://github.com/simonw/datasette/blob/1.0a6/docs/plugin_hooks.rst#register-output-renderer-datasette

I'm tempted to add a get_count argument which, when awaited, returns the full count. Then plugins could do this:

python async def render_notebook(datasette, request, get_count, rows): count = await get_count() # ...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for register_output_renderer hooks to access full count 1898927976  

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