hasql-pool-0.3: A pool of connections for Hasql

Safe HaskellNone
LanguageHaskell2010

Hasql.Pool

Synopsis

Documentation

data Pool Source

A pool of connections to DB.

acquire :: Int -> NominalDiffTime -> Settings -> IO Pool Source

Given the pool-size, timeout and connection settings create a connection-pool.

release :: Pool -> IO () Source

Release the connection-pool.

use :: Pool -> (Connection -> IO a) -> IO (Either ConnectionError a) Source

Use a connection from the pool and return it to the pool, when finished. Exception-safe.