persistent-redis-0.0.4: Backend for Yesod persistent library using Redis.

Safe HaskellNone

Database.Persist.Redis

Synopsis

Documentation

data RedisConf Source

Information required to connect to a Redis server

Constructors

RedisConf 

Fields

rdHost :: Text

Host

rdPort :: PortID

Port

rdAuth :: Maybe RedisAuth

Auth info

rdMaxConn :: Int

Maximum number of connections

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.

data Redis 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.

data Connection

A threadsafe pool of network connections to a Redis server. Use the connect function to create one.

newtype RedisT m a Source

Monad reader transformer keeping Redis connection through out the work

Constructors

RedisT 

withRedisConn :: (Monad m, MonadIO m) => RedisConf -> (Connection -> m a) -> m aSource

Run a connection reader function against a Redis configuration

thisConnection :: Monad m => RedisT m ConnectionSource

Extracts connection from RedisT monad transformer

execRedisT :: (Monad m, MonadIO m) => RedisTx (Queued a) -> RedisT m aSource

Execute Redis transaction inside RedisT monad transformer