hedis
Safe HaskellNone
LanguageHaskell2010

Database.Redis.ManualCommands.BF

Synopsis

Documentation

data BFInfo Source #

Constructors

BFInfo 

Fields

Instances

Instances details
Show BFInfo Source # 
Instance details

Defined in Database.Redis.ManualCommands.BF

Eq BFInfo Source # 
Instance details

Defined in Database.Redis.ManualCommands.BF

Methods

(==) :: BFInfo -> BFInfo -> Bool #

(/=) :: BFInfo -> BFInfo -> Bool #

RedisResult BFInfo Source # 
Instance details

Defined in Database.Redis.ManualCommands.BF

data BFReserveOpts Source #

Constructors

BFReserveOpts 

Fields

data BFInsertOpts Source #

Constructors

BFInsertOpts 

Fields

bfadd 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

bfcard Source #

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

bfexists Source #

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

bfinfo Source #

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

bfinfoCapacity Source #

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

bfinfoSize Source #

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

bfinfoFilters Source #

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

bfinfoItems Source #

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

bfinfoExpansion Source #

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

bfinsert Source #

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

bfinsertOpts Source #

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

bfmadd Source #

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

bfmexists Source #

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

bfreserve Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the Bloom filter to create.

-> Double

Desired false positive probability, between 0 and 1.

-> 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

bfreserveOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the Bloom filter to create.

-> Double

Desired false positive probability, between 0 and 1.

-> Integer

Initial capacity.

-> BFReserveOpts

Scaling options for the reserved filter.

-> m (f Status) 

Creates an empty Bloom filter (https://redis.io/commands/bf.reserve).

O(1)

Since RedisBloom 1.0.0