Class: Google::Apis::DatastoreV1beta2::PropertyExpression

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

Overview

A representation of a property in a projection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PropertyExpression

Returns a new instance of PropertyExpression.


729
730
731
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 729

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

Instance Attribute Details

#aggregation_functionString

The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order. Corresponds to the JSON property aggregationFunction

Returns:

  • (String)

722
723
724
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 722

def aggregation_function
  @aggregation_function
end

#propertyGoogle::Apis::DatastoreV1beta2::PropertyReference

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


727
728
729
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 727

def property
  @property
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


734
735
736
737
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 734

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