Safe Haskell | None |
---|---|
Language | Haskell98 |
- data TransactionType
- data Retries = Retries {
- retriesIntervals :: [Int]
- retriesError :: SQLError -> Bool
- def :: Default a => a
- noRetry :: Retries
- retryForever :: Int -> Retries
- retryN :: Int -> Int -> Retries
- withTransaction :: (MonadIO m, MonadMask m) => Connection -> TransactionType -> Retries -> m a -> m a
- beginTransaction :: MonadIO m => Connection -> TransactionType -> m ()
- commitTransaction :: MonadIO m => Connection -> m ()
- rollbackTransaction :: MonadIO m => Connection -> m ()
- transaction :: SessionMonad m => TransactionType -> Retries -> m a -> m a
- transaction_ :: SessionMonad m => TransactionType -> m a -> m a
- retry :: (MonadIO m, MonadCatch m) => Retries -> m a -> m a
- retry_ :: (MonadIO m, MonadCatch m) => m a -> m a
Documentation
data TransactionType Source #
Three types of transactions
Retry config
Retries | |
|
retryForever :: Int -> Retries Source #
Retry forever
Transactions
withTransaction :: (MonadIO m, MonadMask m) => Connection -> TransactionType -> Retries -> m a -> m a Source #
Run actions inside transaction
beginTransaction :: MonadIO m => Connection -> TransactionType -> m () Source #
Begin transaction
commitTransaction :: MonadIO m => Connection -> m () Source #
Commit transaction
rollbackTransaction :: MonadIO m => Connection -> m () Source #
Rollback transaction
transaction :: SessionMonad m => TransactionType -> Retries -> m a -> m a Source #
Run transaction in SessionMonad
transaction_ :: SessionMonad m => TransactionType -> m a -> m a Source #
Transaction with default retries config
Retry functions
retry_ :: (MonadIO m, MonadCatch m) => m a -> m a Source #
Retry with default params