| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Simple.MonadArbiter
Contents
Synopsis
- class Monad m => HasSimplePool (m :: Type -> Type) where
- getSimplePool :: m SimpleConnectionPool
- localSimplePool :: (SimpleConnectionPool -> SimpleConnectionPool) -> m a -> m a
- data SimpleConnectionPool = SimpleConnectionPool {
- connectionPool :: Maybe (Pool Connection)
- activeConn :: Maybe Connection
- transactionDepth :: Int
- simpleExecuteQuery :: (HasSimplePool m, MonadUnliftIO m) => Text -> Params -> RowCodec a -> m [a]
- simpleExecuteStatement :: (HasSimplePool m, MonadUnliftIO m) => Text -> Params -> m Int64
- simpleWithDbTransaction :: (HasSimplePool m, MonadUnliftIO m) => m a -> m a
- simpleWithConnection :: (HasSimplePool m, MonadUnliftIO m) => m a -> m a
- simpleRunHandlerWithConnection :: (HasSimplePool m, MonadUnliftIO m) => (Connection -> jobs -> m result) -> jobs -> m result
Documentation
class Monad m => HasSimplePool (m :: Type -> Type) where Source #
Methods
getSimplePool :: m SimpleConnectionPool Source #
localSimplePool :: (SimpleConnectionPool -> SimpleConnectionPool) -> m a -> m a Source #
Instances
| Monad m => HasSimplePool (SimpleDb registry m) Source # | |
Defined in Arbiter.Simple.SimpleDb Methods getSimplePool :: SimpleDb registry m SimpleConnectionPool Source # localSimplePool :: (SimpleConnectionPool -> SimpleConnectionPool) -> SimpleDb registry m a -> SimpleDb registry m a Source # | |
data SimpleConnectionPool Source #
Constructors
| SimpleConnectionPool | |
Fields
| |
MonadArbiter implementation
simpleExecuteQuery :: (HasSimplePool m, MonadUnliftIO m) => Text -> Params -> RowCodec a -> m [a] Source #
simpleExecuteStatement :: (HasSimplePool m, MonadUnliftIO m) => Text -> Params -> m Int64 Source #
simpleWithDbTransaction :: (HasSimplePool m, MonadUnliftIO m) => m a -> m a Source #
simpleWithConnection :: (HasSimplePool m, MonadUnliftIO m) => m a -> m a Source #
simpleRunHandlerWithConnection :: (HasSimplePool m, MonadUnliftIO m) => (Connection -> jobs -> m result) -> jobs -> m result Source #