hlrdb-core-0.1.3.0: High-level Redis Database Core API

Safe HaskellNone
LanguageHaskell2010

HLRDB.Structures.Set

Description

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.

Synopsis

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

scard :: MonadRedis m => RedisSet a b -> a -> m Integer Source #

Retrieve the cardinality of a set

srandmember :: MonadRedis m => RedisSet a b -> a -> m (Maybe b) Source #

Retrieve a random element from a set

sscan :: MonadRedis m => RedisSet a b -> a -> Cursor -> m (Maybe Cursor, [b]) Source #

Use a cursor to iterate a collection