Module: ConnectionPersistence
- Included in:
- Rake::DataTask::Postgres
- Defined in:
- lib/data_task/adapters/support/connection_persistence.rb
Instance Method Summary collapse
-
#persist_connection(conn, conn_options) ⇒ Object
Save a connection and key it by a hash of options that uniquely identify it.
-
#persisted_connection(conn_options) ⇒ Object
Retrieve a connection by the hash of options that uniquely identify it.
Instance Method Details
#persist_connection(conn, conn_options) ⇒ Object
Save a connection and key it by a hash of options that uniquely identify it.
14 15 16 |
# File 'lib/data_task/adapters/support/connection_persistence.rb', line 14 def persist_connection conn, @connections[] = conn end |
#persisted_connection(conn_options) ⇒ Object
Retrieve a connection by the hash of options that uniquely identify it.
9 10 11 |
# File 'lib/data_task/adapters/support/connection_persistence.rb', line 9 def persisted_connection @connections[] end |