UNPKG

@loopback/docs

Version:
34 lines (21 loc) 1.07 kB
--- lang: en title: 'API docs: repository.filterbuilder.impose' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.repository.filterbuilder.impose.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [FilterBuilder](./repository.filterbuilder.md) &gt; [impose](./repository.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 | <code>Filter&lt;MT&gt; &#124; Where&lt;MT&gt;</code> | a constraint object to merge with own filter object | <b>Returns:</b> `this`