Page Contents

Home > @loopback/filter > Filter

Filter interface

Query filter object


export interface Filter<MT extends object = AnyObject> 


Property Type Description
fields Fields<MT> To include/exclude fields
include Inclusion[] To include related objects
limit number Maximum number of entities
offset number Offset N number of entities. An alias for skip
order string[] Sorting order for matched entities. Each item should be formatted as fieldName ASC or fieldName DESC. For example: ['f1 ASC', 'f2 DESC', 'f3 ASC'].We might want to use Order in the future. Keep it as string[] for now for compatibility with LoopBack 3.x.
skip number Skip N number of entities
where Where<MT> The matching criteria