Closes this pool and future calls to **take** will cause the scala.concurrent.Future to raise an com.github.mauricio.async.db.postgresql.pool.PoolAlreadyTerminatedException.
Closes this pool and future calls to **take** will cause the scala.concurrent.Future to raise an com.github.mauricio.async.db.postgresql.pool.PoolAlreadyTerminatedException.
Always returns an empty map.
Closes the pool, you should discard the object.
Closes the pool, you should discard the object.
Returns an object to the pool.
Returns an object to the pool. The object is validated before being added to the collection of available objects to make sure we have a usable object. If the object isn't valid it's discarded.
Checks whether we are still connected to the database.
Checks whether we are still connected to the database.
Picks one connection and runs this query against it.
Picks one connection and runs this query against it. The query should be stateless, it should not start transactions and should not leave anything to be cleaned up in the future. The behavior of this object is undefined if you start a transaction from this method.
Picks one connection and runs this query against it.
Picks one connection and runs this query against it. The query should be stateless, it should not start transactions and should not leave anything to be cleaned up in the future. The behavior of this object is undefined if you start a transaction from this method.
Asks for an object from the pool, this object should be returned to the pool when not in use anymore.
Asks for an object from the pool, this object should be returned to the pool when not in use anymore.
Pool specialized in database connections that also simplifies connection handling by implementing the com.github.mauricio.async.db.Connection trait and saving clients from having to implement the "give back" part of pool management. This lets you do your job without having to worry about managing and giving back connection objects to the pool.
The downside of this is that you should not start transactions or any kind of long running process in this object as the object will be sent back to the pool right after executing a query. If you need to start transactions you will have to take an object from the pool, do it and then give it back manually.