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.



489
490
491
# File 'lib/google/apis/firestore_v1/classes.rb', line 489

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)


487
488
489
# File 'lib/google/apis/firestore_v1/classes.rb', line 487

def up_to
  @up_to
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



494
495
496
# File 'lib/google/apis/firestore_v1/classes.rb', line 494

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