-- 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.3 module Hasql.Pool -- | A pool of connections to DB. data Pool -- | Given the pool-size, timeout and connection settings create a -- connection-pool. acquire :: Int -> NominalDiffTime -> Settings -> IO Pool -- | Release the connection-pool. release :: Pool -> IO () -- | Use a connection from the pool and return it to the pool, when -- finished. Exception-safe. use :: Pool -> (Connection -> IO a) -> IO (Either ConnectionError a) -- | Handle-pattern API. module Hasql.Pool.Handle -- | A temporary handle to the pool. data Handle s -- | Given the pool-size, timeout and connection settings executes an IO -- function on a temporary handle, releasing it automatically afterwards. with :: Int -> NominalDiffTime -> Settings -> (forall s. Handle s -> IO a) -> IO a -- | Error of executing a session on a connection from the pool. type Error = Either ConnectionError Error -- | Executes a session on a connection from the pool, using the provided -- temporary handle to it. session :: Handle s -> Session a -> IO (Either Error a)