iovalkey
Version:
A robust, performance-focused and full-featured Valkey/Redis client for Node.js.
9,234 lines • 410 kB
TypeScript
/**
* This file is generated by @ioredis/interface-generator.
* Don't edit it manually. Instead, run `npm run generate` to update
* this file.
*/
/// <reference types="node" />
import { Callback } from "../types";
export declare type RedisKey = string | Buffer;
export declare type RedisValue = string | Buffer | number;
export interface ResultTypes<Result, Context> {
default: Promise<Result>;
pipeline: ChainableCommander;
}
export interface ChainableCommander extends RedisCommander<{
type: "pipeline";
}> {
length: number;
}
export declare type ClientContext = {
type: keyof ResultTypes<unknown, unknown>;
};
export declare type Result<T, Context extends ClientContext> = ResultTypes<T, Context>[Context["type"]];
interface RedisCommander<Context extends ClientContext = {
type: "default";
}> {
/**
* Call arbitrary commands.
*
* `redis.call('set', 'foo', 'bar')` is the same as `redis.set('foo', 'bar')`,
* so the only case you need to use this method is when the command is not
* supported by ioredis.
*
* ```ts
* redis.call('set', 'foo', 'bar');
* redis.call('get', 'foo', (err, value) => {
* // value === 'bar'
* });
* ```
*/
call(command: string, callback?: Callback<unknown>): Result<unknown, Context>;
call(command: string, args: (string | Buffer | number)[], callback?: Callback<unknown>): Result<unknown, Context>;
call(...args: [
command: string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
call(...args: [command: string, ...args: (string | Buffer | number)[]]): Result<unknown, Context>;
callBuffer(command: string, callback?: Callback<unknown>): Result<unknown, Context>;
callBuffer(command: string, args: (string | Buffer | number)[], callback?: Callback<unknown>): Result<unknown, Context>;
callBuffer(...args: [
command: string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
callBuffer(...args: [command: string, ...args: (string | Buffer | number)[]]): Result<unknown, Context>;
/**
* Lists the ACL categories, or the commands inside a category.
* - _group_: server
* - _complexity_: O(1) since the categories and commands are a fixed set.
* - _since_: 6.0.0
*/
acl(subcommand: "CAT", callback?: Callback<unknown>): Result<unknown, Context>;
acl(subcommand: "CAT", category: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Deletes ACL users, and terminates their connections.
* - _group_: server
* - _complexity_: O(1) amortized time considering the typical user.
* - _since_: 6.0.0
*/
acl(...args: [
subcommand: "DELUSER",
...usernames: (string | Buffer)[],
callback: Callback<number>
]): Result<number, Context>;
acl(...args: [subcommand: "DELUSER", ...usernames: (string | Buffer)[]]): Result<number, Context>;
/**
* Simulates the execution of a command by a user, without executing the command.
* - _group_: server
* - _complexity_: O(1).
* - _since_: 7.0.0
*/
acl(subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, callback?: Callback<string>): Result<string, Context>;
aclBuffer(subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, callback?: Callback<Buffer>): Result<Buffer, Context>;
acl(...args: [
subcommand: "DRYRUN",
username: string | Buffer,
command: string | Buffer,
...args: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
aclBuffer(...args: [
subcommand: "DRYRUN",
username: string | Buffer,
command: string | Buffer,
...args: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
acl(...args: [
subcommand: "DRYRUN",
username: string | Buffer,
command: string | Buffer,
...args: (string | Buffer | number)[]
]): Result<string, Context>;
aclBuffer(...args: [
subcommand: "DRYRUN",
username: string | Buffer,
command: string | Buffer,
...args: (string | Buffer | number)[]
]): Result<Buffer, Context>;
/**
* Generates a pseudorandom, secure password that can be used to identify ACL users.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
acl(subcommand: "GENPASS", callback?: Callback<string>): Result<string, Context>;
aclBuffer(subcommand: "GENPASS", callback?: Callback<Buffer>): Result<Buffer, Context>;
acl(subcommand: "GENPASS", bits: number | string, callback?: Callback<string>): Result<string, Context>;
aclBuffer(subcommand: "GENPASS", bits: number | string, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Lists the ACL rules of a user.
* - _group_: server
* - _complexity_: O(N). Where N is the number of password, command and pattern rules that the user has.
* - _since_: 6.0.0
*/
acl(subcommand: "GETUSER", username: string | Buffer, callback?: Callback<string[] | null>): Result<string[] | null, Context>;
aclBuffer(subcommand: "GETUSER", username: string | Buffer, callback?: Callback<Buffer[] | null>): Result<Buffer[] | null, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
acl(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Dumps the effective rules in ACL file format.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: "LIST", callback?: Callback<string[]>): Result<string[], Context>;
aclBuffer(subcommand: "LIST", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Reloads the rules from the configured ACL file.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: "LOAD", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Lists recent security events generated due to ACL rules.
* - _group_: server
* - _complexity_: O(N) with N being the number of entries shown.
* - _since_: 6.0.0
*/
acl(subcommand: "LOG", callback?: Callback<unknown>): Result<unknown, Context>;
acl(subcommand: "LOG", count: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
acl(subcommand: "LOG", reset: "RESET", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Saves the effective ACL rules in the configured ACL file.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: "SAVE", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Creates and modifies an ACL user and its rules.
* - _group_: server
* - _complexity_: O(N). Where N is the number of rules provided.
* - _since_: 6.0.0
*/
acl(subcommand: "SETUSER", username: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
acl(...args: [
subcommand: "SETUSER",
username: string | Buffer,
...rules: (string | Buffer)[],
callback: Callback<"OK">
]): Result<"OK", Context>;
acl(...args: [
subcommand: "SETUSER",
username: string | Buffer,
...rules: (string | Buffer)[]
]): Result<"OK", Context>;
/**
* Lists all ACL users.
* - _group_: server
* - _complexity_: O(N). Where N is the number of configured users.
* - _since_: 6.0.0
*/
acl(subcommand: "USERS", callback?: Callback<string[]>): Result<string[], Context>;
aclBuffer(subcommand: "USERS", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns the authenticated username of the current connection.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
acl(subcommand: "WHOAMI", callback?: Callback<string>): Result<string, Context>;
aclBuffer(subcommand: "WHOAMI", callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Appends a string to the value of a key. Creates the key if it doesn't exist.
* - _group_: string
* - _complexity_: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by the server will double the free space available on every reallocation.
* - _since_: 2.0.0
*/
append(key: RedisKey, value: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Signals that a cluster client is following an -ASK redirect.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
asking(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Authenticates the connection.
* - _group_: connection
* - _complexity_: O(N) where N is the number of passwords defined for the user
* - _since_: 1.0.0
*/
auth(password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
auth(username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Asynchronously rewrites the append-only file to disk.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
bgrewriteaof(callback?: Callback<string>): Result<string, Context>;
bgrewriteaofBuffer(callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Asynchronously saves the database(s) to disk.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
bgsave(callback?: Callback<"OK">): Result<"OK", Context>;
bgsave(schedule: "SCHEDULE", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Counts the number of set bits (population counting) in a string.
* - _group_: bitmap
* - _complexity_: O(N)
* - _since_: 2.6.0
*/
bitcount(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
bitcount(key: RedisKey, start: number | string, callback?: Callback<number>): Result<number, Context>;
bitcount(key: RedisKey, start: number | string, end: number | string, callback?: Callback<number>): Result<number, Context>;
bitcount(key: RedisKey, start: number | string, end: number | string, byte: "BYTE", callback?: Callback<number>): Result<number, Context>;
bitcount(key: RedisKey, start: number | string, end: number | string, bit: "BIT", callback?: Callback<number>): Result<number, Context>;
/**
* Performs arbitrary bitfield integer operations on strings.
* - _group_: bitmap
* - _complexity_: O(1) for each subcommand specified
* - _since_: 3.2.0
*/
bitfield(key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, getBlockToken: "GET", encoding: string | Buffer, offset: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, overflow: "OVERFLOW", wrap: "WRAP", setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, overflow: "OVERFLOW", wrap: "WRAP", incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, overflow: "OVERFLOW", sat: "SAT", setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, overflow: "OVERFLOW", sat: "SAT", incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, overflow: "OVERFLOW", fail: "FAIL", setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
bitfield(key: RedisKey, overflow: "OVERFLOW", fail: "FAIL", incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Performs arbitrary read-only bitfield integer operations on strings.
* - _group_: bitmap
* - _complexity_: O(1) for each subcommand specified
* - _since_: 6.0.0
*/
bitfield_ro(key: RedisKey, callback?: Callback<unknown[]>): Result<unknown[], Context>;
bitfield_ro(...args: [
key: RedisKey,
getBlockToken: "GET",
...getBlocks: (string | Buffer | number)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
bitfield_ro(...args: [
key: RedisKey,
getBlockToken: "GET",
...getBlocks: (string | Buffer | number)[]
]): Result<unknown[], Context>;
/**
* Performs bitwise operations on multiple strings, and stores the result.
* - _group_: bitmap
* - _complexity_: O(N)
* - _since_: 2.6.0
*/
bitop(...args: [
and: "AND",
destkey: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [
and: "AND",
destkey: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [and: "AND", destkey: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [and: "AND", destkey: RedisKey, keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [
or: "OR",
destkey: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [
or: "OR",
destkey: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [or: "OR", destkey: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [or: "OR", destkey: RedisKey, keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [
xor: "XOR",
destkey: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [
xor: "XOR",
destkey: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [xor: "XOR", destkey: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [xor: "XOR", destkey: RedisKey, keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [
not: "NOT",
destkey: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [
not: "NOT",
destkey: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
bitop(...args: [not: "NOT", destkey: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
bitop(...args: [not: "NOT", destkey: RedisKey, keys: RedisKey[]]): Result<number, Context>;
/**
* Finds the first set (1) or clear (0) bit in a string.
* - _group_: bitmap
* - _complexity_: O(N)
* - _since_: 2.8.7
*/
bitpos(key: RedisKey, bit: number | string, callback?: Callback<number>): Result<number, Context>;
bitpos(key: RedisKey, bit: number | string, start: number | string, callback?: Callback<number>): Result<number, Context>;
bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, callback?: Callback<number>): Result<number, Context>;
bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, byte: "BYTE", callback?: Callback<number>): Result<number, Context>;
bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, bit1: "BIT", callback?: Callback<number>): Result<number, Context>;
/**
* Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.
* - _group_: list
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
blmove(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", timeout: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
blmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", timeout: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
blmove(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", timeout: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
blmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", timeout: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
blmove(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", timeout: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
blmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", timeout: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
blmove(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", timeout: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
blmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", timeout: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(N+M) where N is the number of provided keys and M is the number of elements returned.
* - _since_: 7.0.0
*/
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT"
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT"
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT"
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT"
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT"
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT"
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT"
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT"
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
blmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
blmpopBuffer(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
/**
* Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(N) where N is the number of provided keys.
* - _since_: 2.0.0
*/
blpop(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[string, string] | null>
]): Result<[string, string] | null, Context>;
blpopBuffer(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[Buffer, Buffer] | null>
]): Result<[Buffer, Buffer] | null, Context>;
blpop(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[string, string] | null>
]): Result<[string, string] | null, Context>;
blpopBuffer(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[Buffer, Buffer] | null>
]): Result<[Buffer, Buffer] | null, Context>;
blpop(...args: [...keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>;
blpopBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>;
blpop(...args: [keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>;
blpopBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>;
/**
* Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(N) where N is the number of provided keys.
* - _since_: 2.0.0
*/
brpop(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[string, string] | null>
]): Result<[string, string] | null, Context>;
brpopBuffer(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[Buffer, Buffer] | null>
]): Result<[Buffer, Buffer] | null, Context>;
brpop(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[string, string] | null>
]): Result<[string, string] | null, Context>;
brpopBuffer(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[Buffer, Buffer] | null>
]): Result<[Buffer, Buffer] | null, Context>;
brpop(...args: [...keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>;
brpopBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>;
brpop(...args: [keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>;
brpopBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>;
/**
* Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(1)
* - _since_: 2.2.0
*/
brpoplpush(source: RedisKey, destination: RedisKey, timeout: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
brpoplpushBuffer(source: RedisKey, destination: RedisKey, timeout: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.
* - _group_: sorted-set
* - _complexity_: O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.
* - _since_: 7.0.0
*/
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
min: "MIN",
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
min: "MIN",
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
min: "MIN"
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
min: "MIN"
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
max: "MAX",
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
max: "MAX",
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
max: "MAX"
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
max: "MAX"
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
...keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
bzmpop(...args: [
timeout: number | string,
numkeys: number | string,
keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
/**
* Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member available otherwise. Deletes the sorted set if the last element was popped.
* - _group_: sorted-set
* - _complexity_: O(log(N)) with N being the number of elements in the sorted set.
* - _since_: 5.0.0
*/
bzpopmax(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: string, member: string, score: string] | null>
]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopmaxBuffer(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null>
]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
bzpopmax(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: string, member: string, score: string] | null>
]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopmaxBuffer(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null>
]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
bzpopmax(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopmaxBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
bzpopmax(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopmaxBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
/**
* Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.
* - _group_: sorted-set
* - _complexity_: O(log(N)) with N being the number of elements in the sorted set.
* - _since_: 5.0.0
*/
bzpopmin(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: string, member: string, score: string] | null>
]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopminBuffer(...args: [
...keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null>
]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
bzpopmin(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: string, member: string, score: string] | null>
]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopminBuffer(...args: [
keys: RedisKey[],
timeout: number | string,
callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null>
]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
bzpopmin(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopminBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
bzpopmin(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>;
bzpopminBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>;
/**
* Instructs the server whether to track the keys in the next request.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
client(subcommand: "CACHING", yes: "YES", callback?: Callback<"OK">): Result<"OK", Context>;
client(subcommand: "CACHING", no: "NO", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* A client claims its capability.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 8.0.0
*/
client(...args: [
subcommand: "CAPA",
...capabilities: (string | Buffer)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [subcommand: "CAPA", ...capabilities: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Returns the name of the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 2.6.9
*/
client(subcommand: "GETNAME", callback?: Callback<string | null>): Result<string | null, Context>;
clientBuffer(subcommand: "GETNAME", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns the client ID to which the connection's tracking notifications are redirected.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
client(subcommand: "GETREDIR", callback?: Callback<number>): Result<number, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
client(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the unique client ID of the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
client(subcommand: "ID", callback?: Callback<number>): Result<number, Context>;
/**
* Returns information about the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
client(subcommand: "INFO", callback?: Callback<string>): Result<string, Context>;
clientBuffer(subcommand: "INFO", callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Terminates open connections.
* - _group_: connection
* - _complexity_: O(N) where N is the number of client connections
* - _since_: 2.4.0
*/
client(subcommand: "KILL", oldFormat: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", clientIdToken: "ID", clientId: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", type: "TYPE", normal: "NORMAL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", type: "TYPE", master: "MASTER", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", type: "TYPE", primary: "PRIMARY", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", type: "TYPE", slave: "SLAVE", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", type: "TYPE", replica: "REPLICA", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", type: "TYPE", pubsub: "PUBSUB", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", usernameToken: "USER", username: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", addrToken: "ADDR", addr: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", laddrToken: "LADDR", laddr: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", skipme: "SKIPME", yes: "YES", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", skipme: "SKIPME", no: "NO", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "KILL", maxageToken: "MAXAGE", maxage: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Lists open connections.
* - _group_: connection
* - _complexity_: O(N) where N is the number of client connections
* - _since_: 2.4.0
*/
client(subcommand: "LIST", callback?: Callback<unknown>): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
clientIdToken: "ID",
...clientIds: (number | string)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
clientIdToken: "ID",
...clientIds: (number | string)[]
]): Result<unknown, Context>;
client(subcommand: "LIST", type: "TYPE", normal: "NORMAL", callback?: Callback<unknown>): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
normal: "NORMAL",
clientIdToken: "ID",
...clientIds: (number | string)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
normal: "NORMAL",
clientIdToken: "ID",
...clientIds: (number | string)[]
]): Result<unknown, Context>;
client(subcommand: "LIST", type: "TYPE", master: "MASTER", callback?: Callback<unknown>): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
master: "MASTER",
clientIdToken: "ID",
...clientIds: (number | string)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
master: "MASTER",
clientIdToken: "ID",
...clientIds: (number | string)[]
]): Result<unknown, Context>;
client(subcommand: "LIST", type: "TYPE", replica: "REPLICA", callback?: Callback<unknown>): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
replica: "REPLICA",
clientIdToken: "ID",
...clientIds: (number | string)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
replica: "REPLICA",
clientIdToken: "ID",
...clientIds: (number | string)[]
]): Result<unknown, Context>;
client(subcommand: "LIST", type: "TYPE", pubsub: "PUBSUB", callback?: Callback<unknown>): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
pubsub: "PUBSUB",
clientIdToken: "ID",
...clientIds: (number | string)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [
subcommand: "LIST",
type: "TYPE",
pubsub: "PUBSUB",
clientIdToken: "ID",
...clientIds: (number | string)[]
]): Result<unknown, Context>;
/**
* Sets the client eviction mode of the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 7.0.0
*/
client(subcommand: "NO-EVICT", on: "ON", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "NO-EVICT", off: "OFF", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Controls whether commands sent by the client affect the LRU/LFU of accessed keys.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 7.2.0
*/
client(subcommand: "NO-TOUCH", on: "ON", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "NO-TOUCH", off: "OFF", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Suspends commands processing.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
client(subcommand: "PAUSE", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
client(subcommand: "PAUSE", timeout: number | string, write: "WRITE", callback?: Callback<"OK">): Result<"OK", Context>;
client(subcommand: "PAUSE", timeout: number | string, all: "ALL", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Instructs the server whether to reply to commands.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 3.2.0
*/
client(subcommand: "REPLY", on: "ON", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "REPLY", off: "OFF", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "REPLY", skip: "SKIP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Sets information specific to the client or connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 7.2.0
*/
client(subcommand: "SETINFO", libnameToken: "LIB-NAME", libname: string | Buffer, callback?: Callback<string>): Result<string, Context>;
clientBuffer(subcommand: "SETINFO", libnameToken: "LIB-NAME", libname: string | Buffer, callback?: Callback<Buffer>): Result<Buffer, Context>;
client(subcommand: "SETINFO", libverToken: "LIB-VER", libver: string | Buffer, callback?: Callback<string>): Result<string, Context>;
clientBuffer(subcommand: "SETINFO", libverToken: "LIB-VER", libver: string | Buffer, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Sets the connection name.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 2.6.9
*/
client(subcommand: "SETNAME", connectionName: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Controls server-assisted client-side caching for the connection.
* - _group_: connection
* - _complexity_: O(1). Some options may introduce additional complexity.
* - _since_: 6.0.0
*/
client(...args: [
subcommand: "TRACKING",
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
client(...args: [subcommand: "TRACKING", ...args: RedisValue[]]): Result<unknown, Context>;
/**
* Returns information about server-assisted client-side caching for the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
client(subcommand: "TRACKINGINFO", callback?: Callback<string>): Result<string, Context>;
clientBuffer(subcommand: "TRACKINGINFO", callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Unblocks a client blocked by a blocking command from a different connection.
* - _group_: connection
* - _complexity_: O(log N) where N is the number of client connections
* - _since_: 5.0.0
*/
client(subcommand: "UNBLOCK", clientId: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "UNBLOCK", clientId: number | string, timeout: "TIMEOUT", callback?: Callback<unknown>): Result<unknown, Context>;
client(subcommand: "UNBLOCK", clientId: number | string, error: "ERROR", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Resumes processing commands from paused clients.
* - _group_: connection
* - _complexity_: O(N) Where N is the number of paused clients
* - _since_: 6.2.0
*/
client(subcommand: "UNPAUSE", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Assigns new hash slots to a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of hash slot arguments
* - _since_: 3.0.0
*/
cluster(...args: [
subcommand: "ADDSLOTS",
...slots: (number | string)[],
callback: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>
]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [
subcommand: "ADDSLOTS",
slots: (number | string)[],
callback: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>
]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [subcommand: "ADDSLOTS", ...slots: (number | string)[]]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [subcommand: "ADDSLOTS", slots: (number | string)[]]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
/**
* Assigns new hash slot ranges to a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of the slots between the start slot and end slot arguments.
* - _since_: 7.0.0
*/
cluster(...args: [
subcommand: "ADDSLOTSRANGE",
...ranges: (string | number)[],
callback: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>
]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [subcommand: "ADDSLOTSRANGE", ...ranges: (string | number)[]]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
/**
* Advances the cluster config epoch.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "BUMPEPOCH", callback?: Callback<"BUMPED" | "STILL">): Result<"BUMPED" | "STILL", Context>;
/**
* Returns the number of active failure reports active for a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the number of failure reports
* - _since_: 3.0.0
*/
cluster(subcommand: "COUNT-FAILURE-REPORTS", nodeId: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the number of keys in a hash slot.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "COUNTKEYSINSLOT", slot: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Sets hash slots as unbound for a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of hash slot arguments
* - _since_: 3.0.0
*/
cluster(...args: [
subcommand: "DELSLOTS",
...slots: (number | string)[],
callback: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>
]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [
subcommand: "DELSLOTS",
slots: (number | string)[],
callback: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>
]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [subcommand: "DELSLOTS", ...slots: (number | string)[]]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [subcommand: "DELSLOTS", slots: (number | string)[]]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
/**
* Sets hash slot ranges as unbound for a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of the slots between the start slot and end slot arguments.
* - _since_: 7.0.0
*/
cluster(...args: [
subcommand: "DELSLOTSRANGE",
...ranges: (string | number)[],
callback: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>
]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
cluster(...args: [subcommand: "DELSLOTSRANGE", ...ranges: (string | number)[]]): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
/**
* Forces a replica to perform a manual failover of its primary.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "FAILOVER", callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "FAILOVER", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "FAILOVER", takeover: "TAKEOVER", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Deletes all slots information from a node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "FLUSHSLOTS", callback?: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
/**
* Removes a node from the nodes table.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "FORGET", nodeId: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns the key names in a hash slot.
* - _group_: cluster
* - _complexity_: O(N) where N is the number of requested keys
* - _since_: 3.0.0
*/
cluster(subcommand: "GETKEYSINSLOT", slot: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
cluster(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns information about the state of a node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "INFO", callback?: Callback<string>): Result<string, Context>;
/**
* Returns the hash slot for a key.
* - _group_: cluster
* - _complexity_: O(N) where N is the number of bytes in the key
* - _since_: 3.0.0
*/
cluster(subcommand: "KEYSLOT", key: string | Buffer, callback?: Callback<number>): Result<number, Context>;
/**
* Returns a list of all TCP links to and from peer nodes.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of Cluster nodes
* - _since_: 7.0.0
*/
cluster(subcommand: "LINKS", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Forces a node to handshake with another node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "MEET", ip: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "MEET", ip: string | Buffer, port: number | string, clusterBusPort: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns the ID of a node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "MYID", callback?: Callback<string>): Result<string, Context>;
/**
* Returns the shard ID of a node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 7.2.0
*/
cluster(subcommand: "MYSHARDID", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the cluster configuration for a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of Cluster nodes
* - _since_: 3.0.0
*/
cluster(subcommand: "NODES", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Lists the replica nodes of a primary node.
* - _group_: cluster
* - _complexity_: O(N) where N is the number of replicas.
* - _since_: 5.0.0
*/
cluster(subcommand: "REPLICAS", nodeId: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Configure a node as replica of a primary node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "REPLICATE", nodeId: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Resets a node.
* - _group_: cluster
* - _complexity_: O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.
* - _since_: 3.0.0
*/
cluster(subcommand: "RESET", callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "RESET", hard: "HARD", callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "RESET", soft: "SOFT", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Forces a node to save the cluster configuration to disk.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "SAVECONFIG", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Sets the configuration epoch for a new node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "SET-CONFIG-EPOCH", configEpoch: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Binds a hash slot to a node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
cluster(subcommand: "SETSLOT", slot: number | string, importingToken: "IMPORTING", importing: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, importingToken: "IMPORTING", importing: string | Buffer, timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, migratingToken: "MIGRATING", migrating: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, migratingToken: "MIGRATING", migrating: string | Buffer, timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, nodeToken: "NODE", node: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, nodeToken: "NODE", node: string | Buffer, timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, stable: "STABLE", callback?: Callback<"OK">): Result<"OK", Context>;
cluster(subcommand: "SETSLOT", slot: number | string, stable: "STABLE", timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns the mapping of cluster slots to shards.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of cluster nodes
* - _since_: 7.0.0
*/
cluster(subcommand: "SHARDS", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Lists the replica nodes of a primary node.
* - _group_: cluster
* - _complexity_: O(N) where N is the number of replicas.
* - _since_: 3.0.0
*/
cluster(subcommand: "SLAVES", nodeId: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Return an array of slot usage statistics for slots assigned to the current node.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of slots based on arguments. O(N*log(N)) with ORDERBY subcommand.
* - _since_: 8.0.0
*/
cluster(subcommand: "SLOT-STATS", slotsrangeToken: "SLOTSRANGE", startSlot: number | string, endSlot: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, asc: "ASC", callback?: Callback<unknown>): Result<unknown, Context>;
cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, desc: "DESC", callback?: Callback<unknown>): Result<unknown, Context>;
cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, limitToken: "LIMIT", limit: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, limitToken: "LIMIT", limit: number | string, asc: "ASC", callback?: Callback<unknown>): Result<unknown, Context>;
cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, limitToken: "LIMIT", limit: number | string, desc: "DESC", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the mapping of cluster slots to nodes.
* - _group_: cluster
* - _complexity_: O(N) where N is the total number of Cluster nodes
* - _since_: 3.0.0
*/
cluster(subcommand: "SLOTS", callback?: Callback<[
startSlotRange: number,
endSlotRange: number,
...nodes: [
host: string,
port: number,
nodeId: string,
info: unknown[]
][]
][]>): Result<[
startSlotRange: number,
endSlotRange: number,
...nodes: [host: string, port: number, nodeId: string, info: unknown[]][]
][], Context>;
/**
* Returns a count of commands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
command(subcommand: "COUNT", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns documentary information about one, multiple or all commands.
* - _group_: server
* - _complexity_: O(N) where N is the number of commands to look up
* - _since_: 7.0.0
*/
command(subcommand: "DOCS", callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(...args: [
subcommand: "DOCS",
...commandNames: (string | Buffer)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
command(...args: [subcommand: "DOCS", ...commandNames: (string | Buffer)[]]): Result<unknown[], Context>;
/**
* Extracts the key names from an arbitrary command.
* - _group_: server
* - _complexity_: O(N) where N is the number of arguments to the command
* - _since_: 2.8.13
*/
command(subcommand: "GETKEYS", command: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(...args: [
subcommand: "GETKEYS",
command: string | Buffer,
...args: (string | Buffer | number)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
command(...args: [
subcommand: "GETKEYS",
command: string | Buffer,
...args: (string | Buffer | number)[]
]): Result<unknown[], Context>;
/**
* Extracts the key names and access flags for an arbitrary command.
* - _group_: server
* - _complexity_: O(N) where N is the number of arguments to the command
* - _since_: 7.0.0
*/
command(subcommand: "GETKEYSANDFLAGS", command: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(...args: [
subcommand: "GETKEYSANDFLAGS",
command: string | Buffer,
...args: (string | Buffer | number)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
command(...args: [
subcommand: "GETKEYSANDFLAGS",
command: string | Buffer,
...args: (string | Buffer | number)[]
]): Result<unknown[], Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
command(subcommand: "HELP", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns information about one, multiple or all commands.
* - _group_: server
* - _complexity_: O(N) where N is the number of commands to look up
* - _since_: 2.8.13
*/
command(subcommand: "INFO", callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(...args: [
subcommand: "INFO",
...commandNames: (string | Buffer)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
command(...args: [subcommand: "INFO", ...commandNames: (string | Buffer)[]]): Result<unknown[], Context>;
/**
* Returns a list of command names.
* - _group_: server
* - _complexity_: O(N) where N is the total number of commands
* - _since_: 7.0.0
*/
command(subcommand: "LIST", callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(subcommand: "LIST", filterby: "FILTERBY", moduleNameToken: "MODULE", moduleName: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(subcommand: "LIST", filterby: "FILTERBY", categoryToken: "ACLCAT", category: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
command(subcommand: "LIST", filterby: "FILTERBY", patternToken: "PATTERN", pattern: string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns the effective values of configuration parameters.
* - _group_: server
* - _complexity_: O(N) when N is the number of configuration parameters provided
* - _since_: 2.0.0
*/
config(...args: [
subcommand: "GET",
...parameters: (string | Buffer)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
config(...args: [subcommand: "GET", ...parameters: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
config(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Resets the server's statistics.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
config(subcommand: "RESETSTAT", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Persists the effective configuration to file.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.0
*/
config(subcommand: "REWRITE", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Sets configuration parameters in-flight.
* - _group_: server
* - _complexity_: O(N) when N is the number of configuration parameters provided
* - _since_: 2.0.0
*/
config(...args: [
subcommand: "SET",
...data: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
config(...args: [subcommand: "SET", ...data: (string | Buffer | number)[]]): Result<unknown, Context>;
/**
* Copies the value of a key to a new key.
* - _group_: generic
* - _complexity_: O(N) worst case for collections, where N is the number of nested items. O(1) for string values.
* - _since_: 6.2.0
*/
copy(source: RedisKey, destination: RedisKey, callback?: Callback<number>): Result<number, Context>;
copy(source: RedisKey, destination: RedisKey, replace: "REPLACE", callback?: Callback<number>): Result<number, Context>;
copy(source: RedisKey, destination: RedisKey, destinationDbToken: "DB", destinationDb: number | string, callback?: Callback<number>): Result<number, Context>;
copy(source: RedisKey, destination: RedisKey, destinationDbToken: "DB", destinationDb: number | string, replace: "REPLACE", callback?: Callback<number>): Result<number, Context>;
/**
* Returns the number of keys in the database.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
dbsize(callback?: Callback<number>): Result<number, Context>;
/**
* A container for debugging commands.
* - _group_: server
* - _complexity_: Depends on subcommand.
* - _since_: 1.0.0
*/
debug(subcommand: string, callback?: Callback<unknown>): Result<unknown, Context>;
debug(...args: [
subcommand: string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
debug(...args: [subcommand: string, ...args: (string | Buffer | number)[]]): Result<unknown, Context>;
/**
* Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
decr(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Decrements a number from the integer value of a key. Uses 0 as initial value if the key doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
decrby(key: RedisKey, decrement: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Deletes one or more keys.
* - _group_: generic
* - _complexity_: O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).
* - _since_: 1.0.0
*/
del(...args: [...keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
del(...args: [keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
del(...args: [...keys: RedisKey[]]): Result<number, Context>;
del(...args: [keys: RedisKey[]]): Result<number, Context>;
/**
* Discards a transaction.
* - _group_: transactions
* - _complexity_: O(N), when N is the number of queued commands
* - _since_: 2.0.0
*/
discard(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns a serialized representation of the value stored at a key.
* - _group_: generic
* - _complexity_: O(1) to access the key and additional O(N*M) to serialize it, where N is the number of objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1).
* - _since_: 2.6.0
*/
dump(key: RedisKey, callback?: Callback<string>): Result<string, Context>;
dumpBuffer(key: RedisKey, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Returns the given string.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
echo(message: string | Buffer, callback?: Callback<string>): Result<string, Context>;
echoBuffer(message: string | Buffer, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Executes a server-side Lua script.
* - _group_: scripting
* - _complexity_: Depends on the script that is executed.
* - _since_: 2.6.0
*/
eval(script: string | Buffer, numkeys: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
...keys: RedisKey[]
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
keys: RedisKey[]
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval(...args: [
script: string | Buffer,
numkeys: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Executes a read-only server-side Lua script.
* - _group_: scripting
* - _complexity_: Depends on the script that is executed.
* - _since_: 7.0.0
*/
eval_ro(script: string | Buffer, numkeys: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
...keys: RedisKey[]
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
keys: RedisKey[]
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
eval_ro(...args: [
script: string | Buffer,
numkeys: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Executes a server-side Lua script by SHA1 digest.
* - _group_: scripting
* - _complexity_: Depends on the script that is executed.
* - _since_: 2.6.0
*/
evalsha(sha1: string | Buffer, numkeys: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
...keys: RedisKey[]
]): Result<unknown, Context>;
evalsha(...args: [sha1: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Executes a read-only server-side Lua script by SHA1 digest.
* - _group_: scripting
* - _complexity_: Depends on the script that is executed.
* - _since_: 7.0.0
*/
evalsha_ro(sha1: string | Buffer, numkeys: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
...keys: RedisKey[]
]): Result<unknown, Context>;
evalsha_ro(...args: [sha1: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
evalsha_ro(...args: [
sha1: string | Buffer,
numkeys: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Executes all commands in a transaction.
* - _group_: transactions
* - _complexity_: Depends on commands in the transaction
* - _since_: 1.2.0
*/
exec(callback?: Callback<[error: Error | null, result: unknown][] | null>): Promise<[error: Error | null, result: unknown][] | null>;
/**
* Determines whether one or more keys exist.
* - _group_: generic
* - _complexity_: O(N) where N is the number of keys to check.
* - _since_: 1.0.0
*/
exists(...args: [...keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
exists(...args: [keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
exists(...args: [...keys: RedisKey[]]): Result<number, Context>;
exists(...args: [keys: RedisKey[]]): Result<number, Context>;
/**
* Sets the expiration time of a key in seconds.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
expire(key: RedisKey, seconds: number | string, callback?: Callback<number>): Result<number, Context>;
expire(key: RedisKey, seconds: number | string, nx: "NX", callback?: Callback<number>): Result<number, Context>;
expire(key: RedisKey, seconds: number | string, xx: "XX", callback?: Callback<number>): Result<number, Context>;
expire(key: RedisKey, seconds: number | string, gt: "GT", callback?: Callback<number>): Result<number, Context>;
expire(key: RedisKey, seconds: number | string, lt: "LT", callback?: Callback<number>): Result<number, Context>;
/**
* Sets the expiration time of a key to a Unix timestamp.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.2.0
*/
expireat(key: RedisKey, unixTimeSeconds: number | string, callback?: Callback<number>): Result<number, Context>;
expireat(key: RedisKey, unixTimeSeconds: number | string, nx: "NX", callback?: Callback<number>): Result<number, Context>;
expireat(key: RedisKey, unixTimeSeconds: number | string, xx: "XX", callback?: Callback<number>): Result<number, Context>;
expireat(key: RedisKey, unixTimeSeconds: number | string, gt: "GT", callback?: Callback<number>): Result<number, Context>;
expireat(key: RedisKey, unixTimeSeconds: number | string, lt: "LT", callback?: Callback<number>): Result<number, Context>;
/**
* Returns the expiration time of a key as a Unix timestamp.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 7.0.0
*/
expiretime(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Starts a coordinated failover from a server to one of its replicas.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
failover(callback?: Callback<"OK">): Result<"OK", Context>;
failover(millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
failover(abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>;
failover(abort: "ABORT", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, abort: "ABORT", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>;
failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", abort: "ABORT", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Invokes a function.
* - _group_: scripting
* - _complexity_: Depends on the function that is executed.
* - _since_: 7.0.0
*/
fcall(fun: string | Buffer, numkeys: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
...keys: RedisKey[]
]): Result<unknown, Context>;
fcall(...args: [fun: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Invokes a read-only function.
* - _group_: scripting
* - _complexity_: Depends on the function that is executed.
* - _since_: 7.0.0
*/
fcall_ro(fun: string | Buffer, numkeys: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
...keys: RedisKey[]
]): Result<unknown, Context>;
fcall_ro(...args: [fun: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
fcall_ro(...args: [
fun: string | Buffer,
numkeys: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Removes all keys from all databases.
* - _group_: server
* - _complexity_: O(N) where N is the total number of keys in all databases
* - _since_: 1.0.0
*/
flushall(callback?: Callback<"OK">): Result<"OK", Context>;
flushall(async: "ASYNC", callback?: Callback<"OK">): Result<"OK", Context>;
flushall(sync: "SYNC", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Remove all keys from the current database.
* - _group_: server
* - _complexity_: O(N) where N is the number of keys in the selected database
* - _since_: 1.0.0
*/
flushdb(callback?: Callback<"OK">): Result<"OK", Context>;
flushdb(async: "ASYNC", callback?: Callback<"OK">): Result<"OK", Context>;
flushdb(sync: "SYNC", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Adds one or more members to a geospatial index. The key is created if it doesn't exist.
* - _group_: geo
* - _complexity_: O(log(N)) for each item added, where N is the number of elements in the sorted set.
* - _since_: 3.2.0
*/
geoadd(...args: [
key: RedisKey,
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
geoadd(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
geoadd(...args: [key: RedisKey, ch: "CH", ...data: (string | Buffer | number)[]]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
nx: "NX",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
geoadd(...args: [key: RedisKey, nx: "NX", ...data: (string | Buffer | number)[]]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
xx: "XX",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
geoadd(...args: [key: RedisKey, xx: "XX", ...data: (string | Buffer | number)[]]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
geoadd(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
/**
* Returns the distance between two members of a geospatial index.
* - _group_: geo
* - _complexity_: O(1)
* - _since_: 3.2.0
*/
geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, callback?: Callback<string | null>): Result<string | null, Context>;
geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, m: "M", callback?: Callback<string | null>): Result<string | null, Context>;
geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, m: "M", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, km: "KM", callback?: Callback<string | null>): Result<string | null, Context>;
geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, km: "KM", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, ft: "FT", callback?: Callback<string | null>): Result<string | null, Context>;
geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, ft: "FT", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, mi: "MI", callback?: Callback<string | null>): Result<string | null, Context>;
geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, mi: "MI", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns members from a geospatial index as geohash strings.
* - _group_: geo
* - _complexity_: O(1) for each member requested.
* - _since_: 3.2.0
*/
geohash(key: RedisKey, callback?: Callback<string[]>): Result<string[], Context>;
geohashBuffer(key: RedisKey, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
geohash(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<string[]>
]): Result<string[], Context>;
geohashBuffer(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
geohash(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<string[]>
]): Result<string[], Context>;
geohashBuffer(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
geohash(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<string[], Context>;
geohashBuffer(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<Buffer[], Context>;
geohash(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<string[], Context>;
geohashBuffer(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<Buffer[], Context>;
/**
* Returns the longitude and latitude of members from a geospatial index.
* - _group_: geo
* - _complexity_: O(1) for each member requested.
* - _since_: 3.2.0
*/
geopos(key: RedisKey, callback?: Callback<([longitude: string, latitude: string] | null)[]>): Result<([longitude: string, latitude: string] | null)[], Context>;
geopos(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<([longitude: string, latitude: string] | null)[]>
]): Result<([longitude: string, latitude: string] | null)[], Context>;
geopos(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<([longitude: string, latitude: string] | null)[]>
]): Result<([longitude: string, latitude: string] | null)[], Context>;
geopos(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<([longitude: string, latitude: string] | null)[], Context>;
geopos(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<([longitude: string, latitude: string] | null)[], Context>;
/**
* Queries a geospatial index for members within a distance from a coordinate, optionally stores the result.
* - _group_: geo
* - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
* - _since_: 3.2.0
*/
georadius(...args: [
key: RedisKey,
longitude: number | string,
latitude: number | string,
radius: number | string,
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
georadius(...args: [
key: RedisKey,
longitude: number | string,
latitude: number | string,
radius: number | string,
...args: RedisValue[]
]): Result<unknown[], Context>;
/**
* Returns members from a geospatial index that are within a distance from a coordinate.
* - _group_: geo
* - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
* - _since_: 3.2.10
*/
georadius_ro(...args: [
key: RedisKey,
longitude: number | string,
latitude: number | string,
radius: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
georadius_ro(...args: [
key: RedisKey,
longitude: number | string,
latitude: number | string,
radius: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Queries a geospatial index for members within a distance from a member, optionally stores the result.
* - _group_: geo
* - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
* - _since_: 3.2.0
*/
georadiusbymember(...args: [
key: RedisKey,
member: string | Buffer | number,
radius: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
georadiusbymember(...args: [
key: RedisKey,
member: string | Buffer | number,
radius: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Returns members from a geospatial index that are within a distance from a member.
* - _group_: geo
* - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.
* - _since_: 3.2.10
*/
georadiusbymember_ro(...args: [
key: RedisKey,
member: string | Buffer | number,
radius: number | string,
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
georadiusbymember_ro(...args: [
key: RedisKey,
member: string | Buffer | number,
radius: number | string,
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Queries a geospatial index for members inside an area of a box or a circle.
* - _group_: geo
* - _complexity_: 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
* - _since_: 6.2.0
*/
geosearch(...args: [
key: RedisKey,
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
geosearch(...args: [key: RedisKey, ...args: RedisValue[]]): Result<unknown[], Context>;
/**
* Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result.
* - _group_: geo
* - _complexity_: 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
* - _since_: 6.2.0
*/
geosearchstore(...args: [
destination: RedisKey,
source: RedisKey,
...args: RedisValue[],
callback: Callback<number>
]): Result<number, Context>;
geosearchstore(...args: [destination: RedisKey, source: RedisKey, ...args: RedisValue[]]): Result<number, Context>;
/**
* Returns the string value of a key.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
get(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
getBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns a bit value by offset.
* - _group_: bitmap
* - _complexity_: O(1)
* - _since_: 2.2.0
*/
getbit(key: RedisKey, offset: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the string value of a key after deleting the key.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
getdel(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
getdelBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns the string value of a key after setting its expiration time.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
getex(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
getexBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
getex(key: RedisKey, secondsToken: "EX", seconds: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
getexBuffer(key: RedisKey, secondsToken: "EX", seconds: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
getex(key: RedisKey, millisecondsToken: "PX", milliseconds: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
getexBuffer(key: RedisKey, millisecondsToken: "PX", milliseconds: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
getex(key: RedisKey, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
getexBuffer(key: RedisKey, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
getex(key: RedisKey, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
getexBuffer(key: RedisKey, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
getex(key: RedisKey, persist: "PERSIST", callback?: Callback<string | null>): Result<string | null, Context>;
getexBuffer(key: RedisKey, persist: "PERSIST", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns a substring of the string stored at a key.
* - _group_: string
* - _complexity_: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.
* - _since_: 2.4.0
*/
getrange(key: RedisKey, start: number | string, end: number | string, callback?: Callback<string>): Result<string, Context>;
getrangeBuffer(key: RedisKey, start: number | string, end: number | string, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Returns the previous string value of a key after setting it to a new value.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
getset(key: RedisKey, value: string | Buffer | number, callback?: Callback<string | null>): Result<string | null, Context>;
getsetBuffer(key: RedisKey, value: string | Buffer | number, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.
* - _group_: hash
* - _complexity_: O(N) where N is the number of fields to be removed.
* - _since_: 2.0.0
*/
hdel(...args: [
key: RedisKey,
...fields: (string | Buffer)[],
callback: Callback<number>
]): Result<number, Context>;
hdel(...args: [key: RedisKey, ...fields: (string | Buffer)[]]): Result<number, Context>;
/**
* Handshakes with the server.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 6.0.0
*/
hello(callback?: Callback<unknown[]>): Result<unknown[], Context>;
hello(protover: number | string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
hello(protover: number | string, clientnameToken: "SETNAME", clientname: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
hello(protover: number | string, authToken: "AUTH", username: string | Buffer, password: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
hello(protover: number | string, authToken: "AUTH", username: string | Buffer, password: string | Buffer, clientnameToken: "SETNAME", clientname: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Determines whether a field exists in a hash.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
hexists(key: RedisKey, field: string | Buffer, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the value of a field in a hash.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
hget(key: RedisKey, field: string | Buffer, callback?: Callback<string | null>): Result<string | null, Context>;
hgetBuffer(key: RedisKey, field: string | Buffer, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns all fields and values in a hash.
* - _group_: hash
* - _complexity_: O(N) where N is the size of the hash.
* - _since_: 2.0.0
*/
hgetall(key: RedisKey, callback?: Callback<Record<string, string>>): Result<Record<string, string>, Context>;
hgetallBuffer(key: RedisKey, callback?: Callback<Record<string, Buffer>>): Result<Record<string, Buffer>, Context>;
/**
* Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
hincrby(key: RedisKey, field: string | Buffer, increment: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
hincrbyfloat(key: RedisKey, field: string | Buffer, increment: number | string, callback?: Callback<string>): Result<string, Context>;
hincrbyfloatBuffer(key: RedisKey, field: string | Buffer, increment: number | string, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Returns all fields in a hash.
* - _group_: hash
* - _complexity_: O(N) where N is the size of the hash.
* - _since_: 2.0.0
*/
hkeys(key: RedisKey, callback?: Callback<string[]>): Result<string[], Context>;
hkeysBuffer(key: RedisKey, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns the number of fields in a hash.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
hlen(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the values of all fields in a hash.
* - _group_: hash
* - _complexity_: O(N) where N is the number of fields being requested.
* - _since_: 2.0.0
*/
hmget(...args: [
key: RedisKey,
...fields: (string | Buffer)[],
callback: Callback<(string | null)[]>
]): Result<(string | null)[], Context>;
hmgetBuffer(...args: [
key: RedisKey,
...fields: (string | Buffer)[],
callback: Callback<(Buffer | null)[]>
]): Result<(Buffer | null)[], Context>;
hmget(...args: [key: RedisKey, ...fields: (string | Buffer)[]]): Result<(string | null)[], Context>;
hmgetBuffer(...args: [key: RedisKey, ...fields: (string | Buffer)[]]): Result<(Buffer | null)[], Context>;
/**
* Sets the values of multiple fields.
* - _group_: hash
* - _complexity_: O(N) where N is the number of fields being set.
* - _since_: 2.0.0
*/
hmset(key: RedisKey, object: object, callback?: Callback<"OK">): Result<"OK", Context>;
hmset(key: RedisKey, map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
hmset(...args: [
key: RedisKey,
...data: (string | Buffer | number)[],
callback: Callback<"OK">
]): Result<"OK", Context>;
hmset(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result<"OK", Context>;
/**
* Returns one or more random fields from a hash.
* - _group_: hash
* - _complexity_: O(N) where N is the number of fields returned
* - _since_: 6.2.0
*/
hrandfield(key: RedisKey, callback?: Callback<string | unknown[] | null>): Result<string | unknown[] | null, Context>;
hrandfieldBuffer(key: RedisKey, callback?: Callback<Buffer | unknown[] | null>): Result<Buffer | unknown[] | null, Context>;
hrandfield(key: RedisKey, count: number | string, callback?: Callback<string | unknown[] | null>): Result<string | unknown[] | null, Context>;
hrandfieldBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer | unknown[] | null>): Result<Buffer | unknown[] | null, Context>;
hrandfield(key: RedisKey, count: number | string, withvalues: "WITHVALUES", callback?: Callback<string | unknown[] | null>): Result<string | unknown[] | null, Context>;
hrandfieldBuffer(key: RedisKey, count: number | string, withvalues: "WITHVALUES", callback?: Callback<Buffer | unknown[] | null>): Result<Buffer | unknown[] | null, Context>;
/**
* Iterates over fields and values of a hash.
* - _group_: hash
* - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.
* - _since_: 2.8.0
*/
hscan(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
/**
* Creates or modifies the value of a field in a hash.
* - _group_: hash
* - _complexity_: O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.
* - _since_: 2.0.0
*/
hset(key: RedisKey, object: object, callback?: Callback<number>): Result<number, Context>;
hset(key: RedisKey, map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<number>): Result<number, Context>;
hset(...args: [
key: RedisKey,
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
hset(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Sets the value of a field in a hash only when the field doesn't exist.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
hsetnx(key: RedisKey, field: string | Buffer, value: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the length of the value of a field.
* - _group_: hash
* - _complexity_: O(1)
* - _since_: 3.2.0
*/
hstrlen(key: RedisKey, field: string | Buffer, callback?: Callback<number>): Result<number, Context>;
/**
* Returns all values in a hash.
* - _group_: hash
* - _complexity_: O(N) where N is the size of the hash.
* - _since_: 2.0.0
*/
hvals(key: RedisKey, callback?: Callback<string[]>): Result<string[], Context>;
hvalsBuffer(key: RedisKey, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
incr(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
incrby(key: RedisKey, increment: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
incrbyfloat(key: RedisKey, increment: number | string, callback?: Callback<string>): Result<string, Context>;
/**
* Returns information and statistics about the server.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
info(callback?: Callback<string>): Result<string, Context>;
info(...args: [...sections: (string | Buffer)[], callback: Callback<string>]): Result<string, Context>;
info(...args: [...sections: (string | Buffer)[]]): Result<string, Context>;
/**
* Returns all key names that match a pattern.
* - _group_: generic
* - _complexity_: O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length.
* - _since_: 1.0.0
*/
keys(pattern: string, callback?: Callback<string[]>): Result<string[], Context>;
keysBuffer(pattern: string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns the Unix timestamp of the last successful save to disk.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
lastsave(callback?: Callback<number>): Result<number, Context>;
/**
* Returns a human-readable latency analysis report.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
latency(subcommand: "DOCTOR", callback?: Callback<string>): Result<string, Context>;
/**
* Returns a latency graph for an event.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
latency(subcommand: "GRAPH", event: string | Buffer, callback?: Callback<string>): Result<string, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
latency(subcommand: "HELP", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns the cumulative distribution of latencies of a subset or all commands.
* - _group_: server
* - _complexity_: O(N) where N is the number of commands with latency information being retrieved.
* - _since_: 7.0.0
*/
latency(subcommand: "HISTOGRAM", callback?: Callback<unknown>): Result<unknown, Context>;
latency(...args: [
subcommand: "HISTOGRAM",
...commands: (string | Buffer)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
latency(...args: [subcommand: "HISTOGRAM", ...commands: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Returns timestamp-latency samples for an event.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
latency(subcommand: "HISTORY", event: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns the latest latency samples for all events.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
latency(subcommand: "LATEST", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Resets the latency data for one or more events.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.13
*/
latency(subcommand: "RESET", callback?: Callback<number>): Result<number, Context>;
latency(...args: [
subcommand: "RESET",
...events: (string | Buffer)[],
callback: Callback<number>
]): Result<number, Context>;
latency(...args: [subcommand: "RESET", ...events: (string | Buffer)[]]): Result<number, Context>;
/**
* Finds the longest common substring.
* - _group_: string
* - _complexity_: O(N*M) where N and M are the lengths of s1 and s2, respectively
* - _since_: 7.0.0
*/
lcs(key1: RedisKey, key2: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns an element from a list by its index.
* - _group_: list
* - _complexity_: O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1).
* - _since_: 1.0.0
*/
lindex(key: RedisKey, index: number | string, callback?: Callback<string | null>): Result<string | null, Context>;
lindexBuffer(key: RedisKey, index: number | string, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Inserts an element before or after another element in a list.
* - _group_: list
* - _complexity_: O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).
* - _since_: 2.2.0
*/
linsert(key: RedisKey, before: "BEFORE", pivot: string | Buffer | number, element: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
linsert(key: RedisKey, after: "AFTER", pivot: string | Buffer | number, element: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the length of a list.
* - _group_: list
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
llen(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved.
* - _group_: list
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
lmove(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", callback?: Callback<string>): Result<string, Context>;
lmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", callback?: Callback<Buffer>): Result<Buffer, Context>;
lmove(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", callback?: Callback<string>): Result<string, Context>;
lmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", callback?: Callback<Buffer>): Result<Buffer, Context>;
lmove(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", callback?: Callback<string>): Result<string, Context>;
lmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", callback?: Callback<Buffer>): Result<Buffer, Context>;
lmove(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", callback?: Callback<string>): Result<string, Context>;
lmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Returns multiple elements from a list after removing them. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(N+M) where N is the number of provided keys and M is the number of elements returned.
* - _since_: 7.0.0
*/
lmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [numkeys: number | string, ...keys: RedisKey[], left: "LEFT"]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [numkeys: number | string, ...keys: RedisKey[], left: "LEFT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [numkeys: number | string, keys: RedisKey[], left: "LEFT"]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [numkeys: number | string, keys: RedisKey[], left: "LEFT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
left: "LEFT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [numkeys: number | string, ...keys: RedisKey[], right: "RIGHT"]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [numkeys: number | string, ...keys: RedisKey[], right: "RIGHT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [numkeys: number | string, keys: RedisKey[], right: "RIGHT"]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [numkeys: number | string, keys: RedisKey[], right: "RIGHT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: string, members: string[]] | null>
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string,
callback: Callback<[key: Buffer, members: Buffer[]] | null>
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
lmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: string, members: string[]] | null, Context>;
lmpopBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
right: "RIGHT",
countToken: "COUNT",
count: number | string
]): Result<[key: Buffer, members: Buffer[]] | null, Context>;
/**
* Displays computer art and the server version
* - _group_: server
* - _complexity_: undefined
* - _since_: 5.0.0
*/
lolwut(callback?: Callback<string>): Result<string, Context>;
lolwut(versionToken: "VERSION", version: number | string, callback?: Callback<string>): Result<string, Context>;
/**
* Returns the first elements in a list after removing it. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(N) where N is the number of elements returned
* - _since_: 1.0.0
*/
lpop(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
lpopBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
lpop(key: RedisKey, count: number | string, callback?: Callback<string[] | null>): Result<string[] | null, Context>;
lpopBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[] | null>): Result<Buffer[] | null, Context>;
/**
* Returns the index of matching elements in a list.
* - _group_: list
* - _complexity_: 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_: 6.0.6
*/
lpos(key: RedisKey, element: string | Buffer | number, callback?: Callback<number | null>): Result<number | null, Context>;
lpos(key: RedisKey, element: string | Buffer | number, lenToken: "MAXLEN", len: number | string, callback?: Callback<number | null>): Result<number | null, Context>;
lpos(key: RedisKey, element: string | Buffer | number, numMatchesToken: "COUNT", numMatches: number | string, callback?: Callback<number[]>): Result<number[], Context>;
lpos(key: RedisKey, element: string | Buffer | number, numMatchesToken: "COUNT", numMatches: number | string, lenToken: "MAXLEN", len: number | string, callback?: Callback<number[]>): Result<number[], Context>;
lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, callback?: Callback<number | null>): Result<number | null, Context>;
lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, lenToken: "MAXLEN", len: number | string, callback?: Callback<number | null>): Result<number | null, Context>;
lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, numMatchesToken: "COUNT", numMatches: number | string, callback?: Callback<number[]>): Result<number[], Context>;
lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, numMatchesToken: "COUNT", numMatches: number | string, lenToken: "MAXLEN", len: number | string, callback?: Callback<number[]>): Result<number[], Context>;
/**
* Prepends one or more elements to a list. Creates the key if it doesn't exist.
* - _group_: list
* - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.
* - _since_: 1.0.0
*/
lpush(...args: [
key: RedisKey,
...elements: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
lpush(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Prepends one or more elements to a list only when the list exists.
* - _group_: list
* - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.
* - _since_: 2.2.0
*/
lpushx(...args: [
key: RedisKey,
...elements: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
lpushx(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Returns a range of elements from a list.
* - _group_: list
* - _complexity_: O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.
* - _since_: 1.0.0
*/
lrange(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<string[]>): Result<string[], Context>;
lrangeBuffer(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Removes elements from a list. Deletes the list if the last element was removed.
* - _group_: list
* - _complexity_: O(N+M) where N is the length of the list and M is the number of elements removed.
* - _since_: 1.0.0
*/
lrem(key: RedisKey, count: number | string, element: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Sets the value of an element in a list by its index.
* - _group_: list
* - _complexity_: O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).
* - _since_: 1.0.0
*/
lset(key: RedisKey, index: number | string, element: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Removes elements from both ends a list. Deletes the list if all elements were trimmed.
* - _group_: list
* - _complexity_: O(N) where N is the number of elements to be removed by the operation.
* - _since_: 1.0.0
*/
ltrim(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Outputs a memory problems report.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 4.0.0
*/
memory(subcommand: "DOCTOR", callback?: Callback<string>): Result<string, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 4.0.0
*/
memory(subcommand: "HELP", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns the allocator statistics.
* - _group_: server
* - _complexity_: Depends on how much memory is allocated, could be slow
* - _since_: 4.0.0
*/
memory(subcommand: "MALLOC-STATS", callback?: Callback<string>): Result<string, Context>;
/**
* Asks the allocator to release memory.
* - _group_: server
* - _complexity_: Depends on how much memory is allocated, could be slow
* - _since_: 4.0.0
*/
memory(subcommand: "PURGE", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns details about memory usage.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 4.0.0
*/
memory(subcommand: "STATS", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Estimates the memory usage of a key.
* - _group_: server
* - _complexity_: O(N) where N is the number of samples.
* - _since_: 4.0.0
*/
memory(subcommand: "USAGE", key: RedisKey, callback?: Callback<number | null>): Result<number | null, Context>;
memory(subcommand: "USAGE", key: RedisKey, countToken: "SAMPLES", count: number | string, callback?: Callback<number | null>): Result<number | null, Context>;
/**
* Atomically returns the string values of one or more keys.
* - _group_: string
* - _complexity_: O(N) where N is the number of keys to retrieve.
* - _since_: 1.0.0
*/
mget(...args: [...keys: RedisKey[], callback: Callback<(string | null)[]>]): Result<(string | null)[], Context>;
mgetBuffer(...args: [...keys: RedisKey[], callback: Callback<(Buffer | null)[]>]): Result<(Buffer | null)[], Context>;
mget(...args: [keys: RedisKey[], callback: Callback<(string | null)[]>]): Result<(string | null)[], Context>;
mgetBuffer(...args: [keys: RedisKey[], callback: Callback<(Buffer | null)[]>]): Result<(Buffer | null)[], Context>;
mget(...args: [...keys: RedisKey[]]): Result<(string | null)[], Context>;
mgetBuffer(...args: [...keys: RedisKey[]]): Result<(Buffer | null)[], Context>;
mget(...args: [keys: RedisKey[]]): Result<(string | null)[], Context>;
mgetBuffer(...args: [keys: RedisKey[]]): Result<(Buffer | null)[], Context>;
/**
* Atomically transfers a key from one instance to another.
* - _group_: generic
* - _complexity_: This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.
* - _since_: 2.6.0
*/
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
key: RedisKey,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
authToken: "AUTH",
auth: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
...keys: RedisKey[]
]): Result<"OK", Context>;
migrate(...args: [
host: string | Buffer,
port: number | string,
destinationDb: number | string,
timeout: number | string,
copy: "COPY",
replace: "REPLACE",
auth2Token: "AUTH2",
username: string | Buffer,
password: string | Buffer,
keysToken: "KEYS",
keys: RedisKey[]
]): Result<"OK", Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
module(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns all loaded modules.
* - _group_: server
* - _complexity_: O(N) where N is the number of loaded modules.
* - _since_: 4.0.0
*/
module(subcommand: "LIST", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Loads a module.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 4.0.0
*/
module(subcommand: "LOAD", path: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
module(...args: [
subcommand: "LOAD",
path: string | Buffer,
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
module(...args: [
subcommand: "LOAD",
path: string | Buffer,
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
/**
* Loads a module using extended parameters.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 7.0.0
*/
module(subcommand: "LOADEX", path: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
module(...args: [
subcommand: "LOADEX",
path: string | Buffer,
argsToken: "ARGS",
...args: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
module(...args: [
subcommand: "LOADEX",
path: string | Buffer,
argsToken: "ARGS",
...args: (string | Buffer | number)[]
]): Result<unknown, Context>;
module(...args: [
subcommand: "LOADEX",
path: string | Buffer,
configsToken: "CONFIG",
...configs: (string | Buffer | number)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
module(...args: [
subcommand: "LOADEX",
path: string | Buffer,
configsToken: "CONFIG",
...configs: (string | Buffer | number)[]
]): Result<unknown, Context>;
module(...args: [
subcommand: "LOADEX",
path: string | Buffer,
configsToken: "CONFIG",
...args: RedisValue[],
callback: Callback<unknown>
]): Result<unknown, Context>;
module(...args: [
subcommand: "LOADEX",
path: string | Buffer,
configsToken: "CONFIG",
...args: RedisValue[]
]): Result<unknown, Context>;
/**
* Unloads a module.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 4.0.0
*/
module(subcommand: "UNLOAD", name: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Moves a key to another database.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
move(key: RedisKey, db: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Atomically creates or modifies the string values of one or more keys.
* - _group_: string
* - _complexity_: O(N) where N is the number of keys to set.
* - _since_: 1.0.1
*/
mset(object: object, callback?: Callback<"OK">): Result<"OK", Context>;
mset(map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
mset(...args: [
...data: (RedisKey | string | Buffer | number)[],
callback: Callback<"OK">
]): Result<"OK", Context>;
mset(...args: [...data: (RedisKey | string | Buffer | number)[]]): Result<"OK", Context>;
/**
* Atomically modifies the string values of one or more keys only when all keys don't exist.
* - _group_: string
* - _complexity_: O(N) where N is the number of keys to set.
* - _since_: 1.0.1
*/
msetnx(object: object, callback?: Callback<"OK">): Result<"OK", Context>;
msetnx(map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
msetnx(...args: [
...data: (RedisKey | string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
msetnx(...args: [...data: (RedisKey | string | Buffer | number)[]]): Result<number, Context>;
/**
* Returns the internal encoding of an object.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.2.3
*/
object(subcommand: "ENCODING", key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the logarithmic access frequency counter of an object.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 4.0.0
*/
object(subcommand: "FREQ", key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
object(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the time since the last access to an object.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.2.3
*/
object(subcommand: "IDLETIME", key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the reference count of a value of a key.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.2.3
*/
object(subcommand: "REFCOUNT", key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Removes the expiration time of a key.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.2.0
*/
persist(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Sets the expiration time of a key in milliseconds.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
pexpire(key: RedisKey, milliseconds: number | string, callback?: Callback<number>): Result<number, Context>;
pexpire(key: RedisKey, milliseconds: number | string, nx: "NX", callback?: Callback<number>): Result<number, Context>;
pexpire(key: RedisKey, milliseconds: number | string, xx: "XX", callback?: Callback<number>): Result<number, Context>;
pexpire(key: RedisKey, milliseconds: number | string, gt: "GT", callback?: Callback<number>): Result<number, Context>;
pexpire(key: RedisKey, milliseconds: number | string, lt: "LT", callback?: Callback<number>): Result<number, Context>;
/**
* Sets the expiration time of a key to a Unix milliseconds timestamp.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, callback?: Callback<number>): Result<number, Context>;
pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, nx: "NX", callback?: Callback<number>): Result<number, Context>;
pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, xx: "XX", callback?: Callback<number>): Result<number, Context>;
pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, gt: "GT", callback?: Callback<number>): Result<number, Context>;
pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, lt: "LT", callback?: Callback<number>): Result<number, Context>;
/**
* Returns the expiration time of a key as a Unix milliseconds timestamp.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 7.0.0
*/
pexpiretime(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Adds elements to a HyperLogLog key. Creates the key if it doesn't exist.
* - _group_: hyperloglog
* - _complexity_: O(1) to add every element.
* - _since_: 2.8.9
*/
pfadd(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
pfadd(...args: [
key: RedisKey,
...elements: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
pfadd(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).
* - _group_: hyperloglog
* - _complexity_: O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.
* - _since_: 2.8.9
*/
pfcount(...args: [...keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
pfcount(...args: [keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
pfcount(...args: [...keys: RedisKey[]]): Result<number, Context>;
pfcount(...args: [keys: RedisKey[]]): Result<number, Context>;
/**
* Internal commands for debugging HyperLogLog values.
* - _group_: hyperloglog
* - _complexity_: N/A
* - _since_: 2.8.9
*/
pfdebug(subcommand: string | Buffer, key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Merges one or more HyperLogLog values into a single key.
* - _group_: hyperloglog
* - _complexity_: O(N) to merge N HyperLogLogs, but with high constant times.
* - _since_: 2.8.9
*/
pfmerge(destkey: RedisKey, callback?: Callback<"OK">): Result<"OK", Context>;
pfmerge(...args: [
destkey: RedisKey,
...sourcekeys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
pfmerge(...args: [
destkey: RedisKey,
sourcekeys: RedisKey[],
callback: Callback<"OK">
]): Result<"OK", Context>;
pfmerge(...args: [destkey: RedisKey, ...sourcekeys: RedisKey[]]): Result<"OK", Context>;
pfmerge(...args: [destkey: RedisKey, sourcekeys: RedisKey[]]): Result<"OK", Context>;
/**
* An internal command for testing HyperLogLog values.
* - _group_: hyperloglog
* - _complexity_: N/A
* - _since_: 2.8.9
*/
pfselftest(callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the server's liveliness response.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
ping(callback?: Callback<"PONG">): Result<"PONG", Context>;
ping(message: string | Buffer, callback?: Callback<string>): Result<string, Context>;
pingBuffer(message: string | Buffer, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
psetex(key: RedisKey, milliseconds: number | string, value: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Listens for messages published to channels that match one or more patterns.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of patterns to subscribe to.
* - _since_: 2.0.0
*/
psubscribe(...args: [...patterns: string[], callback: Callback<unknown>]): Result<unknown, Context>;
psubscribe(...args: [...patterns: string[]]): Result<unknown, Context>;
/**
* An internal command used in replication.
* - _group_: server
* - _complexity_: undefined
* - _since_: 2.8.0
*/
psync(replicationid: string | Buffer | number, offset: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the expiration time in milliseconds of a key.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
pttl(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Posts a message to a channel.
* - _group_: pubsub
* - _complexity_: O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).
* - _since_: 2.0.0
*/
publish(channel: string | Buffer, message: string | Buffer, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the active channels.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns)
* - _since_: 2.8.0
*/
pubsub(subcommand: "CHANNELS", callback?: Callback<unknown[]>): Result<unknown[], Context>;
pubsub(subcommand: "CHANNELS", pattern: string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: pubsub
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
pubsub(subcommand: "HELP", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns a count of unique pattern subscriptions.
* - _group_: pubsub
* - _complexity_: O(1)
* - _since_: 2.8.0
*/
pubsub(subcommand: "NUMPAT", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns a count of subscribers to channels.
* - _group_: pubsub
* - _complexity_: O(N) for the NUMSUB subcommand, where N is the number of requested channels
* - _since_: 2.8.0
*/
pubsub(subcommand: "NUMSUB", callback?: Callback<unknown[]>): Result<unknown[], Context>;
pubsub(...args: [
subcommand: "NUMSUB",
...channels: (string | Buffer)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
pubsub(...args: [subcommand: "NUMSUB", ...channels: (string | Buffer)[]]): Result<unknown[], Context>;
/**
* Returns the active shard channels.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short shard channels).
* - _since_: 7.0.0
*/
pubsub(subcommand: "SHARDCHANNELS", callback?: Callback<unknown[]>): Result<unknown[], Context>;
pubsub(subcommand: "SHARDCHANNELS", pattern: string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns the count of subscribers of shard channels.
* - _group_: pubsub
* - _complexity_: O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels
* - _since_: 7.0.0
*/
pubsub(subcommand: "SHARDNUMSUB", callback?: Callback<unknown[]>): Result<unknown[], Context>;
pubsub(...args: [
subcommand: "SHARDNUMSUB",
...shardchannels: (string | Buffer)[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
pubsub(...args: [subcommand: "SHARDNUMSUB", ...shardchannels: (string | Buffer)[]]): Result<unknown[], Context>;
/**
* Stops listening to messages published to channels that match one or more patterns.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of patterns to unsubscribe.
* - _since_: 2.0.0
*/
punsubscribe(callback?: Callback<unknown>): Result<unknown, Context>;
punsubscribe(...args: [...patterns: string[], callback: Callback<unknown>]): Result<unknown, Context>;
punsubscribe(...args: [...patterns: string[]]): Result<unknown, Context>;
/**
* Closes the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
quit(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns a random key name from the database.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
randomkey(callback?: Callback<string | null>): Result<string | null, Context>;
randomkeyBuffer(callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Enables read-only queries for a connection to a Valkey replica node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
readonly(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Enables read-write queries for a connection to a Valkey replica node.
* - _group_: cluster
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
readwrite(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Renames a key and overwrites the destination.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
rename(key: RedisKey, newkey: RedisKey, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Renames a key only when the target key name doesn't exist.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
renamenx(key: RedisKey, newkey: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* An internal command for configuring the replication stream.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
replconf(callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Configures a server as replica of another, or promotes it to a primary.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
replicaof(host: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
replicaof(no: "NO", one: "ONE", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Resets the connection.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
reset(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Creates a key from the serialized representation of a value.
* - _group_: generic
* - _complexity_: O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).
* - _since_: 2.6.0
*/
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* An internal command for migrating keys in a cluster.
* - _group_: server
* - _complexity_: O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).
* - _since_: 3.0.0
*/
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the replication role.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.8.12
*/
role(callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns and removes the last elements of a list. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(N) where N is the number of elements returned
* - _since_: 1.0.0
*/
rpop(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
rpopBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
rpop(key: RedisKey, count: number | string, callback?: Callback<string[] | null>): Result<string[] | null, Context>;
rpopBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[] | null>): Result<Buffer[] | null, Context>;
/**
* Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped.
* - _group_: list
* - _complexity_: O(1)
* - _since_: 1.2.0
*/
rpoplpush(source: RedisKey, destination: RedisKey, callback?: Callback<string>): Result<string, Context>;
rpoplpushBuffer(source: RedisKey, destination: RedisKey, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Appends one or more elements to a list. Creates the key if it doesn't exist.
* - _group_: list
* - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.
* - _since_: 1.0.0
*/
rpush(...args: [
key: RedisKey,
...elements: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
rpush(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Appends an element to a list only when the list exists.
* - _group_: list
* - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.
* - _since_: 2.2.0
*/
rpushx(...args: [
key: RedisKey,
...elements: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
rpushx(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Adds one or more members to a set. Creates the key if it doesn't exist.
* - _group_: set
* - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.
* - _since_: 1.0.0
*/
sadd(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
sadd(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
sadd(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<number, Context>;
sadd(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Synchronously saves the database(s) to disk.
* - _group_: server
* - _complexity_: O(N) where N is the total number of keys in all databases
* - _since_: 1.0.0
*/
save(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Iterates over the key names in the database.
* - _group_: generic
* - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.
* - _since_: 2.8.0
*/
scan(cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, patternToken: "MATCH", pattern: string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
scan(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
/**
* Returns the number of members in a set.
* - _group_: set
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
scard(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Sets the debug mode of server-side Lua scripts.
* - _group_: scripting
* - _complexity_: O(1)
* - _since_: 3.2.0
*/
script(subcommand: "DEBUG", yes: "YES", callback?: Callback<unknown>): Result<unknown, Context>;
script(subcommand: "DEBUG", sync: "SYNC", callback?: Callback<unknown>): Result<unknown, Context>;
script(subcommand: "DEBUG", no: "NO", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Determines whether server-side Lua scripts exist in the script cache.
* - _group_: scripting
* - _complexity_: O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).
* - _since_: 2.6.0
*/
script(...args: [
subcommand: "EXISTS",
...sha1s: (string | Buffer)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
script(...args: [subcommand: "EXISTS", ...sha1s: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Removes all server-side Lua scripts from the script cache.
* - _group_: scripting
* - _complexity_: O(N) with N being the number of scripts in cache
* - _since_: 2.6.0
*/
script(subcommand: "FLUSH", callback?: Callback<unknown>): Result<unknown, Context>;
script(subcommand: "FLUSH", async: "ASYNC", callback?: Callback<unknown>): Result<unknown, Context>;
script(subcommand: "FLUSH", sync: "SYNC", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: scripting
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
script(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Terminates a server-side Lua script during execution.
* - _group_: scripting
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
script(subcommand: "KILL", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Loads a server-side Lua script to the script cache.
* - _group_: scripting
* - _complexity_: O(N) with N being the length in bytes of the script body.
* - _since_: 2.6.0
*/
script(subcommand: "LOAD", script: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Show server-side Lua script in the script cache.
* - _group_: scripting
* - _complexity_: O(1).
* - _since_: 8.0.0
*/
script(subcommand: "SHOW", sha1: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the difference of multiple sets.
* - _group_: set
* - _complexity_: O(N) where N is the total number of elements in all given sets.
* - _since_: 1.0.0
*/
sdiff(...args: [...keys: RedisKey[], callback: Callback<string[]>]): Result<string[], Context>;
sdiffBuffer(...args: [...keys: RedisKey[], callback: Callback<Buffer[]>]): Result<Buffer[], Context>;
sdiff(...args: [keys: RedisKey[], callback: Callback<string[]>]): Result<string[], Context>;
sdiffBuffer(...args: [keys: RedisKey[], callback: Callback<Buffer[]>]): Result<Buffer[], Context>;
sdiff(...args: [...keys: RedisKey[]]): Result<string[], Context>;
sdiffBuffer(...args: [...keys: RedisKey[]]): Result<Buffer[], Context>;
sdiff(...args: [keys: RedisKey[]]): Result<string[], Context>;
sdiffBuffer(...args: [keys: RedisKey[]]): Result<Buffer[], Context>;
/**
* Stores the difference of multiple sets in a key.
* - _group_: set
* - _complexity_: O(N) where N is the total number of elements in all given sets.
* - _since_: 1.0.0
*/
sdiffstore(...args: [
destination: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sdiffstore(...args: [
destination: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sdiffstore(...args: [destination: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
sdiffstore(...args: [destination: RedisKey, keys: RedisKey[]]): Result<number, Context>;
/**
* Changes the selected database.
* - _group_: connection
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
select(index: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
set(key: RedisKey, value: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>;
set(key: RedisKey, value: string | Buffer | number, get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, nx: "NX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, nx: "NX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, xx: "XX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, xx: "XX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, nx: "NX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, nx: "NX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, xx: "XX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, xx: "XX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, nx: "NX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, nx: "NX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, xx: "XX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, xx: "XX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, nx: "NX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, nx: "NX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, xx: "XX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, xx: "XX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, nx: "NX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, nx: "NX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, xx: "XX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, xx: "XX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", callback?: Callback<"OK">): Result<"OK", Context>;
set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", nx: "NX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", nx: "NX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>;
set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", xx: "XX", get: "GET", callback?: Callback<string | null>): Result<string | null, Context>;
setBuffer(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", xx: "XX", get: "GET", callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist.
* - _group_: bitmap
* - _complexity_: O(1)
* - _since_: 2.2.0
*/
setbit(key: RedisKey, offset: number | string, value: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Sets the string value and expiration time of a key. Creates the key if it doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 2.0.0
*/
setex(key: RedisKey, seconds: number | string, value: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Set the string value of a key only when the key doesn't exist.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
setnx(key: RedisKey, value: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist.
* - _group_: string
* - _complexity_: O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.
* - _since_: 2.2.0
*/
setrange(key: RedisKey, offset: number | string, value: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Synchronously saves the database(s) to disk and shuts down the server.
* - _group_: server
* - _complexity_: O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)
* - _since_: 1.0.0
*/
shutdown(callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(now: "NOW", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(now: "NOW", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(nosave: "NOSAVE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(nosave: "NOSAVE", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(nosave: "NOSAVE", now: "NOW", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(nosave: "NOSAVE", now: "NOW", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(save: "SAVE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(save: "SAVE", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(save: "SAVE", now: "NOW", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(save: "SAVE", now: "NOW", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>;
shutdown(abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns the intersect of multiple sets.
* - _group_: set
* - _complexity_: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
* - _since_: 1.0.0
*/
sinter(...args: [...keys: RedisKey[], callback: Callback<string[]>]): Result<string[], Context>;
sinterBuffer(...args: [...keys: RedisKey[], callback: Callback<Buffer[]>]): Result<Buffer[], Context>;
sinter(...args: [keys: RedisKey[], callback: Callback<string[]>]): Result<string[], Context>;
sinterBuffer(...args: [keys: RedisKey[], callback: Callback<Buffer[]>]): Result<Buffer[], Context>;
sinter(...args: [...keys: RedisKey[]]): Result<string[], Context>;
sinterBuffer(...args: [...keys: RedisKey[]]): Result<Buffer[], Context>;
sinter(...args: [keys: RedisKey[]]): Result<string[], Context>;
sinterBuffer(...args: [keys: RedisKey[]]): Result<Buffer[], Context>;
/**
* Returns the number of members of the intersect of multiple sets.
* - _group_: set
* - _complexity_: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
* - _since_: 7.0.0
*/
sintercard(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sintercard(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sintercard(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<number, Context>;
sintercard(...args: [numkeys: number | string, keys: RedisKey[]]): Result<number, Context>;
sintercard(...args: [
numkeys: number | string,
...keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string,
callback: Callback<number>
]): Result<number, Context>;
sintercard(...args: [
numkeys: number | string,
keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string,
callback: Callback<number>
]): Result<number, Context>;
sintercard(...args: [
numkeys: number | string,
...keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string
]): Result<number, Context>;
sintercard(...args: [
numkeys: number | string,
keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string
]): Result<number, Context>;
/**
* Stores the intersect of multiple sets in a key.
* - _group_: set
* - _complexity_: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
* - _since_: 1.0.0
*/
sinterstore(...args: [
destination: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sinterstore(...args: [
destination: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sinterstore(...args: [destination: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
sinterstore(...args: [destination: RedisKey, keys: RedisKey[]]): Result<number, Context>;
/**
* Determines whether a member belongs to a set.
* - _group_: set
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
sismember(key: RedisKey, member: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Sets a server as a replica of another, or promotes it to being a primary.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
slaveof(host: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
slaveof(no: "NO", one: "ONE", callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Returns the slow log's entries.
* - _group_: server
* - _complexity_: O(N) where N is the number of entries returned
* - _since_: 2.2.12
*/
slowlog(subcommand: "GET", callback?: Callback<unknown>): Result<unknown, Context>;
slowlog(subcommand: "GET", count: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Show helpful text about the different subcommands
* - _group_: server
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
slowlog(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the number of entries in the slow log.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.2.12
*/
slowlog(subcommand: "LEN", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Clears all entries from the slow log.
* - _group_: server
* - _complexity_: O(N) where N is the number of entries in the slowlog
* - _since_: 2.2.12
*/
slowlog(subcommand: "RESET", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns all members of a set.
* - _group_: set
* - _complexity_: O(N) where N is the set cardinality.
* - _since_: 1.0.0
*/
smembers(key: RedisKey, callback?: Callback<string[]>): Result<string[], Context>;
smembersBuffer(key: RedisKey, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Determines whether multiple members belong to a set.
* - _group_: set
* - _complexity_: O(N) where N is the number of elements being checked for membership
* - _since_: 6.2.0
*/
smismember(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<number[]>
]): Result<number[], Context>;
smismember(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<number[]>
]): Result<number[], Context>;
smismember(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<number[], Context>;
smismember(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<number[], Context>;
/**
* Moves a member from one set to another.
* - _group_: set
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
smove(source: RedisKey, destination: RedisKey, member: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Sorts the elements in a list, a set, or a sorted set, optionally storing the result.
* - _group_: generic
* - _complexity_: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).
* - _since_: 1.0.0
*/
sort(...args: [key: RedisKey, ...args: RedisValue[], callback: Callback<unknown>]): Result<unknown, Context>;
sort(...args: [key: RedisKey, ...args: RedisValue[]]): Result<unknown, Context>;
/**
* Returns the sorted elements of a list, a set, or a sorted set.
* - _group_: generic
* - _complexity_: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).
* - _since_: 7.0.0
*/
sort_ro(key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, asc: "ASC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, asc: "ASC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, desc: "DESC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, desc: "DESC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [key: RedisKey, getPatternToken: "GET", ...getPatterns: string[]]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[]
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, asc: "ASC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, asc: "ASC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, desc: "DESC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, desc: "DESC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[]
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", alpha: "ALPHA", callback?: Callback<unknown>): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[]
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
asc: "ASC",
alpha: "ALPHA"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC"
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA",
callback: Callback<unknown>
]): Result<unknown, Context>;
sort_ro(...args: [
key: RedisKey,
byPatternToken: "BY",
byPattern: string,
limitToken: "LIMIT",
offset: number | string,
count: number | string,
getPatternToken: "GET",
...getPatterns: string[],
desc: "DESC",
alpha: "ALPHA"
]): Result<unknown, Context>;
/**
* Returns one or more random members from a set after removing them. Deletes the set if the last member was popped.
* - _group_: set
* - _complexity_: Without the count argument O(1), otherwise O(N) where N is the value of the passed count.
* - _since_: 1.0.0
*/
spop(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
spopBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
spop(key: RedisKey, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
spopBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Post a message to a shard channel
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of clients subscribed to the receiving shard channel.
* - _since_: 7.0.0
*/
spublish(shardchannel: string | Buffer, message: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Get one or multiple random members from a set
* - _group_: set
* - _complexity_: Without the count argument O(1), otherwise O(N) where N is the absolute value of the passed count.
* - _since_: 1.0.0
*/
srandmember(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
srandmemberBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
srandmember(key: RedisKey, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
srandmemberBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Removes one or more members from a set. Deletes the set if the last member was removed.
* - _group_: set
* - _complexity_: O(N) where N is the number of members to be removed.
* - _since_: 1.0.0
*/
srem(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
srem(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
srem(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<number, Context>;
srem(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Iterates over members of a set.
* - _group_: set
* - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.
* - _since_: 2.8.0
*/
sscan(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
sscanBuffer(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
sscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
sscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
sscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
sscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
sscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
sscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
/**
* Listens for messages published to shard channels.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of shard channels to subscribe to.
* - _since_: 7.0.0
*/
ssubscribe(...args: [
...shardchannels: (string | Buffer)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
ssubscribe(...args: [...shardchannels: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Returns the length of a string value.
* - _group_: string
* - _complexity_: O(1)
* - _since_: 2.2.0
*/
strlen(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Listens for messages published to channels.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of channels to subscribe to.
* - _since_: 2.0.0
*/
subscribe(...args: [...channels: (string | Buffer)[], callback: Callback<unknown>]): Result<unknown, Context>;
subscribe(...args: [...channels: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Returns a substring from a string value.
* - _group_: string
* - _complexity_: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.
* - _since_: 1.0.0
*/
substr(key: RedisKey, start: number | string, end: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the union of multiple sets.
* - _group_: set
* - _complexity_: O(N) where N is the total number of elements in all given sets.
* - _since_: 1.0.0
*/
sunion(...args: [...keys: RedisKey[], callback: Callback<string[]>]): Result<string[], Context>;
sunionBuffer(...args: [...keys: RedisKey[], callback: Callback<Buffer[]>]): Result<Buffer[], Context>;
sunion(...args: [keys: RedisKey[], callback: Callback<string[]>]): Result<string[], Context>;
sunionBuffer(...args: [keys: RedisKey[], callback: Callback<Buffer[]>]): Result<Buffer[], Context>;
sunion(...args: [...keys: RedisKey[]]): Result<string[], Context>;
sunionBuffer(...args: [...keys: RedisKey[]]): Result<Buffer[], Context>;
sunion(...args: [keys: RedisKey[]]): Result<string[], Context>;
sunionBuffer(...args: [keys: RedisKey[]]): Result<Buffer[], Context>;
/**
* Stores the union of multiple sets in a key.
* - _group_: set
* - _complexity_: O(N) where N is the total number of elements in all given sets.
* - _since_: 1.0.0
*/
sunionstore(...args: [
destination: RedisKey,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sunionstore(...args: [
destination: RedisKey,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
sunionstore(...args: [destination: RedisKey, ...keys: RedisKey[]]): Result<number, Context>;
sunionstore(...args: [destination: RedisKey, keys: RedisKey[]]): Result<number, Context>;
/**
* Stops listening to messages posted to shard channels.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of shard channels to unsubscribe.
* - _since_: 7.0.0
*/
sunsubscribe(callback?: Callback<unknown>): Result<unknown, Context>;
sunsubscribe(...args: [
...shardchannels: (string | Buffer)[],
callback: Callback<unknown>
]): Result<unknown, Context>;
sunsubscribe(...args: [...shardchannels: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Swaps two databases.
* - _group_: server
* - _complexity_: O(N) where N is the count of clients watching or blocking on keys from both databases.
* - _since_: 4.0.0
*/
swapdb(index1: number | string, index2: number | string, callback?: Callback<"OK">): Result<"OK", Context>;
/**
* An internal command used in replication.
* - _group_: server
* - _complexity_: undefined
* - _since_: 1.0.0
*/
sync(callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns the server time.
* - _group_: server
* - _complexity_: O(1)
* - _since_: 2.6.0
*/
time(callback?: Callback<number[]>): Result<number[], Context>;
/**
* Returns the number of existing keys out of those specified after updating the time they were last accessed.
* - _group_: generic
* - _complexity_: O(N) where N is the number of keys that will be touched.
* - _since_: 3.2.1
*/
touch(...args: [...keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
touch(...args: [keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
touch(...args: [...keys: RedisKey[]]): Result<number, Context>;
touch(...args: [keys: RedisKey[]]): Result<number, Context>;
/**
* Returns the expiration time in seconds of a key.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
ttl(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Determines the type of value stored at a key.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 1.0.0
*/
type(key: RedisKey, callback?: Callback<string>): Result<string, Context>;
/**
* Asynchronously deletes one or more keys.
* - _group_: generic
* - _complexity_: O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.
* - _since_: 4.0.0
*/
unlink(...args: [...keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
unlink(...args: [keys: RedisKey[], callback: Callback<number>]): Result<number, Context>;
unlink(...args: [...keys: RedisKey[]]): Result<number, Context>;
unlink(...args: [keys: RedisKey[]]): Result<number, Context>;
/**
* Stops listening to messages posted to channels.
* - _group_: pubsub
* - _complexity_: O(N) where N is the number of channels to unsubscribe.
* - _since_: 2.0.0
*/
unsubscribe(callback?: Callback<unknown>): Result<unknown, Context>;
unsubscribe(...args: [...channels: (string | Buffer)[], callback: Callback<unknown>]): Result<unknown, Context>;
unsubscribe(...args: [...channels: (string | Buffer)[]]): Result<unknown, Context>;
/**
* Forgets about watched keys of a transaction.
* - _group_: transactions
* - _complexity_: O(1)
* - _since_: 2.2.0
*/
unwatch(callback?: Callback<"OK">): Result<"OK", Context>;
/**
* Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 3.0.0
*/
wait(numreplicas: number | string, timeout: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the primary and/or replicas.
* - _group_: generic
* - _complexity_: O(1)
* - _since_: 7.2.0
*/
waitaof(numlocal: number | string, numreplicas: number | string, timeout: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Monitors changes to keys to determine the execution of a transaction.
* - _group_: transactions
* - _complexity_: O(1) for every key.
* - _since_: 2.2.0
*/
watch(...args: [...keys: RedisKey[], callback: Callback<"OK">]): Result<"OK", Context>;
watch(...args: [keys: RedisKey[], callback: Callback<"OK">]): Result<"OK", Context>;
watch(...args: [...keys: RedisKey[]]): Result<"OK", Context>;
watch(...args: [keys: RedisKey[]]): Result<"OK", Context>;
/**
* Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.
* - _group_: stream
* - _complexity_: O(1) for each message ID processed.
* - _since_: 5.0.0
*/
xack(...args: [
key: RedisKey,
group: string | Buffer,
...ids: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
xack(...args: [
key: RedisKey,
group: string | Buffer,
...ids: (string | Buffer | number)[]
]): Result<number, Context>;
/**
* Appends a new message to a stream. Creates the key if it doesn't exist.
* - _group_: stream
* - _complexity_: O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.
* - _since_: 5.0.0
*/
xadd(...args: [
key: RedisKey,
...args: RedisValue[],
callback: Callback<string | null>
]): Result<string | null, Context>;
xaddBuffer(...args: [
key: RedisKey,
...args: RedisValue[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
xadd(...args: [key: RedisKey, ...args: RedisValue[]]): Result<string | null, Context>;
xaddBuffer(...args: [key: RedisKey, ...args: RedisValue[]]): Result<Buffer | null, Context>;
/**
* Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.
* - _group_: stream
* - _complexity_: O(1) if COUNT is small.
* - _since_: 6.2.0
*/
xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, callback?: Callback<unknown[]>): Result<unknown[], Context>;
xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, justid: "JUSTID", callback?: Callback<unknown[]>): Result<unknown[], Context>;
xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, justid: "JUSTID", callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.
* - _group_: stream
* - _complexity_: O(log N) with N being the number of messages in the PEL of the consumer group.
* - _since_: 5.0.0
*/
xclaim(...args: [
key: RedisKey,
group: string | Buffer,
consumer: string | Buffer,
minIdleTime: string | Buffer | number,
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xclaim(...args: [
key: RedisKey,
group: string | Buffer,
consumer: string | Buffer,
minIdleTime: string | Buffer | number,
...args: RedisValue[]
]): Result<unknown[], Context>;
/**
* Returns the number of messages after removing them from a stream.
* - _group_: stream
* - _complexity_: O(1) for each single item to delete in the stream, regardless of the stream size.
* - _since_: 5.0.0
*/
xdel(...args: [
key: RedisKey,
...ids: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
xdel(...args: [key: RedisKey, ...ids: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Creates a consumer group.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, mkstream: "MKSTREAM", callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, mkstream: "MKSTREAM", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", mkstream: "MKSTREAM", callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", mkstream: "MKSTREAM", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Creates a consumer in a consumer group.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 6.2.0
*/
xgroup(subcommand: "CREATECONSUMER", key: RedisKey, group: string | Buffer, consumer: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Deletes a consumer from a consumer group.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xgroup(subcommand: "DELCONSUMER", key: RedisKey, group: string | Buffer, consumer: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Destroys a consumer group.
* - _group_: stream
* - _complexity_: O(N) where N is the number of entries in the group's pending entries list (PEL).
* - _since_: 5.0.0
*/
xgroup(subcommand: "DESTROY", key: RedisKey, group: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xgroup(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Sets the last-delivered ID of a consumer group.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, id: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, id: string | Buffer | number, entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, newId: "$", callback?: Callback<unknown>): Result<unknown, Context>;
xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, newId: "$", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns a list of the consumers in a consumer group.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xinfo(subcommand: "CONSUMERS", key: RedisKey, group: string | Buffer, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns a list of the consumer groups of a stream.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xinfo(subcommand: "GROUPS", key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns helpful text about the different subcommands.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xinfo(subcommand: "HELP", callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Returns information about a stream.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xinfo(subcommand: "STREAM", key: RedisKey, callback?: Callback<unknown>): Result<unknown, Context>;
xinfo(subcommand: "STREAM", key: RedisKey, full: "FULL", callback?: Callback<unknown>): Result<unknown, Context>;
xinfo(subcommand: "STREAM", key: RedisKey, full: "FULL", countToken: "COUNT", count: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Return the number of messages in a stream.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xlen(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the information and entries from a stream consumer group's pending entries list.
* - _group_: stream
* - _complexity_: O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). O(M), where M is the total number of entries scanned when used with the IDLE filter. When the command returns just the summary and the list of consumers is small, it runs in O(1) time; otherwise, an additional O(N) time for iterating every consumer.
* - _since_: 5.0.0
*/
xpending(key: RedisKey, group: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
xpending(key: RedisKey, group: string | Buffer, start: string | Buffer | number, end: string | Buffer | number, count: number | string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
xpending(key: RedisKey, group: string | Buffer, start: string | Buffer | number, end: string | Buffer | number, count: number | string, consumer: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
xpending(key: RedisKey, group: string | Buffer, minIdleTimeToken: "IDLE", minIdleTime: number | string, start: string | Buffer | number, end: string | Buffer | number, count: number | string, callback?: Callback<unknown[]>): Result<unknown[], Context>;
xpending(key: RedisKey, group: string | Buffer, minIdleTimeToken: "IDLE", minIdleTime: number | string, start: string | Buffer | number, end: string | Buffer | number, count: number | string, consumer: string | Buffer, callback?: Callback<unknown[]>): Result<unknown[], Context>;
/**
* Returns the messages from a stream within a range of IDs.
* - _group_: stream
* - _complexity_: O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).
* - _since_: 5.0.0
*/
xrange(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>;
xrangeBuffer(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>;
xrange(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>;
xrangeBuffer(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>;
/**
* Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.
* - _group_: stream
* - _complexity_: undefined
* - _since_: 5.0.0
*/
xread(...args: [
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: string,
items: [id: string, fields: string[]][]
][] | null>
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null>
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [streamsToken: "STREAMS", ...args: RedisValue[]]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [streamsToken: "STREAMS", ...args: RedisValue[]]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: string,
items: [id: string, fields: string[]][]
][] | null>
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null>
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [
countToken: "COUNT",
count: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: string,
items: [id: string, fields: string[]][]
][] | null>
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
countToken: "COUNT",
count: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null>
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [
countToken: "COUNT",
count: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
countToken: "COUNT",
count: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: string,
items: [id: string, fields: string[]][]
][] | null>
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null>
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
xread(...args: [
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<[
key: string,
items: [id: string, fields: string[]][]
][] | null, Context>;
xreadBuffer(...args: [
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<[
key: Buffer,
items: [id: Buffer, fields: Buffer[]][]
][] | null, Context>;
/**
* Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise.
* - _group_: stream
* - _complexity_: For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.
* - _since_: 5.0.0
*/
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
millisecondsToken: "BLOCK",
milliseconds: number | string,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
millisecondsToken: "BLOCK",
milliseconds: number | string,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[],
callback: Callback<unknown[]>
]): Result<unknown[], Context>;
xreadgroup(...args: [
groupBlockToken: "GROUP",
group: string | Buffer,
consumer: string | Buffer,
countToken: "COUNT",
count: number | string,
millisecondsToken: "BLOCK",
milliseconds: number | string,
noack: "NOACK",
streamsToken: "STREAMS",
...args: RedisValue[]
]): Result<unknown[], Context>;
/**
* Returns the messages from a stream within a range of IDs in reverse order.
* - _group_: stream
* - _complexity_: O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).
* - _since_: 5.0.0
*/
xrevrange(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>;
xrevrangeBuffer(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>;
xrevrange(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>;
xrevrangeBuffer(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>;
/**
* An internal command for replicating stream values.
* - _group_: stream
* - _complexity_: O(1)
* - _since_: 5.0.0
*/
xsetid(key: RedisKey, lastId: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
xsetid(key: RedisKey, lastId: string | Buffer | number, maxDeletedIdToken: "MAXDELETEDID", maxDeletedId: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
xsetid(key: RedisKey, lastId: string | Buffer | number, entriesAddedToken: "ENTRIESADDED", entriesAdded: number | string, callback?: Callback<unknown>): Result<unknown, Context>;
xsetid(key: RedisKey, lastId: string | Buffer | number, entriesAddedToken: "ENTRIESADDED", entriesAdded: number | string, maxDeletedIdToken: "MAXDELETEDID", maxDeletedId: string | Buffer | number, callback?: Callback<unknown>): Result<unknown, Context>;
/**
* Deletes messages from the beginning of a stream.
* - _group_: stream
* - _complexity_: O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.
* - _since_: 5.0.0
*/
xtrim(key: RedisKey, maxlen: "MAXLEN", threshold: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, maxlen: "MAXLEN", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, maxlen: "MAXLEN", equal: "=", threshold: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, maxlen: "MAXLEN", equal: "=", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, maxlen: "MAXLEN", approximately: "~", threshold: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, maxlen: "MAXLEN", approximately: "~", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, minid: "MINID", threshold: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, minid: "MINID", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, minid: "MINID", equal: "=", threshold: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, minid: "MINID", equal: "=", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, minid: "MINID", approximately: "~", threshold: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
xtrim(key: RedisKey, minid: "MINID", approximately: "~", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist.
* - _group_: sorted-set
* - _complexity_: O(log(N)) for each item added, where N is the number of elements in the sorted set.
* - _since_: 1.2.0
*/
zadd(...args: [
key: RedisKey,
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [key: RedisKey, ch: "CH", ...data: (string | Buffer | number)[]]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [key: RedisKey, gt: "GT", ...data: (string | Buffer | number)[]]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [key: RedisKey, lt: "LT", ...data: (string | Buffer | number)[]]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string>
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer>
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string, Context>;
zaddBuffer(...args: [
key: RedisKey,
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [key: RedisKey, nx: "NX", ...data: (string | Buffer | number)[]]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
nx: "NX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [key: RedisKey, xx: "XX", ...data: (string | Buffer | number)[]]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
gt: "GT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
ch: "CH",
...data: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
ch: "CH",
...data: (string | Buffer | number)[]
]): Result<number, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<string | null>
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[],
callback: Callback<Buffer | null>
]): Result<Buffer | null, Context>;
zadd(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<string | null, Context>;
zaddBuffer(...args: [
key: RedisKey,
xx: "XX",
lt: "LT",
ch: "CH",
incr: "INCR",
...data: (string | Buffer | number)[]
]): Result<Buffer | null, Context>;
/**
* Returns the number of members in a sorted set.
* - _group_: sorted-set
* - _complexity_: O(1)
* - _since_: 1.2.0
*/
zcard(key: RedisKey, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the count of members in a sorted set that have scores within a range.
* - _group_: sorted-set
* - _complexity_: O(log(N)) with N being the number of elements in the sorted set.
* - _since_: 2.0.0
*/
zcount(key: RedisKey, min: number | string, max: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the difference between multiple sorted sets.
* - _group_: sorted-set
* - _complexity_: O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.
* - _since_: 6.2.0
*/
zdiff(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<string[]>
]): Result<string[], Context>;
zdiffBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zdiff(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<string[]>
]): Result<string[], Context>;
zdiffBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zdiff(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<string[], Context>;
zdiffBuffer(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<Buffer[], Context>;
zdiff(...args: [numkeys: number | string, keys: RedisKey[]]): Result<string[], Context>;
zdiffBuffer(...args: [numkeys: number | string, keys: RedisKey[]]): Result<Buffer[], Context>;
zdiff(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zdiffBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zdiff(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zdiffBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zdiff(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zdiffBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zdiff(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zdiffBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
/**
* Stores the difference of multiple sorted sets in a key.
* - _group_: sorted-set
* - _complexity_: O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.
* - _since_: 6.2.0
*/
zdiffstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zdiffstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zdiffstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[]
]): Result<number, Context>;
zdiffstore(...args: [destination: RedisKey, numkeys: number | string, keys: RedisKey[]]): Result<number, Context>;
/**
* Increments the score of a member in a sorted set.
* - _group_: sorted-set
* - _complexity_: O(log(N)) where N is the number of elements in the sorted set.
* - _since_: 1.2.0
*/
zincrby(key: RedisKey, increment: number | string, member: string | Buffer | number, callback?: Callback<string>): Result<string, Context>;
zincrbyBuffer(key: RedisKey, increment: number | string, member: string | Buffer | number, callback?: Callback<Buffer>): Result<Buffer, Context>;
/**
* Returns the intersect of multiple sorted sets.
* - _group_: sorted-set
* - _complexity_: O(N*K)+O(M*log(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.
* - _since_: 6.2.0
*/
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<string[], Context>;
zinterBuffer(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<Buffer[], Context>;
zinter(...args: [numkeys: number | string, keys: RedisKey[]]): Result<string[], Context>;
zinterBuffer(...args: [numkeys: number | string, keys: RedisKey[]]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [numkeys: number | string, ...args: RedisValue[]]): Result<string[], Context>;
zinterBuffer(...args: [numkeys: number | string, ...args: RedisValue[]]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zinter(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zinterBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
/**
* Returns the number of members of the intersect of multiple sorted sets.
* - _group_: sorted-set
* - _complexity_: O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.
* - _since_: 7.0.0
*/
zintercard(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zintercard(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zintercard(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<number, Context>;
zintercard(...args: [numkeys: number | string, keys: RedisKey[]]): Result<number, Context>;
zintercard(...args: [
numkeys: number | string,
...keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string,
callback: Callback<number>
]): Result<number, Context>;
zintercard(...args: [
numkeys: number | string,
keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string,
callback: Callback<number>
]): Result<number, Context>;
zintercard(...args: [
numkeys: number | string,
...keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string
]): Result<number, Context>;
zintercard(...args: [
numkeys: number | string,
keys: RedisKey[],
limitToken: "LIMIT",
limit: number | string
]): Result<number, Context>;
/**
* Stores the intersect of multiple sorted sets in a key.
* - _group_: sorted-set
* - _complexity_: O(N*K)+O(M*log(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.
* - _since_: 2.0.0
*/
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[]
]): Result<number, Context>;
zinterstore(...args: [destination: RedisKey, numkeys: number | string, keys: RedisKey[]]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[]
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<number>
]): Result<number, Context>;
zinterstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<number, Context>;
/**
* Returns the number of members in a sorted set within a lexicographical range.
* - _group_: sorted-set
* - _complexity_: O(log(N)) with N being the number of elements in the sorted set.
* - _since_: 2.8.9
*/
zlexcount(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped.
* - _group_: sorted-set
* - _complexity_: O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.
* - _since_: 7.0.0
*/
zmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
min: "MIN",
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
min: "MIN",
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [numkeys: number | string, ...keys: RedisKey[], min: "MIN"]): Result<unknown, Context>;
zmpop(...args: [numkeys: number | string, keys: RedisKey[], min: "MIN"]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
min: "MIN",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
max: "MAX",
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
max: "MAX",
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [numkeys: number | string, ...keys: RedisKey[], max: "MAX"]): Result<unknown, Context>;
zmpop(...args: [numkeys: number | string, keys: RedisKey[], max: "MAX"]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string,
callback: Callback<unknown>
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
...keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
zmpop(...args: [
numkeys: number | string,
keys: RedisKey[],
max: "MAX",
countToken: "COUNT",
count: number | string
]): Result<unknown, Context>;
/**
* Returns the score of one or more members in a sorted set.
* - _group_: sorted-set
* - _complexity_: O(N) where N is the number of members being requested.
* - _since_: 6.2.0
*/
zmscore(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<(string | null)[]>
]): Result<(string | null)[], Context>;
zmscoreBuffer(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<(Buffer | null)[]>
]): Result<(Buffer | null)[], Context>;
zmscore(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<(string | null)[]>
]): Result<(string | null)[], Context>;
zmscoreBuffer(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<(Buffer | null)[]>
]): Result<(Buffer | null)[], Context>;
zmscore(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<(string | null)[], Context>;
zmscoreBuffer(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<(Buffer | null)[], Context>;
zmscore(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<(string | null)[], Context>;
zmscoreBuffer(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<(Buffer | null)[], Context>;
/**
* Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.
* - _group_: sorted-set
* - _complexity_: O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
* - _since_: 5.0.0
*/
zpopmax(key: RedisKey, callback?: Callback<string[]>): Result<string[], Context>;
zpopmaxBuffer(key: RedisKey, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zpopmax(key: RedisKey, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zpopmaxBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.
* - _group_: sorted-set
* - _complexity_: O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
* - _since_: 5.0.0
*/
zpopmin(key: RedisKey, callback?: Callback<string[]>): Result<string[], Context>;
zpopminBuffer(key: RedisKey, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zpopmin(key: RedisKey, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zpopminBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns one or more random members from a sorted set.
* - _group_: sorted-set
* - _complexity_: O(N) where N is the number of members returned
* - _since_: 6.2.0
*/
zrandmember(key: RedisKey, callback?: Callback<string | null>): Result<string | null, Context>;
zrandmemberBuffer(key: RedisKey, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
zrandmember(key: RedisKey, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrandmemberBuffer(key: RedisKey, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrandmember(key: RedisKey, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrandmemberBuffer(key: RedisKey, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns members in a sorted set within a range of indexes.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
* - _since_: 1.2.0
*/
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns members in a sorted set within a lexicographical range.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
* - _since_: 2.8.9
*/
zrangebylex(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback<string[]>): Result<string[], Context>;
zrangebylexBuffer(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrangebylex(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangebylexBuffer(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns members in a sorted set within a range of scores.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
* - _since_: 1.0.5
*/
zrangebyscore(key: RedisKey, min: number | string, max: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrangebyscore(key: RedisKey, min: number | string, max: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrangebyscore(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrangebyscore(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Stores a range of members from sorted set in a key.
* - _group_: sorted-set
* - _complexity_: 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_: 6.2.0
*/
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, rev: "REV", callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", rev: "REV", callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", rev: "REV", callback?: Callback<number>): Result<number, Context>;
zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Returns the index of a member in a sorted set ordered by ascending scores.
* - _group_: sorted-set
* - _complexity_: O(log(N))
* - _since_: 2.0.0
*/
zrank(key: RedisKey, member: string | Buffer | number, callback?: Callback<number | null>): Result<number | null, Context>;
zrank(key: RedisKey, member: string | Buffer | number, withscore: "WITHSCORE", callback?: Callback<number | null>): Result<number | null, Context>;
/**
* Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.
* - _group_: sorted-set
* - _complexity_: O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.
* - _since_: 1.2.0
*/
zrem(...args: [
key: RedisKey,
...members: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zrem(...args: [
key: RedisKey,
members: (string | Buffer | number)[],
callback: Callback<number>
]): Result<number, Context>;
zrem(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<number, Context>;
zrem(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<number, Context>;
/**
* Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
* - _since_: 2.8.9
*/
zremrangebylex(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback<number>): Result<number, Context>;
/**
* Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
* - _since_: 2.0.0
*/
zremrangebyrank(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
* - _since_: 1.2.0
*/
zremrangebyscore(key: RedisKey, min: number | string, max: number | string, callback?: Callback<number>): Result<number, Context>;
/**
* Returns members in a sorted set within a range of indexes in reverse order.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
* - _since_: 1.2.0
*/
zrevrange(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrevrangeBuffer(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrevrange(key: RedisKey, start: number | string, stop: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrevrangeBuffer(key: RedisKey, start: number | string, stop: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns members in a sorted set within a lexicographical range in reverse order.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
* - _since_: 2.8.9
*/
zrevrangebylex(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, callback?: Callback<string[]>): Result<string[], Context>;
zrevrangebylexBuffer(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrevrangebylex(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrevrangebylexBuffer(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns members in a sorted set within a range of scores in reverse order.
* - _group_: sorted-set
* - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
* - _since_: 2.2.0
*/
zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", callback?: Callback<string[]>): Result<string[], Context>;
zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<string[]>): Result<string[], Context>;
zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback<Buffer[]>): Result<Buffer[], Context>;
/**
* Returns the index of a member in a sorted set ordered by descending scores.
* - _group_: sorted-set
* - _complexity_: O(log(N))
* - _since_: 2.0.0
*/
zrevrank(key: RedisKey, member: string | Buffer | number, callback?: Callback<number | null>): Result<number | null, Context>;
zrevrank(key: RedisKey, member: string | Buffer | number, withscore: "WITHSCORE", callback?: Callback<number | null>): Result<number | null, Context>;
/**
* Iterates over members and scores of a sorted set.
* - _group_: sorted-set
* - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.
* - _since_: 2.8.0
*/
zscan(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>;
zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>;
/**
* Returns the score of a member in a sorted set.
* - _group_: sorted-set
* - _complexity_: O(1)
* - _since_: 1.2.0
*/
zscore(key: RedisKey, member: string | Buffer | number, callback?: Callback<string | null>): Result<string | null, Context>;
zscoreBuffer(key: RedisKey, member: string | Buffer | number, callback?: Callback<Buffer | null>): Result<Buffer | null, Context>;
/**
* Returns the union of multiple sorted sets.
* - _group_: sorted-set
* - _complexity_: O(N)+O(M*log(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_: 6.2.0
*/
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<string[], Context>;
zunionBuffer(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result<Buffer[], Context>;
zunion(...args: [numkeys: number | string, keys: RedisKey[]]): Result<string[], Context>;
zunionBuffer(...args: [numkeys: number | string, keys: RedisKey[]]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [numkeys: number | string, ...args: RedisValue[]]): Result<string[], Context>;
zunionBuffer(...args: [numkeys: number | string, ...args: RedisValue[]]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<string[]>
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES",
callback: Callback<Buffer[]>
]): Result<Buffer[], Context>;
zunion(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<string[], Context>;
zunionBuffer(...args: [
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
withscores: "WITHSCORES"
]): Result<Buffer[], Context>;
/**
* Stores the union of multiple sorted sets in a key.
* - _group_: sorted-set
* - _complexity_: O(N)+O(M log(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_: 2.0.0
*/
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[]
]): Result<number, Context>;
zunionstore(...args: [destination: RedisKey, numkeys: number | string, keys: RedisKey[]]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
keys: RedisKey[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[]
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
sum: "SUM"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
min: "MIN"
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX",
callback: Callback<number>
]): Result<number, Context>;
zunionstore(...args: [
destination: RedisKey,
numkeys: number | string,
...args: RedisValue[],
aggregate: "AGGREGATE",
max: "MAX"
]): Result<number, Context>;
}
export default RedisCommander;