{"html_url": "https://github.com/simonw/datasette/issues/473#issuecomment-996275108", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/473", "id": 996275108, "node_id": "IC_kwDOBm6k_c47YfOk", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T23:32:22Z", "updated_at": "2021-12-16T23:32:30Z", "author_association": "OWNER", "body": "This filter design can only influence the `where` component of the SQL clause - it's not able to modify the `SELECT` columns or adjust the `ORDER BY` or `OFFSET LIMIT` parts. I think that's OK.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 445850934, "label": "Plugin hook: filters_from_request"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/473#issuecomment-996267817", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/473", "id": 996267817, "node_id": "IC_kwDOBm6k_c47Ydcp", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T23:17:52Z", "updated_at": "2021-12-16T23:19:00Z", "author_association": "OWNER", "body": "I revisited this idea in #1518 and came up with a slightly different name and design for the hook:\r\n\r\n```python\r\n@hookspec\r\ndef filters_from_request(request, database, table, datasette):\r\n \"\"\"\r\n Return FilterArguments(\r\n where_clauses=[str, str, str],\r\n params={},\r\n human_descriptions=[str, str, str],\r\n extra_context={}\r\n ) based on the request\"\"\"\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 445850934, "label": "Plugin hook: filters_from_request"}, "performed_via_github_app": null}