Class: Google::Apis::FirestoreV1::RunQueryRequest

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

The request for Firestore.RunQuery.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RunQueryRequest

Returns a new instance of RunQueryRequest.



3152
3153
3154
# File 'lib/google/apis/firestore_v1/classes.rb', line 3152

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

Instance Attribute Details

#modeString

Optional. The mode in which the query request is processed. This field is optional, and when not provided, it defaults to NORMAL mode where no additional statistics will be returned with the query results. Corresponds to the JSON property mode

Returns:

  • (String)


3125
3126
3127
# File 'lib/google/apis/firestore_v1/classes.rb', line 3125

def mode
  @mode
end

#new_transactionGoogle::Apis::FirestoreV1::TransactionOptions

Options for creating a new transaction. Corresponds to the JSON property newTransaction



3130
3131
3132
# File 'lib/google/apis/firestore_v1/classes.rb', line 3130

def new_transaction
  @new_transaction
end

#read_timeString

Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. Corresponds to the JSON property readTime

Returns:

  • (String)


3137
3138
3139
# File 'lib/google/apis/firestore_v1/classes.rb', line 3137

def read_time
  @read_time
end

#structured_queryGoogle::Apis::FirestoreV1::StructuredQuery

A Firestore query. The query stages are executed in the following order: 1. from 2. where 3. select 4. order_by + start_at + end_at 5. offset 6. limit Corresponds to the JSON property structuredQuery



3143
3144
3145
# File 'lib/google/apis/firestore_v1/classes.rb', line 3143

def structured_query
  @structured_query
end

#transactionString

Run the query within an already active transaction. The value here is the opaque transaction ID to execute the query in. Corresponds to the JSON property transaction NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


3150
3151
3152
# File 'lib/google/apis/firestore_v1/classes.rb', line 3150

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3157
3158
3159
3160
3161
3162
3163
# File 'lib/google/apis/firestore_v1/classes.rb', line 3157

def update!(**args)
  @mode = args[:mode] if args.key?(:mode)
  @new_transaction = args[:new_transaction] if args.key?(:new_transaction)
  @read_time = args[:read_time] if args.key?(:read_time)
  @structured_query = args[:structured_query] if args.key?(:structured_query)
  @transaction = args[:transaction] if args.key?(:transaction)
end