home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 1126692066 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 2

  • simonw 2
  • fgregg 2

author_association 2

  • CONTRIBUTOR 2
  • OWNER 2

issue 1

  • Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1033332570 https://github.com/simonw/sqlite-utils/issues/403#issuecomment-1033332570 https://api.github.com/repos/simonw/sqlite-utils/issues/403 IC_kwDOCGYnMM49l2da fgregg 536941 2022-02-09T04:22:43Z 2022-02-09T04:22:43Z CONTRIBUTOR

dddoooope

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` 1126692066  
1032987901 https://github.com/simonw/sqlite-utils/issues/403#issuecomment-1032987901 https://api.github.com/repos/simonw/sqlite-utils/issues/403 IC_kwDOCGYnMM49kiT9 simonw 9599 2022-02-08T19:36:06Z 2022-02-08T19:36:06Z OWNER

New documentation: https://sqlite-utils.datasette.io/en/latest/cli.html#adding-a-primary-key-to-a-rowid-table

{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` 1126692066  
1032976720 https://github.com/simonw/sqlite-utils/issues/403#issuecomment-1032976720 https://api.github.com/repos/simonw/sqlite-utils/issues/403 IC_kwDOCGYnMM49kflQ simonw 9599 2022-02-08T19:23:05Z 2022-02-08T19:23:27Z OWNER

This is already possible using sqlite-utils transform like so:

% echo '[{"name": "Barry"}, {"name": "Sandra"}]' | sqlite-utils insert rowid.db records - % sqlite-utils schema rowid.db CREATE TABLE [records] ( [name] TEXT ); % sqlite-utils rows rowid.db records [{"name": "Barry"}, {"name": "Sandra"}] % sqlite-utils transform rowid.db records --pk id % sqlite-utils rows rowid.db records [{"id": 1, "name": "Barry"}, {"id": 2, "name": "Sandra"}] % sqlite-utils schema rowid.db CREATE TABLE "records" ( [id] INTEGER PRIMARY KEY, [name] TEXT ); % echo '[{"name": "Barry 2"}, {"name": "Sandra 2"}]' | sqlite-utils insert rowid.db records - % sqlite-utils rows rowid.db records [{"id": 1, "name": "Barry"}, {"id": 2, "name": "Sandra"}, {"id": 3, "name": "Barry 2"}, {"id": 4, "name": "Sandra 2"}] It's not covered in the documentation though: https://sqlite-utils.datasette.io/en/3.23/cli.html#transforming-tables

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` 1126692066  
1032126353 https://github.com/simonw/sqlite-utils/issues/403#issuecomment-1032126353 https://api.github.com/repos/simonw/sqlite-utils/issues/403 IC_kwDOCGYnMM49hP-R fgregg 536941 2022-02-08T01:45:15Z 2022-02-08T01:45:31Z CONTRIBUTOR

you can hack something like this to achieve this result:

sqlite-utils convert my_database my_table rowid "{'id': value}" --multi

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document how to add a primary key to a rowid table using `sqlite-utils transform --pk` 1126692066  

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