hasql-transaction-io-0.2.8.0: Perform IO actions during transactions for Hasql
Safe HaskellNone
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 :: (HasCallStack, 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 SessionError 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

Methods

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

sconcat :: NonEmpty (TransactionIO a) -> TransactionIO a

stimes :: Integral b => b -> TransactionIO a -> TransactionIO a

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.