Page Contents

Home > @loopback/filter > FilterBuilder > impose

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.

Signature:

impose(constraint: Filter<MT> | Where<MT>): this;

Parameters

Parameter Type Description
constraint Filter<MT> | Where<MT> a constraint object to merge with own filter object

Returns:

this