Cloud Datastore V1 Client - Class Avg (1.32.0)

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
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