UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

35 lines (22 loc) 1.19 kB
--- lang: en title: 'API docs: filter.filterbuilder.impose' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/filter permalink: /doc/en/lb4/apidocs.filter.filterbuilder.impose.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/filter](./filter.md) &gt; [FilterBuilder](./filter.filterbuilder.md) &gt; [impose](./filter.filterbuilder.impose.md) ## FilterBuilder.impose() method Add a Filter or Where constraint object. If it is a filter object, create an `and` clause for conflicting keys with its where object. For any other properties, throw an error. If it's not a Filter, coerce it to a filter, and carry out the same logic. <b>Signature:</b> ```typescript impose(constraint: Filter<MT> | Where<MT>): this; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | constraint | [Filter](./filter.filter.md)<!-- -->&lt;MT&gt; \| [Where](./filter.where.md)<!-- -->&lt;MT&gt; | a constraint object to merge with own filter object | <b>Returns:</b> this