File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ Features:
3434 roundup-gettext will extract translatable strings from the tracker's
3535 Python code. If polib is missing, it will print a warning. (Patch
3636 Marcus Priesch, cleanup to remove python 2 issues, John Rouillard.)
37+ - issue2551315 - Document use of
38+ RestfulInstance.max_response_row_size to limit data returned
39+ from rest request.
3740
38412024-07-13 2.4.0
3942
Original file line number Diff line number Diff line change @@ -151,6 +151,28 @@ burst count. On slower hardware, errors of up to 10% have been
151151observed. Using redis, PostgreSQL, or MySQL for storing ephemeral data
152152minimizes the loss.
153153
154+ Limit Size of Returned Data
155+ ---------------------------
156+
157+ When selecting from the database, you can limit the number of rows
158+ returned by adding the following to `interfaces.py`_::
159+
160+ from roundup.rest import RestfulInstance
161+ RestfulInstance.max_response_row_size = 26
162+
163+ This will limit the setting of ``@page_size`` to 25 (one less than the
164+ value). If the url includes a ``@page_size`` pagination value greater
165+ than or equal to the ``max_response_row_size`` you will receive an
166+ error like::
167+
168+ {
169+ "error": {
170+ "status": 400,
171+ "msg": "Page size 30 must be less than admin limit on query
172+ result size: 26."
173+ }
174+ }
175+
154176Client API
155177==========
156178
You can’t perform that action at this time.
0 commit comments