Page Contents
Home > @loopback/filter > Filter
Filter interface
Query filter object
Signature:
export interface Filter<MT extends object = AnyObject>
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| [fields?](/doc/en/lb4/apidocs.filter.filter.fields.html) | [Fields](/doc/en/lb4/apidocs.filter.fields.html)<MT> | _(Optional)_ To include/exclude fields | |
| [include?](/doc/en/lb4/apidocs.filter.filter.include.html) | [InclusionFilter](/doc/en/lb4/apidocs.filter.inclusionfilter.html)\[\] | _(Optional)_ To include related objects | |
| [limit?](/doc/en/lb4/apidocs.filter.filter.limit.html) | number | _(Optional)_ Maximum number of entities | |
| [offset?](/doc/en/lb4/apidocs.filter.filter.offset.html) | number | _(Optional)_ Offset N number of entities. An alias for `skip` | |
| [order?](/doc/en/lb4/apidocs.filter.filter.order.html) | string\[\] | _(Optional)_ 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?](/doc/en/lb4/apidocs.filter.filter.skip.html) | number | _(Optional)_ Skip N number of entities | |
| [where?](/doc/en/lb4/apidocs.filter.filter.where.html) | [Where](/doc/en/lb4/apidocs.filter.where.html)<MT> | _(Optional)_ The matching criteria |