| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Redis.ManualCommands.Cms
Synopsis
- data CMSInfo = CMSInfo {}
- data CMSMergeOpts
- cmsMergeOptsToArgs :: CMSMergeOpts -> [ByteString]
- cmsincrby :: RedisCtx m f => ByteString -> NonEmpty (ByteString, Integer) -> m (f [Integer])
- cmsinfo :: RedisCtx m f => ByteString -> m (f CMSInfo)
- cmsinitbydim :: RedisCtx m f => ByteString -> Integer -> Integer -> m (f Status)
- cmsinitbyprob :: RedisCtx m f => ByteString -> Double -> Double -> m (f Status)
- cmsmerge :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f Status)
- cmsmergeOpts :: RedisCtx m f => ByteString -> CMSMergeOpts -> m (f Status)
- cmsmergeWeighted :: RedisCtx m f => ByteString -> NonEmpty (ByteString, Integer) -> m (f Status)
- cmsquery :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Integer])
Documentation
Constructors
| CMSInfo | |
Fields
| |
data CMSMergeOpts Source #
Constructors
| CMSMergeUnweighted (NonEmpty ByteString) | Merge the given source sketches using the default weight of |
| CMSMergeWeighted (NonEmpty (ByteString, Integer)) | Merge the given source sketches using an explicit weight for each source. |
Instances
| Show CMSMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Cms Methods showsPrec :: Int -> CMSMergeOpts -> ShowS # show :: CMSMergeOpts -> String # showList :: [CMSMergeOpts] -> ShowS # | |
| Eq CMSMergeOpts Source # | |
Defined in Database.Redis.ManualCommands.Cms | |
cmsMergeOptsToArgs :: CMSMergeOpts -> [ByteString] Source #
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch. |
| -> NonEmpty (ByteString, Integer) | Item and increment pairs. |
| -> m (f [Integer]) |
Increases the count of one or more items by increment (https://redis.io/commands/cms.incrby).
O(n) where n is the number of items
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch. |
| -> m (f CMSInfo) |
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch to create. |
| -> Integer | Number of counters in each row. |
| -> Integer | Number of counter rows. |
| -> m (f Status) |
Initializes a Count-Min Sketch to dimensions specified by user (https://redis.io/commands/cms.initbydim).
O(1)
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch to create. |
| -> Double | Error factor. |
| -> Double | Probability of the error factor. |
| -> m (f Status) |
Initializes a Count-Min Sketch to accommodate requested tolerances (https://redis.io/commands/cms.initbyprob).
O(1)
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination sketch key. |
| -> NonEmpty ByteString | Source sketch keys. |
| -> m (f Status) |
Merges several sketches into one sketch (https://redis.io/commands/cms.merge).
Source sketches are merged with the default weight of 1.
O(n) where n is the number of sketches
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination sketch key. |
| -> CMSMergeOpts | Source sketches with optional weights. |
| -> m (f Status) |
Merges several sketches into one sketch (https://redis.io/commands/cms.merge).
O(n) where n is the number of sketches
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Destination sketch key. |
| -> NonEmpty (ByteString, Integer) | Source sketch keys paired with weights. |
| -> m (f Status) |
Merges several sketches into one sketch (https://redis.io/commands/cms.merge).
O(n) where n is the number of sketches
Since RedisBloom 2.0.0
Arguments
| :: RedisCtx m f | |
| => ByteString | Key of the Count-Min Sketch. |
| -> NonEmpty ByteString | Items to query. |
| -> m (f [Integer]) |
Returns the count for one or more items in a sketch (https://redis.io/commands/cms.query).
O(n) where n is the number of items
Since RedisBloom 2.0.0