# new FromClause(clauseopt)
The FROM clause
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
clause |
ModelArg
|
<optional> |
- Implements:
Extends
Members
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;
- Inherited From:
- 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:
# 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>>
# where(condition) → {OrderAndGroupOption}
filter the records by a condition
Parameters:
Name | Type | Description |
---|---|---|
condition |
Condition
|
- Implements: