Cloud Datastore V1 Client - Class Avg (1.24.4)

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, returns NaN. 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 \ Aggregation

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
Google\Cloud\Datastore\V1\PropertyReference|null

hasProperty

clearProperty

setProperty

The property to aggregate on.

Parameter
NameDescription
var Google\Cloud\Datastore\V1\PropertyReference
Returns
TypeDescription
$this