hasql
Safe HaskellNone
LanguageHaskell2010

Hasql.Connection

Description

This module provides a low-level effectful API dealing with the connections to the database.

Synopsis

Documentation

data Connection Source #

A single connection to the database.

Instances

Instances details
MonadReader Connection Session Source # 
Instance details

Defined in Hasql.Session.Core

type ConnectionError = Maybe ByteString Source #

Possible details of the connection acquistion error.

acquire :: [Setting] -> IO (Either ConnectionError Connection) Source #

Establish a connection according to the provided settings.

release :: Connection -> IO () Source #

Release the connection.

withLibPQConnection :: Connection -> (Connection -> IO a) -> IO a Source #

Execute an operation on the raw libpq Connection.

The access to the connection is exclusive.