Class: RailsBand::ActiveRecord::Event::StartTransaction

Inherits:
BaseEvent
  • Object
show all
Defined in:
lib/rails_band/active_record/event/start_transaction.rb

Overview

A wrapper for the event that is passed to start_transaction.active_record.

Instance Attribute Summary

Attributes inherited from BaseEvent

#allocations, #cpu_time, #duration, #end, #idle_time, #name, #time, #transaction_id

Instance Method Summary collapse

Methods inherited from BaseEvent

#initialize, #slice, #to_h

Constructor Details

This class inherits a constructor from RailsBand::BaseEvent

Instance Method Details

#connection ⇒ Object



12
13
14
# File 'lib/rails_band/active_record/event/start_transaction.rb', line 12

def connection
  @connection ||= @event.payload.fetch(:connection)
end

#transaction ⇒ Object



8
9
10
# File 'lib/rails_band/active_record/event/start_transaction.rb', line 8

def transaction
  @transaction ||= @event.payload.fetch(:transaction)
end