home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 665817570 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 · 4 ✖

issue 1

  • Output binary columns in "sqlite-utils query" JSON · 4 ✖

author_association 1

  • OWNER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
664065341 https://github.com/simonw/sqlite-utils/issues/125#issuecomment-664065341 https://api.github.com/repos/simonw/sqlite-utils/issues/125 MDEyOklzc3VlQ29tbWVudDY2NDA2NTM0MQ== simonw 9599 2020-07-27T00:49:41Z 2020-07-27T00:49:41Z OWNER

Documentation: https://github.com/simonw/sqlite-utils/commit/20e543e9a492f2e764caae73c38e87f18eaec444?short_path=7240b7c#diff-7240b7c71b1a8194da0c001c64fc8d40

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Output binary columns in "sqlite-utils query" JSON 665817570  
664062546 https://github.com/simonw/sqlite-utils/issues/125#issuecomment-664062546 https://api.github.com/repos/simonw/sqlite-utils/issues/125 MDEyOklzc3VlQ29tbWVudDY2NDA2MjU0Ng== simonw 9599 2020-07-27T00:33:03Z 2020-07-27T00:33:03Z OWNER

I'm going to imitate how Datasette solves this problem: json [ { "name": "lorem.txt", "mode": 33188, "mtime": 1595805965, "sz": 16984, "data": { "$base64": true, "encoded": "eJzt0c1xAyEMBeC7q1ABHleR3HxNAQrIjmb4M0gelx+RTY7p4N2WBYT0vmufUknH8kq5lz5pqRFXsTOl3pYkE/NJnHXoStruJEVjc0mOCyTqq/ZMJnXEZW1Js2ZvRm5U+DPKk9hRWqjyvTFx0YfzhT6MpGmN2lR1fzxjyfVMD9dFrS+bnkleMpMam/ZGXgrX1I/K+5Au3S/9lNQRh0k4Gq/RUz8GiKfsQm+7JLsJ6fTo5JhVG00ZU76kZZkxePx49uIjnpNoJyYlWUsoaSl/CcVATje/Kxu13RANnrHweaH3V5Jh4jvGyKCnxJLiXPKhmW3fiCnG7Jql7RR3UvFo8jJ4z039dtOkTFmWzL1be9lt8A5II471m6vXy+l0BR/4wAc+8IEPfOADH/jABz7wgQ984AMf+MAHPvCBD3zgAx/4wAc+8IEPfOADH/jABz7wgQ984AMf+MAHPvCBD3zgAx/4wAc+8IEPfOADH/jABz7wgQ984PuP7xubBoN9" } } ]

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Output binary columns in "sqlite-utils query" JSON 665817570  
664012247 https://github.com/simonw/sqlite-utils/issues/125#issuecomment-664012247 https://api.github.com/repos/simonw/sqlite-utils/issues/125 MDEyOklzc3VlQ29tbWVudDY2NDAxMjI0Nw== simonw 9599 2020-07-26T16:48:46Z 2020-07-26T16:48:46Z OWNER

I could solve round tripping (at least a bit) by allowing insert to be run with a flag that says "these columns are base64 encoded, store the decoded data in a BLOB".

That would solve inserting binary data using JSON too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Output binary columns in "sqlite-utils query" JSON 665817570  
664012148 https://github.com/simonw/sqlite-utils/issues/125#issuecomment-664012148 https://api.github.com/repos/simonw/sqlite-utils/issues/125 MDEyOklzc3VlQ29tbWVudDY2NDAxMjE0OA== simonw 9599 2020-07-26T16:47:51Z 2020-07-26T16:47:51Z OWNER

Best solution I can think of is to return the data as base64. It's a bit nasty since it means you can't round trip it back again.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Output binary columns in "sqlite-utils query" JSON 665817570  

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