mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363)
* Introduce new default /$DB/-/query endpoint * Fix a lot of tests * Update pyodide test to use query endpoint * Link to /fixtures/-/query in a few places * Documentation for QueryView --------- Co-authored-by: Simon Willison <swillison@gmail.com>
This commit is contained in:
parent
56adfff8d2
commit
a23c2aee00
21 changed files with 148 additions and 83 deletions
|
|
@ -40,11 +40,11 @@ async () => {
|
|||
import setuptools
|
||||
from datasette.app import Datasette
|
||||
ds = Datasette(memory=True, settings={'num_sql_threads': 0})
|
||||
(await ds.client.get('/_memory.json?sql=select+55+as+itworks&_shape=array')).text
|
||||
(await ds.client.get('/_memory/-/query.json?sql=select+55+as+itworks&_shape=array')).text
|
||||
\`);
|
||||
if (JSON.parse(output)[0].itworks != 55) {
|
||||
throw 'Got ' + output + ', expected itworks: 55';
|
||||
}
|
||||
return 'Test passed!';
|
||||
}
|
||||
"
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue