Module: ActiveRecord::ConnectionAdapters::SQLServerRealTransaction

Defined in:
lib/active_record/connection_adapters/sqlserver/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#starting_isolation_levelObject (readonly)

Returns the value of attribute starting_isolation_level.



30
31
32
# File 'lib/active_record/connection_adapters/sqlserver/transaction.rb', line 30

def starting_isolation_level
  @starting_isolation_level
end

Instance Method Details

#commitObject



38
39
40
41
# File 'lib/active_record/connection_adapters/sqlserver/transaction.rb', line 38

def commit
  super
  reset_starting_isolation_level
end

#initialize(connection, isolation: nil, joinable: true, run_commit_callbacks: false) ⇒ Object



32
33
34
35
36
# File 'lib/active_record/connection_adapters/sqlserver/transaction.rb', line 32

def initialize(connection, isolation: nil, joinable: true, run_commit_callbacks: false)
  @connection = connection
  @starting_isolation_level = current_isolation_level if isolation
  super
end

#rollbackObject



43
44
45
46
# File 'lib/active_record/connection_adapters/sqlserver/transaction.rb', line 43

def rollback
  super
  reset_starting_isolation_level
end