Page Contents
Home > @loopback/filter > WhereBuilder
WhereBuilder class
A builder for Where object. It provides fluent APIs to add clauses such as and, or, and other operators.
Signature:
export declare class WhereBuilder<MT extends object = AnyObject>
Example
const whereBuilder = new WhereBuilder();
const where = whereBuilder
.eq('a', 1)
.and({x: 'x'}, {y: {gt: 1}})
.and({b: 'b'}, {c: {lt: 1}})
.or({d: 'd'}, {e: {neq: 1}})
.build();
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
|
Where<MT> |
Methods
| Method | Modifiers | Description |
|---|---|---|
|
Add an | ||
|
Add a | ||
|
Get the where object | ||
|
Add an | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a where object. For conflicting keys with the existing where object, create an | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add a | ||
|
Add an | ||
|
Add a |