Displaying 1 result from an estimated 1 matches for "savepoint_nam".
Did you mean:
savepoint_name
2006 Jun 15
4
testing with transactions
...omebody help me with achieving this (esp. with
connection_adapters and wrapping this all up as a plugin perhaps).
Something in the way of:
# Wrap a block in a transaction. 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
i...