issue_comments
3 rows where issue = 601358649
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
id ▼ | html_url | issue_url | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
614845657 | https://github.com/simonw/sqlite-utils/issues/100#issuecomment-614845657 | https://api.github.com/repos/simonw/sqlite-utils/issues/100 | MDEyOklzc3VlQ29tbWVudDYxNDg0NTY1Nw== | simonw 9599 | 2020-04-16T19:17:05Z | 2020-04-16T19:17:05Z | OWNER | The syntax for explicitly creating a table looks like this: ```python db["cats"].create({ "id": int, "name": str, "weight": float, }, pk="id") ``` So using a dictionary of column name -> Python type here would be good. I think it becomes a new optional argument to `.insert_all()` and `.insert()` and `.upsert_all()` and `.upsert()`. Question is, what should that argument be called? Options: - `columns` - `types` - `type_overrides` - `extra_columns` I like the first two best. I'm leaning towards `columns` - it would serve two purposes: you can use it to ensure extra columns are created, and you can use it to specify the type on extra OR deteced columns. Maybe something like this: ```python db["authors"].insert_all( [{"id": 1, "name": "Sally", "score": "2"}], pk="id", not_null={"name", "score"}, defaults={"score": 1}, columns={"score": int, "weight": float} ) ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Mechanism for forcing column-type, over-riding auto-detection 601358649 | |
614846059 | https://github.com/simonw/sqlite-utils/issues/100#issuecomment-614846059 | https://api.github.com/repos/simonw/sqlite-utils/issues/100 | MDEyOklzc3VlQ29tbWVudDYxNDg0NjA1OQ== | simonw 9599 | 2020-04-16T19:17:56Z | 2020-04-16T19:17:56Z | OWNER | Reminder: the current list of arguments for those methods is: https://github.com/simonw/sqlite-utils/blob/13528faa817d79bc3900d3af7473300686b145d7/sqlite_utils/db.py#L951-L967 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Mechanism for forcing column-type, over-riding auto-detection 601358649 | |
615372322 | https://github.com/simonw/sqlite-utils/issues/100#issuecomment-615372322 | https://api.github.com/repos/simonw/sqlite-utils/issues/100 | MDEyOklzc3VlQ29tbWVudDYxNTM3MjMyMg== | simonw 9599 | 2020-04-17T17:31:42Z | 2020-04-17T17:31:42Z | OWNER | I'm going with `columns={"score": int}` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | Mechanism for forcing column-type, over-riding auto-detection 601358649 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);