Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRedisClient

Extends default RedisClient type to allow dynamic properties access on it

type

{IRedisClient}

Hierarchy

  • RedisClient
    • IRedisClient

Indexable

[name: string]: any

Extends default RedisClient type to allow dynamic properties access on it

Index

Properties

Methods

Properties

BITFIELD

BITFIELD: OverloadedKeyCommand<string | number, [number, number], boolean>

BLPOP

BLPOP: OverloadedLastCommand<string, number, [string, string], boolean>

BRPOP

BRPOP: OverloadedLastCommand<string, number, [string, string], boolean>

CLIENT

CLIENT: OverloadedCommand<string, any, boolean>

CLUSTER

CLUSTER: OverloadedCommand<string, any, this>

CONFIG

CONFIG: OverloadedCommand<string, boolean, boolean>

DEBUG

DEBUG: OverloadedCommand<string, boolean, boolean>

DEL

DEL: OverloadedCommand<string, number, boolean>

EVAL

EVAL: OverloadedCommand<string | number, any, boolean>

EVALSHA

EVALSHA: OverloadedCommand<string | number, any, boolean>

EXISTS

EXISTS: OverloadedCommand<string, number, boolean>

GEOADD

GEOADD: OverloadedKeyCommand<string | number, number, boolean>

GEODIST

GEODIST: OverloadedKeyCommand<string, string, boolean>

GEOHASH

GEOHASH: OverloadedKeyCommand<string, string, boolean>

GEOPOS

GEOPOS: OverloadedKeyCommand<string, Array<[number, number]>, boolean>

GEORADIUS

GEORADIUS: OverloadedKeyCommand<string | number, Array<string | [string, string | [string, string]]>, boolean>

GEORADIUSBYMEMBER

GEORADIUSBYMEMBER: OverloadedKeyCommand<string | number, Array<string | [string, string | [string, string]]>, boolean>

HDEL

HDEL: OverloadedKeyCommand<string, number, boolean>

HMGET

HMGET: OverloadedKeyCommand<string, string[], boolean>

HMSET

HMSET: OverloadedSetCommand<string | number, boolean, boolean>

HSCAN

HSCAN: OverloadedKeyCommand<string, [string, string[]], boolean>

LPUSH

LPUSH: OverloadedKeyCommand<string, number, boolean>

MGET

MGET: OverloadedCommand<string, string[], boolean>

MIGRATE

MIGRATE: OverloadedCommand<string, boolean, boolean>

MSET

MSET: OverloadedCommand<string, boolean, boolean>

MSETNX

MSETNX: OverloadedCommand<string, boolean, boolean>

OBJECT

OBJECT: OverloadedCommand<string, any, boolean>

PFADD

PFADD: OverloadedKeyCommand<string, number, boolean>

PFCOUNT

PFCOUNT: OverloadedCommand<string, number, boolean>

PFMERGE

PFMERGE: OverloadedCommand<string, boolean, boolean>

PSUBSCRIBE

PSUBSCRIBE: OverloadedListCommand<string, string, boolean>

PUBSUB

PUBSUB: OverloadedCommand<string, number, boolean>

PUNSUBSCRIBE

PUNSUBSCRIBE: OverloadedListCommand<string, string, boolean>

RPUSH

RPUSH: OverloadedKeyCommand<string, number, boolean>

RedisClient

RedisClient: object

Type declaration

  • constructor: function
    • new __type(options: ClientOpts): RedisClient
    • Parameters

      • options: ClientOpts

      Returns RedisClient

SADD

SADD: OverloadedKeyCommand<string, number, boolean>

SCAN

SCAN: OverloadedCommand<string, [string, string[]], boolean>

SCRIPT

SCRIPT: OverloadedCommand<string, any, boolean>

SDIFF

SDIFF: OverloadedCommand<string, string[], boolean>

SDIFFSTORE

SDIFFSTORE: OverloadedKeyCommand<string, number, boolean>

SHUTDOWN

SHUTDOWN: OverloadedCommand<string, string, boolean>

SINTER

SINTER: OverloadedKeyCommand<string, string[], boolean>

SINTERSTORE

SINTERSTORE: OverloadedCommand<string, number, boolean>

SLOWLOG

SLOWLOG: OverloadedCommand<string, Array<[number, number, number, string[]]>, boolean>

SORT

SORT: OverloadedCommand<string, string[], boolean>

SREM

SREM: OverloadedKeyCommand<string, number, boolean>

SSCAN

SSCAN: OverloadedKeyCommand<string, [string, string[]], boolean>

SUBSCRIBE

SUBSCRIBE: OverloadedListCommand<string, string, boolean>

SUNION

SUNION: OverloadedCommand<string, string[], boolean>

SUNIONSTORE

SUNIONSTORE: OverloadedCommand<string, number, boolean>

UNSUBSCRIBE

UNSUBSCRIBE: OverloadedListCommand<string, string, boolean>

WATCH

WATCH: OverloadedCommand<string, "OK", boolean>

ZADD

ZADD: OverloadedKeyCommand<string | number, number, boolean>

ZINTERSTORE

ZINTERSTORE: OverloadedCommand<string | number, number, boolean>

ZREM

ZREM: OverloadedKeyCommand<string, number, boolean>

ZSCAN

ZSCAN: OverloadedKeyCommand<string, [string, string[]], boolean>

ZUNIONSTORE

ZUNIONSTORE: OverloadedCommand<string | number, number, boolean>

bitfield

bitfield: OverloadedKeyCommand<string | number, [number, number], boolean>

Perform arbitrary bitfield integer operations on strings.

blpop

blpop: OverloadedLastCommand<string, number, [string, string], boolean>

Remove and get the first element in a list, or block until one is available.

brpop

brpop: OverloadedLastCommand<string, number, [string, string], boolean>

Remove and get the last element in a list, or block until one is available.

client

client: OverloadedCommand<string, any, boolean>

KILL - Kill the connection of a client. LIST - Get the list of client connections. GETNAME - Get the current connection name. PAUSE - Stop processing commands from clients for some time. REPLY - Instruct the server whether to reply to commands. SETNAME - Set the current connection name.

cluster

cluster: OverloadedCommand<string, any, this>

ADDSLOTS - Assign new hash slots to receiving node. COUNT-FAILURE-REPORTS - Return the number of failure reports active for a given node. COUNTKEYSINSLOT - Return the number of local keys in the specified hash slot. DELSLOTS - Set hash slots as unbound in receiving node. FAILOVER - Forces a slave to perform a manual failover of its master. FORGET - Remove a node from the nodes table. GETKEYSINSLOT - Return local key names in the specified hash slot. INFO - Provides info about Redis Cluster node state. KEYSLOT - Returns the hash slot of the specified key. MEET - Force a node cluster to handshake with another node. NODES - Get cluster config for the node. REPLICATE - Reconfigure a node as a slave of the specified master node. RESET - Reset a Redis Cluster node. SAVECONFIG - Forces the node to save cluster state on disk. SET-CONFIG-EPOCH - Set the configuration epoch in a new node. SETSLOT - Bind a hash slot to a specified node. SLAVES - List slave nodes of the specified master node. SLOTS - Get array of Cluster slot to node mappings.

command_queue

command_queue: any[]

command_queue_length

command_queue_length: number

config

config: OverloadedCommand<string, boolean, boolean>

Get array of Redis command details.

