This module is meant to make working with redis in Haskell more simple. It
is a small layer above the full-blown redis
package.
It only supports a small subset of the redis features.
- newtype Key = Key {
- unKey :: ByteString
- itemGet :: Binary a => Redis -> Key -> IO (Maybe a)
- itemExists :: Redis -> Key -> IO Bool
- itemSet :: Binary a => Redis -> Key -> a -> IO ()
- itemDelete :: Redis -> Key -> IO ()
- setAdd :: Binary a => Redis -> Key -> a -> IO ()
- setRemove :: Binary a => Redis -> Key -> a -> IO ()
- setContains :: Binary a => Redis -> Key -> a -> IO Bool
- setFindAll :: Binary a => Redis -> Key -> IO [a]
Type for keys
Type for a key in the key-value store
Key | |
|
Working with simple key-value pairs
Gets an item from the database
Checks if an item with a given key exists
Set an item in the database
Working with sets
Add an item to a redis set
:: Binary a | |
=> Redis | Redis handle |
-> Key | Key of the set |
-> a | Item to remove from the set |
-> IO () | No result |
Remove an item from a redis set