| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Redis.ManualCommands.CF
Synopsis
- data CFInfo = CFInfo {}
- data CFReserveOpts = CFReserveOpts {}
- defaultCFReserveOpts :: CFReserveOpts
- data CFInsertOpts = CFInsertOpts {}
- defaultCFInsertOpts :: CFInsertOpts
- data CFInsertResult
- cfReserveOptsToArgs :: CFReserveOpts -> [ByteString]
- cfInsertOptsToArgs :: CFInsertOpts -> [ByteString]
- cfadd :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfaddnx :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfcount :: RedisCtx m f => ByteString -> ByteString -> m (f Integer)
- cfdel :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- cfinfo :: RedisCtx m f => ByteString -> m (f CFInfo)
- cfinsert :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [CFInsertResult])
- cfinsertOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> CFInsertOpts -> m (f [CFInsertResult])
- cfinsertnx :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [CFInsertResult])
- cfinsertnxOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> CFInsertOpts -> m (f [CFInsertResult])
- cfmexists :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- cfreserve :: RedisCtx m f => ByteString -> Integer -> m (f Status)
- cfreserveOpts :: RedisCtx m f => ByteString -> Integer -> CFReserveOpts -> m (f Status)
Documentation
Constructors
| CFInfo | |
Fields
| |
data CFReserveOpts Source #
Constructors
| CFReserveOpts | |
Fields
| |
Instances
| Show CFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.CF Methods showsPrec :: Int -> CFReserveOpts -> ShowS # show :: CFReserveOpts -> String # showList :: [CFReserveOpts] -> ShowS # | |
| Eq CFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.CF Methods (==) :: CFReserveOpts -> CFReserveOpts -> Bool # (/=) :: CFReserveOpts -> CFReserveOpts -> Bool # | |
data CFInsertOpts Source #
Constructors
| CFInsertOpts | |
Fields
| |
Instances
| Show CFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.CF Methods showsPrec :: Int -> CFInsertOpts -> ShowS # show :: CFInsertOpts -> String # showList :: [CFInsertOpts] -> ShowS # | |
| Eq CFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.CF | |
data CFInsertResult Source #
Constructors
| CFInsertAdded | |
| CFInsertAlreadyExists | |
| CFInsertFilterFull |
Instances
| Show CFInsertResult Source # | |
Defined in Database.Redis.ManualCommands.CF Methods showsPrec :: Int -> CFInsertResult -> ShowS # show :: CFInsertResult -> String # showList :: [CFInsertResult] -> ShowS # | |
| Eq CFInsertResult Source # | |
Defined in Database.Redis.ManualCommands.CF Methods (==) :: CFInsertResult -> CFInsertResult -> Bool # (/=) :: CFInsertResult -> CFInsertResult -> Bool # | |
| RedisResult CFInsertResult Source # | |
Defined in Database.Redis.ManualCommands.CF | |
cfInsertOptsToArgs :: CFInsertOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to add. |
| -> m (f Bool) |
Adds an item to a Cuckoo filter (https://redis.io/commands/cf.add).
A filter is created automatically if the key does not exist.
O(k + i), where k is the number of sub-filters and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to add. |
| -> m (f Bool) |
Adds an item to a Cuckoo filter only if it did not already exist (https://redis.io/commands/cf.addnx).
A filter is created automatically if the key does not exist.
O(k + i), where k is the number of sub-filters and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to count. |
| -> m (f Integer) |
Returns the number of times an item might appear in a Cuckoo filter (https://redis.io/commands/cf.count).
Returns 0 when the key does not exist or the item was not found.
O(k), where k is the number of sub-filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to delete. |
| -> m (f Bool) |
Deletes an item from a Cuckoo filter (https://redis.io/commands/cf.del).
Returns False when the key does not exist or the item was not found.
O(k), where k is the number of sub-filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> ByteString | Item to check. |
| -> m (f Bool) |
Checks whether an item may exist in a Cuckoo filter (https://redis.io/commands/cf.exists).
Returns False when the key does not exist or the item is definitely absent.
O(k), where k is the number of sub-filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> m (f CFInfo) |
Returns information about a Cuckoo filter (https://redis.io/commands/cf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter, creating it when needed (https://redis.io/commands/cf.insert).
This is equivalent to inserting with default options and automatic creation enabled.
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> CFInsertOpts | Optional creation parameters. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter, creating it when needed (https://redis.io/commands/cf.insert).
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter only if they did not already exist (https://redis.io/commands/cf.insertnx).
This is equivalent to inserting with default options and automatic creation enabled.
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to add. |
| -> CFInsertOpts | Optional creation parameters. |
| -> m (f [CFInsertResult]) |
Adds one or more items to a Cuckoo filter only if they did not already exist (https://redis.io/commands/cf.insertnx).
O(n * (k + i)), where n is the number of items, k is the number of sub-filters, and i is maxIterations.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter. |
| -> NonEmpty ByteString | Items to check. |
| -> m (f [Bool]) |
Checks whether one or more items may exist in a Cuckoo filter (https://redis.io/commands/cf.mexists).
A False result means the item is definitely absent, or the key does not exist.
O(k * n), where k is the number of sub-filters and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter to create. |
| -> Integer | Initial capacity. |
| -> m (f Status) |
Creates an empty Cuckoo filter (https://redis.io/commands/cf.reserve).
The filter will fail if the key already exists.
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Cuckoo filter to create. |
| -> Integer | Initial capacity. |
| -> CFReserveOpts | Bucket and scaling options. |
| -> m (f Status) |