Class: ODataQueryPipe
Defined in: query/odata-query.pipe.ts:44
ODataQueryPipe — NestJS PipeTransform that converts the request's query options into a typed, validated ODataQuery.
Input contract: one entry per query option name with its value already decoded, which is what NestJS gives an @Query() parameter (Express's req.query, Fastify's request.query). Each option is parsed from its own value and never percent-decoded again, so a value may hold &, %, + or any other character ($filter=contains(title,'A & B'), sent as %26). A system query option given more than once (in any letter case) or with a non-string value is refused (400). To parse a raw query string, use parseQueryString.
Per threat model T-03-01: validates all $filter/$select/$orderby property references against EdmRegistry. Unknown properties throw ODataValidationError.
Per threat model T-03-03: clamps $top to maxTop from ODataModuleResolvedOptions.
Zero TypeORM imports — per PKG-01 architecture constraint.
Implements
PipeTransform<ODataQueryOptionValues,ODataQuery>
Constructors
Constructor
new ODataQueryPipe(
edmRegistry,options):ODataQueryPipe
Defined in: query/odata-query.pipe.ts:45
Parameters
edmRegistry
options
Returns
ODataQueryPipe
Methods
transform()
transform(
value,metadata):ODataQuery
Defined in: query/odata-query.pipe.ts:50
Method to implement a custom pipe. Called with two parameters
Parameters
value
argument before it is received by route handler method
metadata
ArgumentMetadata
contains metadata about the value
Returns
Implementation of
PipeTransform.transform