Reference documentation and code samples for the Cloud Datastore V1 Client class Avg.
Average of the values of the requested property.
- Only numeric values will be aggregated. All non-numeric values
including
NULL
are skipped. - If the aggregated values contain
NaN
, returnsNaN
. Infinity math follows IEEE-754 standards. - If the aggregated value set is empty, returns
NULL
. - Always returns the result as a double.
Generated from protobuf message google.datastore.v1.AggregationQuery.Aggregation.Avg
Namespace
Google \ Cloud \ Datastore \ V1 \ AggregationQuery \ AggregationMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ property |
Google\Cloud\Datastore\V1\PropertyReference
The property to aggregate on. |
getProperty
The property to aggregate on.
Returns | |
---|---|
Type | Description |
Google\Cloud\Datastore\V1\PropertyReference|null |
hasProperty
clearProperty
setProperty
The property to aggregate on.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Datastore\V1\PropertyReference
|
Returns | |
---|---|
Type | Description |
$this |