An AggregateField is a class that contains data that defines an aggregation.
Package
@google-cloud/datastoreProperties
alias_
alias_?: string;Methods
alias(alias)
alias(alias?: string): AggregateField;Sets the alias on the aggregate field that should be used.
| Parameter | |
|---|---|
| Name | Description |
alias | string The label used in the results to describe this aggregate field when a query is run. |
| Returns | |
|---|---|
| Type | Description |
AggregateField | {AggregateField} |
average(property)
static average(property: string): Average;Gets a copy of the Average aggregate field.
| Parameter | |
|---|---|
| Name | Description |
property | string |
| Returns | |
|---|---|
| Type | Description |
Average | {Average} |
count()
static count(): Count;Gets a copy of the Count aggregate field.
| Returns | |
|---|---|
| Type | Description |
Count | {Count} |
sum(property)
static sum(property: string): Sum;Gets a copy of the Sum aggregate field.
| Parameter | |
|---|---|
| Name | Description |
property | string |
| Returns | |
|---|---|
| Type | Description |
Sum | {Sum} |
toProto()
abstract toProto(): any;Gets the proto for the aggregate field.
| Returns | |
|---|---|
| Type | Description |
any | |