Safe Haskell | None |
---|---|
Language | Haskell98 |
Database.Persist.Redis
- newtype RedisAuth = RedisAuth Text
- data RedisConf = RedisConf {}
- class MonadRedis m => RedisCtx m f | m -> f
- data Redis a :: * -> *
- data Connection :: *
- data PortID :: *
- type RedisT = ReaderT Connection
- runRedisPool :: RedisT m a -> Connection -> m a
- withRedisConn :: (Monad m, MonadIO m) => RedisConf -> (Connection -> m a) -> m a
- thisConnection :: Monad m => RedisT m Connection
- module Database.Persist
- execRedisT :: (Monad m, MonadIO m) => RedisTx (Queued a) -> RedisT m a
- type RedisBackend = Connection
- data RedisException
Documentation
class MonadRedis m => RedisCtx m f | m -> f
This class captures the following behaviour: In a context m
, a command
will return it's result wrapped in a "container" of type f
.
Please refer to the Command Type Signatures section of this page for more information.
Minimal complete definition
returnDecode
data Redis a :: * -> *
data Connection :: *
A threadsafe pool of network connections to a Redis server. Use the
connect
function to create one.
Instances
data PortID :: *
Constructors
Service String | |
PortNumber PortNumber | |
UnixSocket String |
type RedisT = ReaderT Connection Source
Monad reader transformer keeping Redis connection through out the work
runRedisPool :: RedisT m a -> Connection -> m a Source
withRedisConn :: (Monad m, 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 :: (Monad m, MonadIO m) => RedisTx (Queued a) -> RedisT m a Source
Execute Redis transaction inside RedisT monad transformer
type RedisBackend = Connection Source