home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where "created_at" is on date 2019-11-12, issue = 521868864 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 · 3 ✖

issue 1

  • The ".upsert()" method is misnamed · 3 ✖

author_association 1

  • OWNER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
553171414 https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553171414 https://api.github.com/repos/simonw/sqlite-utils/issues/66 MDEyOklzc3VlQ29tbWVudDU1MzE3MTQxNA== simonw 9599 2019-11-12T23:52:35Z 2019-11-12T23:52:35Z OWNER

If I do implement the correct definition of .upsert() I think I'll use this pattern, since it works in versions of SQLite prior to 3.24: sql INSERT OR IGNORE INTO book(id) VALUES(1001); UPDATE book SET name = 'Programming' WHERE id = 1001;

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
The ".upsert()" method is misnamed 521868864  
553171011 https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553171011 https://api.github.com/repos/simonw/sqlite-utils/issues/66 MDEyOklzc3VlQ29tbWVudDU1MzE3MTAxMQ== simonw 9599 2019-11-12T23:50:52Z 2019-11-12T23:50:52Z OWNER

Fixing this is going to be a real pain. There's lots of code out there that uses sqlite-utils with the expectation that upsert() behaves as it currently does.

Maybe I need to introduce new terms for both of these different patterns and deprecate the existing .upsert() and .upsert_all() since their behaviour can't be changed?

Or maybe I fix this and ship sqlite-utils 2.0 with a breaking change?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
The ".upsert()" method is misnamed 521868864  
553170650 https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553170650 https://api.github.com/repos/simonw/sqlite-utils/issues/66 MDEyOklzc3VlQ29tbWVudDU1MzE3MDY1MA== simonw 9599 2019-11-12T23:49:29Z 2019-11-12T23:49:29Z OWNER

This relates to this bug: https://github.com/dogsheep/github-to-sqlite/pull/8#issuecomment-549233778

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
The ".upsert()" method is misnamed 521868864  

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