COUNT - Get array of Redis command details. GETKEYS - Extract keys given a full Redis command. INFO - Get array of specific Redis command details. GET - Get the value of a configuration parameter. REWRITE - Rewrite the configuration file with the in memory configuration. SET - Set a configuration parameter to the given value. RESETSTAT - Reset the stats returned by INFO.

connected

connected: boolean

connection_id

connection_id: number

debug

debug: OverloadedCommand<string, boolean, boolean>

OBJECT - Get debugging information about a key. SEGFAULT - Make the server crash.

del

del: OverloadedCommand<string, number, boolean>

Delete a key.

eval

eval: OverloadedCommand<string | number, any, boolean>

Execute a Lua script server side.

evalsha

evalsha: OverloadedCommand<string | number, any, boolean>

Execute a Lue script server side.

exists

exists: OverloadedCommand<string, number, boolean>

Determine if a key exists.

geoadd

geoadd: OverloadedKeyCommand<string | number, number, boolean>

Add one or more geospatial items in the geospatial index represented using a sorted set.

geodist

geodist: OverloadedKeyCommand<string, string, boolean>

Returns the distance between two members of a geospatial index.

geohash

geohash: OverloadedKeyCommand<string, string, boolean>

Returns members of a geospatial index as standard geohash strings.

geopos

geopos: OverloadedKeyCommand<string, Array<[number, number]>, boolean>

Returns longitude and latitude of members of a geospatial index.

georadius

georadius: OverloadedKeyCommand<string | number, Array<string | [string, string | [string, string]]>, boolean>

Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point.

georadiusbymember

georadiusbymember: OverloadedKeyCommand<string | number, Array<string | [string, string | [string, string]]>, boolean>

Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member.

hdel

hdel: OverloadedKeyCommand<string, number, boolean>

Delete on or more hash fields.

hmget

hmget: OverloadedKeyCommand<string, string[], boolean>

Get the values of all the given hash fields.

hmset

hmset: OverloadedSetCommand<string | number, boolean, boolean>

Set multiple hash fields to multiple values.

hscan

hscan: OverloadedKeyCommand<string, [string, string[]], boolean>

Incrementally iterate hash fields and associated values.

lpush

lpush: OverloadedKeyCommand<string, number, boolean>

Prepend one or multiple values to a list.

mget

mget: OverloadedCommand<string, string[], boolean>

Get the values of all given keys.

migrate

migrate: OverloadedCommand<string, boolean, boolean>

Atomically tranfer a key from a Redis instance to another one.

mset

mset: OverloadedCommand<string, boolean, boolean>

Set multiple keys to multiple values.

msetnx

msetnx: OverloadedCommand<string, boolean, boolean>

Set multiple keys to multiple values, only if none of the keys exist.

object

object: OverloadedCommand<string, any, boolean>

Inspect the internals of Redis objects.

offline_queue

offline_queue: any[]

offline_queue_length

offline_queue_length: number

pfadd

pfadd: OverloadedKeyCommand<string, number, boolean>

Adds the specified elements to the specified HyperLogLog.

pfcount

pfcount: OverloadedCommand<string, number, boolean>

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

pfmerge

pfmerge: OverloadedCommand<string, boolean, boolean>

Merge N different HyperLogLogs into a single one.

psubscribe

psubscribe: OverloadedListCommand<string, string, boolean>

Listen for messages published to channels matching the given patterns.

pubsub

pubsub: OverloadedCommand<string, number, boolean>

Inspect the state of the Pub/Sub subsytem.

punsubscribe

punsubscribe: OverloadedListCommand<string, string, boolean>

Stop listening for messages posted to channels matching the given patterns.

retry_backoff

retry_backoff: number

retry_delay

retry_delay: number

rpush

rpush: OverloadedKeyCommand<string, number, boolean>

Append one or multiple values to a list.

sadd

sadd: OverloadedKeyCommand<string, number, boolean>

Append one or multiple members to a set.

scan

scan: OverloadedCommand<string, [string, string[]], boolean>

Incrementally iterate the keys space.

script

script: OverloadedCommand<string, any, boolean>

DEBUG - Set the debug mode for executed scripts. EXISTS - Check existence of scripts in the script cache. FLUSH - Remove all scripts from the script cache. KILL - Kill the script currently in execution. LOAD - Load the specified Lua script into the script cache.

sdiff

sdiff: OverloadedCommand<string, string[], boolean>

Subtract multiple sets.

sdiffstore

sdiffstore: OverloadedKeyCommand<string, number, boolean>

Subtract multiple sets and store the resulting set in a key.

server_info

server_info: ServerInfo

shutdown

shutdown: OverloadedCommand<string, string, boolean>

Synchronously save the dataset to disk and then shut down the server.

sinter

sinter: OverloadedKeyCommand<string, string[], boolean>

Intersect multiple sets.

sinterstore

sinterstore: OverloadedCommand<string, number, boolean>

Intersect multiple sets and store the resulting set in a key.

slowlog

slowlog: OverloadedCommand<string, Array<[number, number, number, string[]]>, boolean>

Manages the Redis slow queries log.

sort

sort: OverloadedCommand<string, string[], boolean>

Sort the elements in a list, set or sorted set.

srem

srem: OverloadedKeyCommand<string, number, boolean>

Remove one or more members from a set.

sscan

sscan: OverloadedKeyCommand<string, [string, string[]], boolean>

Incrementally iterate Set elements.

stream

stream: Duplex

subscribe

subscribe: OverloadedListCommand<string, string, boolean>

Listen for messages published to the given channels.

sunion

sunion: OverloadedCommand<string, string[], boolean>

Add multiple sets.

sunionstore

sunionstore: OverloadedCommand<string, number, boolean>

Add multiple sets and store the resulting set in a key.

unsubscribe

unsubscribe: OverloadedListCommand<string, string, boolean>

Stop listening for messages posted to the given channels.

watch

watch: OverloadedCommand<string, "OK", boolean>

Watch the given keys to determine execution of the MULTI/EXEC block.

zadd

zadd: OverloadedKeyCommand<string | number, number, boolean>

Add one or more members to a sorted set, or update its score if it already exists.

zinterstore

zinterstore: OverloadedCommand<string | number, number, boolean>

Intersect multiple sorted sets and store the resulting sorted set in a new key.

zrem

zrem: OverloadedKeyCommand<string, number, boolean>

Remove one or more members from a sorted set.

zscan

zscan: OverloadedKeyCommand<string, [string, string[]], boolean>

Incrementally iterate sorted sets elements and associated scores.

zunionstore

zunionstore: OverloadedCommand<string | number, number, boolean>

Add multiple sorted sets and store the resulting sorted set in a new key.

Static defaultMaxListeners

defaultMaxListeners: number

Methods

