activerecord-spanner-adapter - Class ActiveRecordSpannerAdapter::Transaction (v2.0.0)

Reference documentation and code samples for the activerecord-spanner-adapter class ActiveRecordSpannerAdapter::Transaction.

Inherits

  • Object

Methods

#active?

def active?() -> Boolean
Returns
  • (Boolean)

#begin

def begin()

Begins the transaction.

Read-only and PDML transactions are started by executing a BeginTransaction RPC. Read/write transactions are not really started by this method, and instead a transaction selector is prepared that will be included with the first statement on the transaction.

#buffer

def buffer(mutation)

#commit

def commit()

#force_begin_read_write

def force_begin_read_write()

Forces a BeginTransaction RPC for a read/write transaction. This is used by a connection if the first statement of a transaction failed.

#grpc_transaction=

def grpc_transaction=(grpc)

Sets the underlying gRPC transaction to use for this Transaction. This is used for queries/DML statements that inlined the BeginTransaction option and returned a transaction in the metadata.

#initialize

def initialize(connection, isolation) -> Transaction
Returns

#isolation

def isolation()

#mark_aborted

def mark_aborted()

#next_sequence_number

def next_sequence_number()

#rollback

def rollback()

#shoot_and_forget_rollback

def shoot_and_forget_rollback()

#state

def state()

Returns the value of attribute state.

#transaction_selector

def transaction_selector()