hasql-transaction-0.7.2: A composable abstraction over the retryable transactions for Hasql

Safe HaskellNone




An API for declaration of transactions.


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.