home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where "created_at" is on date 2019-05-29 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 5

  • add_column() should support REFERENCES {other_table}({other_column}) 4
  • Plugin that adds an authentication layer of some sort 1
  • Improvements to table label detection 1
  • Option to ignore inserts if primary key exists already 1
  • Facets not correctly persisted in hidden form fields 1

user 2

  • simonw 7
  • duarteocarmo 1

author_association 2

  • OWNER 7
  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
497116074 https://github.com/simonw/datasette/issues/485#issuecomment-497116074 https://api.github.com/repos/simonw/datasette/issues/485 MDEyOklzc3VlQ29tbWVudDQ5NzExNjA3NA== simonw 9599 2019-05-29T21:29:16Z 2019-05-29T21:29:16Z OWNER

Another good rule of thumb: look for text fields with a unique constraint?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Improvements to table label detection  447469253  
496970219 https://github.com/simonw/datasette/issues/492#issuecomment-496970219 https://api.github.com/repos/simonw/datasette/issues/492 MDEyOklzc3VlQ29tbWVudDQ5Njk3MDIxOQ== simonw 9599 2019-05-29T14:50:10Z 2019-05-29T14:50:10Z OWNER

Code in question: https://github.com/simonw/datasette/blob/2a4b892d6c0f6609ea48df0dc393397af2b7b1c1/datasette/templates/table.html#L84-L86

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Facets not correctly persisted in hidden form fields 449854604  
496966227 https://github.com/simonw/datasette/issues/120#issuecomment-496966227 https://api.github.com/repos/simonw/datasette/issues/120 MDEyOklzc3VlQ29tbWVudDQ5Njk2NjIyNw== duarteocarmo 26342344 2019-05-29T14:40:52Z 2019-05-29T14:40:52Z NONE

I would really like this. If you give me some pointers @simonw I'm willing to PR!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Plugin that adds an authentication layer of some sort 275087397  
496787958 https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496787958 https://api.github.com/repos/simonw/sqlite-utils/issues/16 MDEyOklzc3VlQ29tbWVudDQ5Njc4Nzk1OA== simonw 9599 2019-05-29T05:17:58Z 2019-05-29T05:17:58Z OWNER

Shipped this feature in sqlite-utils 1.1: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-1

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
add_column() should support REFERENCES {other_table}({other_column}) 413867537  
496786354 https://github.com/simonw/sqlite-utils/issues/21#issuecomment-496786354 https://api.github.com/repos/simonw/sqlite-utils/issues/21 MDEyOklzc3VlQ29tbWVudDQ5Njc4NjM1NA== simonw 9599 2019-05-29T05:09:01Z 2019-05-29T05:09:01Z OWNER

Shipped this feature in sqlite-utils 1.1: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-1

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Option to ignore inserts if primary key exists already 448391492  
496757010 https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496757010 https://api.github.com/repos/simonw/sqlite-utils/issues/16 MDEyOklzc3VlQ29tbWVudDQ5Njc1NzAxMA== simonw 9599 2019-05-29T02:16:17Z 2019-05-29T02:16:17Z OWNER

In that case --fk othertable detects the primary key.

If you want to point at a different column, use --fk-col X

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
add_column() should support REFERENCES {other_table}({other_column}) 413867537  
496756758 https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496756758 https://api.github.com/repos/simonw/sqlite-utils/issues/16 MDEyOklzc3VlQ29tbWVudDQ5Njc1Njc1OA== simonw 9599 2019-05-29T02:14:50Z 2019-05-29T02:14:50Z OWNER

Hmm... probably not:

For options, only a fixed number of arguments is supported.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
add_column() should support REFERENCES {other_table}({other_column}) 413867537  
496756348 https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496756348 https://api.github.com/repos/simonw/sqlite-utils/issues/16 MDEyOklzc3VlQ29tbWVudDQ5Njc1NjM0OA== simonw 9599 2019-05-29T02:12:43Z 2019-05-29T02:12:43Z OWNER

For the CLI I'm thinking:

sqlite-utils add-column data.db mytable col text --fk othertable id

So the foreign key is added using --fk othertable othercolumn

If the user doesn't provide the column type we can derive it from the foreign key.

Can we make the othercolumn optional? That would be neat - then we could automatically detect it using the sole primary key of the referenced table.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
add_column() should support REFERENCES {other_table}({other_column}) 413867537  

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