Module: ActiveRecord::ConnectionAdapters::Savepoints

Included in:
AbstractAdapter
Defined in:
activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb

Instance Method Summary collapse

Instance Method Details

#create_savepoint(name = current_savepoint_name) ⇒ Object



10
11
12
# File 'activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb', line 10

def create_savepoint(name = current_savepoint_name)
  internal_execute("SAVEPOINT #{name}", "TRANSACTION")
end

#current_savepoint_nameObject



6
7
8
# File 'activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb', line 6

def current_savepoint_name
  current_transaction.savepoint_name
end

#exec_rollback_to_savepoint(name = current_savepoint_name) ⇒ Object



14
15
16
# File 'activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb', line 14

def exec_rollback_to_savepoint(name = current_savepoint_name)
  internal_execute("ROLLBACK TO SAVEPOINT #{name}", "TRANSACTION")
end

#release_savepoint(name = current_savepoint_name) ⇒ Object



18
19
20
# File 'activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb', line 18

def release_savepoint(name = current_savepoint_name)
  internal_execute("RELEASE SAVEPOINT #{name}", "TRANSACTION")
end