Method: PG::EM::ConnectionPool#transaction
- Defined in:
- lib/pg/em/connection_pool.rb
#transaction(&blk) ⇒ Object
Executes a BEGIN at the start of the block and a COMMIT at the end of the block or ROLLBACK if any exception occurs. Calls to transaction may be nested, however without sub-transactions (save points).
298 299 300 301 302 |
# File 'lib/pg/em/connection_pool.rb', line 298 def transaction(&blk) hold do |pg| pg.transaction(&blk) end end |