Class: Google::Apis::DatastoreV1::BeginTransactionRequest

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
more...

Overview

The request for Datastore.BeginTransaction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BeginTransactionRequest

Returns a new instance of BeginTransactionRequest.

[View source]

280
281
282
# File 'lib/google/apis/datastore_v1/classes.rb', line 280

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

Instance Attribute Details

#database_idString

The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. Corresponds to the JSON property databaseId

Returns:

  • (String)

271
272
273
# File 'lib/google/apis/datastore_v1/classes.rb', line 271

def database_id
  @database_id
end

#transaction_optionsGoogle::Apis::DatastoreV1::TransactionOptions

Options for beginning a new transaction. Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests. Corresponds to the JSON property transactionOptions


278
279
280
# File 'lib/google/apis/datastore_v1/classes.rb', line 278

def transaction_options
  @transaction_options
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

285
286
287
288
# File 'lib/google/apis/datastore_v1/classes.rb', line 285

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