hasql-transaction-1.1.1.2: Composable abstraction over retryable transactions for Hasql
Safe HaskellNone
LanguageHaskell2010

Hasql.Transaction

Description

An API for declaration of transactions.

Synopsis

Transaction monad

data Transaction a Source #

A composable abstraction over the retryable transactions.

Executes multiple queries under the specified mode and isolation level, while automatically retrying the transaction in case of conflicts. Thus this abstraction closely reproduces the behaviour of STM.

condemn :: Transaction () Source #

Cause transaction to eventually roll back.

sql :: ByteString -> Transaction () Source #

Possibly a multi-statement query, which however cannot be parameterized or prepared, nor can any results of it be collected.

statement :: a -> Statement a b -> Transaction b Source #

Parameters and a specification of the parametric query to apply them to.