home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 707944044 and user = 9599 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 · 7 ✖

issue 1

  • Much, much faster extract() implementation · 7 ✖

author_association 1

  • OWNER 7
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
698400790 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698400790 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODQwMDc5MA== simonw 9599 2020-09-24T14:59:50Z 2020-09-24T14:59:50Z OWNER

For reusing the lookup table: I'm going to raise an error if a lookup table exists but without the correct columns. The caller can then add those columns and try again.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  
698184166 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698184166 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODE4NDE2Ng== simonw 9599 2020-09-24T08:01:07Z 2020-09-24T08:01:07Z OWNER

I may revert the now unnecessary undocumented tweaks to the .update() method made in 66d506587eba9f0715267d6560b97c1fa44cc781 as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  
698182656 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698182656 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODE4MjY1Ng== simonw 9599 2020-09-24T07:58:08Z 2020-09-24T07:58:08Z OWNER

The way the lookup table works here differs from the previous implementation. In the previous implementation the usage of .lookup() meant that an existing table would be modified to fit the new purpose. That no longer happens in this version. Need to make a design decision about how this should work.

It should definitely be possible to use an existing lookup table - imagine a database where several tables have a "Departments" column and we want to extract all of those values out to a single shared "Departments" table.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  
698182037 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698182037 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODE4MjAzNw== simonw 9599 2020-09-24T07:56:50Z 2020-09-24T07:56:50Z OWNER

I could also be a bit smarter about transaction handling. I think it may be possible to run this entire operation in a single transaction now.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  
698181478 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698181478 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODE4MTQ3OA== simonw 9599 2020-09-24T07:55:45Z 2020-09-24T07:55:45Z OWNER

import functools is no longer needed.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  
698180705 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698180705 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODE4MDcwNQ== simonw 9599 2020-09-24T07:54:10Z 2020-09-24T07:54:10Z OWNER

After running through the steps in https://simonwillison.net/2020/Sep/23/sqlite-utils-extract/ I get a table that looks like this:

The foreign key columns are all at the end of the table. It would be nicer if they were arranged in the same order as the columns they replaced.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  
698180113 https://github.com/simonw/sqlite-utils/pull/174#issuecomment-698180113 https://api.github.com/repos/simonw/sqlite-utils/issues/174 MDEyOklzc3VlQ29tbWVudDY5ODE4MDExMw== simonw 9599 2020-09-24T07:53:03Z 2020-09-24T07:53:03Z OWNER

This could do with a little bit more testing - I'm worried there may be column or table name edge cases that are not covered yet. I also need to remove the progress bar code since that no longer makes sense for this implementation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Much, much faster extract() implementation 707944044  

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