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

Safe HaskellNone
LanguageHaskell2010

Hasql.Pool.Handle

Contents

Description

Handle-pattern API.

Synopsis

Documentation

data Handle s Source

A temporary handle to the pool.

with :: Int -> NominalDiffTime -> Settings -> (forall s. Handle s -> IO a) -> IO a Source

Given the pool-size, timeout and connection settings executes an IO function on a temporary handle, releasing it automatically afterwards.

Usage

type Error = Either ConnectionError Error Source

Error of executing a session on a connection from the pool.

session :: Handle s -> Session a -> IO (Either Error a) Source

Executes a session on a connection from the pool, using the provided temporary handle to it.