Class: Google::Apis::DatastoreV1::Avg

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/datastore_v1/classes.rb,
lib/google/apis/datastore_v1/representations.rb,
lib/google/apis/datastore_v1/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Avg

Returns a new instance of Avg.



253
254
255
# File 'lib/google/apis/datastore_v1/classes.rb', line 253

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#propertyGoogle::Apis::DatastoreV1::PropertyReference

A reference to a property relative to the kind expressions. Corresponds to the JSON property property



251
252
253
# File 'lib/google/apis/datastore_v1/classes.rb', line 251

def property
  @property
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



258
259
260
# File 'lib/google/apis/datastore_v1/classes.rb', line 258

def update!(**args)
  @property = args[:property] if args.key?(:property)
end