hsdev-0.3.1.3: Haskell development library

Safe HaskellNone
LanguageHaskell98

HsDev.Database.SQLite.Transaction

Contents

Synopsis

Documentation

data Retries Source #

Retry config

Constructors

Retries 

Instances

def :: Default a => a #

The default value for this type.

noRetry :: Retries Source #

Don't retry

retryForever :: Int -> Retries Source #

Retry forever

retryN :: Int -> Int -> Retries Source #

Retry with interval N times

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) => Retries -> m a -> m a Source #

Retry operation

retry_ :: (MonadIO m, MonadCatch m) => m a -> m a Source #

Retry with default params