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/617#issuecomment-552254238 | https://api.github.com/repos/simonw/datasette/issues/617 | 552254238 | MDEyOklzc3VlQ29tbWVudDU1MjI1NDIzOA== | 9599 | 2019-11-11T00:49:57Z | 2019-11-11T00:51:35Z | OWNER | I experimented with a `table_filter()` plugin hook a while ago which looks very much like the abstraction I'm now talking about here: https://github.com/simonw/datasette/commit/5116c4ec8aed5091e1f75415424b80f613518dc6 - more details here: https://simonwillison.net/2018/Aug/6/russian-facebook-ads/#Weird_implementation_details_106 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 519613116 | |
https://github.com/simonw/datasette/issues/617#issuecomment-551349770 | https://api.github.com/repos/simonw/datasette/issues/617 | 551349770 | MDEyOklzc3VlQ29tbWVudDU1MTM0OTc3MA== | 9599 | 2019-11-08T01:59:20Z | 2019-11-11T00:53:42Z | OWNER | This is what the code does: - Check if the table name is actually a canned query - if so execute that - Check for other parameters that need to be redirected - e.g. `?_filter_column=x` or `_sort_by_desc=y` - Turn the table + querystring parameters (`?foo=bar`, `?bar__contains=baz`, `?_where=`, `_sort=` etc) into a SQL query - Figure out pagination (apply limit, and handle [keyset pagination](https://simonwillison.net/2018/Oct/4/datasette-ideas/#Keyset_pagination)) - Calculate suggested facets against the non-paginated version of the query - Calculate facet counts against the non-paginated version of the query - Execute the query - Expand any foreign key references from the results | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 519613116 | |
https://github.com/simonw/datasette/issues/617#issuecomment-552254753 | https://api.github.com/repos/simonw/datasette/issues/617 | 552254753 | MDEyOklzc3VlQ29tbWVudDU1MjI1NDc1Mw== | 9599 | 2019-11-11T00:54:51Z | 2019-11-11T00:54:51Z | OWNER | That `table_filter()` plugin hook should probably be renamed though, since it could now apply to the regular custom SQL view as well as the table view. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 519613116 |