Class: Google::Apis::FirestoreV1::Count

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

Overview

Count of documents that match the query. The COUNT(*) aggregation function operates on the entire document 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.



541
542
543
# File 'lib/google/apis/firestore_v1/classes.rb', line 541

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

Instance Attribute Details

#up_toFixnum

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

Returns:

  • (Fixnum)


539
540
541
# File 'lib/google/apis/firestore_v1/classes.rb', line 539

def up_to
  @up_to
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



546
547
548
# File 'lib/google/apis/firestore_v1/classes.rb', line 546

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