Safe Haskell | None |
---|---|
Language | Haskell2010 |
Important: it is required that the Hashable and Eq instances used for HashSet respect whatever is used for serialization, since Redis will decide equality only on serialized values.
- smembers :: (MonadRedis m, Eq b, Hashable b) => RedisSet a b -> a -> m (HashSet b)
- sismember :: MonadRedis m => RedisSet a b -> a -> b -> m Bool
- sadd :: (MonadRedis m, Traversable t) => RedisSet a b -> a -> t b -> m ()
- srem :: (MonadRedis m, Traversable t) => RedisSet a b -> a -> t b -> m ()
- scard :: MonadRedis m => RedisSet a b -> a -> m Integer
- srandmember :: MonadRedis m => RedisSet a b -> a -> m (Maybe b)
- sscan :: MonadRedis m => RedisSet a b -> a -> Cursor -> m (Maybe Cursor, [b])
Documentation
smembers :: (MonadRedis m, Eq b, Hashable b) => RedisSet a b -> a -> m (HashSet b) Source #
Retrieve the elements of a set from Redis
sismember :: MonadRedis m => RedisSet a b -> a -> b -> m Bool Source #
Test if an item is a member of a set
sadd :: (MonadRedis m, Traversable t) => RedisSet a b -> a -> t b -> m () Source #
Add items to a set
srem :: (MonadRedis m, Traversable t) => RedisSet a b -> a -> t b -> m () Source #
Remove items from a set
srandmember :: MonadRedis m => RedisSet a b -> a -> m (Maybe b) Source #
Retrieve a random element from a set