datasette/datasette/utils
Claude 3a0ea58557
Unify page-size parameters on _size with table semantics
The stored query lists silently clamped out-of-range ?_size= values
(a request for 5000 quietly returned 1000) and did not accept the max
keyword. They now share the table view semantics via a new
parse_size_limit() helper: blank means default, "max" means the
maximum (max_returned_rows for query lists), negative or non-integer
values are a 400, and values over the maximum are a 400 instead of
being silently clamped.

The /-/allowed and /-/rules debug endpoints renamed their bare
page/page_size parameters to _page/_size, matching the underscore
grammar used by every other system parameter, with the same validation
(400 instead of silently capping page_size at 200). Their HTML debug
pages and next_url/previous_url builders use the new names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
2026-07-04 17:54:03 +00:00
..
__init__.py Unify page-size parameters on _size with table semantics 2026-07-04 17:54:03 +00:00
actions_sql.py Switch to CTE to handle 600+ actions at once 2026-06-13 11:09:28 -07:00
asgi.py Add cache-busted static asset helper (#2804) 2026-06-23 13:44:58 -07:00
baseconv.py Rename to_decimal/from_decimal to decode/encode, refs #1734 2022-05-02 12:44:09 -07:00
check_callable.py Fix for asyncio.iscoroutinefunction deprecation warnings 2025-10-08 20:32:16 -07:00
internal_db.py Query is_trusted and is_private properties 2026-05-26 11:59:49 -07:00
multipart.py Add request.form() for multipart form data and file uploads 2026-01-28 18:41:03 -08:00
permissions.py Black formatting 2026-02-17 13:30:24 -08:00
shutil_backport.py Upgrade to latest Black, closes #2239 2024-01-30 19:55:26 -08:00
sql_analysis.py Handle recursive CTEs in query analysis 2026-06-29 11:36:54 -07:00
sqlite.py Fixes for SQL write with RETURNING (#2763) 2026-05-31 16:15:34 -07:00
testing.py Replace token-based CSRF with Sec-Fetch-Site header protection (#2689) 2026-04-14 17:11:36 -07:00