hasql-transaction-io-0.2.4.0: Perform IO actions during transactions for Hasql
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasql.TransactionIO

Synopsis

Documentation

data TransactionIO a Source #

A mixture of Hasql statements and arbitrary IO that is all performed during a single transaction

Instances

Instances details
MonadIO TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Methods

liftIO :: IO a -> TransactionIO a #

Applicative TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Functor TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Methods

fmap :: (a -> b) -> TransactionIO a -> TransactionIO b #

(<$) :: a -> TransactionIO b -> TransactionIO a #

Monad TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

MonadThrow TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Methods

throwM :: Exception e => e -> TransactionIO a #

MonadUnliftIO TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Methods

withRunInIO :: ((forall a. TransactionIO a -> IO a) -> IO b) -> TransactionIO b #

MonadError QueryError TransactionIO Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Monoid a => Monoid (TransactionIO a) Source # 
Instance details

Defined in Hasql.Private.TransactionIO

Semigroup a => Semigroup (TransactionIO a) Source # 
Instance details

Defined in Hasql.Private.TransactionIO

condemn :: TransactionIO a Source #

Throw an internal exception that causes the transaction to be rolled back. If you wish to rollback a transaction with a more useful exception use throwIO

sql :: ByteString -> TransactionIO () Source #

Like sql but in a TransactionIO. It should not attempt any statements that cannot be safely run inside a transaction.

statement :: params -> Statement params result -> TransactionIO result Source #

Like statement but in a TransactionIO. It should not attempt any statements that cannot be safely run inside a transaction.