Skip to content

Commit

Permalink
AR: fixed postgres transaction tests [#4519 state:commited]
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
e2 authored and jeremy committed May 1, 2010
1 parent a61a6d2 commit 8b1b273
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -490,12 +490,8 @@ def rollback_db_transaction
execute "ROLLBACK"
end

if defined?(PGconn::PQTRANS_IDLE)
# The ruby-pg driver supports inspecting the transaction status,
# while the ruby-postgres driver does not.
def outside_transaction?
@connection.transaction_status == PGconn::PQTRANS_IDLE
end
def outside_transaction?
@connection.transaction_status == PGconn::PQTRANS_IDLE
end

def create_savepoint
Expand Down

0 comments on commit 8b1b273

Please sign in to comment.