home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "OWNER", issue = 780278550 and "updated_at" is on date 2021-01-25 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

  • Make original path available to render hooks · 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
766484435 https://github.com/simonw/datasette/issues/1179#issuecomment-766484435 https://api.github.com/repos/simonw/datasette/issues/1179 MDEyOklzc3VlQ29tbWVudDc2NjQ4NDQzNQ== simonw 9599 2021-01-25T01:31:36Z 2021-01-25T01:31:36Z OWNER

Relevant existing tests: https://github.com/simonw/datasette/blob/461670a0b87efa953141b449a9a261919864ceb3/tests/test_utils.py#L365-L398

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make original path available to render hooks 780278550  
766484257 https://github.com/simonw/datasette/issues/1179#issuecomment-766484257 https://api.github.com/repos/simonw/datasette/issues/1179 MDEyOklzc3VlQ29tbWVudDc2NjQ4NDI1Nw== simonw 9599 2021-01-25T01:30:57Z 2021-01-25T01:30:57Z OWNER

The challenge here is figuring out what the original path, without the .format, actually was - while taking into account that Datasette has a special case for tables that themselves end in a .something.

The path_with_format() function nearly does what we need here:

https://github.com/simonw/datasette/blob/b6a7b58fa01af0cd5a5e94bd17d686d283a46819/datasette/utils/init.py#L710-L729

It can be called with replace_format="csv" to REMOVE the .csv format and replace it with something else.

Problem is, we want to use it to get rid of the format entirely.

We could update path_with_format() to accept format='' to mean "remove the format entirely", but it's a bit messy. It may be better to reconsider the design of path_with_format() and related utility functions entirely.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make original path available to render hooks 780278550  

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