Class: Google::Apis::DatastoreV1::Count

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

Count of entities that match the query. The COUNT(*) aggregation function operates on the entire entity so it does not require a field reference.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Count

Returns a new instance of Count.



435
436
437
# File 'lib/google/apis/datastore_v1/classes.rb', line 435

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

Instance Attribute Details

#up_toFixnum

Optional. Optional constraint on the maximum number of entities to count. This provides a way to set an upper bound on the number of entities to scan, limiting latency, and cost. Unspecified is interpreted as no bound. If a zero value is provided, a count result of zero should always be expected. High- Level Example: AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); Requires: * Must be non-negative when present. Corresponds to the JSON property upTo

Returns:

  • (Fixnum)


433
434
435
# File 'lib/google/apis/datastore_v1/classes.rb', line 433

def up_to
  @up_to
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



440
441
442
# File 'lib/google/apis/datastore_v1/classes.rb', line 440

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