Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type DBConnection (schemas :: SchemasType) = K Connection schemas
- runSquealWithConn :: MonadUnliftIO m => DBConnection schemas -> Maybe TransactionMode -> (SquealException -> m k) -> SquealC schemas m k -> m k
- runSquealWithConnRethrow :: MonadUnliftIO m => DBConnection schemas -> Maybe TransactionMode -> SquealC schemas m k -> m k
- runSquealWithConn' :: DBConnection schemas -> SquealC schemas m k -> m k
- newtype SquealC schemas m k = SquealC {
- unSquealC :: DBConnection schemas -> m k
- getSquealPool :: Has (SquealPool schemas) sig m => m (Pool (DBConnection schemas))
- runSqueal' :: (MonadUnliftIO m, Has (SquealPool schemas) sig m) => SquealC schemas m k -> m k
- runSqueal :: (MonadUnliftIO m, Has (SquealPool schemas) sig m) => Maybe TransactionMode -> (SquealException -> m k) -> SquealC schemas m k -> m k
- runSquealPool :: Pool (DBConnection schemas) -> SquealPoolC schemas m k -> m k
- runSquealRethrow :: (MonadUnliftIO m, Has (SquealPool schemas) sig m) => Maybe TransactionMode -> SquealC schemas m k -> m k
- module Control.Algebra
Documentation
type DBConnection (schemas :: SchemasType) = K Connection schemas Source #
runSquealWithConn :: MonadUnliftIO m => DBConnection schemas -> Maybe TransactionMode -> (SquealException -> m k) -> SquealC schemas m k -> m k Source #
Run a squeal session using the given database connection, transaction mode and error handler.
runSquealWithConnRethrow :: MonadUnliftIO m => DBConnection schemas -> Maybe TransactionMode -> SquealC schemas m k -> m k Source #
Run a squeal session using the given database connection and transaction mode. Errors will not be handled.
runSquealWithConn' :: DBConnection schemas -> SquealC schemas m k -> m k Source #
Run a squeal session using the given database connection without a transaction and without any error handling. You probably shouldn't use this.
newtype SquealC schemas m k Source #
SquealC | |
|
Instances
(MonadUnliftIO m, Algebra sig m) => Algebra ((Squeal schemas :: (Type -> Type) -> Type -> Type) :+: sig) (SquealC schemas m) Source # | |
Monad m => Monad (SquealC schemas m) Source # | |
Functor m => Functor (SquealC schemas m) Source # | |
Applicative m => Applicative (SquealC schemas m) Source # | |
Defined in Control.Carrier.Squeal pure :: a -> SquealC schemas m a # (<*>) :: SquealC schemas m (a -> b) -> SquealC schemas m a -> SquealC schemas m b # liftA2 :: (a -> b -> c) -> SquealC schemas m a -> SquealC schemas m b -> SquealC schemas m c # (*>) :: SquealC schemas m a -> SquealC schemas m b -> SquealC schemas m b # (<*) :: SquealC schemas m a -> SquealC schemas m b -> SquealC schemas m a # | |
MonadIO m => MonadIO (SquealC schemas m) Source # | |
Defined in Control.Carrier.Squeal | |
MonadUnliftIO m => MonadUnliftIO (SquealC schemas m) Source # | |
Defined in Control.Carrier.Squeal |
getSquealPool :: Has (SquealPool schemas) sig m => m (Pool (DBConnection schemas)) Source #
runSqueal' :: (MonadUnliftIO m, Has (SquealPool schemas) sig m) => SquealC schemas m k -> m k Source #
Run a squeal session picking a database connection from the connection pool without a transaction and without any error handling. You probably shouldn't use this.
runSqueal :: (MonadUnliftIO m, Has (SquealPool schemas) sig m) => Maybe TransactionMode -> (SquealException -> m k) -> SquealC schemas m k -> m k Source #
Run a squeal session picking a database connection from the connection pool with the given transaction mode and error handler.
runSquealPool :: Pool (DBConnection schemas) -> SquealPoolC schemas m k -> m k Source #
runSquealRethrow :: (MonadUnliftIO m, Has (SquealPool schemas) sig m) => Maybe TransactionMode -> SquealC schemas m k -> m k Source #
Run a squeal session picking a database connection from the connection pool with the given transaction mode. Errors will not be handled.
module Control.Algebra