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/datasette/issues/782#issuecomment-1368285442 | https://api.github.com/repos/simonw/datasette/issues/782 | 1368285442 | IC_kwDOBm6k_c5RjmEC | 9599 | 2022-12-31T22:02:16Z | 2022-12-31T22:02:16Z | OWNER | https://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2 now returns `count`: ```json { "database": "fixtures", "table": "compound_three_primary_keys", "is_view": false, "human_description_en": "", "rows": [ { "pk1": "a", "pk2": "a", "pk3": "a", "content": "a-a-a" }, { "pk1": "a", "pk2": "a", "pk3": "b", "content": "a-a-b" } ], "truncated": false, "count": 1001, ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
627794879 | |
https://github.com/simonw/datasette/issues/782#issuecomment-1368278278 | https://api.github.com/repos/simonw/datasette/issues/782 | 1368278278 | IC_kwDOBm6k_c5RjkUG | 9599 | 2022-12-31T20:49:38Z | 2022-12-31T20:49:38Z | OWNER | I'm going to rename `filtered_table_rows_count` to `count` - to match the SQL `count(*)` function. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
627794879 | |
https://github.com/simonw/datasette/issues/782#issuecomment-1368269811 | https://api.github.com/repos/simonw/datasette/issues/782 | 1368269811 | IC_kwDOBm6k_c5RjiPz | 9599 | 2022-12-31T19:33:09Z | 2022-12-31T19:33:09Z | OWNER | Here's the so-far updated documentation for this change: https://github.com/simonw/datasette/blob/a2dca62360ad4a961d4c46f68eae41b7d5c7b2c9/docs/json_api.rst#different-shapes | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
627794879 | |
https://github.com/simonw/datasette/issues/782#issuecomment-1368269283 | https://api.github.com/repos/simonw/datasette/issues/782 | 1368269283 | IC_kwDOBm6k_c5RjiHj | 9599 | 2022-12-31T19:29:45Z | 2022-12-31T19:29:45Z | OWNER | https://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2 now shows the new default: ```json { "database": "fixtures", "table": "compound_three_primary_keys", "is_view": false, "human_description_en": "", "rows": [ { "pk1": "a", "pk2": "a", "pk3": "a", "content": "a-a-a" }, { "pk1": "a", "pk2": "a", "pk3": "b", "content": "a-a-b" } ], ``` The old format can be had like this: https://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2&_shape=arrays | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
627794879 | |
https://github.com/simonw/datasette/issues/782#issuecomment-1368268148 | https://api.github.com/repos/simonw/datasette/issues/782 | 1368268148 | IC_kwDOBm6k_c5Rjh10 | 9599 | 2022-12-31T19:22:07Z | 2022-12-31T19:22:07Z | OWNER | It turned out the most significant part of this change - switching from an array of arrays to an array of objects for the `"rows"` key - was really easy: Datasette already had a `?_shape=arrays` v.s. `?_shape=objects` mechanism, so I switched which one was the default in https://github.com/simonw/datasette/commit/234230e59574ccb8d8a24c45ccd325f725812377 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
627794879 |