-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A pool of connections for Hasql -- -- A pool of connections for Hasql @package hasql-pool @version 0.7.2 module Hasql.Pool -- | A pool of connections to DB. data Pool -- | Given the pool-size and connection settings create a connection-pool. -- -- No connections actually get established by this function. It is -- delegated to use. acquire :: Int -> Settings -> IO Pool -- | Given the pool-size and connection settings constructor action create -- a connection-pool. -- -- No connections actually get established by this function. It is -- delegated to use. -- -- In difference to acquire new settings get fetched each time a -- connection is created. This may be useful for some security models. acquireDynamically :: Int -> IO Settings -> IO Pool -- | Release all the connections in the pool. release :: Pool -> IO () -- | Use a connection from the pool to run a session and return the -- connection to the pool, when finished. -- -- Session failing with a ClientError gets interpreted as a loss -- of connection. In such case the connection does not get returned to -- the pool and a slot gets freed up for a new connection to be -- established the next time one is needed. The error still gets returned -- from this function. use :: Pool -> Session a -> IO (Either UsageError a) -- | Union over all errors that use can result in. data UsageError -- | Attempt to establish a connection failed. ConnectionUsageError :: ConnectionError -> UsageError -- | Session execution failed. SessionUsageError :: QueryError -> UsageError -- | Attempt to use a pool, which has already been called release -- upon. PoolIsReleasedUsageError :: UsageError instance GHC.Classes.Eq Hasql.Pool.UsageError instance GHC.Show.Show Hasql.Pool.UsageError instance GHC.Exception.Type.Exception Hasql.Pool.UsageError