HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

  • Packagehedis-0.16.4
  • Exports551
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceManualCommands.hs

Connection

0 declarations

Auth

Authenticate to the server (http://redis.io/commands/auth). Since Redis 1.0.0

valueauth
  1. :: RedisCtx m f
  2. => ByteString

    Password.

  3. -> m (f Status)
#

O(N) where N is the number of passwords defined for the user.

Authenticates client to the server.

valueauthOpts
  1. :: RedisCtx m f
  2. => ByteString

    Password.

  3. -> AuthOpts

    Additional options.

  4. -> m (f Status)
#

O(N) where N is the number of passwords defined for the user.

Authenticates client to the server.

This method allows passing additional options.

Default options for AuthOpts

Example1 expression
defaultAuthOptsAuthOpts {authOptsUsername = Nothing}

Other commands

Generic keys

47 declarations

Redis default MigrateOpts. Equivalent to omitting all optional parameters.

MigrateOpts
    { migrateCopy    = False -- remove the key from the local instance
    , migrateReplace = False -- don't replace existing key on the remote instance
    , migrateAuth = Nothing
    }
newtypenewtype Cursor
#
Instances4Eq, Show, RedisArg, RedisResult
  • Eq CursorDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show CursorDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • RedisArg CursorDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • RedisResult CursorDefined in hedis-0.16.4 · Database.Redis.ManualCommands

Redis default ScanOpts. Equivalent to omitting all optional parameters.

ScanOpts
    { scanMatch = Nothing -- don't match any pattern
    , scanCount = Nothing -- don't set any requirements on number elements returned (works like value COUNT 10)
    }

Redis default SortOpts. Equivalent to omitting all optional parameters.

SortOpts
    { sortBy    = Nothing -- omit the BY option
    , sortLimit = (0,-1)  -- return entire collection
    , sortGet   = []      -- omit the GET option
    , sortOrder = Asc     -- sort in ascending order
    , sortAlpha = False   -- sort numerically, not lexicographically
    }

Hashes

43 declarations
valuehexpire
  1. :: RedisCtx m f
  2. => ByteString

    Key of the hash.

  3. -> Integer

    Seconds until expiration.

  4. -> NonEmpty ByteString

    List of fields to set expiration for.

  5. -> m (f [HashFieldExpirationStatus])
#

Sets expiration for hash fields using relative time to expire in seconds (https://redis.io/commands/hexpire).

O(N) where N is the number of specified fields.

Set an expiration (TTL or time to live) on one or more fields of a given hash key. You must specify at least one field. Field(s) will automatically be deleted from the hash key when their TTLs expire.

Field expirations will only be cleared by commands that delete or overwrite the contents of the hash fields, including HDEL and HSET commands. This means that all the operations that conceptually alter the value stored at a hash key's field without replacing it with a new one will leave the TTL untouched.

You can clear the TTL using the hpersist command, which turns the hash field back into a persistent field.

Note that calling hexpirehpexpire with a zero TTL or hexpireathpexpireat with a time in the past will result in the hash field being deleted.

Since Redis 7.4.0

valuehrandfieldCount
  1. :: RedisCtx m f
  2. => ByteString
  3. -> Integer
  4. -> m (f [ByteString])
#

Returns one or more random fields from a hash (https://redis.io/commands/hrandfield).

O(N) where N is the number of fields returned.

If the provided count argument is positive, return an array of distinct fields. The array's length is either count or the hash's number of fields (HLEN), whichever is lower.

If called with a negative count, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.

Since Redis 6.2.0

Returns one or more random fields and their values from a hash (https://redis.io/commands/hrandfield).

O(N) where N is the number of fields returned.

If the provided count argument is positive, return an array of distinct fields. The array's length is either count or the hash's number of fields (HLEN), whichever is lower.

If called with a negative count, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.

Since Redis 6.2.0

HyperLogLogs

3 declarations

Lists

35 declarations
valueblmove
  1. :: RedisCtx m f
  2. => ByteString

    Source

  3. -> ByteString

    Destination

  4. -> ListDirection

    Direction where to get the element from in the source list

  5. -> ListDirection

    Direction where to push the element to in the destination list

  6. -> Integer
  7. -> m (f (Maybe ByteString))
#

Move an element after taking it from one list and pushing it to another, or blocks until one is available (https://redis.io/commands/blmove).

In clustered environments source and destination keys must be in the same hash slot, which can be ensured by using hash tags (e.g. {tag}source and {tag}destination).

O(1)

Since Redis 6.2.0

valuelpos :: RedisCtx m f => ByteString -> ByteString -> m (f (Maybe Integer))
#

Returns the index of the first matching element in a list (https://redis.io/commands/lpos).

O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.

Since Redis 6.0.6

valuelmove
  1. :: RedisCtx m f
  2. => ByteString

    Source

  3. -> ByteString

    Destination

  4. -> ListDirection

    Direction where to get the element from in the source list

  5. -> ListDirection

    Direction where to push the element to in the destination list

  6. -> m (f (Maybe ByteString))
#

Move an element after taking it from one list and pushing it to another (https://redis.io/commands/lmove).

In clustered environments source and destination keys must be in the same hash slot, which can be ensured by using hash tags (e.g. {tag}source and {tag}destination). O(1)

Since Redis 6.2.0

Scripting

15 declarations
valueevalsha
  1. :: (RedisCtx m f, RedisResult a)
  2. => ByteString

    base16-encoded sha1 hash of the script

  3. -> [ByteString]

    keys

  4. -> [ByteString]

    args

  5. -> m (f a)
#

Works like eval, but sends the SHA1 hash of the script instead of the script itself. Fails if the server does not recognise the hash, in which case, eval should be used instead.

datadata DebugMode
#
Instances3Eq, Show, RedisArg
  • Eq DebugModeDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show DebugModeDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • RedisArg DebugModeDefined in hedis-0.16.4 · Database.Redis.ManualCommands

Server

49 declarations
valuebgsaveSchedule :: RedisCtx m f => m (f Status)
#

Asynchronously save the dataset to disk (http://redis.io/commands/bgsave).

Immediately returns OK when an AOF rewrite is in progress and schedule the background save to run at the next opportunity.

A client may bee able to check if the operation succeeded using the lastsave command

Since Redis 3.2.2

datadata ReplyMode
#
Instances3Eq, Show, RedisArg
  • Eq ReplyModeDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show ReplyModeDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • RedisArg ReplyModeDefined in hedis-0.16.4 · Database.Redis.ManualCommands
valueclientNoTouch :: RedisCtx m f => Bool -> m (f Status)
#

The CLIENT NO-TOUCH command controls whether commands sent by the client will alter the LRULFU of the keys they access (<https:redis.iocommands/client-notouch>).

When turned on, the current client will not change LFU/LRU stats, unless it sends the TOUCH command.

When turned off, the client touches LFU/LRU stats just as a normal client.

O(1)

Since Redis 7.2.0

valuecommandListOpts
  1. :: RedisCtx m f
  2. => Maybe CommandListFilter

    Optional filtering mode.

    CommandListFilterByModule keeps only commands that belong to the given module. CommandListFilterByAclCat keeps only commands from the given ACL category. CommandListFilterByPattern keeps only commands whose names match the specified glob-style pattern.

  3. -> m (f [ByteString])
#

Returns a list of command names (https://redis.io/commands/command-list).

O(N) where N is the total number of Redis commands.

Since Redis 7.0.0

datadata HotkeysStartOpts
#

Constructors

Instances2Eq, Show
datadata HotkeysGetResponse
#
Instances3Eq, Show, RedisResult

Get information and statistics about the server (http://redis.io/commands/info). The Redis command INFO is split up into info, infoSection. Since Redis 1.0.0

Get information and statistics about the server (http://redis.io/commands/info). The Redis command INFO is split up into info, infoSection. Since Redis 1.0.0

Get the UNIX time stamp of the last successful save to disk (http://redis.io/commands/lastsave). Since Redis 1.0.0

datadata Slowlog
#

A single entry from the slowlog.

Constructors

Instances3Eq, Show, RedisResult
  • Eq SlowlogDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show SlowlogDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • RedisResult SlowlogDefined in hedis-0.16.4 · Database.Redis.ManualCommands

Manages the Redis slow queries log (http://redis.io/commands/slowlog). The Redis command SLOWLOG is split up into slowlogGet, slowlogLen, slowlogReset. Since Redis 2.2.12

Manages the Redis slow queries log (http://redis.io/commands/slowlog). The Redis command SLOWLOG is split up into slowlogGet, slowlogLen, slowlogReset. Since Redis 2.2.12

Manages the Redis slow queries log (http://redis.io/commands/slowlog). The Redis command SLOWLOG is split up into slowlogGet, slowlogLen, slowlogReset. Since Redis 2.2.12

Sets

23 declarations

Sorted Sets

72 declarations
datadata ZaddOpts
#

Add one or more members to a sorted set, or update its score if it already exists (http://redis.io/commands/zadd). The Redis command ZADD is split up into zadd, zaddOpts. Since Redis 1.2.0

Constructors

Instances2Eq, Show
  • Eq ZaddOptsDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show ZaddOptsDefined in hedis-0.16.4 · Database.Redis.ManualCommands

Redis default ZaddOpts. Equivalent to omitting all optional parameters.

ZaddOpts
  { zaddCondition = Nothing -- omit NX and XX options
  , zaddChange    = False   -- don't modify the return value from the number of new elements added, to the total number of elements changed
  , zaddIncrement = False   -- don't add like ZINCRBY
  , zaddSizeCondition = Nothing -- omit GT and LT options
  }
valuezdiff :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString])
#

Returns the difference between multiple sorted sets (https://redis.io/commands/zdiff).

O(L + (N - K)log(N)) worst case where $L$ is the total number of elements in all the sorted sets, N is the size of the first sorted set, and K is the size of the result set.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 6.2.0

valuezdiffWithscores
  1. :: RedisCtx m f
  2. => NonEmpty ByteString

    Sorted set keys.

  3. -> m (f [(ByteString, Double)])
#

Returns the difference between multiple sorted sets with scores (https://redis.io/commands/zdiff).

O(L + (N - K)log(N)) worst case where $L$ is the total number of elements in all the sorted sets, N is the size of the first sorted set, and K is the size of the result set.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 6.2.0

valuezdiffstore
  1. :: RedisCtx m f
  2. => ByteString

    Destination key.

  3. -> NonEmpty ByteString

    Sorted set keys.

  4. -> m (f Integer)
#

Stores the difference of multiple sorted sets in a key (https://redis.io/commands/zdiffstore).

O(L + (N - K)log(N)) worst case where $L$ is the total number of elements in all the sorted sets, N is the size of the first sorted set, and K is the size of the result set.

In clustered environment, commands must operate on keys within the same hash slot.

Keys that do not exist are considered to be empty sets.

If destination already exists, it is overwritten.

Since Redis 6.2.0

datadata SizeCondition
#

Constructors

  • CGT

    Only update existing elements if the new score is greater than the current score. This flag doesn't prevent adding new elements.

  • CLT

    Only update existing elements if the new score is less than the current score. This flag doesn't prevent adding new elements.

Instances3Eq, Show, RedisArg

Removes and returns member-score pairs from the first non-empty sorted set from a list of keys (https://redis.io/commands/zmpop).

O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 7.0.0

Removes and returns member-score pairs from the first non-empty sorted set from a list of keys, or blocks until one is available (https://redis.io/commands/bzmpop).

O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 7.0.0

Removes and returns member-score pairs from the first non-empty sorted set from a list of keys, or blocks until one is available (https://redis.io/commands/bzmpop).

O(K) + O(Mlog(N)) where K is the number of provided keys, N is the number of elements in the sorted set, and M is the number of elements popped.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 7.0.0

datadata ZAggregateOpts
#

Constructors

  • ZAggregateOpts
    • zAggregateWeights :: [Double]

      WEIGHTS option, it is possible to specify a multiplication factor for each input sorted set. Each element's score is multiplied by its corresponding weight before aggregation. When WEIGHTS is not given, the multiplication factors default to 1.

    • zAggregateAggregate :: Aggregate

      AGGREGATE option, it is possible to specify how the results of the union are aggregated

Instances2Eq, Show
valuezinter
  1. :: RedisCtx m f
  2. => NonEmpty ByteString

    Sorted set keys.

  3. -> m (f [ByteString])
#

Returns the intersection of multiple sorted sets (https://redis.io/commands/zinter).

O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 6.2.0

valuezinterWithscores
  1. :: RedisCtx m f
  2. => NonEmpty ByteString

    Sorted set keys.

  3. -> m (f [(ByteString, Double)])
#

Returns the intersection of multiple sorted sets with scores (https://redis.io/commands/zinter).

O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 6.2.0

valuezinterOpts
  1. :: RedisCtx m f
  2. => NonEmpty ByteString

    Sorted set keys.

  3. -> ZAggregateOpts
  4. -> m (f [ByteString])
#

Returns the intersection of multiple sorted sets (https://redis.io/commands/zinter).

O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 6.2.0

valuezinterWithscoresOpts
  1. :: RedisCtx m f
  2. => NonEmpty ByteString

    Sorted set keys.

  3. -> ZAggregateOpts
  4. -> m (f [(ByteString, Double)])
#

Returns the intersection of multiple sorted sets with scores (https://redis.io/commands/zinter).

O(NK) + O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.

In clustered environment, commands must operate on keys within the same hash slot.

Since Redis 6.2.0

Return a range of members in a sorted set, by score (http://redis.io/commands/zrangebyscore). The Redis command ZRANGEBYSCORE is split up into zrangebyscore, zrangebyscoreWithscores, zrangebyscoreLimit, zrangebyscoreWithscoresLimit. Since Redis 1.0.5

Return a range of members in a sorted set, by score (http://redis.io/commands/zrangebyscore). The Redis command ZRANGEBYSCORE is split up into zrangebyscore, zrangebyscoreWithscores, zrangebyscoreLimit, zrangebyscoreWithscoresLimit. Since Redis 1.0.5

Return a range of members in a sorted set, by score (http://redis.io/commands/zrangebyscore). The Redis command ZRANGEBYSCORE is split up into zrangebyscore, zrangebyscoreWithscores, zrangebyscoreLimit, zrangebyscoreWithscoresLimit. Since Redis 1.0.5

Return a range of members in a sorted set, by score (http://redis.io/commands/zrangebyscore). The Redis command ZRANGEBYSCORE is split up into zrangebyscore, zrangebyscoreWithscores, zrangebyscoreLimit, zrangebyscoreWithscoresLimit. Since Redis 1.0.5

Return a range of members in a sorted set, by index, with scores ordered from high to low (http://redis.io/commands/zrevrange). The Redis command ZREVRANGE is split up into zrevrange, zrevrangeWithscores. Since Redis 1.2.0

Return a range of members in a sorted set, by index, with scores ordered from high to low (http://redis.io/commands/zrevrange). The Redis command ZREVRANGE is split up into zrevrange, zrevrangeWithscores. Since Redis 1.2.0

Return a range of members in a sorted set, by score, with scores ordered from high to low (http://redis.io/commands/zrevrangebyscore). The Redis command ZREVRANGEBYSCORE is split up into zrevrangebyscore, zrevrangebyscoreWithscores, zrevrangebyscoreLimit, zrevrangebyscoreWithscoresLimit. Since Redis 2.2.0

Return a range of members in a sorted set, by score, with scores ordered from high to low (http://redis.io/commands/zrevrangebyscore). The Redis command ZREVRANGEBYSCORE is split up into zrevrangebyscore, zrevrangebyscoreWithscores, zrevrangebyscoreLimit, zrevrangebyscoreWithscoresLimit. Since Redis 2.2.0

Return a range of members in a sorted set, by score, with scores ordered from high to low (http://redis.io/commands/zrevrangebyscore). The Redis command ZREVRANGEBYSCORE is split up into zrevrangebyscore, zrevrangebyscoreWithscores, zrevrangebyscoreLimit, zrevrangebyscoreWithscoresLimit. Since Redis 2.2.0

Return a range of members in a sorted set, by score, with scores ordered from high to low (http://redis.io/commands/zrevrangebyscore). The Redis command ZREVRANGEBYSCORE is split up into zrevrangebyscore, zrevrangebyscoreWithscores, zrevrangebyscoreLimit, zrevrangebyscoreWithscoresLimit. Since Redis 2.2.0

Incrementally iterate sorted sets elements and associated scores (http://redis.io/commands/zscan). The Redis command ZSCAN is split up into zscan, zscanOpts. Since Redis 2.8.0

Incrementally iterate sorted sets elements and associated scores (http://redis.io/commands/zscan). The Redis command ZSCAN is split up into zscan, zscanOpts. Since Redis 2.8.0

Add multiple sorted sets and store the resulting sorted set in a new key (http://redis.io/commands/zunionstore). The Redis command ZUNIONSTORE is split up into zunionstore, zunionstoreWeights. Since Redis 2.0.0

Add multiple sorted sets and store the resulting sorted set in a new key (http://redis.io/commands/zunionstore). The Redis command ZUNIONSTORE is split up into zunionstore, zunionstoreWeights. Since Redis 2.0.0

Vector Sets

36 declarations
valuevadd
  1. :: RedisCtx m f
  2. => ByteString

    The name of the key that will hold the vector set data.

  3. -> NonEmpty Double

    The vector values as floating point numbers.

    This uses the VALUES argument form and automatically supplies the number of vector elements.

  4. -> ByteString

    The name of the element that is being added to the vector set.

  5. -> m (f Bool)
#

Adds a new element to a vector set, or updates its vector if it already exists (https://redis.io/commands/vadd).

O(log(N)) for each element added, where N is the number of elements in the vector set.

Since Redis 8.0.0

valuevaddOpts
  1. :: RedisCtx m f
  2. => ByteString

    The name of the key that will hold the vector set data.

  3. -> NonEmpty Double

    The vector values as floating point numbers.

  4. -> ByteString

    The name of the element that is being added to the vector set.

  5. -> VAddOpts

    Additional parameters.

    `REDUCE dim` reduces the dimensionality of the vector using random projection. CAS performs the slow neighbor candidate collection in the background. NOQUANT, Q8, and BIN control quantization and are mutually exclusive. EF sets the build exploration factor. SETATTR associates attributes with the entry. M sets the maximum number of graph links per node.

  6. -> m (f Bool)
#

Adds a new element to a vector set, or updates its vector if it already exists (https://redis.io/commands/vadd).

O(log(N)) for each element added, where N is the number of elements in the vector set.

Since Redis 8.0.0

valuevrange
  1. :: RedisCtx m f
  2. => ByteString

    The name of the vector set key from which to retrieve elements.

  3. -> ByteString

    The starting point of the lexicographical range.

    Use a value prefixed with `[` for an inclusive bound, a value prefixed with `(` for an exclusive bound, or - for the minimum element.

  4. -> ByteString

    The ending point of the lexicographical range.

    Use a value prefixed with `[` for an inclusive bound, a value prefixed with `(` for an exclusive bound, or + for the maximum element.

  5. -> m (f [ByteString])
#

Returns elements in a lexicographical range (https://redis.io/commands/vrange).

O(log(K)+M) where K is the number of elements in the start prefix, and M is the number of elements returned. In practical terms, the command is just O(M).

Since Redis 8.4.0

valuevrangeCount
  1. :: RedisCtx m f
  2. => ByteString

    The name of the vector set key from which to retrieve elements.

  3. -> ByteString

    The starting point of the lexicographical range.

  4. -> ByteString

    The ending point of the lexicographical range.

  5. -> Integer

    The maximum number of elements to return.

    If count is negative, the command returns all elements in the specified range.

  6. -> m (f [ByteString])
#

Returns elements in a lexicographical range (https://redis.io/commands/vrange).

O(log(K)+M) where K is the number of elements in the start prefix, and M is the number of elements returned. In practical terms, the command is just O(M).

Since Redis 8.4.0

valuevrem
  1. :: RedisCtx m f
  2. => ByteString

    The name of the key that holds the vector set.

  3. -> ByteString

    The name of the element to remove from the vector set.

  4. -> m (f Bool)
#

Remove an element from a vector set (https://redis.io/commands/vrem).

O(log(N)) for each element removed, where N is the number of elements in the vector set.

Since Redis 8.0.0

valuevsimOpts
  1. :: RedisCtx m f
  2. => ByteString

    The name of the key that holds the vector set data.

  3. -> VSimQuery

    Query vector source.

  4. -> VSimOpts

    Additional search options.

    COUNT limits the number of returned results. EPSILON filters out elements that are too far from the query vector. EF controls the exploration factor. FILTER applies a filtering expression and `FILTER-EF` limits filtering effort. TRUTH forces an exact linear scan. NOTHREAD executes the search in the main thread.

  5. -> m (f [ByteString])
#

Return elements similar to a given vector or element (https://redis.io/commands/vsim).

O(log(N)) where N is the number of elements in the vector set.

Since Redis 8.0.0

Arrays

34 declarations
datadata ARInfoResponse
#
Instances3Eq, Show, RedisResult
valueargrepWithValuesOpts
  1. :: RedisCtx m f
  2. => ByteString

    Array key.

  3. -> ByteString

    Start index or - for the first array index.

  4. -> ByteString

    End index or + for the last array index.

  5. -> NonEmpty ARGrepPredicate

    One or more predicates to apply.

  6. -> ARGrepOpts

    Additional predicate options.

  7. -> m (f ARIndexValuePairsResponse)
#

Searches array elements in a range and returns matching index-value pairs (https://redis.io/commands/argrep).

O(P * C) where P is the number of visited positions and C is the cost of evaluating predicates.

Since Redis 8.8.0

valuearseek
  1. :: RedisCtx m f
  2. => ByteString

    Array key.

  3. -> Integer

    The new insert cursor position.

  4. -> m (f Bool)
#

Sets the ARINSERT ARRING cursor to a specific index (<https:redis.iocommands/arseek>).

O(1)

Since Redis 8.8.0

Strings

55 declarations

Count set bits in a string (http://redis.io/commands/bitcount). The Redis command BITCOUNT is split up into bitcount, bitcountRange. Since Redis 2.6.0

Count set bits in a string (http://redis.io/commands/bitcount). The Redis command BITCOUNT is split up into bitcount, bitcountRange. Since Redis 2.6.0

Perform bitwise operations between strings (http://redis.io/commands/bitop). The Redis command BITOP is split up into bitopAnd, bitopOr, bitopXor, bitopNot. Since Redis 2.6.0

Perform bitwise operations between strings (http://redis.io/commands/bitop). The Redis command BITOP is split up into bitopAnd, bitopOr, bitopXor, bitopNot. Since Redis 2.6.0

Perform bitwise operations between strings (http://redis.io/commands/bitop). The Redis command BITOP is split up into bitopAnd, bitopOr, bitopXor, bitopNot. Since Redis 2.6.0

Perform bitwise operations between strings (http://redis.io/commands/bitop). The Redis command BITOP is split up into bitopAnd, bitopOr, bitopXor, bitopNot. Since Redis 2.6.0

valuedelex
  1. :: RedisCtx m f
  2. => ByteString

    Key of the string.

  3. -> m (f Bool)
#

Conditionally removes the specified key based on value or hash digest comparison (https://redis.io/commands/delex).

O(1) for IFEQ and IFNE. O(N) for IFDEQ and IFDNE, where N is the length of the string value.

Since Redis 8.4.0

valuedelexWhen
  1. :: RedisCtx m f
  2. => ByteString

    Key of the string.

  3. -> DelexCondition

    Condition to enforce.

    The DELEX command supports a set of options that modify its behavior. Only one option can be specified: IFEQ removes the key if the value is equal to the specified value. IFNE removes the key if the value is not equal to the specified value. IFDEQ removes the key if its hash digest is equal to the specified hash digest. IFDNE removes the key if its hash digest is not equal to the specified hash digest.

  4. -> m (f Bool)
#

Conditionally removes the specified key based on value or hash digest comparison (https://redis.io/commands/delex).

O(1) for IFEQ and IFNE. O(N) for IFDEQ and IFDNE, where N is the length of the string value.

Since Redis 8.4.0

valueincrexOpts
  1. :: RedisCtx m f
  2. => ByteString

    The name of the key to increment.

  3. -> IncrexOpts Integer

    Bound and expiration options.

    LBOUND and UBOUND constrain the result. SATURATE clips out-of-bounds values instead of rejecting the increment. EXPXEXATPXATPERSIST control the key expiration. ENX only sets the expiration when the key currently has no TTL.

  4. -> m (f (Integer, Integer))
#

Increments the numeric value of a key by one and optionally updates its expiration (https://redis.io/commands/increx).

O(1)

Since Redis 8.8.0

valuemsetexOpts
  1. :: RedisCtx m f
  2. => NonEmpty (ByteString, ByteString)

    A series of key/value pairs.

  3. -> SetOpts

    Shared condition and expiration flags.

    The MSETEX command supports a set of options that modify its behavior: NX sets the keys and their expiration time only if none of the specified keys exist. XX sets the keys and their expiration time only if all of the specified keys already exist. EXPXEXAT/PXAT set the shared expiration for the specified keys. KEEPTTL retains the time to live associated with the keys.

  4. -> m (f Bool)
#

Atomically sets multiple string keys with an optional shared expiration in a single operation (https://redis.io/commands/msetex).

O(N) where N is the number of keys to set.

Since Redis 8.4.0

datadata Condition
#

Constructors

  • Nx

    Only set the key if it does not already exist.

  • Xx

    Only set the key if it already exists.

Instances3Eq, Show, RedisArg
  • Eq ConditionDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show ConditionDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • RedisArg ConditionDefined in hedis-0.16.4 · Database.Redis.ManualCommands
datadata SetOpts
#

Constructors

Instances2Eq, Show
  • Eq SetOptsDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show SetOptsDefined in hedis-0.16.4 · Database.Redis.ManualCommands

Set the string value of a key (http://redis.io/commands/set). The Redis command SET is split up into set, setOpts, setGet, setGetOpts. Since Redis 1.0.0

Set the string value of a key (http://redis.io/commands/set). The Redis command SET is split up into set, setOpts, setGet, setGetOpts. Since Redis 1.0.0

Set the string value of a key (http://redis.io/commands/set). The Redis command SET is split up into set, setOpts, setGet, setGetOpts. Since Redis 1.0.0

Set the string value of a key (http://redis.io/commands/set). The Redis command SET is split up into set, setOpts, setGet, setGetOpts. Since Redis 1.0.0

Streams

75 declarations

Redis default XReadOpts. Equivalent to omitting all optional parameters.

XReadOpts
    { block = Nothing -- Don't block waiting for more records
    , recordCount    = Nothing   -- no record count
    }
datadata TrimStrategy
#

Trimming strategy.

Constructors

  • TrimMaxlen Integer

    Evicts entries as long as the stream's length exceeds the specified threshold, where threshold is a positive integer.

  • TrimMinId ByteString

    Evicts entries with IDs lower than threshold, where threshold is a stream ID.

    Since Redis 6.2: will fail if used on ealier versions.

datadata TrimType
#

Type of the trimming.

Constructors

  • TrimExact

    Exact trimming

  • TrimApprox (Maybe Integer)

    Approximate trimming. Is faster, but may leave slightly more elements in the stream if they can't be immediately deleted.

    Additional parameter Specifies the maximal count of entries that will be evicted. When LIMIT and count aren't specified, the default value of 100 * the number of entries in a macro node will be implicitly used as the count, Just 0 removes the limit entirely.

Read values from a stream as part of a consumer group (https:/redis.iocommands/xreadgroup). The redis command XREADGROUP is split up into xreadGroup and xreadGroupOpts. Since Redis 5.0.0

Read values from a stream as part of a consumer group (https:/redis.iocommands/xreadgroup). The redis command XREADGROUP is split up into xreadGroup and xreadGroupOpts. Since Redis 5.0.0

Acknowledge receipt of a message as part of a consumer group. Since Redis 5.0.0

datadata XRefPolicy
#

Constructors

  • XRefPolicyKeepRef

    Deletes the specified entries from the stream, but preserves existing references to these entries in all consumer groups

  • XRefPolicyDelRef

    Deletes the specified entries from the stream and also removes all references to these entries from all consumer groups' pending entry lists, effectively cleaning up all traces of the messages. If an entry ID is not in the stream, but there are dangling references, XDELEX with DELREF would still remove all those references.

  • XRefPolicyAcked

    Deletes the specified entries from the stream only if they have been acknowledged by all consumer groups.

Instances3Eq, Show, RedisArg

Create a consumer group. The redis command XGROUP CREATE is split up into xgroupCreate, xgroupCreateOpts.

datadata XGroupCreateOpts
#

Additional parameters of the XGroupCreate

Constructors

  • XGroupCreateOpts
    • xGroupCreateMkStream :: Bool

      If a stream does not exist, create it automatically with length of 0

    • xGroupCreateEntriesRead :: Maybe ByteString

      Enable consumer group lag tracking, specify an arbitrary ID. An arbitrary ID is any ID that isn't the ID of the stream's first entry, last entry, or zero ("0-0") ID. Use it to find out how many entries are between the arbitrary ID (excluding it) and the stream's last entry.

      Since Redis 7.0, fails if set on the ealier versions.

Instances2Eq, Show

Sets last delivered ID for a consumer group. The redis command XGROUP SETID is split up into xgroupSetId and xgroupSetIdOpts methods.

Read values from a stream within a range (https:/redis.iocommands/xrange). Since Redis 5.0.0

Read values from a stream within a range in reverse order (https:/redis.iocommands/xrevrange). Since Redis 5.0.0

Get the number of entries in a stream (https:/redis.iocommands/xlen). Since Redis 5.0.0

The Redis XPENDING command is split into xpendingSummary and xpendingDetail.

Instances3Eq, Show, RedisResult
datadata XPendingDetailRecord
#

Details about message returned by the xpendingDetails

Instances3Eq, Show, RedisResult

Change ownership of some messages to the given consumer, returning the updated messages. The Redis XCLAIM command is split into xclaim and xclaimJustIds. Since Redis 5.0.0

Change ownership of some messages to the given consumer, returning only the changed message IDs. The Redis XCLAIM command is split into xclaim and xclaimJustIds. Since Redis 5.0.0

Family of the commands related to the autoclaim command in redis, they provide an ability to claim messages that are not processed for a long time.

Transfers ownership of pending stream entries that match the specified criteria. The message should be pending for more than <min-idle-time> milliseconds and ID should be greater than <start>.

Redis xautoclaim command is split info xautoclaim, xautoclaimOpts, xautoclaimJustIds xautoclaimJustIdsOpt functions.

All commands are available since Redis 7.0

valuexautoclaim
  1. :: RedisCtx m f
  2. => ByteString

    Stream name.

  3. -> ByteString

    Consumer group name.

  4. -> ByteString

    Consumer name.

  5. -> Integer

    Min idle time (ms).

  6. -> ByteString

    ID of the message to start.

  7. -> m (f XAutoclaimStreamsResult)
#

O(1) Transfers ownership of pending stream entries that match the specified criteria. The message should be pending for more than <min-idle-time> milliseconds and ID should be greater than <start>.

XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start>

This version of function claims no more than 100 mesages, use xautoclaimOpt to override this behavior.

Since Redis 7.0: fails on ealier versions.

valuexautoclaimOpts
  1. :: RedisCtx m f
  2. => ByteString

    Stream name.

  3. -> ByteString

    Consumer group name.

  4. -> ByteString

    Consumer name.

  5. -> Integer

    min idle time (ms).

  6. -> ByteString

    start ID.

  7. -> XAutoclaimOpts

    Additional parameters.

  8. -> m (f XAutoclaimStreamsResult)
#

O(1) if count is small. Transfers ownership of pending stream entries that match the specified criteria. See xautoclaim for details.

Allows to pass additional optional parameters to set limit.

XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start> COUNT <count>

Since Redis 7.0: fails on the ealier versions.

datadata XAutoclaimResult resultFormat
#

Result of the xautoclaim family of calls

Constructors

Instances3Eq, Show, RedisResult
valuexautoclaimJustIds
  1. :: RedisCtx m f
  2. => ByteString

    Stream name.

  3. -> ByteString

    Consumer group name.

  4. -> ByteString

    Consumer name.

  5. -> Integer

    Min idle time (ms).

  6. -> ByteString

    start ID.

  7. -> m (f XAutoclaimJustIdsResult)
#

O(1) Transfers ownership of pending stream entries that match the specified criteria. See xautoclaim for more details about criteria.

This variant returns only id of the messages without data. This method claims no more than 100 messages, see xautoclaimJustIdsOpts for changing this default.

XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start> JUSTID

Since Redis 7.0: fails on the ealier versions.

valuexautoclaimJustIdsOpts
  1. :: RedisCtx m f
  2. => ByteString

    Stream name.

  3. -> ByteString

    Consumers group name.

  4. -> ByteString

    Consumer namee.

  5. -> Integer

    min idle time (ms).

  6. -> ByteString

    Start ID.

  7. -> XAutoclaimOpts

    Additional parametres.

  8. -> m (f XAutoclaimJustIdsResult)
#

O(1) if count is small Transfers ownership of pending stream entries that match the specified criteria. See xautoclaim for more details about criteria.

This variant returns only id of the messages without data and allows to set the maximum number of messages to be claimed.

XAUTOCLAIM <stream name> <consumer group name> <min idle time> <start> COUNT <count> JUSTID

Since Redis 7.0: fails on the ealier versions.

Data structure that is returned as a result of xinfoConsumers

Constructors

Instances3Eq, Show, RedisResult
datadata XInfoGroupsResponse
#

Result of the xinfoGroups call.

Constructors

Instances3Eq, Show, RedisResult
datadata XInfoStreamResponse
#

Constructors

Instances3Eq, Show, RedisResult

Geo commands

18 declarations
datadata GeoAddOpts
#

Adds one or more members to a geospatial index (https://redis.io/commands/geoadd). The Redis command GEOADD is split up into geoadd and geoAddOpts. Since Redis 3.2.0

Constructors

Instances2Eq, Show
  • Eq GeoAddOptsDefined in hedis-0.16.4 · Database.Redis.ManualCommands
  • Show GeoAddOptsDefined in hedis-0.16.4 · Database.Redis.ManualCommands

Redis stack

0 declarations

Wait

Bloom Filters

Cuckoo Filters

Count-Min Sketches

Top-K

T-Digest

Time Series

Redis Indexes

JSON

Cluster commands

38 declarations
datadata ClusterInfoResponse
#

Constructors

Instances3Eq, Show, RedisResult
Instances2Eq, Show
Instances3Eq, Show, RedisResult
datadata ClusterMigrationTask
#
Instances3Eq, Show, RedisResult

Unimplemented Commands

0 declarations

These commands are not implemented, as of now. Library users can implement these or other commands from experimental Redis versions by using the sendRequest function.