mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Limit on max rows returned, controlled by --max_returned_rows option
If someone executes 'select * from table' against a table with a million rows in it, we could run into problems: just serializing that much data as JSON is likely to lock up the server. Solution: we now have a hard limit on the maximum number of rows that can be returned by a query. If that limit is exceeded, the server will return a `"truncated": true` field in the JSON. This limit can be optionally controlled by the new `--max_returned_rows` option. Setting that option to 0 disables the limit entirely. Closes #69
This commit is contained in:
parent
6b3b05b6db
commit
8252e71da4
6 changed files with 76 additions and 25 deletions
26
README.md
26
README.md
|
|
@ -80,17 +80,21 @@ http://localhost:8001/History/downloads.jsono will return that data as JSON in a
|
|||
Serve up specified SQLite database files with a web UI
|
||||
|
||||
Options:
|
||||
-h, --host TEXT host for server, defaults to 0.0.0.0
|
||||
-p, --port INTEGER port for server, defaults to 8001
|
||||
--debug Enable debug mode - useful for development
|
||||
--reload Automatically reload if code change detected -
|
||||
useful for development
|
||||
--cors Enable CORS by serving Access-Control-Allow-Origin:
|
||||
*
|
||||
--inspect-file TEXT Path to JSON file created using "datasette build"
|
||||
-m, --metadata FILENAME Path to JSON file containing license/source
|
||||
metadata
|
||||
--help Show this message and exit.
|
||||
-h, --host TEXT host for server, defaults to 0.0.0.0
|
||||
-p, --port INTEGER port for server, defaults to 8001
|
||||
--debug Enable debug mode - useful for development
|
||||
--reload Automatically reload if code change detected -
|
||||
useful for development
|
||||
--cors Enable CORS by serving Access-Control-Allow-
|
||||
Origin: *
|
||||
--page_size INTEGER Page size - default is 100
|
||||
--max_returned_rows INTEGER Max allowed rows to return at once - default is
|
||||
1000. Set to 0 to disable check entirely.
|
||||
--inspect-file TEXT Path to JSON file created using "datasette
|
||||
build"
|
||||
-m, --metadata FILENAME Path to JSON file containing license/source
|
||||
metadata
|
||||
--help Show this message and exit.
|
||||
|
||||
## metadata.json
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue