search for: create_savepoint

Displaying 1 result from an estimated 1 matches for "create_savepoint".

2006 Jun 15
4
testing with transactions
...Returns result of block. def transaction(start_db_transaction = true) transaction_open = false savepoint_open = false savepoint_name = nil begin if block_given? if start_db_transaction begin_db_transaction transaction_open = true else savepoint_name = create_savepoint savepoint_open = true end yield end rescue Exception => database_transaction_rollback if transaction_open transaction_open = false rollback_db_transaction end if savepoint_open savepoint_open = false rollback_to_savepoint(savepoint_na...