home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 614354219

This data as json

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  
Powered by Datasette · Queries took 1.638ms