Expand description
Collection query parsing (specification sections 6.2 - 6.4).
Turns the reserved query parameters (limit, offset, sort, fields) and
the free-form field filters of a request URL into a structured query.
Structs§
- Collection
Query - A parsed collection query.
- Filter
- One field filter: a name and the value, or values, it must equal.
- Query
Params - The query parameters of a request, in the order they were sent.
- SortKey
- One ordering key of a collection query.
Constants§
- DEFAULT_
LIMIT - Page size used when a request does not ask for one.
- MAX_
LIMIT - Largest page a server will serve, whatever the request asks for.
- RESERVED_
QUERY_ PARAMETERS - Query parameters that are not field filters.
Functions§
- form_
decode - Decode one query component, reading
+as a space. - form_
encode - Percent-encode one query component the way a form does, with
+for a space. - parse_
bounded_ integer - Parse a bounded non-negative integer query parameter.
- parse_
collection_ query - Parse a full collection query from request query parameters.
- parse_
fields - Parse a
fieldsparameter into a sparse fieldset. - parse_
scalar - Parse a filter value with the Links Notation scalar rules.
- parse_
sort - Parse a
sortparameter into ordered sort keys.