home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "MEMBER", "created_at" is on date 2020-05-01 and user = 9599 sorted by updated_at descending

✖
✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 5

  • Create index on issue_comments(user) and other foreign keys 2
  • Mechanism for creating views if they don't yet exist 2
  • Add this repos_starred view 1
  • Add this view for seeing new releases 1
  • Add view for better display of dependent repos 1

user 1

  • simonw · 7 ✖

author_association 1

  • MEMBER · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
622461948 https://github.com/dogsheep/github-to-sqlite/issues/37#issuecomment-622461948 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/37 MDEyOklzc3VlQ29tbWVudDYyMjQ2MTk0OA== simonw 9599 2020-05-01T16:36:42Z 2020-05-01T16:36:42Z MEMBER

It should only create views if the underlying tables exist.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for creating views if they don't yet exist 610843136  
622461537 https://github.com/dogsheep/github-to-sqlite/issues/37#issuecomment-622461537 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/37 MDEyOklzc3VlQ29tbWVudDYyMjQ2MTUzNw== simonw 9599 2020-05-01T16:35:40Z 2020-05-01T16:35:40Z MEMBER

This will check if the view exists and has the exact same matching definition as the one we want. If it doesn't, we will drop it (if it exists) and recreate it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for creating views if they don't yet exist 610843136  
622461223 https://github.com/dogsheep/github-to-sqlite/issues/12#issuecomment-622461223 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/12 MDEyOklzc3VlQ29tbWVudDYyMjQ2MTIyMw== simonw 9599 2020-05-01T16:34:52Z 2020-05-01T16:34:52Z MEMBER

Blocked on #37

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add this view for seeing new releases 520756546  
622461122 https://github.com/dogsheep/github-to-sqlite/issues/10#issuecomment-622461122 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/10 MDEyOklzc3VlQ29tbWVudDYyMjQ2MTEyMg== simonw 9599 2020-05-01T16:34:39Z 2020-05-01T16:34:39Z MEMBER

Blocked on #37

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add this repos_starred view 516967682  
622461025 https://github.com/dogsheep/github-to-sqlite/issues/36#issuecomment-622461025 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/36 MDEyOklzc3VlQ29tbWVudDYyMjQ2MTAyNQ== simonw 9599 2020-05-01T16:34:24Z 2020-05-01T16:34:24Z MEMBER

Blocked on #37

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add view for better display of dependent repos 610842926  
622214262 https://github.com/dogsheep/github-to-sqlite/issues/35#issuecomment-622214262 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/35 MDEyOklzc3VlQ29tbWVudDYyMjIxNDI2Mg== simonw 9599 2020-05-01T02:10:32Z 2020-05-01T02:11:19Z MEMBER

This sped that query up even more - down to 4ms. sql create index issue_comments_issue on issue_comments(issue);

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Create index on issue_comments(user) and other foreign keys 610511450  
622213950 https://github.com/dogsheep/github-to-sqlite/issues/35#issuecomment-622213950 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/35 MDEyOklzc3VlQ29tbWVudDYyMjIxMzk1MA== simonw 9599 2020-05-01T02:09:04Z 2020-05-01T02:09:04Z MEMBER

It sped up this query a lot - 2.5s down to 300ms: sql select repos.full_name, json_object( 'href', 'https://github.com/' || repos.full_name || '/issues/' || issues.number, 'label', '#' || issues.number ) as issue, issues.title, users.login, users.id, issues.state, issues.locked, issues.assignee, issues.milestone, issues.comments, issues.created_at, issues.updated_at, issues.closed_at, issues.author_association, issues.pull_request, issues.repo, issues.type from issues join repos on repos.id = issues.repo join users on issues.user = users.id where issues.state = 'open' and issues.user not in (9599, 27856297) and not exists ( select id from issue_comments where issue_comments.user = 9599 and issues.id = issue_comments.issue ) order by issues.updated_at desc;

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Create index on issue_comments(user) and other foreign keys 610511450  

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