APPEND

  • APPEND(key: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

AUTH

  • AUTH(password: string, callback?: Callback<string>): boolean
  • Parameters

    • password: string
    • Optional callback: Callback<string>

    Returns boolean

BATCH

  • BATCH(args?: Array<Array<string | number | Callback<any>>>): Multi
  • Parameters

    • Optional args: Array<Array<string | number | Callback<any>>>

    Returns Multi

BGREWRITEAOF

  • BGREWRITEAOF(cb?: Callback<"OK">): boolean
  • Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

BGSAVE

  • BGSAVE(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

BITCOUNT

  • BITCOUNT(key: string, cb?: Callback<number>): boolean
  • BITCOUNT(key: string, start: number, end: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • key: string
    • start: number
    • end: number
    • Optional cb: Callback<number>

    Returns boolean

BITOP

  • BITOP(operation: string, destkey: string, key1: string, key2: string, key3: string, cb?: Callback<number>): boolean
  • BITOP(operation: string, destkey: string, key1: string, key2: string, cb?: Callback<number>): boolean
  • BITOP(operation: string, destkey: string, key: string, cb?: Callback<number>): boolean
  • BITOP(operation: string, destkey: string, ...args: Array<string | Callback<number>>): boolean
  • Parameters

    • operation: string
    • destkey: string
    • key1: string
    • key2: string
    • key3: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • operation: string
    • destkey: string
    • key1: string
    • key2: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • operation: string
    • destkey: string
    • key: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • operation: string
    • destkey: string
    • Rest ...args: Array<string | Callback<number>>

    Returns boolean

BITPOS

  • BITPOS(key: string, bit: number, start: number, end: number, cb?: Callback<number>): boolean
  • BITPOS(key: string, bit: number, start: number, cb?: Callback<number>): boolean
  • BITPOS(key: string, bit: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • bit: number
    • start: number
    • end: number
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • key: string
    • bit: number
    • start: number
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • key: string
    • bit: number
    • Optional cb: Callback<number>

    Returns boolean

BRPOPLPUSH

  • BRPOPLPUSH(source: string, destination: string, timeout: number, cb?: Callback<string | null>): boolean
  • Parameters

    • source: string
    • destination: string
    • timeout: number
    • Optional cb: Callback<string | null>

    Returns boolean

COMMAND

  • COMMAND(cb?: Callback<Array<[string, number, string[], number, number, number]>>): boolean
  • Parameters

    • Optional cb: Callback<Array<[string, number, string[], number, number, number]>>

    Returns boolean

DBSIZE

  • DBSIZE(cb?: Callback<number>): boolean
  • Parameters

    • Optional cb: Callback<number>

    Returns boolean

DECR

  • DECR(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

DECRBY

  • DECRBY(key: string, decrement: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • decrement: number
    • Optional cb: Callback<number>

    Returns boolean

DISCARD

  • DISCARD(cb?: Callback<"OK">): boolean
  • Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

DUMP

  • DUMP(key: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

ECHO

  • ECHO<T>(message: T, cb?: Callback<T>): boolean
  • Type parameters

    • T: string

    Parameters

    • message: T
    • Optional cb: Callback<T>

    Returns boolean

EXPIRE

  • EXPIRE(key: string, seconds: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • seconds: number
    • Optional cb: Callback<number>

    Returns boolean

EXPIREAT

  • EXPIREAT(key: string, timestamp: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • timestamp: number
    • Optional cb: Callback<number>

    Returns boolean

FLUSHALL

  • FLUSHALL(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

FLUSHDB

  • FLUSHDB(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

GET

  • GET(key: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

GETBIT

  • GETBIT(key: string, offset: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • offset: number
    • Optional cb: Callback<number>

    Returns boolean

GETRANGE

  • GETRANGE(key: string, start: number, end: number, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • start: number
    • end: number
    • Optional cb: Callback<string>

    Returns boolean

GETSET

  • GETSET(key: string, value: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • value: string
    • Optional cb: Callback<string>

    Returns boolean

HEXISTS

  • HEXISTS(key: string, field: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • field: string
    • Optional cb: Callback<number>

    Returns boolean

HGET

  • HGET(key: string, field: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • field: string
    • Optional cb: Callback<string>

    Returns boolean

HGETALL

  • HGETALL(key: string, cb?: Callback<object>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<object>

    Returns boolean

HINCRBY

  • HINCRBY(key: string, field: string, increment: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • field: string
    • increment: number
    • Optional cb: Callback<number>

    Returns boolean

HINCRBYFLOAT

  • HINCRBYFLOAT(key: string, field: string, increment: number, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • field: string
    • increment: number
    • Optional cb: Callback<string>

    Returns boolean

HKEYS

  • HKEYS(key: string, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string[]>

    Returns boolean

HLEN

  • HLEN(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

HSET

  • HSET(key: string, field: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • field: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

HSETNX

  • HSETNX(key: string, field: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • field: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

HSTRLEN

  • HSTRLEN(key: string, field: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • field: string
    • Optional cb: Callback<number>

    Returns boolean

HVALS

  • HVALS(key: string, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string[]>

    Returns boolean

INCR

  • INCR(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

INCRBY

  • INCRBY(key: string, increment: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • increment: number
    • Optional cb: Callback<number>

    Returns boolean

INCRBYFLOAT

  • INCRBYFLOAT(key: string, increment: number, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • increment: number
    • Optional cb: Callback<string>

    Returns boolean

INFO

  • INFO(cb?: Callback<ServerInfo>): boolean
  • INFO(section?: string | string[], cb?: Callback<ServerInfo>): boolean
  • Parameters

    • Optional cb: Callback<ServerInfo>

    Returns boolean

  • Parameters

    • Optional section: string | string[]
    • Optional cb: Callback<ServerInfo>

    Returns boolean

KEYS

  • KEYS(pattern: string, cb?: Callback<string[]>): boolean
  • Parameters

    • pattern: string
    • Optional cb: Callback<string[]>

    Returns boolean

LASTSAVE

  • LASTSAVE(cb?: Callback<number>): boolean
  • Parameters

    • Optional cb: Callback<number>

    Returns boolean

LINDEX

  • LINDEX(key: string, index: number, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • index: number
    • Optional cb: Callback<string>

    Returns boolean

LINSERT

  • LINSERT(key: string, dir: "BEFORE" | "AFTER", pivot: string, value: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • dir: "BEFORE" | "AFTER"
    • pivot: string
    • value: string
    • Optional cb: Callback<string>

    Returns boolean

LLEN

  • LLEN(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

LPOP

  • LPOP(key: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

LPUSHX

  • LPUSHX(key: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

LRANGE

  • LRANGE(key: string, start: number, stop: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<string[]>

    Returns boolean

LREM

  • LREM(key: string, count: number, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • count: number
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

LSET

  • LSET(key: string, index: number, value: string, cb?: Callback<"OK">): boolean
  • Parameters

    • key: string
    • index: number
    • value: string
    • Optional cb: Callback<"OK">

    Returns boolean

LTRIM

  • LTRIM(key: string, start: number, stop: number, cb?: Callback<"OK">): boolean
  • Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<"OK">

    Returns boolean

MONITOR

  • MONITOR(cb?: Callback<undefined>): boolean
  • Parameters

    • Optional cb: Callback<undefined>

    Returns boolean

MOVE

  • MOVE(key: string, db: string | number): boolean
  • Parameters

    • key: string
    • db: string | number

    Returns boolean

MULTI

  • MULTI(args?: Array<Array<string | number | Callback<any>>>): Multi
  • Parameters

    • Optional args: Array<Array<string | number | Callback<any>>>

    Returns Multi

PERSIST

  • PERSIST(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

PEXPIRE

  • PEXPIRE(key: string, milliseconds: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • milliseconds: number
    • Optional cb: Callback<number>

    Returns boolean

PEXPIREAT

  • PEXPIREAT(key: string, millisecondsTimestamp: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • millisecondsTimestamp: number
    • Optional cb: Callback<number>

    Returns boolean

PING

  • PING(callback?: Callback<string>): boolean
  • PING(message: string, callback?: Callback<string>): boolean
  • Parameters

    • Optional callback: Callback<string>

    Returns boolean

  • Parameters

    • message: string
    • Optional callback: Callback<string>

    Returns boolean

PSETEX

  • PSETEX(key: string, milliseconds: number, value: string, cb?: Callback<"OK">): boolean
  • Parameters

    • key: string
    • milliseconds: number
    • value: string
    • Optional cb: Callback<"OK">

    Returns boolean

PTTL

  • PTTL(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

PUBLISH

  • PUBLISH(channel: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • channel: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

QUIT

  • QUIT(cb?: Callback<"OK">): boolean
  • Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

RANDOMKEY

  • RANDOMKEY(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

READONLY

  • READONLY(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

READWRITE

  • READWRITE(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

RENAME

  • RENAME(key: string, newkey: string, cb?: Callback<"OK">): boolean
  • Parameters

    • key: string
    • newkey: string
    • Optional cb: Callback<"OK">

    Returns boolean

RENAMENX

  • RENAMENX(key: string, newkey: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • newkey: string
    • Optional cb: Callback<number>

    Returns boolean

RESTORE

  • RESTORE(key: string, ttl: number, serializedValue: string, cb?: Callback<"OK">): boolean
  • Parameters

    • key: string
    • ttl: number
    • serializedValue: string
    • Optional cb: Callback<"OK">

    Returns boolean

ROLE

  • ROLE(cb?: Callback<[string, number, Array<[string, string, string]>]>): boolean
  • Parameters

    • Optional cb: Callback<[string, number, Array<[string, string, string]>]>

    Returns boolean

RPOP

  • RPOP(key: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

RPOPLPUSH

  • RPOPLPUSH(source: string, destination: string, cb?: Callback<string>): boolean
  • Parameters

    • source: string
    • destination: string
    • Optional cb: Callback<string>

    Returns boolean

RPUSHX

  • RPUSHX(key: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

SAVE

  • SAVE(cb?: Callback<string>): boolean
  • Parameters

    • Optional cb: Callback<string>

    Returns boolean

SCARD

  • SCARD(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

SELECT

  • SELECT(index: number | string, cb?: Callback<string>): boolean
  • Parameters

    • index: number | string
    • Optional cb: Callback<string>

    Returns boolean

SET

  • SET(key: string, value: string, cb?: Callback<"OK">): boolean
  • SET(key: string, value: string, flag: string, cb?: Callback<"OK">): boolean
  • SET(key: string, value: string, mode: string, duration: number, cb?: Callback<"OK" | undefined>): boolean
  • SET(key: string, value: string, mode: string, duration: number, flag: string, cb?: Callback<"OK" | undefined>): boolean
  • Parameters

    • key: string
    • value: string
    • Optional cb: Callback<"OK">

    Returns boolean

  • Parameters

    • key: string
    • value: string
    • flag: string
    • Optional cb: Callback<"OK">

    Returns boolean

  • Parameters

    • key: string
    • value: string
    • mode: string
    • duration: number
    • Optional cb: Callback<"OK" | undefined>

    Returns boolean

  • Parameters

    • key: string
    • value: string
    • mode: string
    • duration: number
    • flag: string
    • Optional cb: Callback<"OK" | undefined>

    Returns boolean

SETBIT

  • SETBIT(key: string, offset: number, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • offset: number
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

SETEX

  • SETEX(key: string, seconds: number, value: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • seconds: number
    • value: string
    • Optional cb: Callback<string>

    Returns boolean

SETNX

  • SETNX(key: string, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

SETRANGE

  • SETRANGE(key: string, offset: number, value: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • offset: number
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

SISMEMBER

  • SISMEMBER(key: string, member: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • member: string
    • Optional cb: Callback<number>

    Returns boolean

SLAVEOF

  • SLAVEOF(host: string, port: string | number, cb?: Callback<string>): boolean
  • Parameters

    • host: string
    • port: string | number
    • Optional cb: Callback<string>

    Returns boolean

SMEMBERS

  • SMEMBERS(key: string, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string[]>

    Returns boolean

SMOVE

  • SMOVE(source: string, destination: string, member: string, cb?: Callback<number>): boolean
  • Parameters

    • source: string
    • destination: string
    • member: string
    • Optional cb: Callback<number>

    Returns boolean

SPOP

  • SPOP(key: string, cb?: Callback<string>): boolean
  • SPOP(key: string, count: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

  • Parameters

    • key: string
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

SRANDMEMBER

  • SRANDMEMBER(key: string, cb?: Callback<string>): boolean
  • SRANDMEMBER(key: string, count: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

  • Parameters

    • key: string
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

STRLEN

  • STRLEN(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

SYNC

  • SYNC(cb?: Callback<undefined>): boolean
  • Parameters

    • Optional cb: Callback<undefined>

    Returns boolean

TIME

  • TIME(cb?: Callback<[string, string]>): boolean
  • Parameters

    • Optional cb: Callback<[string, string]>

    Returns boolean

TTL

  • TTL(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

TYPE

  • TYPE(key: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

UNWATCH

  • UNWATCH(cb?: Callback<"OK">): boolean
  • Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

WAIT

  • WAIT(numslaves: number, timeout: number, cb?: Callback<number>): boolean
  • Parameters

    • numslaves: number
    • timeout: number
    • Optional cb: Callback<number>

    Returns boolean

ZCARD

  • ZCARD(key: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

ZCOUNT

  • ZCOUNT(key: string, min: number | string, max: number | string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • Optional cb: Callback<number>

    Returns boolean

ZINCRBY

  • ZINCRBY(key: string, increment: number, member: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • increment: number
    • member: string
    • Optional cb: Callback<number>

    Returns boolean

ZLEXCOUNT

  • ZLEXCOUNT(key: string, min: string, max: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<number>

    Returns boolean

ZRANGE

  • ZRANGE(key: string, start: number, stop: number, cb?: Callback<string[]>): boolean
  • ZRANGE(key: string, start: number, stop: number, withscores: string, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • start: number
    • stop: number
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

ZRANGEBYLEX

  • ZRANGEBYLEX(key: string, min: string, max: string, cb?: Callback<string[]>): boolean
  • ZRANGEBYLEX(key: string, min: string, max: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: string
    • max: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

ZRANGEBYSCORE

  • ZRANGEBYSCORE(key: string, min: number | string, max: number | string, cb?: Callback<string[]>): boolean
  • ZRANGEBYSCORE(key: string, min: number | string, max: number | string, withscores: string, cb?: Callback<string[]>): boolean
  • ZRANGEBYSCORE(key: string, min: number | string, max: number | string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • ZRANGEBYSCORE(key: string, min: number | string, max: number | string, withscores: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

ZRANK

  • ZRANK(key: string, member: string, cb?: Callback<number | undefined>): boolean
  • Parameters

    • key: string
    • member: string
    • Optional cb: Callback<number | undefined>

    Returns boolean

ZREMRANGEBYLEX

  • ZREMRANGEBYLEX(key: string, min: string, max: string, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<number>

    Returns boolean

ZREMRANGEBYRANK

  • ZREMRANGEBYRANK(key: string, start: number, stop: number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<number>

    Returns boolean

ZREMRANGEBYSCORE

  • ZREMRANGEBYSCORE(key: string, min: string | number, max: string | number, cb?: Callback<number>): boolean
  • Parameters

    • key: string
    • min: string | number
    • max: string | number
    • Optional cb: Callback<number>

    Returns boolean

ZREVRANGE

  • ZREVRANGE(key: string, start: number, stop: number, cb?: Callback<string[]>): boolean
  • ZREVRANGE(key: string, start: number, stop: number, withscores: string, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • start: number
    • stop: number
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

ZREVRANGEBYLEX

  • ZREVRANGEBYLEX(key: string, min: string, max: string, cb?: Callback<string[]>): boolean
  • ZREVRANGEBYLEX(key: string, min: string, max: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: string
    • max: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

ZREVRANGEBYSCORE

  • ZREVRANGEBYSCORE(key: string, min: number | string, max: number | string, cb?: Callback<string[]>): boolean
  • ZREVRANGEBYSCORE(key: string, min: number | string, max: number | string, withscores: string, cb?: Callback<string[]>): boolean
  • ZREVRANGEBYSCORE(key: string, min: number | string, max: number | string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • ZREVRANGEBYSCORE(key: string, min: number | string, max: number | string, withscores: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

ZREVRANK

  • ZREVRANK(key: string, member: string, cb?: Callback<number | undefined>): boolean
  • Parameters

    • key: string
    • member: string
    • Optional cb: Callback<number | undefined>

    Returns boolean

ZSCORE

  • ZSCORE(key: string, member: string, cb?: Callback<string>): boolean
  • Parameters

    • key: string
    • member: string
    • Optional cb: Callback<string>

    Returns boolean

addCommand

  • addCommand(command: string): void
  • Parameters

    • command: string

    Returns void

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

add_command

  • add_command(command: string): void
  • Parameters

    • command: string

    Returns void

append

  • append(key: string, value: string, cb?: Callback<number>): boolean
  • Append a value to a key.

    Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

auth

  • auth(password: string, callback?: Callback<string>): boolean
  • Authenticate to the server.

    Parameters

    • password: string
    • Optional callback: Callback<string>

    Returns boolean

batch

  • batch(args?: Array<Array<string | number | Callback<any>>>): Multi
  • Parameters

    • Optional args: Array<Array<string | number | Callback<any>>>

    Returns Multi

bgrewriteaof

  • bgrewriteaof(cb?: Callback<"OK">): boolean
  • Asynchronously rewrite the append-only file.

    Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

bgsave

  • bgsave(cb?: Callback<string>): boolean
  • Asynchronously save the dataset to disk.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

bitcount

  • bitcount(key: string, cb?: Callback<number>): boolean
  • bitcount(key: string, start: number, end: number, cb?: Callback<number>): boolean
  • Count set bits in a string.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • key: string
    • start: number
    • end: number
    • Optional cb: Callback<number>

    Returns boolean

bitop

  • bitop(operation: string, destkey: string, key1: string, key2: string, key3: string, cb?: Callback<number>): boolean
  • bitop(operation: string, destkey: string, key1: string, key2: string, cb?: Callback<number>): boolean
  • bitop(operation: string, destkey: string, key: string, cb?: Callback<number>): boolean
  • bitop(operation: string, destkey: string, ...args: Array<string | Callback<number>>): boolean
  • Perform bitwise operations between strings.

    Parameters

    • operation: string
    • destkey: string
    • key1: string
    • key2: string
    • key3: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • operation: string
    • destkey: string
    • key1: string
    • key2: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • operation: string
    • destkey: string
    • key: string
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • operation: string
    • destkey: string
    • Rest ...args: Array<string | Callback<number>>

    Returns boolean

bitpos

  • bitpos(key: string, bit: number, start: number, end: number, cb?: Callback<number>): boolean
  • bitpos(key: string, bit: number, start: number, cb?: Callback<number>): boolean
  • bitpos(key: string, bit: number, cb?: Callback<number>): boolean
  • Find first bit set or clear in a string.

    Parameters

    • key: string
    • bit: number
    • start: number
    • end: number
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • key: string
    • bit: number
    • start: number
    • Optional cb: Callback<number>

    Returns boolean

  • Parameters

    • key: string
    • bit: number
    • Optional cb: Callback<number>

    Returns boolean

brpoplpush

  • brpoplpush(source: string, destination: string, timeout: number, cb?: Callback<string | null>): boolean
  • Pop a value from a list, push it to another list and return it; or block until one is available.

    Parameters

    • source: string
    • destination: string
    • timeout: number
    • Optional cb: Callback<string | null>

    Returns boolean

command

  • command(cb?: Callback<Array<[string, number, string[], number, number, number]>>): boolean
  • Get array of Redis command details.

    COUNT - Get total number of Redis commands. GETKEYS - Extract keys given a full Redis command. INFO - Get array of specific REdis command details.

    Parameters

    • Optional cb: Callback<Array<[string, number, string[], number, number, number]>>

    Returns boolean

cork

  • cork(): void
  • Returns void

dbsize

  • dbsize(cb?: Callback<number>): boolean
  • Return the number of keys in the selected database.

    Parameters

    • Optional cb: Callback<number>

    Returns boolean

decr

  • decr(key: string, cb?: Callback<number>): boolean
  • Decrement the integer value of a key by one.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

decrby

  • decrby(key: string, decrement: number, cb?: Callback<number>): boolean
  • Decrement the integer value of a key by the given number.

    Parameters

    • key: string
    • decrement: number
    • Optional cb: Callback<number>

    Returns boolean

discard

  • discard(cb?: Callback<"OK">): boolean
  • Discard all commands issued after MULTI.

    Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

dump

  • dump(key: string, cb?: Callback<string>): boolean
  • Return a serialized version of the value stored at the specified key.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

duplicate

  • duplicate(options?: ClientOpts, cb?: Callback<RedisClient>): RedisClient
  • Parameters

    • Optional options: ClientOpts
    • Optional cb: Callback<RedisClient>

    Returns RedisClient

echo

  • echo<T>(message: T, cb?: Callback<T>): boolean
  • Echo the given string.

    Type parameters

    • T: string

    Parameters

    • message: T
    • Optional cb: Callback<T>

    Returns boolean

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

end

  • end(flush?: undefined | false | true): void
  • Client methods.

    Parameters

    • Optional flush: undefined | false | true

    Returns void

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

expire

  • expire(key: string, seconds: number, cb?: Callback<number>): boolean
  • Set a key's time to live in seconds.

    Parameters

    • key: string
    • seconds: number
    • Optional cb: Callback<number>

    Returns boolean

expireat

  • expireat(key: string, timestamp: number, cb?: Callback<number>): boolean
  • Set the expiration for a key as a UNIX timestamp.

    Parameters

    • key: string
    • timestamp: number
    • Optional cb: Callback<number>

    Returns boolean

flushall

  • flushall(cb?: Callback<string>): boolean
  • Remove all keys from all databases.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

flushdb

  • flushdb(cb?: Callback<string>): boolean
  • Remove all keys from the current database.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

get

  • get(key: string, cb?: Callback<string>): boolean
  • Get the value of a key.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getbit

  • getbit(key: string, offset: number, cb?: Callback<number>): boolean
  • Returns the bit value at offset in the string value stored at key.

    Parameters

    • key: string
    • offset: number
    • Optional cb: Callback<number>

    Returns boolean

getrange

  • getrange(key: string, start: number, end: number, cb?: Callback<string>): boolean
  • Get a substring of the string stored at a key.

    Parameters

    • key: string
    • start: number
    • end: number
    • Optional cb: Callback<string>

    Returns boolean

getset

  • getset(key: string, value: string, cb?: Callback<string>): boolean
  • Set the string value of a key and return its old value.

    Parameters

    • key: string
    • value: string
    • Optional cb: Callback<string>

    Returns boolean

hexists

  • hexists(key: string, field: string, cb?: Callback<number>): boolean
  • Determine if a hash field exists.

    Parameters

    • key: string
    • field: string
    • Optional cb: Callback<number>

    Returns boolean

hget

  • hget(key: string, field: string, cb?: Callback<string>): boolean
  • Get the value of a hash field.

    Parameters

    • key: string
    • field: string
    • Optional cb: Callback<string>

    Returns boolean

hgetall

  • hgetall(key: string, cb?: Callback<object>): boolean
  • Get all fields and values in a hash.

    Parameters

    • key: string
    • Optional cb: Callback<object>

    Returns boolean

hincrby

  • hincrby(key: string, field: string, increment: number, cb?: Callback<number>): boolean
  • Increment the integer value of a hash field by the given number.

    Parameters

    • key: string
    • field: string
    • increment: number
    • Optional cb: Callback<number>

    Returns boolean

hincrbyfloat

  • hincrbyfloat(key: string, field: string, increment: number, cb?: Callback<string>): boolean
  • Increment the float value of a hash field by the given amount.

    Parameters

    • key: string
    • field: string
    • increment: number
    • Optional cb: Callback<string>

    Returns boolean

hkeys

  • hkeys(key: string, cb?: Callback<string[]>): boolean
  • Get all the fields of a hash.

    Parameters

    • key: string
    • Optional cb: Callback<string[]>

    Returns boolean

hlen

  • hlen(key: string, cb?: Callback<number>): boolean
  • Get the number of fields in a hash.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

hset

  • hset(key: string, field: string, value: string, cb?: Callback<number>): boolean
  • Set the string value of a hash field.

    Parameters

    • key: string
    • field: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

hsetnx

  • hsetnx(key: string, field: string, value: string, cb?: Callback<number>): boolean
  • Set the value of a hash field, only if the field does not exist.

    Parameters

    • key: string
    • field: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

hstrlen

  • hstrlen(key: string, field: string, cb?: Callback<number>): boolean
  • Get the length of the value of a hash field.

    Parameters

    • key: string
    • field: string
    • Optional cb: Callback<number>

    Returns boolean

hvals

  • hvals(key: string, cb?: Callback<string[]>): boolean
  • Get all the values of a hash.

    Parameters

    • key: string
    • Optional cb: Callback<string[]>

    Returns boolean

incr

  • incr(key: string, cb?: Callback<number>): boolean
  • Increment the integer value of a key by one.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

incrby

  • incrby(key: string, increment: number, cb?: Callback<number>): boolean
  • Increment the integer value of a key by the given amount.

    Parameters

    • key: string
    • increment: number
    • Optional cb: Callback<number>

    Returns boolean

incrbyfloat

  • incrbyfloat(key: string, increment: number, cb?: Callback<string>): boolean
  • Increment the float value of a key by the given amount.

    Parameters

    • key: string
    • increment: number
    • Optional cb: Callback<string>

    Returns boolean

info

  • info(cb?: Callback<ServerInfo>): boolean
  • info(section?: string | string[], cb?: Callback<ServerInfo>): boolean
  • Get information and statistics about the server.

    Parameters

    • Optional cb: Callback<ServerInfo>

    Returns boolean

  • Parameters

    • Optional section: string | string[]
    • Optional cb: Callback<ServerInfo>

    Returns boolean

keys

  • keys(pattern: string, cb?: Callback<string[]>): boolean
  • Find all keys matching the given pattern.

    Parameters

    • pattern: string
    • Optional cb: Callback<string[]>

    Returns boolean

lastsave

  • lastsave(cb?: Callback<number>): boolean
  • Get the UNIX time stamp of the last successful save to disk.

    Parameters

    • Optional cb: Callback<number>

    Returns boolean

lindex

  • lindex(key: string, index: number, cb?: Callback<string>): boolean
  • Get an element from a list by its index.

    Parameters

    • key: string
    • index: number
    • Optional cb: Callback<string>

    Returns boolean

linsert

  • linsert(key: string, dir: "BEFORE" | "AFTER", pivot: string, value: string, cb?: Callback<string>): boolean
  • Insert an element before or after another element in a list.

    Parameters

    • key: string
    • dir: "BEFORE" | "AFTER"
    • pivot: string
    • value: string
    • Optional cb: Callback<string>

    Returns boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

llen

  • llen(key: string, cb?: Callback<number>): boolean
  • Get the length of a list.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

lpop

  • lpop(key: string, cb?: Callback<string>): boolean
  • Remove and get the first element in a list.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

lpushx

  • lpushx(key: string, value: string, cb?: Callback<number>): boolean
  • Prepend a value to a list, only if the list exists.

    Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

lrange

  • lrange(key: string, start: number, stop: number, cb?: Callback<string[]>): boolean
  • Get a range of elements from a list.

    Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<string[]>

    Returns boolean

lrem

  • lrem(key: string, count: number, value: string, cb?: Callback<number>): boolean
  • Remove elements from a list.

    Parameters

    • key: string
    • count: number
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

lset

  • lset(key: string, index: number, value: string, cb?: Callback<"OK">): boolean
  • Set the value of an element in a list by its index.

    Parameters

    • key: string
    • index: number
    • value: string
    • Optional cb: Callback<"OK">

    Returns boolean

ltrim

  • ltrim(key: string, start: number, stop: number, cb?: Callback<"OK">): boolean
  • Trim a list to the specified range.

    Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<"OK">

    Returns boolean

monitor

  • monitor(cb?: Callback<undefined>): boolean
  • Listen for all requests received by the server in real time.

    Parameters

    • Optional cb: Callback<undefined>

    Returns boolean

move

  • move(key: string, db: string | number): boolean
  • Move a key to another database.

    Parameters

    • key: string
    • db: string | number

    Returns boolean

multi

  • multi(args?: Array<Array<string | number | Callback<any>>>): Multi
  • Mark the start of a transaction block.

    Parameters

    • Optional args: Array<Array<string | number | Callback<any>>>

    Returns Multi

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: "message" | "message_buffer", listener: function): this
  • on(event: "pmessage" | "pmessage_buffer", listener: function): this
  • on(event: "subscribe" | "unsubscribe", listener: function): this
  • on(event: "psubscribe" | "punsubscribe", listener: function): this
  • on(event: string, listener: function): this
  • Parameters

    • event: "message" | "message_buffer"
    • listener: function
        • (channel: string, message: string): void
        • Parameters

          • channel: string
          • message: string

          Returns void

    Returns this

  • Parameters

    • event: "pmessage" | "pmessage_buffer"
    • listener: function
        • (pattern: string, channel: string, message: string): void
        • Parameters

          • pattern: string
          • channel: string
          • message: string

          Returns void

    Returns this

  • Parameters

    • event: "subscribe" | "unsubscribe"
    • listener: function
        • (channel: string, count: number): void
        • Parameters

          • channel: string
          • count: number

          Returns void

    Returns this

  • Parameters

    • event: "psubscribe" | "punsubscribe"
    • listener: function
        • (pattern: string, count: number): void
        • Parameters

          • pattern: string
          • count: number

          Returns void

    Returns this

  • Parameters

    • event: string
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

persist

  • persist(key: string, cb?: Callback<number>): boolean
  • Remove the expiration from a key.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

pexpire

  • pexpire(key: string, milliseconds: number, cb?: Callback<number>): boolean
  • Remove a key's time to live in milliseconds.

    Parameters

    • key: string
    • milliseconds: number
    • Optional cb: Callback<number>

    Returns boolean

pexpireat

  • pexpireat(key: string, millisecondsTimestamp: number, cb?: Callback<number>): boolean
  • Set the expiration for a key as a UNIX timestamp specified in milliseconds.

    Parameters

    • key: string
    • millisecondsTimestamp: number
    • Optional cb: Callback<number>

    Returns boolean

ping

  • ping(callback?: Callback<string>): boolean
  • ping(message: string, callback?: Callback<string>): boolean
  • Ping the server.

    Parameters

    • Optional callback: Callback<string>

    Returns boolean

  • Parameters

    • message: string
    • Optional callback: Callback<string>

    Returns boolean

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

psetex

  • psetex(key: string, milliseconds: number, value: string, cb?: Callback<"OK">): boolean
  • Set the value and expiration in milliseconds of a key.

    Parameters

    • key: string
    • milliseconds: number
    • value: string
    • Optional cb: Callback<"OK">

    Returns boolean

pttl

  • pttl(key: string, cb?: Callback<number>): boolean
  • Get the time to live for a key in milliseconds.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

publish

  • publish(channel: string, value: string, cb?: Callback<number>): boolean
  • Post a message to a channel.

    Parameters

    • channel: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

quit

  • quit(cb?: Callback<"OK">): boolean
  • Close the connection.

    Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

randomkey

  • randomkey(cb?: Callback<string>): boolean
  • Return a random key from the keyspace.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

readonly

  • readonly(cb?: Callback<string>): boolean
  • Enables read queries for a connection to a cluster slave node.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

readwrite

  • readwrite(cb?: Callback<string>): boolean
  • Disables read queries for a connection to cluster slave node.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rename

  • rename(key: string, newkey: string, cb?: Callback<"OK">): boolean
  • Rename a key.

    Parameters

    • key: string
    • newkey: string
    • Optional cb: Callback<"OK">

    Returns boolean

renamenx

  • renamenx(key: string, newkey: string, cb?: Callback<number>): boolean
  • Rename a key, only if the new key does not exist.

    Parameters

    • key: string
    • newkey: string
    • Optional cb: Callback<number>

    Returns boolean

restore

  • restore(key: string, ttl: number, serializedValue: string, cb?: Callback<"OK">): boolean
  • Create a key using the provided serialized value, previously obtained using DUMP.

    Parameters

    • key: string
    • ttl: number
    • serializedValue: string
    • Optional cb: Callback<"OK">

    Returns boolean

role

  • role(cb?: Callback<[string, number, Array<[string, string, string]>]>): boolean
  • Return the role of the instance in the context of replication.

    Parameters

    • Optional cb: Callback<[string, number, Array<[string, string, string]>]>

    Returns boolean

rpop

  • rpop(key: string, cb?: Callback<string>): boolean
  • Remove and get the last element in a list.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

rpoplpush

  • rpoplpush(source: string, destination: string, cb?: Callback<string>): boolean
  • Remove the last element in a list, prepend it to another list and return it.

    Parameters

    • source: string
    • destination: string
    • Optional cb: Callback<string>

    Returns boolean

rpushx

  • rpushx(key: string, value: string, cb?: Callback<number>): boolean
  • Append a value to a list, only if the list exists.

    Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

save

  • save(cb?: Callback<string>): boolean
  • Synchronously save the dataset to disk.

    Parameters

    • Optional cb: Callback<string>

    Returns boolean

scard

  • scard(key: string, cb?: Callback<number>): boolean
  • Get the number of members in a set.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

select

  • select(index: number | string, cb?: Callback<string>): boolean
  • Change the selected database for the current connection.

    Parameters

    • index: number | string
    • Optional cb: Callback<string>

    Returns boolean

sendCommand

  • sendCommand(command: string, cb?: Callback<any>): boolean
  • sendCommand(command: string, args?: any[], cb?: Callback<any>): boolean
  • Parameters

    • command: string
    • Optional cb: Callback<any>

    Returns boolean

  • Parameters

    • command: string
    • Optional args: any[]
    • Optional cb: Callback<any>

    Returns boolean

send_command

  • send_command(command: string, cb?: Callback<any>): boolean
  • send_command(command: string, args?: any[], cb?: Callback<any>): boolean
  • Parameters

    • command: string
    • Optional cb: Callback<any>

    Returns boolean

  • Parameters

    • command: string
    • Optional args: any[]
    • Optional cb: Callback<any>

    Returns boolean

set

  • set(key: string, value: string, cb?: Callback<"OK">): boolean
  • set(key: string, value: string, flag: string, cb?: Callback<"OK">): boolean
  • set(key: string, value: string, mode: string, duration: number, cb?: Callback<"OK" | undefined>): boolean
  • set(key: string, value: string, mode: string, duration: number, flag: string, cb?: Callback<"OK" | undefined>): boolean
  • Set the string value of a key.

    Parameters

    • key: string
    • value: string
    • Optional cb: Callback<"OK">

    Returns boolean

  • Parameters

    • key: string
    • value: string
    • flag: string
    • Optional cb: Callback<"OK">

    Returns boolean

  • Parameters

    • key: string
    • value: string
    • mode: string
    • duration: number
    • Optional cb: Callback<"OK" | undefined>

    Returns boolean

  • Parameters

    • key: string
    • value: string
    • mode: string
    • duration: number
    • flag: string
    • Optional cb: Callback<"OK" | undefined>

    Returns boolean

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setbit

  • setbit(key: string, offset: number, value: string, cb?: Callback<number>): boolean
  • Sets or clears the bit at offset in the string value stored at key.

    Parameters

    • key: string
    • offset: number
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

setex

  • setex(key: string, seconds: number, value: string, cb?: Callback<string>): boolean
  • Set the value and expiration of a key.

    Parameters

    • key: string
    • seconds: number
    • value: string
    • Optional cb: Callback<string>

    Returns boolean

setnx

  • setnx(key: string, value: string, cb?: Callback<number>): boolean
  • Set the value of a key, only if the key does not exist.

    Parameters

    • key: string
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

setrange

  • setrange(key: string, offset: number, value: string, cb?: Callback<number>): boolean
  • Overwrite part of a string at key starting at the specified offset.

    Parameters

    • key: string
    • offset: number
    • value: string
    • Optional cb: Callback<number>

    Returns boolean

sismember

  • sismember(key: string, member: string, cb?: Callback<number>): boolean
  • Determine if a given value is a member of a set.

    Parameters

    • key: string
    • member: string
    • Optional cb: Callback<number>

    Returns boolean

slaveof

  • slaveof(host: string, port: string | number, cb?: Callback<string>): boolean
  • Make the server a slave of another instance, or promote it as master.

    Parameters

    • host: string
    • port: string | number
    • Optional cb: Callback<string>

    Returns boolean

smembers

  • smembers(key: string, cb?: Callback<string[]>): boolean
  • Get all the members in a set.

    Parameters

    • key: string
    • Optional cb: Callback<string[]>

    Returns boolean

smove

  • smove(source: string, destination: string, member: string, cb?: Callback<number>): boolean
  • Move a member from one set to another.

    Parameters

    • source: string
    • destination: string
    • member: string
    • Optional cb: Callback<number>

    Returns boolean

spop

  • spop(key: string, cb?: Callback<string>): boolean
  • spop(key: string, count: number, cb?: Callback<string[]>): boolean
  • Remove and return one or multiple random members from a set.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

  • Parameters

    • key: string
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

srandmember

  • srandmember(key: string, cb?: Callback<string>): boolean
  • srandmember(key: string, count: number, cb?: Callback<string[]>): boolean
  • Get one or multiple random members from a set.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

  • Parameters

    • key: string
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

strlen

  • strlen(key: string, cb?: Callback<number>): boolean
  • Get the length of the value stored in a key.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

sync

  • sync(cb?: Callback<undefined>): boolean
  • Internal command used for replication.

    Parameters

    • Optional cb: Callback<undefined>

    Returns boolean

time

  • time(cb?: Callback<[string, string]>): boolean
  • Return the current server time.

    Parameters

    • Optional cb: Callback<[string, string]>

    Returns boolean

ttl

  • ttl(key: string, cb?: Callback<number>): boolean
  • Get the time to live for a key.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

type

  • type(key: string, cb?: Callback<string>): boolean
  • Determine the type stored at key.

    Parameters

    • key: string
    • Optional cb: Callback<string>

    Returns boolean

uncork

  • uncork(): void
  • Returns void

unref

  • unref(): void
  • Returns void

unwatch

  • unwatch(cb?: Callback<"OK">): boolean
  • Forget about all watched keys.

    Parameters

    • Optional cb: Callback<"OK">

    Returns boolean

wait

  • wait(numslaves: number, timeout: number, cb?: Callback<number>): boolean
  • Wait for the synchronous replication of all the write commands sent in the context of the current connection.

    Parameters

    • numslaves: number
    • timeout: number
    • Optional cb: Callback<number>

    Returns boolean

zcard

  • zcard(key: string, cb?: Callback<number>): boolean
  • Get the number of members in a sorted set.

    Parameters

    • key: string
    • Optional cb: Callback<number>

    Returns boolean

zcount

  • zcount(key: string, min: number | string, max: number | string, cb?: Callback<number>): boolean
  • Count the members in a sorted set with scores between the given values.

    Parameters

    • key: string
    • min: number | string
    • max: number | string
    • Optional cb: Callback<number>

    Returns boolean

zincrby

  • zincrby(key: string, increment: number, member: string, cb?: Callback<number>): boolean
  • Increment the score of a member in a sorted set.

    Parameters

    • key: string
    • increment: number
    • member: string
    • Optional cb: Callback<number>

    Returns boolean

zlexcount

  • zlexcount(key: string, min: string, max: string, cb?: Callback<number>): boolean
  • Count the number of members in a sorted set between a given lexicographic range.

    Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<number>

    Returns boolean

zrange

  • zrange(key: string, start: number, stop: number, cb?: Callback<string[]>): boolean
  • zrange(key: string, start: number, stop: number, withscores: string, cb?: Callback<string[]>): boolean
  • Return a range of members in a sorted set, by index.

    Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • start: number
    • stop: number
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

zrangebylex

  • zrangebylex(key: string, min: string, max: string, cb?: Callback<string[]>): boolean
  • zrangebylex(key: string, min: string, max: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Return a range of members in a sorted set, by lexicographical range.

    Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: string
    • max: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

zrangebyscore

  • zrangebyscore(key: string, min: number | string, max: number | string, cb?: Callback<string[]>): boolean
  • zrangebyscore(key: string, min: number | string, max: number | string, withscores: string, cb?: Callback<string[]>): boolean
  • zrangebyscore(key: string, min: number | string, max: number | string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • zrangebyscore(key: string, min: number | string, max: number | string, withscores: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Return a range of members in a sorted set, by score.

    Parameters

    • key: string
    • min: number | string
    • max: number | string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

zrank

  • zrank(key: string, member: string, cb?: Callback<number | undefined>): boolean
  • Determine the index of a member in a sorted set.

    Parameters

    • key: string
    • member: string
    • Optional cb: Callback<number | undefined>

    Returns boolean

zremrangebylex

  • zremrangebylex(key: string, min: string, max: string, cb?: Callback<number>): boolean
  • Remove all members in a sorted set between the given lexicographical range.

    Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<number>

    Returns boolean

zremrangebyrank

  • zremrangebyrank(key: string, start: number, stop: number, cb?: Callback<number>): boolean
  • Remove all members in a sorted set within the given indexes.

    Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<number>

    Returns boolean

zremrangebyscore

  • zremrangebyscore(key: string, min: string | number, max: string | number, cb?: Callback<number>): boolean
  • Remove all members in a sorted set within the given indexes.

    Parameters

    • key: string
    • min: string | number
    • max: string | number
    • Optional cb: Callback<number>

    Returns boolean

zrevrange

  • zrevrange(key: string, start: number, stop: number, cb?: Callback<string[]>): boolean
  • zrevrange(key: string, start: number, stop: number, withscores: string, cb?: Callback<string[]>): boolean
  • Return a range of members in a sorted set, by index, with scores ordered from high to low.

    Parameters

    • key: string
    • start: number
    • stop: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • start: number
    • stop: number
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

zrevrangebylex

  • zrevrangebylex(key: string, min: string, max: string, cb?: Callback<string[]>): boolean
  • zrevrangebylex(key: string, min: string, max: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.

    Parameters

    • key: string
    • min: string
    • max: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: string
    • max: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

zrevrangebyscore

  • zrevrangebyscore(key: string, min: number | string, max: number | string, cb?: Callback<string[]>): boolean
  • zrevrangebyscore(key: string, min: number | string, max: number | string, withscores: string, cb?: Callback<string[]>): boolean
  • zrevrangebyscore(key: string, min: number | string, max: number | string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • zrevrangebyscore(key: string, min: number | string, max: number | string, withscores: string, limit: string, offset: number, count: number, cb?: Callback<string[]>): boolean
  • Return a range of members in a sorted set, by score, with scores ordered from high to low.

    Parameters

    • key: string
    • min: number | string
    • max: number | string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

  • Parameters

    • key: string
    • min: number | string
    • max: number | string
    • withscores: string
    • limit: string
    • offset: number
    • count: number
    • Optional cb: Callback<string[]>

    Returns boolean

zrevrank

  • zrevrank(key: string, member: string, cb?: Callback<number | undefined>): boolean
  • Determine the index of a member in a sorted set, with scores ordered from high to low.

    Parameters

    • key: string
    • member: string
    • Optional cb: Callback<number | undefined>

    Returns boolean

zscore

  • zscore(key: string, member: string, cb?: Callback<string>): boolean
  • Get the score associated with the given member in a sorted set.

    Parameters

    • key: string
    • member: string
    • Optional cb: Callback<string>

    Returns boolean

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number