hedis
Safe HaskellNone
LanguageHaskell2010

Database.Redis.ManualCommands

Synopsis

Documentation

objectRefcount Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f Integer) 

Inspect the internals of Redis objects (http://redis.io/commands/object). The Redis command OBJECT is split up into objectRefcount, objectEncoding, objectIdletime. Since Redis 2.2.3

objectIdletime Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f Integer) 

Inspect the internals of Redis objects (http://redis.io/commands/object). The Redis command OBJECT is split up into objectRefcount, objectEncoding, objectIdletime. Since Redis 2.2.3

objectEncoding Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f ByteString) 

Inspect the internals of Redis objects (http://redis.io/commands/object). The Redis command OBJECT is split up into objectRefcount, objectEncoding, objectIdletime. Since Redis 2.2.3

linsertBefore Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

pivot

-> ByteString

value

-> m (f Integer) 

Insert an element before or after another element in a list (http://redis.io/commands/linsert). The Redis command LINSERT is split up into linsertBefore, linsertAfter. Since Redis 2.2.0

linsertAfter Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

pivot

-> ByteString

value

-> m (f Integer) 

Insert an element before or after another element in a list (http://redis.io/commands/linsert). The Redis command LINSERT is split up into linsertBefore, linsertAfter. Since Redis 2.2.0

data LPosOpts Source #

Constructors

LPosOpts 

Instances

Instances details
Show LPosOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq LPosOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

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

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

lposOpts :: RedisCtx m f => ByteString -> ByteString -> LPosOpts -> m (f (Maybe Integer)) Source #

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

lposCount :: RedisCtx m f => ByteString -> ByteString -> Integer -> m (f [Integer]) Source #

Returns the indexes of matching elements 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

lposCountOpts :: RedisCtx m f => ByteString -> ByteString -> Integer -> LPosOpts -> m (f [Integer]) Source #

Returns the indexes of matching elements 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

lmove Source #

Arguments

:: RedisCtx m f 
=> ByteString

Source

-> ByteString

Destination

-> ListDirection

Direction where to get the element from in the source list

-> ListDirection

Direction where to push the element to in the destination list

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

blmove Source #

Arguments

:: RedisCtx m f 
=> ByteString

Source

-> ByteString

Destination

-> ListDirection

Direction where to get the element from in the source list

-> ListDirection

Direction where to push the element to in the destination list

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

lmpop :: RedisCtx m f => NonEmpty ByteString -> ListDirection -> m (f (Maybe (ByteString, [ByteString]))) Source #

Pops one or more elements from the first non-empty list from a list of keys (https://redis.io/commands/lmpop).

O(N+M) where N is the number of provided keys and M is the number of elements returned.

Since Redis 7.0.0

lmpopCount :: RedisCtx m f => NonEmpty ByteString -> ListDirection -> Integer -> m (f (Maybe (ByteString, [ByteString]))) Source #

Pops one or more elements from the first non-empty list from a list of keys (https://redis.io/commands/lmpop).

O(N+M) where N is the number of provided keys and M is the number of elements returned.

Since Redis 7.0.0

blmpop :: RedisCtx m f => Double -> NonEmpty ByteString -> ListDirection -> m (f (Maybe (ByteString, [ByteString]))) Source #

Pops one or more elements from the first non-empty list from a list of keys, or blocks until one is available (https://redis.io/commands/blmpop).

O(N+M) where N is the number of provided keys and M is the number of elements returned.

Since Redis 7.0.0

blmpopCount :: RedisCtx m f => Double -> NonEmpty ByteString -> ListDirection -> Integer -> m (f (Maybe (ByteString, [ByteString]))) Source #

Pops one or more elements from the first non-empty list from a list of keys, or blocks until one is available (https://redis.io/commands/blmpop).

O(N+M) where N is the number of provided keys and M is the number of elements returned.

Since Redis 7.0.0

getType Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f RedisType) 

Determine the type stored at key (http://redis.io/commands/type). Since Redis 1.0.0

data Slowlog Source #

A single entry from the slowlog.

Constructors

Slowlog 

Fields

Instances

Instances details
Show Slowlog Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq Slowlog Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

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

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

RedisResult Slowlog Source # 
Instance details

Defined in Database.Redis.ManualCommands

slowlogGet Source #

Arguments

:: RedisCtx m f 
=> Integer

cnt

-> m (f [Slowlog]) 

zrange Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

start

-> Integer

stop

-> m (f [ByteString]) 

Return a range of members in a sorted set, by index (http://redis.io/commands/zrange). The Redis command ZRANGE is split up into zrange, zrangeWithscores. Since Redis 1.2.0

zrangeWithscores Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

start

-> Integer

stop

-> m (f [(ByteString, Double)]) 

Return a range of members in a sorted set, by index (http://redis.io/commands/zrange). The Redis command ZRANGE is split up into zrange, zrangeWithscores. Since Redis 1.2.0

zrevrange Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

start

-> Integer

stop

-> m (f [ByteString]) 

zrevrangeWithscores Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

start

-> Integer

stop

-> m (f [(ByteString, Double)]) 

zrangebyscore Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

min

-> Double

max

-> m (f [ByteString]) 

zrangebyscoreWithscores Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

min

-> Double

max

-> m (f [(ByteString, Double)]) 

zrangebyscoreLimit Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

min

-> Double

max

-> Integer

offset

-> Integer

count

-> m (f [ByteString]) 

zrangebyscoreWithscoresLimit Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

min

-> Double

max

-> Integer

offset

-> Integer

count

-> m (f [(ByteString, Double)]) 

zrevrangebyscore Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

max

-> Double

min

-> m (f [ByteString]) 

zrevrangebyscoreWithscores Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

max

-> Double

min

-> m (f [(ByteString, Double)]) 

zrevrangebyscoreLimit Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

max

-> Double

min

-> Integer

offset

-> Integer

count

-> m (f [ByteString]) 

zrevrangebyscoreWithscoresLimit Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Double

max

-> Double

min

-> Integer

offset

-> Integer

count

-> m (f [(ByteString, Double)]) 

data SortOpts Source #

Options for the sort command.

Instances

Instances details
Show SortOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq SortOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultSortOpts :: SortOpts Source #

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
    }

data SortOrder Source #

Constructors

Asc 
Desc 

Instances

Instances details
Show SortOrder Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq SortOrder Source # 
Instance details

Defined in Database.Redis.ManualCommands

sortStore Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

destination

-> SortOpts 
-> m (f Integer) 

Sort the elements in a list, set or sorted set (http://redis.io/commands/sort). The Redis command SORT is split up into sort, sortStore. Since Redis 1.0.0

sort Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> SortOpts 
-> m (f [ByteString]) 

Sort the elements in a list, set or sorted set (http://redis.io/commands/sort). The Redis command SORT is split up into sort, sortStore. Since Redis 1.0.0

sortInternal Source #

Arguments

:: (RedisResult a, RedisCtx m f) 
=> ByteString

key

-> Maybe ByteString

destination

-> SortOpts 
-> m (f a) 

data Aggregate Source #

Constructors

Sum 
Min 
Max 

Instances

Instances details
Show Aggregate Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq Aggregate Source # 
Instance details

Defined in Database.Redis.ManualCommands

zunionstore Source #

Arguments

:: RedisCtx m f 
=> ByteString

destination

-> [ByteString]

keys

-> Aggregate 
-> m (f Integer) 

zunionstoreWeights Source #

Arguments

:: RedisCtx m f 
=> ByteString

destination

-> [(ByteString, Double)]

weighted keys

-> Aggregate 
-> m (f Integer) 

zinterstore Source #

Arguments

:: RedisCtx m f 
=> ByteString

destination

-> NonEmpty ByteString

keys

-> Aggregate 
-> m (f Integer) 

Intersect multiple sorted sets and store the resulting sorted set in a new key (http://redis.io/commands/zinterstore). The Redis command ZINTERSTORE is split up into zinterstore, zinterstoreWeights. Since Redis 2.0.0

zinterstoreWeights Source #

Arguments

:: RedisCtx m f 
=> ByteString

destination

-> NonEmpty (ByteString, Double)

weighted keys

-> Aggregate 
-> m (f Integer) 

Intersect multiple sorted sets and store the resulting sorted set in a new key (http://redis.io/commands/zinterstore). The Redis command ZINTERSTORE is split up into zinterstore, zinterstoreWeights. Since Redis 2.0.0

zstoreInternal Source #

Arguments

:: RedisCtx m f 
=> ByteString

cmd

-> ByteString

destination

-> [ByteString]

keys

-> [Double]

weights

-> Aggregate 
-> m (f Integer) 

zdiff :: RedisCtx m f => NonEmpty ByteString -> m (f [ByteString]) Source #

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

zdiffWithscores Source #

Arguments

:: RedisCtx m f 
=> NonEmpty ByteString

Sorted set keys.

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

zdiffstore Source #

Arguments

:: RedisCtx m f 
=> ByteString

Destination key.

-> NonEmpty ByteString

Sorted set keys.

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

zinter Source #

Arguments

:: RedisCtx m f 
=> NonEmpty ByteString

Sorted set keys.

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

data ZAggregateOpts Source #

Constructors

ZAggregateOpts 

Fields

  • 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

zinterWithscores Source #

Arguments

:: RedisCtx m f 
=> NonEmpty ByteString

Sorted set keys.

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

zinterOpts Source #

Arguments

:: RedisCtx m f 
=> NonEmpty ByteString

Sorted set keys.

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

zinterWithscoresOpts Source #

Arguments

:: RedisCtx m f 
=> NonEmpty ByteString

Sorted set keys.

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

zunion Source #

Arguments

:: RedisCtx m f 
=> NonEmpty ByteString

Sorted set keys.

-> m (f [ByteString]) 

Returns the union of multiple sorted sets (https://redis.io/commands/zunion).

O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.

Since Redis 6.2.0

zunionWithscores :: RedisCtx m f => NonEmpty ByteString -> m (f [(ByteString, Double)]) Source #

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

O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.

Since Redis 6.2.0

zunionOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [ByteString]) Source #

Returns the union of multiple sorted sets (https://redis.io/commands/zunion).

O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.

Since Redis 6.2.0

zunionWithscoresOpts :: RedisCtx m f => NonEmpty ByteString -> ZAggregateOpts -> m (f [(ByteString, Double)]) Source #

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

O(N) + O(Mlog(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.

Since Redis 6.2.0

eval Source #

Arguments

:: (RedisCtx m f, RedisResult a) 
=> ByteString

script

-> [ByteString]

keys

-> [ByteString]

args

-> m (f a) 

Execute a Lua script server side (http://redis.io/commands/eval). Since Redis 2.6.0

evalsha Source #

Arguments

:: (RedisCtx m f, RedisResult a) 
=> ByteString

base16-encoded sha1 hash of the script

-> [ByteString]

keys

-> [ByteString]

args

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

fcall :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a) Source #

Invokes a function (https://redis.io/commands/fcall).

Complexity depends on the function that is executed.

Since Redis 7.0.0

fcallReadonly :: (RedisCtx m f, RedisResult a) => ByteString -> [ByteString] -> [ByteString] -> m (f a) Source #

Invokes a read-only function (https://redis.io/commands/fcall_ro).

Complexity depends on the function that is executed.

Since Redis 7.0.0

functionDelete :: RedisCtx m f => ByteString -> m (f Status) Source #

Deletes a library and its functions (https://redis.io/commands/function-delete).

O(1)

Since Redis 7.0.0

functionDump :: RedisCtx m f => m (f ByteString) Source #

Dumps all libraries into a serialized binary payload (https://redis.io/commands/function-dump).

O(N) where N is the number of functions.

Since Redis 7.0.0

functionFlush :: RedisCtx m f => m (f Status) Source #

Deletes all libraries and functions (https://redis.io/commands/function-flush).

O(N) where N is the number of functions deleted.

Since Redis 7.0.0

functionFlushOpts :: RedisCtx m f => FlushOpts -> m (f Status) Source #

Deletes all libraries and functions (https://redis.io/commands/function-flush).

O(N) where N is the number of functions deleted.

Since Redis 7.0.0

functionHelp :: RedisCtx m f => m (f [ByteString]) Source #

Returns helpful text about FUNCTION subcommands (https://redis.io/commands/function-help).

O(1)

Since Redis 7.0.0

functionKill :: RedisCtx m f => m (f Status) Source #

Terminates a function during execution (https://redis.io/commands/function-kill).

O(1)

Since Redis 7.0.0

functionList :: RedisCtx m f => m (f Reply) Source #

Returns information about all libraries (https://redis.io/commands/function-list).

O(N) where N is the number of functions.

Since Redis 7.0.0

functionListOpts :: RedisCtx m f => FunctionListOpts -> m (f Reply) Source #

Returns information about all libraries (https://redis.io/commands/function-list).

O(N) where N is the number of functions.

Since Redis 7.0.0

functionLoad :: RedisCtx m f => ByteString -> m (f ByteString) Source #

Creates a library (https://redis.io/commands/function-load).

O(N) where N is the number of bytes in the function's source code.

Since Redis 7.0.0

functionLoadReplace :: RedisCtx m f => ByteString -> m (f ByteString) Source #

Creates a library, replacing an existing one with the same name (https://redis.io/commands/function-load).

O(N) where N is the number of bytes in the function's source code.

Since Redis 7.0.0

functionRestore :: RedisCtx m f => ByteString -> Maybe FunctionRestorePolicy -> m (f Status) Source #

Restores all libraries from a payload (https://redis.io/commands/function-restore).

O(N) where N is the number of functions restored.

Since Redis 7.0.0

functionStats :: RedisCtx m f => m (f Reply) Source #

Returns information about a function during execution (https://redis.io/commands/function-stats).

O(1)

Since Redis 7.0.0

bitcount Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f Integer) 

bitcountRange Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

start

-> Integer

end

-> m (f Integer) 

bitopAnd Source #

Arguments

:: RedisCtx m f 
=> ByteString

destkey

-> [ByteString]

srckeys

-> m (f Integer) 

bitopOr Source #

Arguments

:: RedisCtx m f 
=> ByteString

destkey

-> [ByteString]

srckeys

-> m (f Integer) 

bitopXor Source #

Arguments

:: RedisCtx m f 
=> ByteString

destkey

-> [ByteString]

srckeys

-> m (f Integer) 

bitopNot Source #

Arguments

:: RedisCtx m f 
=> ByteString

destkey

-> ByteString

srckey

-> m (f Integer) 

bitop Source #

Arguments

:: RedisCtx m f 
=> ByteString

operation

-> [ByteString]

keys

-> m (f Integer) 

defaultVAddOpts :: VAddOpts Source #

Redis default VAddOpts. Equivalent to omitting all optional parameters.

vadd Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> NonEmpty Double

The vector values as floating point numbers.

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

-> ByteString

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

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

vaddOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> NonEmpty Double

The vector values as floating point numbers.

-> ByteString

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

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

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

vcard Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> m (f Integer) 

Return the number of elements in the specified vector set (https://redis.io/commands/vcard).

O(1)

Since Redis 8.0.0

vdim Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> m (f Integer) 

Return the number of dimensions of the vectors in the specified vector set (https://redis.io/commands/vdim).

O(1)

Since Redis 8.0.0

vemb Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element whose vector you want to retrieve.

-> m (f [Double]) 

Return the approximate vector associated with a given element in the vector set (https://redis.io/commands/vemb).

O(1)

Since Redis 8.0.0

vembRaw Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element whose vector you want to retrieve.

-> m (f (Maybe VEmbRawResponse)) 

Return the raw internal representation of the vector associated with a given element in the vector set (https://redis.io/commands/vemb).

O(1)

Since Redis 8.0.0

vgetattr Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element whose attributes you want to retrieve.

-> m (f (Maybe ByteString)) 

Retrieve the JSON attributes of an element in a vector set (https://redis.io/commands/vgetattr).

O(1)

Since Redis 8.0.0

vinfo Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> m (f (Maybe VInfoResponse)) 

Return metadata and internal details about a vector set (https://redis.io/commands/vinfo).

O(1)

Since Redis 8.0.0

vismember Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element to check.

-> m (f Bool) 

Check if an element exists in a vector set (https://redis.io/commands/vismember).

O(1)

Since Redis 8.0.0

vlinks Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element whose HNSW neighbors you want to inspect.

-> m (f (Maybe VLinksResponse)) 

Return the neighbors of a specified element in a vector set (https://redis.io/commands/vlinks).

O(1)

Since Redis 8.0.0

vlinksWithScores Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element whose HNSW neighbors you want to inspect.

-> m (f (Maybe VLinksWithScoresResponse)) 

Return the neighbors of a specified element in a vector set together with their similarity scores (https://redis.io/commands/vlinks).

O(1)

Since Redis 8.0.0

vrandmember Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> m (f (Maybe ByteString)) 

Return one random element from a vector set (https://redis.io/commands/vrandmember).

O(N) where N is the absolute value of the count argument.

Since Redis 8.0.0

vrandmemberCount Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> Integer

The number of elements to return.

Positive values return distinct elements; negative values allow duplicates.

-> m (f [ByteString]) 

Return one or multiple random elements from a vector set (https://redis.io/commands/vrandmember).

O(N) where N is the absolute value of the count argument.

Since Redis 8.0.0

vrange Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

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

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

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

vrangeCount Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> ByteString

The starting point of the lexicographical range.

-> ByteString

The ending point of the lexicographical range.

-> Integer

The maximum number of elements to return.

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

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

vrem Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

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

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

vsetattr Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key that holds the vector set.

-> ByteString

The name of the element in the vector set.

-> ByteString

The attributes as a JSON object string.

Use the empty string to remove existing attributes.

-> m (f Bool) 

Associate or remove the JSON attributes of an element in a vector set (https://redis.io/commands/vsetattr).

O(1)

Since Redis 8.0.0

vsim Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> VSimQuery

Query vector source.

Use VSimByElement to refer to an existing element, VSimByFp32 for binary float format, or VSimByValues for a list of float values.

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

vsimOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> VSimQuery

Query vector source.

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

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

vsimWithScores Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> VSimQuery

Query vector source.

-> m (f [(ByteString, Double)]) 

Return elements similar to a given vector or element together with their similarity scores (https://redis.io/commands/vsim).

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

Since Redis 8.0.0

vsimWithScoresOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f [(ByteString, Double)]) Source #

Return elements similar to a given vector or element together with their similarity scores (https://redis.io/commands/vsim).

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

Since Redis 8.0.0

vsimWithScoresWithAttribs Source #

Arguments

:: RedisCtx m f 
=> ByteString

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

-> VSimQuery

Query vector source.

-> m (f VSimWithAttribsResponse) 

Return elements similar to a given vector or element together with their similarity scores and JSON attributes (https://redis.io/commands/vsim).

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

Since Redis 8.2.0

vsimWithScoresWithAttribsOpts :: RedisCtx m f => ByteString -> VSimQuery -> VSimOpts -> m (f VSimWithAttribsResponse) Source #

Return elements similar to a given vector or element together with their similarity scores and JSON attributes (https://redis.io/commands/vsim).

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

Since Redis 8.2.0

migrate Source #

Arguments

:: RedisCtx m f 
=> ByteString

host

-> ByteString

port

-> ByteString

key

-> Integer

destinationDb

-> Integer

timeout

-> m (f Status) 

Atomically transfer a key from a Redis instance to another one (http://redis.io/commands/migrate). The Redis command MIGRATE is split up into migrate, migrateMultiple. Since Redis 2.6.0

data MigrateOpts Source #

Options for the migrate command.

Instances

Instances details
Show MigrateOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq MigrateOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultMigrateOpts :: MigrateOpts Source #

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
    }

migrateMultiple Source #

Arguments

:: RedisCtx m f 
=> ByteString

host

-> ByteString

port

-> Integer

destinationDb

-> Integer

timeout

-> MigrateOpts 
-> [ByteString]

keys

-> m (f Status) 

Atomically transfer a key from a Redis instance to another one (http://redis.io/commands/migrate). The Redis command MIGRATE is split up into migrate, migrateMultiple. Since Redis 2.6.0

restore Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

timeToLive

-> ByteString

serializedValue

-> m (f Status) 

Create a key using the provided serialized value, previously obtained using DUMP (http://redis.io/commands/restore). The Redis command RESTORE is split up into restore, restoreReplace. Since Redis 2.6.0

restoreOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

timeToLive

-> ByteString

serializedValue

-> RestoreOpts

restore options

-> m (f Status) 

Create a key using the provided serialized value, previously obtained using DUMP (http://redis.io/commands/restore). The Redis command RESTORE is split up into restore, restoreReplace. Since Redis 2.6.0

restoreReplace Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

timeToLive

-> ByteString

serializedValue

-> m (f Status) 

Create a key using the provided serialized value, previously obtained using DUMP (http://redis.io/commands/restore). The Redis command RESTORE is split up into restore, restoreReplace. Since Redis 2.6.0

data CopyOpts Source #

Options for the copy command.

Constructors

CopyOpts 

Fields

Instances

Instances details
Show CopyOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq CopyOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultCopyOpts :: CopyOpts Source #

Redis default CopyOpts. Equivalent to omitting all optional parameters.

copy Source #

Arguments

:: RedisCtx m f 
=> ByteString

Source key

-> ByteString

Destination key

-> m (f Bool) 

Copies the value of a key to a new key (https://redis.io/commands/copy).

O(N) worst case for collections, where N is the number of nested items. O(1) for string values.

Since Redis 6.2.0

copyOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Source key

-> ByteString

Destination key

-> CopyOpts

Copy options

-> m (f Bool) 

Copies the value of a key to a new key (https://redis.io/commands/copy).

O(N) worst case for collections, where N is the number of nested items. O(1) for string values.

Since Redis 6.2.0

expiretime :: RedisCtx m f => ByteString -> m (f Integer) Source #

Returns the expiration time of a key as a Unix timestamp (https://redis.io/commands/expiretime).

Returns -2 if the key does not exist; -1 if the key exists but has no associated expiration.

O(1). Since Redis 7.0.0

pexpiretime :: RedisCtx m f => ByteString -> m (f Integer) Source #

Returns the expiration time of a key as a Unix timestamp in milliseconds (https://redis.io/commands/pexpiretime).

Returns -2 if the key does not exist; -1 if the key exists but has no associated expiration.

O(1). Since Redis 7.0.0

set Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

value

-> m (f Status) 

data Condition Source #

Constructors

Nx

Only set the key if it does not already exist.

Xx

Only set the key if it already exists.

Instances

Instances details
Show Condition Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq Condition Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg Condition Source # 
Instance details

Defined in Database.Redis.ManualCommands

data SetOpts Source #

Constructors

SetOpts 

Fields

Instances

Instances details
Show SetOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq SetOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

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

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

defaultSetOpts :: SetOpts Source #

Redis default SetOpts. Equivalent to omitting all optional parameters.

setOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

value

-> SetOpts 
-> m (f Status) 

setGet Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

value

-> m (f ByteString) 

setGetOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> ByteString

value

-> SetOpts 
-> m (f ByteString) 

msetex Source #

Arguments

:: RedisCtx m f 
=> NonEmpty (ByteString, ByteString)

A series of key/value pairs.

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

msetexOpts Source #

Arguments

:: RedisCtx m f 
=> NonEmpty (ByteString, ByteString)

A series of key/value pairs.

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

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

getdel :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #

Returns the string value of a key after deleting the key (https://redis.io/commands/getdel).

O(1)

Since Redis 6.2.0

delex Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the string.

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

delexWhen Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the string.

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

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

digest Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the string.

-> m (f (Maybe ByteString)) 

Returns the hash digest of a string value (https://redis.io/commands/digest).

O(N) where N is the length of the string value.

Since Redis 8.4.0

getex :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #

Returns the string value of a key after setting its expiration time (https://redis.io/commands/getex).

O(1)

Since Redis 6.2.0

getexOpts :: RedisCtx m f => ByteString -> GetExOpts -> m (f (Maybe ByteString)) Source #

Returns the string value of a key after setting its expiration time (https://redis.io/commands/getex).

O(1)

Since Redis 6.2.0

hgetex :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString]) Source #

Returns the values associated with the specified fields in a hash and optionally updates the key expiration (https://redis.io/commands/hgetex).

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

Since Redis 8.0.0

hgetexOpts :: RedisCtx m f => ByteString -> NonEmpty ByteString -> HGetExOpts -> m (f [Maybe ByteString]) Source #

Returns the values associated with the specified fields in a hash and optionally updates the key expiration (https://redis.io/commands/hgetex).

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

Since Redis 8.0.0

hgetdel :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe ByteString]) Source #

Returns the values associated with the specified fields in a hash and deletes those fields (https://redis.io/commands/hgetdel).

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

Since Redis 8.0.0

hsetex :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> m (f Bool) Source #

Sets fields in a hash and optionally updates the key expiration (https://redis.io/commands/hsetex).

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

Since Redis 8.0.0

hsetexOpts :: RedisCtx m f => ByteString -> NonEmpty (ByteString, ByteString) -> HSetExOpts -> m (f Bool) Source #

Sets fields in a hash and optionally updates the key expiration (https://redis.io/commands/hsetex).

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

Since Redis 8.0.0

hexpire Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Seconds until expiration.

-> NonEmpty ByteString

List of fields to set expiration for.

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

hexpireOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Seconds until expiration.

-> NonEmpty ByteString

List of fields to set expiration for.

-> ExpireOpts

Expiration options.

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

Since Redis 7.4.0

hpexpire Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Milliseconds until expiration.

-> NonEmpty ByteString

List of fields to set expiration for.

-> m (f [HashFieldExpirationStatus]) 

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

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

Since Redis 7.4.0

hpexpireOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Milliseconds until expiration.

-> NonEmpty ByteString

List of fields to set expiration for.

-> ExpireOpts

Expiration options.

-> m (f [HashFieldExpirationStatus]) 

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

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

Since Redis 7.4.0

hexpireat Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Absolute Unix timestamp in seconds at which the hash fields will expire.

-> NonEmpty ByteString

List of fields to set expiration for.

-> m (f [HashFieldExpirationStatus]) 

Sets expiration for hash fields using an absolute Unix timestamp in seconds (https://redis.io/commands/hexpireat).

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

Since Redis 7.4.0

hexpireatOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Absolute Unix timestamp in seconds at which the hash fields will expire.

-> NonEmpty ByteString

List of fields to set expiration for.

-> ExpireOpts

Expiration options.

-> m (f [HashFieldExpirationStatus]) 

Sets expiration for hash fields using an absolute Unix timestamp in seconds (https://redis.io/commands/hexpireat).

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

Since Redis 7.4.0

hpexpireat Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Absolute Unix timestamp in milliseconds at which the hash fields will expire.

-> NonEmpty ByteString

List of fields to set expiration for.

-> m (f [HashFieldExpirationStatus]) 

Sets expiration for hash fields using an absolute Unix timestamp in milliseconds (https://redis.io/commands/hpexpireat).

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

Since Redis 7.4.0

hpexpireatOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> Integer

Absolute Unix timestamp in milliseconds at which the hash fields will expire.

-> NonEmpty ByteString

List of fields to set expiration for.

-> ExpireOpts

Expiration options.

-> m (f [HashFieldExpirationStatus]) 

Sets expiration for hash fields using an absolute Unix timestamp in milliseconds (https://redis.io/commands/hpexpireat).

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

Since Redis 7.4.0

httl Source #

Arguments

:: RedisCtx m f 
=> ByteString

Key of the hash.

-> NonEmpty ByteString

List of fields to get TTL for.

-> m (f [HashFieldExpirationInfo]) 

Returns the TTL in seconds of hash fields (https://redis.io/commands/httl).

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

Since Redis 7.4.0

hpttl :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo]) Source #

Returns the TTL in milliseconds of hash fields (https://redis.io/commands/hpttl).

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

Since Redis 7.4.0

hexpiretime :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo]) Source #

Returns the expiration time of hash fields as a Unix timestamp in seconds (https://redis.io/commands/hexpiretime).

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

Since Redis 7.4.0

hpexpiretime :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [HashFieldExpirationInfo]) Source #

Returns the expiration time of hash fields as a Unix timestamp in milliseconds (https://redis.io/commands/hpexpiretime).

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

Since Redis 7.4.0

data DebugMode Source #

Constructors

Yes 
Sync 
No 

Instances

Instances details
Show DebugMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq DebugMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg DebugMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

scriptDebug :: RedisCtx m f => DebugMode -> m (f Bool) Source #

Set the debug mode for executed scripts (http://redis.io/commands/script-debug). Since Redis 3.2.0

zadd Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> [(Double, ByteString)]

scoreMember

-> m (f Integer) 

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

data SizeCondition Source #

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.

data ZaddOpts Source #

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

ZaddOpts 

Fields

Instances

Instances details
Show ZaddOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq ZaddOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultZaddOpts :: ZaddOpts Source #

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
  }

zaddOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> [(Double, ByteString)]

scoreMember

-> ZaddOpts

options

-> m (f Integer) 

data ReplyMode Source #

Constructors

On 
Off 
Skip 

Instances

Instances details
Show ReplyMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq ReplyMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg ReplyMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

clientReply :: RedisCtx m f => ReplyMode -> m (f Bool) Source #

Instruct the server whether to reply to commands (http://redis.io/commands/client-reply). Since Redis 3.2

clientUnpause :: RedisCtx m f => m (f Status) Source #

Resumes processing commands from paused clients (https://redis.io/commands/client-unpause).

O(N) where N is the number of paused clients.

Since Redis 6.2.0

clientNoTouch :: RedisCtx m f => Bool -> m (f Status) Source #

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

clientSetinfo :: RedisCtx m f => ClientSetInfoOpts -> m (f Status) Source #

The CLIENT SETINFO command assigns various info attributes to the current connection which are displayed in the output of CLIENT LIST and CLIENT INFO (https://redis.io/commands/client-setinfo).

O(1)

Since Redis 7.2.0

srandmember Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f (Maybe ByteString)) 

Get one or multiple random members from a set (http://redis.io/commands/srandmember). The Redis command SRANDMEMBER is split up into srandmember, srandmemberN. Since Redis 1.0.0

srandmemberN Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

count

-> m (f [ByteString]) 

Get one or multiple random members from a set (http://redis.io/commands/srandmember). The Redis command SRANDMEMBER is split up into srandmember, srandmemberN. Since Redis 1.0.0

spop Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f (Maybe ByteString)) 

Remove and return one or multiple random members from a set (http://redis.io/commands/spop). The Redis command SPOP is split up into spop, spopN. Since Redis 1.0.0

spopN Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

count

-> m (f [ByteString]) 

Remove and return one or multiple random members from a set (http://redis.io/commands/spop). The Redis command SPOP is split up into spop, spopN. Since Redis 1.0.0

smismember :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Bool]) Source #

Determines whether multiple members belong to a set (https://redis.io/commands/smismember).

O(N) where N is the number of elements being checked for membership.

Since Redis 6.2.0

sintercard :: RedisCtx m f => NonEmpty ByteString -> m (f Integer) Source #

Returns the cardinality of the intersection of multiple sets (https://redis.io/commands/sintercard).

O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.

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

Since Redis 7.0.0

sintercardOpts :: RedisCtx m f => NonEmpty ByteString -> SintercardOpts -> m (f Integer) Source #

Returns the cardinality of the intersection of multiple sets (https://redis.io/commands/sintercard).

O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.

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

Since Redis 7.0.0

info :: RedisCtx m f => m (f ByteString) Source #

infoSection Source #

Arguments

:: RedisCtx m f 
=> ByteString

section

-> m (f ByteString) 

exists Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> m (f Bool) 

Determine if a key exists (http://redis.io/commands/exists). Since Redis 1.0.0

newtype Cursor Source #

Constructors

Cursor ByteString 

Instances

Instances details
Show Cursor Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq Cursor Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

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

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

RedisArg Cursor Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisResult Cursor Source # 
Instance details

Defined in Database.Redis.ManualCommands

scan Source #

Arguments

:: RedisCtx m f 
=> Cursor 
-> m (f (Cursor, [ByteString]))

next cursor and values

Incrementally iterate the keys space (http://redis.io/commands/scan). The Redis command SCAN is split up into scan, scanOpts. Since Redis 2.8.0

data ScanOpts Source #

Instances

Instances details
Show ScanOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq ScanOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultScanOpts :: ScanOpts Source #

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

scanOpts Source #

Arguments

:: RedisCtx m f 
=> Cursor 
-> ScanOpts 
-> Maybe ByteString

types of the object to scan

-> m (f (Cursor, [ByteString]))

next cursor and values

Incrementally iterate the keys space (http://redis.io/commands/scan). The Redis command SCAN is split up into scan, scanOpts. Since Redis 2.8.0

addScanOpts Source #

Arguments

:: [ByteString]

main part of scan command

-> ScanOpts 
-> [ByteString] 

sscan Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Cursor 
-> m (f (Cursor, [ByteString]))

next cursor and values

Incrementally iterate Set elements (http://redis.io/commands/sscan). The Redis command SSCAN is split up into sscan, sscanOpts. Since Redis 2.8.0

sscanOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Cursor 
-> ScanOpts 
-> m (f (Cursor, [ByteString]))

next cursor and values

Incrementally iterate Set elements (http://redis.io/commands/sscan). The Redis command SSCAN is split up into sscan, sscanOpts. Since Redis 2.8.0

hscan Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Cursor 
-> m (f (Cursor, [(ByteString, ByteString)]))

next cursor and values

Incrementally iterate hash fields and associated values (http://redis.io/commands/hscan). The Redis command HSCAN is split up into hscan, hscanOpts. Since Redis 2.8.0

hscanOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Cursor 
-> ScanOpts 
-> m (f (Cursor, [(ByteString, ByteString)]))

next cursor and values

Incrementally iterate hash fields and associated values (http://redis.io/commands/hscan). The Redis command HSCAN is split up into hscan, hscanOpts. Since Redis 2.8.0

hrandfield :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #

Returns a random field from a hash (https://redis.io/commands/hrandfield).

O(1)

Since Redis 6.2.0

hrandfieldCount :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString]) Source #

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

hrandfieldCountWithValues :: RedisCtx m f => ByteString -> Integer -> m (f [(ByteString, ByteString)]) Source #

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

zscan Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Cursor 
-> m (f (Cursor, [(ByteString, Double)]))

next cursor and values

zscanOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Cursor 
-> ScanOpts 
-> m (f (Cursor, [(ByteString, Double)]))

next cursor and values

data RangeLex a Source #

Constructors

Incl a 
Excl a 
Minr 
Maxr 

Instances

Instances details
Show a => Show (RangeLex a) Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

showsPrec :: Int -> RangeLex a -> ShowS #

show :: RangeLex a -> String #

showList :: [RangeLex a] -> ShowS #

Eq a => Eq (RangeLex a) Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

(==) :: RangeLex a -> RangeLex a -> Bool #

(/=) :: RangeLex a -> RangeLex a -> Bool #

RedisArg a => RedisArg (RangeLex a) Source # 
Instance details

Defined in Database.Redis.ManualCommands

zrangebylex Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> RangeLex ByteString

min

-> RangeLex ByteString

max

-> m (f [ByteString]) 

Return a range of members in a sorted set, by lexicographical range (http://redis.io/commands/zrangebylex). Since Redis 2.8.9

zrangebylexLimit Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> RangeLex ByteString

min

-> RangeLex ByteString

max

-> Integer

offset

-> Integer

count

-> m (f [ByteString]) 

data ZPopMinMax Source #

Constructors

ZPopMin 
ZPopMax 

Instances

Instances details
Show ZPopMinMax Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq ZPopMinMax Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg ZPopMinMax Source # 
Instance details

Defined in Database.Redis.ManualCommands

zmpop :: RedisCtx m f => NonEmpty ByteString -> ZPopMinMax -> m (f (Maybe ZPopResponse)) Source #

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

zmpopCount :: RedisCtx m f => NonEmpty ByteString -> ZPopMinMax -> Integer -> m (f (Maybe ZPopResponse)) Source #

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

bzmpop :: RedisCtx m f => Double -> NonEmpty ByteString -> ZPopMinMax -> m (f (Maybe ZPopResponse)) Source #

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

bzmpopCount :: RedisCtx m f => Double -> NonEmpty ByteString -> ZPopMinMax -> Integer -> m (f (Maybe ZPopResponse)) Source #

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

zmscore :: RedisCtx m f => ByteString -> NonEmpty ByteString -> m (f [Maybe Double]) Source #

Returns the score of one or more members in a sorted set (https://redis.io/commands/zmscore).

O(N) where N is the number of members being requested.

Since Redis 6.2.0

zrandmember :: RedisCtx m f => ByteString -> m (f (Maybe ByteString)) Source #

Returns a random member from a sorted set (https://redis.io/commands/zrandmember).

O(1) without the optional count argument.

Since Redis 6.2.0

zrandmemberN :: RedisCtx m f => ByteString -> Integer -> m (f [ByteString]) Source #

Returns one or more random members from a sorted set (https://redis.io/commands/zrandmember).

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

Since Redis 6.2.0

zrandmemberWithscores :: RedisCtx m f => ByteString -> Integer -> m (f [(ByteString, Double)]) Source #

Returns one or more random members and their scores from a sorted set (https://redis.io/commands/zrandmember).

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

Since Redis 6.2.0

zrangestore :: RedisCtx m f => ByteString -> ByteString -> Integer -> Integer -> m (f Integer) Source #

Stores a range of members from a sorted set in a destination key (https://redis.io/commands/zrangestore).

O(log(N) + M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.

Since Redis 6.2.0

zrangestoreOpts :: RedisCtx m f => ByteString -> ByteString -> ZRangeStoreRange -> ZRangeStoreOpts -> m (f Integer) Source #

Stores a range of members from a sorted set in a destination key (https://redis.io/commands/zrangestore).

O(log(N) + M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.

Since Redis 6.2.0

data TrimStrategy Source #

Trimming strategy.

Since: 0.16.0

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.

data TrimType Source #

Type of the trimming.

Since: 0.16.0

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.

internalTrimArgToList :: TrimOpts -> [ByteString] Source #

Converts trim options to the low level parameters

data XAddOpts Source #

Constructors

XAddOpts 

Fields

xaddOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Message ID

-> [(ByteString, ByteString)]

Message data (field, value)

-> XAddOpts

Additional parameteers

-> m (f ByteString)

ID of the added entry.

Add a value to a stream (https://redis.io/commands/xadd). The Redis command XADD is split up into xadd, xaddOpts. Since Redis 5.0.0

xadd Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name

-> ByteString

Message id

-> [(ByteString, ByteString)]

Message data (field, value)

-> m (f ByteString) 

O(1) Adds a value to a stream (https://redis.io/commands/xadd). Since Redis 5.0.0

newtype XAutoclaimOpts Source #

Additional parameters.

Constructors

XAutoclaimOpts 

Fields

defaultXAutoclaimOpts :: XAutoclaimOpts Source #

Default XAutoclaimOpts value.

Prefer to use this function over direct use of constructor to preserve backwards compatibility.

Defaults to [Count 100)

data XAutoclaimResult resultFormat Source #

Result of the xautoclaim family of calls

Constructors

XAutoclaimResult 

Fields

Instances

Instances details
Show resultFormat => Show (XAutoclaimResult resultFormat) Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

showsPrec :: Int -> XAutoclaimResult resultFormat -> ShowS #

show :: XAutoclaimResult resultFormat -> String #

showList :: [XAutoclaimResult resultFormat] -> ShowS #

Eq resultFormat => Eq (XAutoclaimResult resultFormat) Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

(==) :: XAutoclaimResult resultFormat -> XAutoclaimResult resultFormat -> Bool #

(/=) :: XAutoclaimResult resultFormat -> XAutoclaimResult resultFormat -> Bool #

RedisResult a => RedisResult (XAutoclaimResult a) Source # 
Instance details

Defined in Database.Redis.ManualCommands

type XAutoclaimStreamsResult = XAutoclaimResult StreamsRecord Source #

Version of the autoclaim result that contains data of the messages.

type XAutoclaimJustIdsResult = XAutoclaimResult ByteString Source #

Version of the autoclaim result that contains only IDs.

xautoclaim Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

Consumer name.

-> Integer

Min idle time (ms).

-> ByteString

ID of the message to start.

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

xautoclaimOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

Consumer name.

-> Integer

min idle time (ms).

-> ByteString

start ID.

-> XAutoclaimOpts

Additional parameters.

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

xautoclaimJustIds Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

Consumer name.

-> Integer

Min idle time (ms).

-> ByteString

start ID.

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

xautoclaimJustIdsOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumers group name.

-> ByteString

Consumer namee.

-> Integer

min idle time (ms).

-> ByteString

Start ID.

-> XAutoclaimOpts

Additional parametres.

-> 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 XReadOpts Source #

Constructors

XReadOpts 

Instances

Instances details
Show XReadOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq XReadOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultXreadOpts :: XReadOpts Source #

Redis default XReadOpts. Equivalent to omitting all optional parameters.

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

xreadOpts Source #

Arguments

:: RedisCtx m f 
=> [(ByteString, ByteString)]

(stream, id) pairs

-> XReadOpts

Options

-> m (f (Maybe [XReadResponse])) 

Read values from a stream (https://redis.io/commands/xread). The Redis command XREAD is split up into xread, xreadOpts. Since Redis 5.0.0

xread Source #

Arguments

:: RedisCtx m f 
=> [(ByteString, ByteString)]

(stream, id) pairs

-> m (f (Maybe [XReadResponse])) 

Read values from a stream (https://redis.io/commands/xread). The Redis command XREAD is split up into xread, xreadOpts. Since Redis 5.0.0

xreadGroupOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

group name

-> ByteString

consumer name

-> [(ByteString, ByteString)]

(stream, id) pairs

-> XReadGroupOpts

Options

-> m (f (Maybe [XReadResponse])) 

xreadGroup Source #

Arguments

:: RedisCtx m f 
=> ByteString

group name

-> ByteString

consumer name

-> [(ByteString, ByteString)]

(stream, id) pairs

-> m (f (Maybe [XReadResponse])) 

data XGroupCreateOpts Source #

Additional parameters of the XGroupCreate

Constructors

XGroupCreateOpts 

Fields

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

defaultXGroupCreateOpts :: XGroupCreateOpts Source #

Specifies default group opts.

Prefer using this method over use of constructor to preserve backwards compatibility.

xgroupCreate Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

ID of the message to start reading with.

-> m (f Status) 

O(1) Creates consumer group.

Fails if called on with the stream name that does not exist, use xgroupCreateOpts to override this behavior.

xgroupCreateOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

ID of the message to start reading with.

-> XGroupCreateOpts

Additional parameters.

-> m (f Status) 

O(1) Creates consumer group, accepts additional parameters.

xgroupCreateConsumer Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

Consumer name.

-> m (f Bool)

Returns if the consumer was created or not.

O(1) Creates new consumer in the consumers group.

Since redis 6.2.0: fails on the ealier versions.

xgroupSetId Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumr group name.

-> ByteString

Message ID or $

-> m (f Status) 

O(1) Sets last delivered id for a consumer group.

newtype XGroupSetIdOpts Source #

Additional parameters for the xgroupSetId method

Constructors

XGroupSetIdOpts 

Fields

  • xGroupSetIdEntriesRead :: Maybe ByteString

    Enable consumer group lag tracking for an arbitrary ID. An arbitrary ID is any ID that isn't the ID of the stream's first entry, its last entry or the zero ("0-0") ID

    @since Redis 7.0, fails if set to Just on ealier versions.

defaultXGroupSetIdOpts :: XGroupSetIdOpts Source #

Default value for the XGroupSetIdOpts.

Prefer use this method over the raw constructor in order to preserve backwards compatibility.

xgroupSetIdOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

Message id or @$S

-> XGroupSetIdOpts

Additional parameters.

-> m (f Status) 

O(1) a variant of the xgroupSetId that allowes to pass additional parameters.

xgroupDelConsumer Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

Consumer name.

-> m (f Integer)

The number of pending messages owned by the consumer.

O(1) Delete consumer.

xgroupDestroy Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> m (f Bool)

Tells if the group was destroyed or not.

O(1) destroys a group.

data XRefPolicy Source #

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.

Instances

Instances details
Show XRefPolicy Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq XRefPolicy Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg XRefPolicy Source # 
Instance details

Defined in Database.Redis.ManualCommands

data XCfgSetOpts Source #

Constructors

XCfgSetOpts 

Fields

Instances

Instances details
Show XCfgSetOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq XCfgSetOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultXCfgSetOpts :: XCfgSetOpts Source #

Redis default XCfgSetOpts. Equivalent to omitting all optional parameters.

At least one field must be set before calling xcfgset.

data XNackMode Source #

Instances

Instances details
Show XNackMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq XNackMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg XNackMode Source # 
Instance details

Defined in Database.Redis.ManualCommands

data XNackOpts Source #

Instances

Instances details
Show XNackOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq XNackOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultXNackOpts :: XNackOpts Source #

Redis default XNackOpts. Equivalent to omitting all optional parameters.

xack Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> ByteString

group name

-> [ByteString]

message IDs

-> m (f Integer) 

xackdel Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> NonEmpty ByteString

Entry IDs.

-> m (f [XEntryDeletionResult]) 

Acknowledges and conditionally deletes entries for a consumer group (https://redis.io/commands/xackdel).

O(1) for each entry ID processed.

Since Redis 8.2.0

xackdelOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> NonEmpty ByteString

Entry IDs.

-> XEntryDeletionOpts

Additional options.

-> m (f [XEntryDeletionResult]) 

Acknowledges and conditionally deletes entries for a consumer group (https://redis.io/commands/xackdel).

O(1) for each entry ID processed.

Since Redis 8.2.0

xrange Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> ByteString

start

-> ByteString

end

-> Maybe Integer

COUNT

-> m (f [StreamsRecord]) 

xrevRange Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> ByteString

end

-> ByteString

start

-> Maybe Integer

COUNT

-> m (f [StreamsRecord]) 

xlen Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> m (f Integer) 

xpendingSummary Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Stream consumer group.

-> m (f XPendingSummaryResponse) 

O(N) N - number of message beign returned.

Get information about pending messages (https:/redis.iocommands/xpending).

Since Redis 5.0.

data XPendingDetailOpts Source #

Additional parameters of the xpending call family

Constructors

XPendingDetailOpts 

Fields

defaultXPendingDetailOpts :: XPendingDetailOpts Source #

Default XPendingOpts values.

Prefer this method over use of the constructor in order to preserve backwards compatibility.

xpendingDetail Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Consumer group name.

-> ByteString

ID of the first interesting message.

-> ByteString

ID of the last intersting message.

-> Integer

Limits the numbere of messages returned from the call.

-> XPendingDetailOpts 
-> m (f [XPendingDetailRecord]) 

O(N) N - number of messages returned.

Get detailed information about pending messages (https:/redis.iocommands/xpending).

xclaimRequest Source #

Arguments

:: ByteString

stream

-> ByteString

group

-> ByteString

consumer

-> Integer

min idle time

-> XClaimOpts

optional arguments

-> [ByteString]

message IDs

-> [ByteString] 

Format a request for XCLAIM.

xclaim Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> ByteString

group

-> ByteString

consumer

-> Integer

min idle time

-> XClaimOpts

optional arguments

-> [ByteString]

message IDs

-> m (f [StreamsRecord]) 

xclaimJustIds Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> ByteString

group

-> ByteString

consumer

-> Integer

min idle time

-> XClaimOpts

optional arguments

-> [ByteString]

message IDs

-> m (f [ByteString]) 

data GeoUnit Source #

Instances

Instances details
Show GeoUnit Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq GeoUnit Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

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

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

RedisArg GeoUnit Source # 
Instance details

Defined in Database.Redis.ManualCommands

data GeoOrder Source #

Constructors

GeoAsc 
GeoDesc 

Instances

Instances details
Show GeoOrder Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq GeoOrder Source # 
Instance details

Defined in Database.Redis.ManualCommands

RedisArg GeoOrder Source # 
Instance details

Defined in Database.Redis.ManualCommands

data GeoAddOpts Source #

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

GeoAddOpts 

Fields

Instances

Instances details
Show GeoAddOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq GeoAddOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultGeoAddOpts :: GeoAddOpts Source #

Redis default GeoAddOpts. Equivalent to omitting all optional parameters.

geoadd :: RedisCtx m f => ByteString -> [(Double, Double, ByteString)] -> m (f Integer) Source #

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.

Note: there is no geodel command because you can use zrem to remove elements. The Geo index structure is just a sorted set.

Since Redis 3.2.0

Redis tags: write, geo, slow

geoaddOpts :: RedisCtx m f => ByteString -> [(Double, Double, ByteString)] -> GeoAddOpts -> m (f Integer) Source #

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 6.2.0

geodist :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Maybe GeoUnit -> m (f (Maybe Double)) Source #

Returns the distance between two members of a geospatial index (https://redis.io/commands/geodist). Since Redis 3.2.0

Redis tags: read, geo, slow

geopos :: RedisCtx m f => ByteString -> [ByteString] -> m (f [Maybe GeoCoordinates]) Source #

Returns the longitude and latitude of members from a geospatial index (https://redis.io/commands/geopos). Since Redis 3.2.0

ACL categories: read, geo, @slow.

geoSearch :: RedisCtx m f => ByteString -> GeoSearchFrom -> GeoSearchBy -> GeoSearchOpts -> m (f [GeoLocation]) Source #

Queries a geospatial index for members inside an area of a box or a circle (https://redis.io/commands/geosearch). Since Redis 6.2.0

O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape

ACL: read, geo, @slow

Since: Redis 6.2.0

geoSearchStore :: RedisCtx m f => ByteString -> ByteString -> GeoSearchFrom -> GeoSearchBy -> GeoSearchStoreOpts -> m (f Integer) Source #

Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result (https://redis.io/commands/geosearchstore). Since Redis 6.2.0

data XInfoConsumersResponse Source #

Data structure that is returned as a result of xinfoConsumers

Constructors

XInfoConsumersResponse 

Fields

xinfoConsumers Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> ByteString

Group name.

-> m (f [XInfoConsumersResponse]) 

O(1) Returns information about the list of the consumers beloging to the consumer group.

Available since Redis 5.0.0

Wrapper over XINFO CONSUMERS <stream name> <group name>

data XInfoGroupsResponse Source #

Result of the xinfoGroups call.

Constructors

XInfoGroupsResponse 

Fields

xinfoGroups Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> m (f [XInfoGroupsResponse]) 

O(1) Returns information about the groups.

Available since: Redis 5.0.0

Wrapper around XINFO GROUPS <stream name> call.

data XInfoStreamResponse Source #

Constructors

XInfoStreamResponse 

Fields

XInfoStreamEmptyResponse 

Fields

xinfoStream Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> m (f XInfoStreamResponse) 

Get info about a stream. The Redis command XINFO is split into xinfoConsumers, xinfoGroups, and xinfoStream. Since Redis 5.0.0

xdel Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> NonEmpty ByteString

message IDs

-> m (f Integer) 

Delete messages from a stream. Since Redis 5.0.0

xdelex Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> NonEmpty ByteString

Entry IDs.

-> m (f [XEntryDeletionResult]) 

Conditionally deletes entries from a stream (https://redis.io/commands/xdelex).

O(1) for each entry ID processed.

Since Redis 8.2.0

xdelexOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream name.

-> NonEmpty ByteString

Entry IDs.

-> XEntryDeletionOpts

Additional options.

-> m (f [XEntryDeletionResult]) 

Conditionally deletes entries from a stream (https://redis.io/commands/xdelex).

O(1) for each entry ID processed.

Since Redis 8.2.0

xcfgset Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the stream key. The stream must already exist.

-> XCfgSetOpts

Configuration parameters.

At least one of xCfgSetIdmpDuration or xCfgSetIdmpMaxsize must be specified. Calling XCFGSET clears all existing producer IDMP maps for the stream.

-> m (f Status) 

Sets the IDMP configuration parameters for a stream (https://redis.io/commands/xcfgset).

O(1)

Since Redis 8.6.0

xidmprecord Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream key.

-> ByteString

Producer ID.

-> ByteString

Idempotency ID.

-> ByteString

Existing stream entry ID.

-> m (f Status) 

Sets IDMP metadata on an existing stream message (https://redis.io/commands/xidmprecord).

This is an internal command used during AOF loading.

O(1)

Since Redis 8.6.2

xnack Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream key.

-> ByteString

Consumer group name.

-> XNackMode

Release strategy.

-> NonEmpty ByteString

Stream entry IDs.

-> m (f Integer) 

Releases claimed messages back to the group's PEL without acknowledging them (https://redis.io/commands/xnack).

O(1) for each message ID processed.

Since Redis 8.8.0

xnackOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Stream key.

-> ByteString

Consumer group name.

-> XNackMode

Release strategy.

-> NonEmpty ByteString

Stream entry IDs.

-> XNackOpts

Additional options.

-> m (f Integer) 

Releases claimed messages back to the group's PEL without acknowledging them (https://redis.io/commands/xnack).

O(1) for each message ID processed.

Since Redis 8.8.0

xtrim Source #

Arguments

:: RedisCtx m f 
=> ByteString

stream

-> TrimOpts 
-> m (f Integer) 

Set the upper bound for number of messages in a stream. Since Redis 5.0.0

inf :: RealFloat a => a Source #

Constructor for inf Redis argument values

data AuthOpts Source #

Additional parameters for the auth command.

Constructors

AuthOpts 

Fields

Instances

Instances details
Show AuthOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultAuthOpts :: AuthOpts Source #

Default options for AuthOpts

>>> defaultAuthOpts
AuthOpts {authOptsUsername = Nothing}

auth Source #

Arguments

:: RedisCtx m f 
=> ByteString

Password.

-> m (f Status) 

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

Authenticates client to the server.

authOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Password.

-> AuthOpts

Additional options.

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

select Source #

Arguments

:: RedisCtx m f 
=> Integer

index

-> m (f Status) 

Change the selected database for the current connection (http://redis.io/commands/select). Since Redis 1.0.0

ping :: RedisCtx m f => m (f Status) Source #

Ping the server (http://redis.io/commands/ping). Since Redis 1.0.0

data ClusterInfoResponse Source #

Constructors

ClusterInfoResponse 

Fields

clusterMyshardid :: RedisCtx m f => m (f ByteString) Source #

Returns the shard ID of a node (https://redis.io/commands/cluster-myshardid).

O(1)

Since Redis 7.2.0

clusterMigrationImport Source #

Arguments

:: RedisCtx m f 
=> NonEmpty (Integer, Integer)

Slot ranges to import.

Execute this subcommand on the destination master. It accepts multiple slot ranges and returns a task ID that can later be used to monitor the migration.

-> m (f ByteString) 

Starts an atomic slot migration import task on the current node (https://redis.io/commands/cluster-migration).

O(N) where N is the total number of slots between the specified start and end slot arguments.

Since Redis 8.4.0

clusterMigrationCancelId Source #

Arguments

:: RedisCtx m f 
=> ByteString

Task identifier.

-> m (f Integer) 

Cancels an ongoing migration task by task ID (https://redis.io/commands/cluster-migration).

O(N) where N is the total number of slots between the specified start and end slot arguments.

Since Redis 8.4.0

clusterMigrationCancelAll :: RedisCtx m f => m (f Integer) Source #

Cancels all ongoing migration tasks (https://redis.io/commands/cluster-migration).

O(N) where N is the total number of slots between the specified start and end slot arguments.

Since Redis 8.4.0

clusterMigrationStatus :: RedisCtx m f => m (f ClusterMigrationStatusResponse) Source #

Returns the status of current and completed atomic slot migration tasks (https://redis.io/commands/cluster-migration).

O(N) where N is the total number of slots between the specified start and end slot arguments.

Since Redis 8.4.0

clusterMigrationStatusAll :: RedisCtx m f => m (f ClusterMigrationStatusResponse) Source #

Returns the status of all current and completed atomic slot migration tasks (https://redis.io/commands/cluster-migration).

O(N) where N is the total number of slots between the specified start and end slot arguments.

Since Redis 8.4.0

clusterMigrationStatusId Source #

Arguments

:: RedisCtx m f 
=> ByteString

Task identifier.

-> m (f ClusterMigrationStatusResponse) 

Returns the status of a specific atomic slot migration task (https://redis.io/commands/cluster-migration).

O(N) where N is the total number of slots between the specified start and end slot arguments.

Since Redis 8.4.0

command :: RedisCtx m f => m (f [CommandInfo]) Source #

commandList :: RedisCtx m f => m (f [ByteString]) Source #

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

commandListOpts Source #

Arguments

:: RedisCtx m f 
=> 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.

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

data IncrexOpts a Source #

Instances

Instances details
Show a => Show (IncrexOpts a) Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq a => Eq (IncrexOpts a) Source # 
Instance details

Defined in Database.Redis.ManualCommands

Methods

(==) :: IncrexOpts a -> IncrexOpts a -> Bool #

(/=) :: IncrexOpts a -> IncrexOpts a -> Bool #

defaultIncrexOpts :: IncrexOpts a Source #

Redis default IncrexOpts. Equivalent to omitting all optional parameters.

increx Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key to increment.

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

increxOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key to increment.

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

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

increxBy Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key to increment.

-> Integer

The integer increment to apply.

-> IncrexOpts Integer

Bound and expiration options.

-> m (f (Integer, Integer)) 

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

O(1)

Since Redis 8.8.0

increxByFloat Source #

Arguments

:: RedisCtx m f 
=> ByteString

The name of the key to increment.

-> Double

The floating-point increment to apply.

-> IncrexOpts Double

Bound and expiration options.

-> m (f (Double, Double)) 

Increments the floating-point value of a key by a specific amount and optionally updates its expiration (https://redis.io/commands/increx).

O(1)

Since Redis 8.8.0

defaultARGrepOpts :: ARGrepOpts Source #

Redis default ARGrepOpts. Equivalent to omitting all optional parameters.

defaultARLastItemsOpts :: ARLastItemsOpts Source #

Redis default ARLastItemsOpts. Equivalent to omitting all optional parameters.

data ARScanOpts Source #

Constructors

ARScanOpts 

Instances

Instances details
Show ARScanOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq ARScanOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

defaultARScanOpts :: ARScanOpts Source #

Redis default ARScanOpts. Equivalent to omitting all optional parameters.

data AROpValue Source #

Constructors

AROpSum 
AROpMin 
AROpMax 

Instances

Instances details
Show AROpValue Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq AROpValue Source # 
Instance details

Defined in Database.Redis.ManualCommands

data AROpCount Source #

Instances

Instances details
Show AROpCount Source # 
Instance details

Defined in Database.Redis.ManualCommands

Eq AROpCount Source # 
Instance details

Defined in Database.Redis.ManualCommands

arcount Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> m (f Integer) 

Returns the number of non-empty elements in an array (https://redis.io/commands/arcount).

O(1)

Since Redis 8.8.0

ardel Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> NonEmpty Integer

One or more zero-based indices to delete.

-> m (f Integer) 

Deletes elements at the specified indices in an array (https://redis.io/commands/ardel).

O(N) where N is the number of indices to delete.

Since Redis 8.8.0

argetrange Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Start index.

-> Integer

End index, inclusive.

-> m (f [Maybe ByteString]) 

Gets values in a range of indices (https://redis.io/commands/argetrange).

O(N) where N is the range length.

Since Redis 8.8.0

argrep Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> ByteString

Start index or - for the first array index.

-> ByteString

End index or + for the last array index.

-> NonEmpty ARGrepPredicate

One or more predicates to apply.

-> m (f [Integer]) 

Searches array elements in a range using textual predicates (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

argrepOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> ByteString

Start index or - for the first array index.

-> ByteString

End index or + for the last array index.

-> NonEmpty ARGrepPredicate

One or more predicates to apply.

-> ARGrepOpts

Additional predicate options.

-> m (f [Integer]) 

Searches array elements in a range using textual predicates (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

argrepWithValues Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> ByteString

Start index or - for the first array index.

-> ByteString

End index or + for the last array index.

-> NonEmpty ARGrepPredicate

One or more predicates to apply.

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

argrepWithValuesOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> ByteString

Start index or - for the first array index.

-> ByteString

End index or + for the last array index.

-> NonEmpty ARGrepPredicate

One or more predicates to apply.

-> ARGrepOpts

Additional predicate options.

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

arinfo Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> m (f ARInfoResponse) 

Returns metadata about an array (https://redis.io/commands/arinfo).

O(1), or O(N) with FULL where N is the number of slices.

Since Redis 8.8.0

arinfoFull Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> m (f ARInfoResponse) 

Returns extended metadata about an array (https://redis.io/commands/arinfo).

O(N) where N is the number of slices.

Since Redis 8.8.0

arinsert Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> NonEmpty ByteString

Values to insert at the current insert cursor.

-> m (f Integer) 

Inserts one or more values at consecutive indices (https://redis.io/commands/arinsert).

O(N) where N is the number of values.

Since Redis 8.8.0

arlastitems Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Maximum number of most recently inserted elements to return.

-> m (f [Maybe ByteString]) 

Returns the most recently inserted elements (https://redis.io/commands/arlastitems).

O(N) where N is the count.

Since Redis 8.8.0

arlastitemsOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Maximum number of most recently inserted elements to return.

-> ARLastItemsOpts

Additional options.

-> m (f [Maybe ByteString]) 

Returns the most recently inserted elements (https://redis.io/commands/arlastitems).

O(N) where N is the count.

Since Redis 8.8.0

arlen Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> m (f Integer) 

Returns the length of an array (max index + 1) (https://redis.io/commands/arlen).

O(1)

Since Redis 8.8.0

armget Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> NonEmpty Integer

One or more zero-based indices.

-> m (f [Maybe ByteString]) 

Gets values at multiple indices in an array (https://redis.io/commands/armget).

O(N) where N is the number of indices.

Since Redis 8.8.0

arnext Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> m (f (Maybe Integer)) 

Returns the next index that ARINSERT would use (https://redis.io/commands/arnext).

O(1)

Since Redis 8.8.0

aropValue Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Start index.

-> Integer

End index.

-> AROpValue

Aggregate operation.

-> m (f (Maybe ByteString)) 

Performs aggregate operations on array elements in a range and returns a string result (https://redis.io/commands/arop).

O(P) where P is the number of visited positions in touched slices.

Since Redis 8.8.0

aropCount Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Start index.

-> Integer

End index.

-> AROpCount

Aggregate operation.

-> m (f (Maybe Integer)) 

Performs aggregate operations on array elements in a range and returns an integer result (https://redis.io/commands/arop).

O(P) where P is the number of visited positions in touched slices.

Since Redis 8.8.0

arring Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Ring buffer size.

-> NonEmpty ByteString

Values to insert.

-> m (f Integer) 

Inserts values into a ring buffer of specified size, wrapping and truncating as needed (https://redis.io/commands/arring).

O(M) normally, or O(N+M) on ring resize.

Since Redis 8.8.0

arscan Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Start index.

-> Integer

End index.

-> m (f ARIndexValuePairsResponse) 

Iterates existing elements in a range, returning index-value pairs (https://redis.io/commands/arscan).

O(P) where P is the number of visited positions in touched slices.

Since Redis 8.8.0

arscanOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Start index.

-> Integer

End index.

-> ARScanOpts

Additional options.

-> m (f ARIndexValuePairsResponse) 

Iterates existing elements in a range, returning index-value pairs (https://redis.io/commands/arscan).

O(P) where P is the number of visited positions in touched slices.

Since Redis 8.8.0

arseek Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

The new insert cursor position.

-> m (f Bool) 

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

O(1)

Since Redis 8.8.0

arset Source #

Arguments

:: RedisCtx m f 
=> ByteString

Array key.

-> Integer

Start index.

-> NonEmpty ByteString

One or more values to store at consecutive indices.

-> m (f Integer) 

Sets one or more contiguous values starting at an index in an array (https://redis.io/commands/arset).

O(N) where N is the number of values.

Since Redis 8.8.0

data HotkeysStartOpts Source #

Constructors

HotkeysStartOpts 

Fields

defaultHotkeysStartOpts :: HotkeysStartOpts Source #

Redis default HotkeysStartOpts. Equivalent to omitting all optional parameters.

hotkeysStart Source #

Arguments

:: RedisCtx m f 
=> NonEmpty HotkeysMetric

The metrics to track.

The command automatically derives the `METRICS count` argument from the number of provided metrics. At least one metric must be specified.

-> m (f Status) 

Starts hotkeys tracking (https://redis.io/commands/hotkeys-start).

O(1)

Since Redis 8.6.0

hotkeysStartOpts Source #

Arguments

:: RedisCtx m f 
=> NonEmpty HotkeysMetric

The metrics to track.

-> HotkeysStartOpts

Additional tracking options.

-> m (f Status) 

Starts hotkeys tracking (https://redis.io/commands/hotkeys-start).

O(1)

Since Redis 8.6.0

hotkeysGet :: RedisCtx m f => m (f HotkeysGetResponse) Source #

Returns tracking results and metadata from the current or most recent hotkeys tracking session (https://redis.io/commands/hotkeys-get).

O(K) where K is the number of hotkeys returned.

Since Redis 8.6.0

hotkeysStop :: RedisCtx m f => m (f Status) Source #

Stops hotkeys tracking (https://redis.io/commands/hotkeys-stop).

O(1)

Since Redis 8.6.0

hotkeysReset :: RedisCtx m f => m (f Status) Source #

Release the resources used for hotkey tracking (https://redis.io/commands/hotkeys-reset).

O(1)

Since Redis 8.6.0

pexpireatOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

millisecondsTimestamp

-> ExpireOpts 
-> m (f Bool) 

Set the expiration for a key as a UNIX timestamp specified in milliseconds (http://redis.io/commands/pexpireat). Since Redis 7.0

expireOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

seconds

-> ExpireOpts 
-> m (f Bool) 

expireatOpts Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

timestamp

-> ExpireOpts 
-> m (f Bool) 

Set the expiration for a key as a UNIX timestamp (http://redis.io/commands/expireat). Since Redis 1.2.0

data FlushOpts Source #

Instances

Instances details
RedisArg FlushOpts Source # 
Instance details

Defined in Database.Redis.ManualCommands

flushdbOpts :: RedisCtx m f => FlushOpts -> m (f Status) Source #

Remove all keys from the current database (http://redis.io/commands/flushdb). Since Redis 6.2

flushallOpts :: RedisCtx m f => FlushOpts -> m (f Status) Source #

Remove all keys from the current database (http://redis.io/commands/flushdb). Since Redis 6.2

data BitposType Source #

Constructors

Byte 
Bit 

Instances

Instances details
RedisArg BitposType Source # 
Instance details

Defined in Database.Redis.ManualCommands

substr Source #

Arguments

:: RedisCtx m f 
=> ByteString

key

-> Integer

start

-> Integer

end

-> m (f ByteString) 

Get a substring of the string stored at a key (http://redis.io/commands/substr).

Deprecated in Redis. Use getrange instead.

Since Redis 1.0.0