Module: ActiveRecord::ConnectionAdapters::MSSQL::RealTransactionExt

Included in:
RealTransaction
Defined in:
lib/arjdbc/mssql/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#initial_transaction_isolationObject (readonly)

Returns the value of attribute initial_transaction_isolation.



28
29
30
# File 'lib/arjdbc/mssql/transaction.rb', line 28

def initial_transaction_isolation
  @initial_transaction_isolation
end

Instance Method Details

#commitObject



40
41
42
43
# File 'lib/arjdbc/mssql/transaction.rb', line 40

def commit
  super
  restore_initial_isolation_level
end

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



30
31
32
33
34
35
36
37
38
# File 'lib/arjdbc/mssql/transaction.rb', line 30

def initialize(connection, isolation: nil, joinable: true, run_commit_callbacks: false)
  @connection = connection

  if isolation
    @initial_transaction_isolation = current_transaction_isolation
  end

  super
end

#rollbackObject



45
46
47
48
# File 'lib/arjdbc/mssql/transaction.rb', line 45

def rollback
  super
  restore_initial_isolation_level
end