Constructor
# new WhereClause(clauseopt)
The WHERE clause
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
clause |
ClauseArg
|
<optional> |
Extends
Methods
# build() → {Q}
Method to build and validate the prepared statement before the execution;
.Method to build and validate the prepared statement before the execution;
- Overrides:
- Implements:
for invalid statements
QueryError
Q
# execute(args) → {Promise.<V>}
Processes itself
Parameters:
Name | Type | Description |
---|---|---|
args |
Array.<any>
|
- Inherited From:
- Implements:
Promise.<V>
# groupBy(selector) → {Executor}
Groups records by an attribute
Parameters:
Name | Type | Description |
---|---|---|
selector |
GroupBySelector
|
- Inherited From:
- Implements:
# hasErrors(exceptions) → {ModelErrorDefinition|undefined}
Parameters:
Name | Type | Description |
---|---|---|
exceptions |
Array
|
ModelErrorDefinition
|
undefined
# limit(selector) → {OffsetOption}
Limits the results to the provided number
Parameters:
Name | Type | Description |
---|---|---|
selector |
LimitSelector
|
- Inherited From:
- Implements:
# offset(selector) → {Executor}
Offsets the results by the provided selector
Parameters:
Name | Type | Description |
---|---|---|
selector |
OffsetSelector
|
- Inherited From:
- Implements:
# orderBy(selector) → {LimitOption|OffsetOption}
Orders the results by the provided attribute and according to the provided direction
Parameters:
Name | Type | Description |
---|---|---|
selector |
OrderBySelector
|
- Inherited From:
- Implements:
# async paginate(size) → {Promise.<Paginator.<R, Q>>}
Parameters:
Name | Type | Description |
---|---|---|
size |
number
|
- Inherited From:
Promise.<Paginator.<R, Q>>