github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/76#issuecomment-614354219 | https://api.github.com/repos/simonw/sqlite-utils/issues/76 | 614354219 | MDEyOklzc3VlQ29tbWVudDYxNDM1NDIxOQ== | 9599 | 2020-04-16T01:01:34Z | 2020-04-16T01:01:34Z | OWNER | I think a neat way to do this would be with an optional argument for `.rows_where()`: ```python rows = db["table"].rows_where("age > 10", order_by="age desc") ``` If you want everything you can use this: ```python rows = db["table"].rows_where(order_by="age desc") ``` It's a tiny bit weird calling `.rows_where()` without a where clause, but I think it makes sense here - especially since `.rows` is a property that can't take any arguments - though under the hood it actually does this: https://github.com/simonw/sqlite-utils/blob/ad6ac19470a67867b96cb4c086450b8e4e46bf02/sqlite_utils/db.py#L436-L443 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
549287310 | |
https://github.com/simonw/sqlite-utils/issues/76#issuecomment-614440032 | https://api.github.com/repos/simonw/sqlite-utils/issues/76 | 614440032 | MDEyOklzc3VlQ29tbWVudDYxNDQ0MDAzMg== | 10501166 | 2020-04-16T06:23:29Z | 2020-04-16T06:23:29Z | NONE | Thanks for your hard work! | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
549287310 | |
https://github.com/simonw/sqlite-utils/issues/76#issuecomment-614400454 | https://api.github.com/repos/simonw/sqlite-utils/issues/76 | 614400454 | MDEyOklzc3VlQ29tbWVudDYxNDQwMDQ1NA== | 9599 | 2020-04-16T03:51:01Z | 2020-04-16T03:51:01Z | OWNER | Released in 2.6 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
549287310 | |
https://github.com/simonw/sqlite-utils/issues/76#issuecomment-614400533 | https://api.github.com/repos/simonw/sqlite-utils/issues/76 | 614400533 | MDEyOklzc3VlQ29tbWVudDYxNDQwMDUzMw== | 9599 | 2020-04-16T03:51:26Z | 2020-04-16T03:51:26Z | OWNER | Documentation here: https://sqlite-utils.readthedocs.io/en/stable/python-api.html#listing-rows | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
549287310 | |
https://github.com/dogsheep/github-to-sqlite/issues/26#issuecomment-614794739 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/26 | 614794739 | MDEyOklzc3VlQ29tbWVudDYxNDc5NDczOQ== | 9599 | 2020-04-16T17:38:28Z | 2020-04-16T17:38:28Z | MEMBER | I'm already doing this here: https://github.com/dogsheep/github-to-sqlite/blob/c4aaa50e167cfa9021c7c94260bc3e89e10947bf/github_to_sqlite/utils.py#L246-L250 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
601271612 | |
https://github.com/dogsheep/github-to-sqlite/issues/26#issuecomment-614795712 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/26 | 614795712 | MDEyOklzc3VlQ29tbWVudDYxNDc5NTcxMg== | 9599 | 2020-04-16T17:40:27Z | 2020-04-16T17:40:27Z | MEMBER | Aha! it was missing from the `fetch_repo()` function. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
601271612 | |
https://github.com/dogsheep/github-to-sqlite/issues/27#issuecomment-614843406 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/27 | 614843406 | MDEyOklzc3VlQ29tbWVudDYxNDg0MzQwNg== | 9599 | 2020-04-16T19:11:53Z | 2020-04-16T19:20:23Z | MEMBER | This didn't quite work: the column type is incorrect, so the foreign key relationship isn't sticking: https://github-to-sqlite.dogsheep.net/github/repos?organization=53015001 `[organization] TEXT REFERENCES [users]([id])` - should be `INTEGER`. The problem is that if the first repo inserted has no organization it's set to `null`, which `sqlite-utils` derives as a `TEXT` column. One solution would be to create the column explicitly with a type, but this could get messy. I think I want a new sqlite-utils feature for this instead. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
601330277 | |
https://github.com/simonw/sqlite-utils/issues/100#issuecomment-614845657 | https://api.github.com/repos/simonw/sqlite-utils/issues/100 | 614845657 | MDEyOklzc3VlQ29tbWVudDYxNDg0NTY1Nw== | 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 } |
601358649 | |
https://github.com/simonw/sqlite-utils/issues/100#issuecomment-614846059 | https://api.github.com/repos/simonw/sqlite-utils/issues/100 | 614846059 | MDEyOklzc3VlQ29tbWVudDYxNDg0NjA1OQ== | 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 } |
601358649 | |
https://github.com/dogsheep/github-to-sqlite/issues/25#issuecomment-614810417 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/25 | 614810417 | MDEyOklzc3VlQ29tbWVudDYxNDgxMDQxNw== | 9599 | 2020-04-16T18:07:11Z | 2020-04-16T18:07:11Z | MEMBER | Turns out the main problem was #26 - now fixed. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
601265023 | |
https://github.com/dogsheep/github-to-sqlite/issues/27#issuecomment-614831451 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/27 | 614831451 | MDEyOklzc3VlQ29tbWVudDYxNDgzMTQ1MQ== | 9599 | 2020-04-16T18:47:25Z | 2020-04-16T18:47:25Z | MEMBER | Is it possible for a repo to have an `owner` that differs from its `organization`? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
601330277 | |
https://github.com/dogsheep/github-to-sqlite/issues/27#issuecomment-614831842 | https://api.github.com/repos/dogsheep/github-to-sqlite/issues/27 | 614831842 | MDEyOklzc3VlQ29tbWVudDYxNDgzMTg0Mg== | 9599 | 2020-04-16T18:48:18Z | 2020-04-16T18:48:18Z | MEMBER | I'm going to make `organization` another foreign key to the `users` table just in case it IS possible (maybe with GitHub Enterprise or similar?) | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
601330277 |