mirror of
https://github.com/simonw/datasette.git
synced 2026-10-20 00:06:59 +02:00
fix: report custom query CSV truncation in response headers
Expose the row limit and truncation flag so clients can detect incomplete CSV exports. Keep custom query CSV within the configured limit when it equals the page size. Fixes #1553.
This commit is contained in:
parent
cec5e6b2ef
commit
28c411679c
4 changed files with 95 additions and 2 deletions
|
|
@ -45,6 +45,13 @@ The following options can be used to customize the CSVs returned by Datasette.
|
|||
``?_dl=on``
|
||||
Causes Datasette to return a ``content-disposition: attachment; filename="filename.csv"`` header.
|
||||
|
||||
Custom SQL query CSV responses include a ``Datasette-Truncated`` response
|
||||
header with the value ``true`` or ``false``. A value of ``true`` means rows
|
||||
were omitted because of the :ref:`setting_max_returned_rows` limit. The
|
||||
``Datasette-Max-Returned-Rows`` header reports that limit, including ``0``
|
||||
when it is disabled. These headers are also available to cross-origin browser
|
||||
clients when CORS is enabled.
|
||||
|
||||
Streaming all records
|
||||
---------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue