Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype RedisAuth = RedisAuth Text
- data RedisConf = RedisConf {}
- class MonadRedis m => RedisCtx (m :: Type -> Type) (f :: Type -> Type) | m -> f
- data Redis a
- data Connection
- data PortID
- type RedisT = ReaderT Connection
- runRedisPool :: RedisT m a -> Connection -> m a
- withRedisConn :: MonadIO m => RedisConf -> (Connection -> m a) -> m a
- thisConnection :: Monad m => RedisT m Connection
- module Database.Persist
- execRedisT :: MonadIO m => RedisTx (Queued a) -> RedisT m a
- type RedisBackend = Connection
- data RedisException
Documentation
Information required to connect to a Redis server
Instances
Show RedisConf Source # | |
PersistConfig RedisConf Source # | |
Defined in Database.Persist.Redis.Config type PersistConfigBackend RedisConf :: (Type -> Type) -> Type -> Type # type PersistConfigPool RedisConf # loadConfig :: Value -> Parser RedisConf # applyEnv :: RedisConf -> IO RedisConf # createPoolConfig :: RedisConf -> IO (PersistConfigPool RedisConf) # runPool :: MonadUnliftIO m => RedisConf -> PersistConfigBackend RedisConf m a -> PersistConfigPool RedisConf -> m a # | |
type PersistConfigBackend RedisConf Source # | |
Defined in Database.Persist.Redis.Config | |
type PersistConfigPool RedisConf Source # | |
Defined in Database.Persist.Redis.Config |
class MonadRedis m => RedisCtx (m :: Type -> Type) (f :: Type -> Type) | m -> f #
This class captures the following behaviour: In a context m
, a command
will return its result wrapped in a "container" of type f
.
Please refer to the Command Type Signatures section of this page for more information.
Instances
RedisCtx RedisTx Queued | |
Defined in Database.Redis.Transactions returnDecode :: RedisResult a => Reply -> RedisTx (Queued a) # | |
RedisCtx Redis (Either Reply) | |
Defined in Database.Redis.Core returnDecode :: RedisResult a => Reply -> Redis (Either Reply a) # |
Context for normal command execution, outside of transactions. Use
runRedis
to run actions of this type.
In this context, each result is wrapped in an Either
to account for the
possibility of Redis returning an Error
reply.
Instances
MonadFail Redis | |
Defined in Database.Redis.Core.Internal | |
MonadIO Redis | |
Defined in Database.Redis.Core.Internal | |
Applicative Redis | |
Functor Redis | |
Monad Redis | |
MonadRedis Redis | |
Defined in Database.Redis.Core | |
MonadUnliftIO Redis | |
Defined in Database.Redis.Core.Internal | |
RedisCtx Redis (Either Reply) | |
Defined in Database.Redis.Core returnDecode :: RedisResult a => Reply -> Redis (Either Reply a) # |
data Connection #
A threadsafe pool of network connections to a Redis server. Use the
connect
function to create one.
Instances
type RedisT = ReaderT Connection Source #
Monad reader transformer keeping Redis connection through out the work
runRedisPool :: RedisT m a -> Connection -> m a Source #
withRedisConn :: MonadIO m => RedisConf -> (Connection -> m a) -> m a Source #
Run a connection reader function against a Redis configuration
thisConnection :: Monad m => RedisT m Connection Source #
Extracts connection from RedisT monad transformer
module Database.Persist
execRedisT :: MonadIO m => RedisTx (Queued a) -> RedisT m a Source #
Execute Redis transaction inside RedisT monad transformer
type RedisBackend = Connection Source #
data RedisException Source #
NotSupportedOperation String | |
ParserError String | |
NotSupportedValueType String | |
IncorrectUpdate String | |
IncorrectBehavior |
Instances
Exception RedisException Source # | |
Defined in Database.Persist.Redis.Exception | |
Show RedisException Source # | |
Defined in Database.Persist.Redis.Exception showsPrec :: Int -> RedisException -> ShowS # show :: RedisException -> String # showList :: [RedisException] -> ShowS # |