issue_comments: 1384752452
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/datasette/issues/262#issuecomment-1384752452 | https://api.github.com/repos/simonw/datasette/issues/262 | 1384752452 | IC_kwDOBm6k_c5SiaVE | 9599 | 2023-01-17T02:14:41Z | 2023-01-17T02:15:58Z | OWNER | Thinking about `?_extra=` values just for the table JSON. The default shape will look like this: ```json { "ok": true, "rows": [{"id": 1, "name": "Name"}], "next": null, } ``` The table extras could be: - `count` - adds a `"count"` field with a full `count(*)` for that filtered table - `next_url` - the full URL to the next page - `columns` - adds `"columns": ["id", "name"]` - `expandable_columns` - a list of columns that can be expanded (note that `"expanded_columns": [...]` shows up automatically if the user passes any `?_label=` options, like on https://latest.datasette.io/fixtures/facetable.json?_label=_city_id ) - I'm tempted to rename this to `label_columns` and have it add both `label_columns` and `label_columns_selected` or similar. - `primary_keys` - a list of primary keys e.g. `["id"]` - not sure what to do about `rowid` columns here - `query` - a `{"sql": "select ...", "params": {"p0": "1"}}` object - `units` - the units feature - `suggested_facets` - suggested facets - `metadata` - a `{"metadata": {"source_url": "..."}}` etc block - differs from current in that it would be nested in `"metadata": {...}`. Stuff currently in https://latest.datasette.io/fixtures/facetable.json that is not yet covered by the above: ``` "database": "fixtures", "table": "facetable", "is_view": false, "human_description_en": "where id = 1", "private": false, "allow_execute_sql": true, "query_ms": 16.749476999393664, ``` I'm tempted to bundle `database`, `table`, `is_view` and `human_description_en` into one (not sure what to call it though, perhaps `display_details`?) - and then drop `allow_execute_sql` entirely and have `private` and `query_ms` as their own named extras. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 323658641 |