New JSON design for query views (#2118)

* Refs #2111, closes #2110
* New Context dataclass/subclass mechanism, refs #2127
* Define QueryContext and extract get_tables() method, refs #2127
* Fix OPTIONS bug by porting DaatbaseView to be a View subclass
* Expose async_view_for_class.view_class for test_routes test
* Error/truncated aruments for renderers, closes #2130
This commit is contained in:
Simon Willison 2023-08-07 18:47:39 -07:00 committed by GitHub
commit 1377a290cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 579 additions and 112 deletions

View file

@ -700,7 +700,6 @@ async def test_max_returned_rows(ds_client):
"/fixtures.json?sql=select+content+from+no_primary_key"
)
data = response.json()
assert {"sql": "select content from no_primary_key", "params": {}} == data["query"]
assert data["truncated"]
assert 100 == len(data["rows"])