module Rake::DataTask::Db::StandardTransactions
Public Instance Methods
with_transaction(do_commit) { || ... }
click to toggle source
# File lib/data_task/adapters/support/transactions.rb, line 9 def with_transaction do_commit, &block execute "begin;" yield close_command = do_commit ? "commit;" : "rollback;" execute close_command end
with_transaction_commit(&block)
click to toggle source
# File lib/data_task/adapters/support/transactions.rb, line 16 def with_transaction_commit &block with_transaction true, &block end
with_transaction_rollback(&block)
click to toggle source
# File lib/data_task/adapters/support/transactions.rb, line 20 def with_transaction_rollback &block with_transaction false, &block end