| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Redis.ManualCommands.BF
Synopsis
- data BFInfo = BFInfo {}
- data BFReserveOpts = BFReserveOpts {}
- defaultBFReserveOpts :: BFReserveOpts
- data BFInsertOpts = BFInsertOpts {}
- defaultBFInsertOpts :: BFInsertOpts
- bfReserveOptsToArgs :: BFReserveOpts -> [ByteString]
- bfInsertOptsToArgs :: BFInsertOpts -> [ByteString]
- bfadd :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- bfcard :: RedisCtx m f => ByteString -> m (f Integer)
- bfexists :: RedisCtx m f => ByteString -> ByteString -> m (f Bool)
- bfinfo :: RedisCtx m f => ByteString -> m (f BFInfo)
- bfinfoCapacity :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoSize :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoFilters :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoItems :: RedisCtx m f => ByteString -> m (f [Integer])
- bfinfoExpansion :: RedisCtx m f => ByteString -> m (f [Maybe Integer])
- bfinsert :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- bfinsertOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> BFInsertOpts -> m (f [Bool])
- bfmadd :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- bfmexists :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool])
- bfreserve :: RedisCtx m f => ByteString -> Double -> Integer -> m (f Status)
- bfreserveOpts :: RedisCtx m f => ByteString -> Double -> Integer -> BFReserveOpts -> m (f Status)
Documentation
Constructors
| BFInfo | |
Fields
| |
data BFReserveOpts Source #
Constructors
| BFReserveOpts | |
Fields
| |
Instances
| Show BFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.BF Methods showsPrec :: Int -> BFReserveOpts -> ShowS # show :: BFReserveOpts -> String # showList :: [BFReserveOpts] -> ShowS # | |
| Eq BFReserveOpts Source # | |
Defined in Database.Redis.ManualCommands.BF Methods (==) :: BFReserveOpts -> BFReserveOpts -> Bool # (/=) :: BFReserveOpts -> BFReserveOpts -> Bool # | |
data BFInsertOpts Source #
Constructors
| BFInsertOpts | |
Fields
| |
Instances
| Show BFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.BF Methods showsPrec :: Int -> BFInsertOpts -> ShowS # show :: BFInsertOpts -> String # showList :: [BFInsertOpts] -> ShowS # | |
| Eq BFInsertOpts Source # | |
Defined in Database.Redis.ManualCommands.BF | |
bfInsertOptsToArgs :: BFInsertOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> ByteString | Item to add to the Bloom filter. |
| -> m (f Bool) |
Adds an item to a Bloom filter (https://redis.io/commands/bf.add).
A filter is created automatically if the key does not exist.
O(k), where k is the number of hash functions used by the last sub-filter.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f Integer) |
Returns the cardinality of a Bloom filter (https://redis.io/commands/bf.card).
Returns 0 when the key does not exist.
O(1)
Since RedisBloom 2.4.4
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> ByteString | Item to check. |
| -> m (f Bool) |
Determines whether an item was added to a Bloom filter (https://redis.io/commands/bf.exists).
Returns False when the key does not exist or the item was definitely not added.
O(k), where $k$ is the number of hash functions used by the last sub-filter.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f BFInfo) |
Returns information about a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the configured capacity of a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the size in bytes of a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the number of sub-filters in a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Integer]) |
Returns the number of unique inserted items detected by a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> m (f [Maybe Integer]) |
Returns the expansion rate of a Bloom filter (https://redis.io/commands/bf.info).
O(1)
Returns Nothing for the non scaling filters.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [Bool]) |
Adds one or more items to a Bloom filter, creating it when needed (https://redis.io/commands/bf.insert).
This is equivalent to inserting with default options and automatic creation enabled.
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to add. |
| -> BFInsertOpts | Optional creation and scaling parameters. |
| -> m (f [Bool]) |
Adds one or more items to a Bloom filter, creating it when needed (https://redis.io/commands/bf.insert).
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to add. |
| -> m (f [Bool]) |
Adds one or more items to a Bloom filter (https://redis.io/commands/bf.madd).
A filter is created automatically if the key does not exist.
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter. |
| -> NonEmpty ByteString | Items to check. |
| -> m (f [Bool]) |
Checks whether one or more items were added to a Bloom filter (https://redis.io/commands/bf.mexists).
A False result means the item is definitely absent, or the key does not exist.
O(kn), where k is the number of hash functions and n is the number of items.
Since RedisBloom 1.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Bloom filter to create. |
| -> Double | Desired false positive probability, between |
| -> Integer | Initial capacity. |
| -> m (f Status) |
Creates an empty Bloom filter (https://redis.io/commands/bf.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 Bloom filter to create. |
| -> Double | Desired false positive probability, between |
| -> Integer | Initial capacity. |
| -> BFReserveOpts | Scaling options for the reserved filter. |
| -> m (f Status) |