Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool
- Inherits:
-
ConnectionAdapters::StatementPool
- Object
- ConnectionAdapters::StatementPool
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool
- Defined in:
- lib/rapns/patches/rails/3.1.1/postgresql_adapter.rb
Instance Method Summary collapse
Instance Method Details
#connection_active? ⇒ Boolean
9 10 11 12 13 |
# File 'lib/rapns/patches/rails/3.1.1/postgresql_adapter.rb', line 9 def connection_active? @connection.status == PGconn::CONNECTION_OK rescue PGError false end |
#dealloc(key) ⇒ Object
5 6 7 |
# File 'lib/rapns/patches/rails/3.1.1/postgresql_adapter.rb', line 5 def dealloc(key) @connection.query "DEALLOCATE #{key}" if connection_active? end |