Class: RedisClient

vertx-redis-js/redis_client~ RedisClient

new RedisClient()

Source:

Methods

append(key, value, handler) → {RedisClient}

Append a value to a key
Parameters:
Name Type Description
key string Key string
value string Value to append
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

auth(password, handler) → {RedisClient}

Authenticate to the server
Parameters:
Name Type Description
password string Password for authentication
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

bgrewriteaof(handler) → {RedisClient}

Asynchronously rewrite the append-only file
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

bgsave(handler) → {RedisClient}

Asynchronously save the dataset to disk
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

bitcount(key, handler) → {RedisClient}

Count set bits in a string
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

bitcountRange(key, start, end, handler) → {RedisClient}

Count set bits in a string
Parameters:
Name Type Description
key string Key string
start number Start index
end number End index
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

bitfield(key, bitFieldOptions, handler) → {RedisClient}

Perform arbitrary bitfield integer operations on strings.
Parameters:
Name Type Description
key string Key string
bitFieldOptions Object
handler function
Source:
Returns:
Type
RedisClient

bitfieldWithOverflow(key, commands, overflow, handler) → {RedisClient}

Perform arbitrary bitfield integer operations on strings.
Parameters:
Name Type Description
key string Key string
commands Object
overflow Object
handler function
Source:
Returns:
Type
RedisClient

bitop(operation, destkey, keys, handler) → {RedisClient}

Perform bitwise operations between strings
Parameters:
Name Type Description
operation Object Bitwise operation to perform
destkey string Destination key where result is stored
keys Array.<string> List of keys on which to perform the operation
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

bitpos(key, bit, handler) → {RedisClient}

Find first bit set or clear in a string
Parameters:
Name Type Description
key string Key string
bit number What bit value to look for - must be 1, or 0
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

bitposFrom(key, bit, start, handler) → {RedisClient}

Find first bit set or clear in a string See also bitposRange() method, which takes start, and stop offset.
Parameters:
Name Type Description
key string Key string
bit number What bit value to look for - must be 1, or 0
start number Start offset
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

bitposRange(key, bit, start, stop, handler) → {RedisClient}

Find first bit set or clear in a string Note: when both start, and stop offsets are specified, behaviour is slightly different than if only start is specified
Parameters:
Name Type Description
key string Key string
bit number What bit value to look for - must be 1, or 0
start number Start offset
stop number End offset - inclusive
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

blpop(key, seconds, handler) → {RedisClient}

Remove and get the first element in a list, or block until one is available
Parameters:
Name Type Description
key string Key string identifying a list to watch
seconds number Timeout in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

blpopMany(keys, seconds, handler) → {RedisClient}

Remove and get the first element in any of the lists, or block until one is available
Parameters:
Name Type Description
keys Array.<string> List of key strings identifying lists to watch
seconds number Timeout in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

brpop(key, seconds, handler) → {RedisClient}

Remove and get the last element in a list, or block until one is available
Parameters:
Name Type Description
key string Key string identifying a list to watch
seconds number Timeout in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

brpoplpush(key, destkey, seconds, handler) → {RedisClient}

Pop a value from a list, push it to another list and return it; or block until one is available
Parameters:
Name Type Description
key string Key string identifying the source list
destkey string Key string identifying the destination list
seconds number Timeout in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

brpopMany(keys, seconds, handler) → {RedisClient}

Remove and get the last element in any of the lists, or block until one is available
Parameters:
Name Type Description
keys Array.<string> List of key strings identifying lists to watch
seconds number Timeout in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clientGetname(handler) → {RedisClient}

Get the current connection name
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

clientKill(filter, handler) → {RedisClient}

Kill the connection of a client
Parameters:
Name Type Description
filter Object Filter options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clientList(handler) → {RedisClient}

Get the list of client connections
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

clientPause(millis, handler) → {RedisClient}

Stop processing commands from clients for some time
Parameters:
Name Type Description
millis number Pause time in milliseconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clientReply(options, handler) → {RedisClient}

Instruct the server whether to reply to commands.
Parameters:
Name Type Description
options Object
handler function
Source:
Returns:
Type
RedisClient

clientSetname(name, handler) → {RedisClient}

Set the current connection name
Parameters:
Name Type Description
name string New name for current connection
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

close(handler)

Close the client - when it is fully closed the handler will be called.
Parameters:
Name Type Description
handler function
Source:

clusterAddslots(slots, handler) → {RedisClient}

Assign new hash slots to receiving node.
Parameters:
Name Type Description
slots Array.<number>
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterCountFailureReports(nodeId, handler) → {RedisClient}

Return the number of failure reports active for a given node.
Parameters:
Name Type Description
nodeId string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterCountkeysinslot(slot, handler) → {RedisClient}

Return the number of local keys in the specified hash slot.
Parameters:
Name Type Description
slot number
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterDelslots(slot, handler) → {RedisClient}

Set hash slots as unbound in receiving node.
Parameters:
Name Type Description
slot number
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterDelslotsMany(slots, handler) → {RedisClient}

Set hash slots as unbound in receiving node.
Parameters:
Name Type Description
slots Array.<number>
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterFailover(handler) → {RedisClient}

Forces a slave to perform a manual failover of its master.
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterFailOverWithOptions(options, handler) → {RedisClient}

Forces a slave to perform a manual failover of its master.
Parameters:
Name Type Description
options Object
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterForget(nodeId, handler) → {RedisClient}

Remove a node from the nodes table.
Parameters:
Name Type Description
nodeId string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterGetkeysinslot(slot, count, handler) → {RedisClient}

Return local key names in the specified hash slot.
Parameters:
Name Type Description
slot number
count number
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterInfo(handler) → {RedisClient}

Provides info about Redis Cluster node state.
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterKeyslot(key, handler) → {RedisClient}

Returns the hash slot of the specified key.
Parameters:
Name Type Description
key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterMeet(ip, port, handler) → {RedisClient}

Force a node cluster to handshake with another node.
Parameters:
Name Type Description
ip string
port number
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterNodes(handler) → {RedisClient}

Get Cluster config for the node.
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterReplicate(nodeId, handler) → {RedisClient}

Reconfigure a node as a slave of the specified master node.
Parameters:
Name Type Description
nodeId string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterReset(handler) → {RedisClient}

Reset a Redis Cluster node.
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterResetWithOptions(options, handler) → {RedisClient}

Reset a Redis Cluster node.
Parameters:
Name Type Description
options Object
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterSaveconfig(handler) → {RedisClient}

Forces the node to save cluster state on disk.
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterSetConfigEpoch(epoch, handler) → {RedisClient}

Set the configuration epoch in a new node.
Parameters:
Name Type Description
epoch number
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterSetslot(slot, subcommand, handler) → {RedisClient}

Bind an hash slot to a specific node.
Parameters:
Name Type Description
slot number
subcommand Object
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterSetslotWithNode(slot, subcommand, nodeId, handler) → {RedisClient}

Bind an hash slot to a specific node.
Parameters:
Name Type Description
slot number
subcommand Object
nodeId string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterSlaves(nodeId, handler) → {RedisClient}

List slave nodes of the specified master node.
Parameters:
Name Type Description
nodeId string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

clusterSlots(handler) → {RedisClient}

Get array of Cluster slot to node mappings
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

command(handler) → {RedisClient}

Get array of Redis command details
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

commandCount(handler) → {RedisClient}

Get total number of Redis commands
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

commandGetkeys(handler) → {RedisClient}

Extract keys given a full Redis command
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

commandInfo(commands, handler) → {RedisClient}

Get array of specific Redis command details
Parameters:
Name Type Description
commands Array.<string> List of commands to get info for
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

configGet(parameter, handler) → {RedisClient}

Get the value of a configuration parameter
Parameters:
Name Type Description
parameter string Configuration parameter
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

configResetstat(handler) → {RedisClient}

Reset the stats returned by INFO
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

configRewrite(handler) → {RedisClient}

Rewrite the configuration file with the in memory configuration
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

configSet(parameter, value, handler) → {RedisClient}

Set a configuration parameter to the given value
Parameters:
Name Type Description
parameter string Configuration parameter
value string New value
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

dbsize(handler) → {RedisClient}

Return the number of keys in the selected database
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

debugObject(key, handler) → {RedisClient}

Get debugging information about a key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

debugSegfault(handler) → {RedisClient}

Make the server crash
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

decr(key, handler) → {RedisClient}

Decrement the integer value of a key by one
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

decrby(key, decrement, handler) → {RedisClient}

Decrement the integer value of a key by the given number
Parameters:
Name Type Description
key string Key string
decrement number Value by which to decrement
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

del(key, handler) → {RedisClient}

Delete a key
Parameters:
Name Type Description
key string Keys to delete
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

delMany(keys, handler) → {RedisClient}

Delete many keys
Parameters:
Name Type Description
keys Array.<string> List of keys to delete
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

dump(key, handler) → {RedisClient}

Return a serialized version of the value stored at the specified key.
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

echo(message, handler) → {RedisClient}

Echo the given string
Parameters:
Name Type Description
message string String to echo
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

eval(script, keys, args, handler) → {RedisClient}

Execute a Lua script server side. Due to the dynamic nature of this command any response type could be returned for This reason and to ensure type safety the reply is always guaranteed to be a JsonArray. When a reply if for example a String the handler will be called with a JsonArray with a single element containing the String.
Parameters:
Name Type Description
script string Lua script to evaluate
keys Array.<string> List of keys
args Array.<string> List of argument values
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

evalsha(sha1, keys, values, handler) → {RedisClient}

Execute a Lua script server side. Due to the dynamic nature of this command any response type could be returned for This reason and to ensure type safety the reply is always guaranteed to be a JsonArray. When a reply if for example a String the handler will be called with a JsonArray with a single element containing the String.
Parameters:
Name Type Description
sha1 string SHA1 digest of the script cached on the server
keys Array.<string> List of keys
values Array.<string> List of values
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

exists(key, handler) → {RedisClient}

Determine if a key exists
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

expire(key, seconds, handler) → {RedisClient}

Set a key's time to live in seconds
Parameters:
Name Type Description
key string Key string
seconds number Time to live in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

expireat(key, seconds, handler) → {RedisClient}

Set the expiration for a key as a UNIX timestamp
Parameters:
Name Type Description
key string Key string
seconds number Expiry time as Unix timestamp in seconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

flushall(handler) → {RedisClient}

Remove all keys from all databases
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

flushdb(handler) → {RedisClient}

Remove all keys from the current database
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

geoadd(key, longitude, latitude, member, handler) → {RedisClient}

Add one or more geospatial items in the geospatial index represented using a sorted set.
Parameters:
Name Type Description
key string Key string
longitude number longitude
latitude number latitude
member string member
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geoaddMany(key, members, handler) → {RedisClient}

Add one or more geospatial items in the geospatial index represented using a sorted set.
Parameters:
Name Type Description
key string Key string
members Array.<Object> list of <lon, lat, member>
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geodist(key, member1, member2, handler) → {RedisClient}

Return the distance between two members in the geospatial index represented by the sorted set.
Parameters:
Name Type Description
key string Key string
member1 string member 1
member2 string member 2
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geodistWithUnit(key, member1, member2, unit, handler) → {RedisClient}

Return the distance between two members in the geospatial index represented by the sorted set.
Parameters:
Name Type Description
key string Key string
member1 string member 1
member2 string member 2
unit Object geo unit
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geohash(key, member, handler) → {RedisClient}

Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD).
Parameters:
Name Type Description
key string Key string
member string member
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geohashMany(key, members, handler) → {RedisClient}

Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD).
Parameters:
Name Type Description
key string Key string
members Array.<string> list of members
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geopos(key, member, handler) → {RedisClient}

Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
Parameters:
Name Type Description
key string Key string
member string member
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

geoposMany(key, members, handler) → {RedisClient}

Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
Parameters:
Name Type Description
key string Key string
members Array.<string> list of members
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

georadius(key, longitude, latitude, radius, unit, handler) → {RedisClient}

Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).
Parameters:
Name Type Description
key string Key string
longitude number longitude
latitude number latitude
radius number radius
unit Object geo unit
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

georadiusbymember(key, member, radius, unit, handler) → {RedisClient}

This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.
Parameters:
Name Type Description
key string Key string
member string member
radius number radius
unit Object geo unit
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

georadiusbymemberWithOptions(key, member, radius, unit, options, handler) → {RedisClient}

This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.
Parameters:
Name Type Description
key string Key string
member string member
radius number radius
unit Object geo unit
options Object geo radius options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

georadiusWithOptions(key, longitude, latitude, radius, unit, options, handler) → {RedisClient}

Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).
Parameters:
Name Type Description
key string Key string
longitude number longitude
latitude number latitude
radius number radius
unit Object geo unit
options Object geo radius options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

get(key, handler) → {RedisClient}

Get the value of a key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

getBinary(key, handler) → {RedisClient}

Get the value of a key - without decoding as utf-8
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

getbit(key, offset, handler) → {RedisClient}

Returns the bit value at offset in the string value stored at key
Parameters:
Name Type Description
key string Key string
offset number Offset in bits
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

getrange(key, start, end, handler) → {RedisClient}

Get a substring of the string stored at a key
Parameters:
Name Type Description
key string Key string
start number Start offset
end number End offset - inclusive
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

getset(key, value, handler) → {RedisClient}

Set the string value of a key and return its old value
Parameters:
Name Type Description
key string Key of which value to set
value string New value for the key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hdel(key, field, handler) → {RedisClient}

Delete one or more hash fields
Parameters:
Name Type Description
key string Key string
field string Field name
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hdelMany(key, fields, handler) → {RedisClient}

Delete one or more hash fields
Parameters:
Name Type Description
key string Key string
fields Array.<string> Field names
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hexists(key, field, handler) → {RedisClient}

Determine if a hash field exists
Parameters:
Name Type Description
key string Key string
field string Field name
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hget(key, field, handler) → {RedisClient}

Get the value of a hash field
Parameters:
Name Type Description
key string Key string
field string Field name
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hgetall(key, handler) → {RedisClient}

Get all the fields and values in a hash
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hincrby(key, field, increment, handler) → {RedisClient}

Increment the integer value of a hash field by the given number
Parameters:
Name Type Description
key string Key string
field string Field name
increment number Value by which to increment
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hincrbyfloat(key, field, increment, handler) → {RedisClient}

Increment the float value of a hash field by the given amount
Parameters:
Name Type Description
key string Key string
field string Field name
increment number Value by which to increment
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hkeys(key, handler) → {RedisClient}

Get all the fields in a hash
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hlen(key, handler) → {RedisClient}

Get the number of fields in a hash
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hmget(key, fields, handler) → {RedisClient}

Get the values of all the given hash fields
Parameters:
Name Type Description
key string Key string
fields Array.<string> Field names
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hmset(key, values, handler) → {RedisClient}

Set multiple hash fields to multiple values
Parameters:
Name Type Description
key string Key string
values Object Map of field:value pairs
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hscan(key, cursor, options, handler) → {RedisClient}

Incrementally iterate hash fields and associated values
Parameters:
Name Type Description
key string Key string
cursor string Cursor id
options Object Scan options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hset(key, field, value, handler) → {RedisClient}

Set the string value of a hash field
Parameters:
Name Type Description
key string Key string
field string Field name
value string New value
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hsetnx(key, field, value, handler) → {RedisClient}

Set the value of a hash field, only if the field does not exist
Parameters:
Name Type Description
key string Key string
field string Field name
value string New value
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

hstrlen(key, field, handler) → {RedisClient}

Get the length of the value of a hash field.
Parameters:
Name Type Description
key string Key String
field string field
handler function
Source:
Returns:
Type
RedisClient

hvals(key, handler) → {RedisClient}

Get all the values in a hash
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

incr(key, handler) → {RedisClient}

Increment the integer value of a key by one
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

incrby(key, increment, handler) → {RedisClient}

Increment the integer value of a key by the given amount
Parameters:
Name Type Description
key string Key string
increment number Value by which to increment
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

incrbyfloat(key, increment, handler) → {RedisClient}

Increment the float value of a key by the given amount
Parameters:
Name Type Description
key string Key string
increment number Value by which to increment
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

info(handler) → {RedisClient}

Get information and statistics about the server
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

infoSection(section, handler) → {RedisClient}

Get information and statistics about the server
Parameters:
Name Type Description
section string Specific section of information to return
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

keys(pattern, handler) → {RedisClient}

Find all keys matching the given pattern
Parameters:
Name Type Description
pattern string Pattern to limit the keys returned
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lastsave(handler) → {RedisClient}

Get the UNIX time stamp of the last successful save to disk
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

lindex(key, index, handler) → {RedisClient}

Get an element from a list by its index
Parameters:
Name Type Description
key string Key string
index number Index of list element to get
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

linsert(key, option, pivot, value, handler) → {RedisClient}

Insert an element before or after another element in a list
Parameters:
Name Type Description
key string Key string
option Object BEFORE or AFTER
pivot string Key to use as a pivot
value string Value to be inserted before or after the pivot
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

llen(key, handler) → {RedisClient}

Get the length of a list
Parameters:
Name Type Description
key string String key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lpop(key, handler) → {RedisClient}

Remove and get the first element in a list
Parameters:
Name Type Description
key string String key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lpush(key, value, handler) → {RedisClient}

Prepend one value to a list
Parameters:
Name Type Description
key string Key string
value string Value to be added at the beginning of the list
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lpushMany(key, values, handler) → {RedisClient}

Prepend one or multiple values to a list
Parameters:
Name Type Description
key string Key string
values Array.<string> Values to be added at the beginning of the list, one by one
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lpushx(key, value, handler) → {RedisClient}

Prepend a value to a list, only if the list exists
Parameters:
Name Type Description
key string Key string
value string Value to add at the beginning of the list
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lrange(key, from, to, handler) → {RedisClient}

Get a range of elements from a list
Parameters:
Name Type Description
key string Key string
from number Start index
to number Stop index
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lrem(key, count, value, handler) → {RedisClient}

Remove elements from a list
Parameters:
Name Type Description
key string Key string
count number Number of first found occurrences equal to $value to remove from the list
value string Value to be removed
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

lset(key, index, value, handler) → {RedisClient}

Set the value of an element in a list by its index
Parameters:
Name Type Description
key string Key string
index number Position within list
value string New value
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

ltrim(key, from, to, handler) → {RedisClient}

Trim a list to the specified range
Parameters:
Name Type Description
key string Key string
from number Start index
to number Stop index
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

mget(key, handler) → {RedisClient}

Get the value of the given key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

mgetMany(keys, handler) → {RedisClient}

Get the values of all the given keys
Parameters:
Name Type Description
keys Array.<string> List of keys to get
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

migrate(host, port, key, destdb, timeout, options, handler) → {RedisClient}

Atomically transfer a key from a Redis instance to another one.
Parameters:
Name Type Description
host string Destination host
port number Destination port
key string Key to migrate
destdb number Destination database index
timeout number
options Object Migrate options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

monitor(handler) → {RedisClient}

Listen for all requests received by the server in real time
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

move(key, destdb, handler) → {RedisClient}

Move a key to another database
Parameters:
Name Type Description
key string Key to migrate
destdb number Destination database index
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

mset(keyvals, handler) → {RedisClient}

Set multiple keys to multiple values
Parameters:
Name Type Description
keyvals Object Key value pairs to set
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

msetnx(keyvals, handler) → {RedisClient}

Set multiple keys to multiple values, only if none of the keys exist
Parameters:
Name Type Description
keyvals Object Key value pairs to set
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

object(key, cmd, handler) → {RedisClient}

Inspect the internals of Redis objects
Parameters:
Name Type Description
key string Key string
cmd Object Object sub command
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

persist(key, handler) → {RedisClient}

Remove the expiration from a key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pexpire(key, millis, handler) → {RedisClient}

Set a key's time to live in milliseconds
Parameters:
Name Type Description
key string String key
millis number Time to live in milliseconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pexpireat(key, millis, handler) → {RedisClient}

Set the expiration for a key as a UNIX timestamp specified in milliseconds
Parameters:
Name Type Description
key string Key string
millis number Expiry time as Unix timestamp in milliseconds
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pfadd(key, element, handler) → {RedisClient}

Adds the specified element to the specified HyperLogLog.
Parameters:
Name Type Description
key string Key string
element string Element to add
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pfaddMany(key, elements, handler) → {RedisClient}

Adds the specified elements to the specified HyperLogLog.
Parameters:
Name Type Description
key string Key string
elements Array.<string> Elementa to add
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pfcount(key, handler) → {RedisClient}

Return the approximated cardinality of the set observed by the HyperLogLog at key.
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pfcountMany(keys, handler) → {RedisClient}

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
Parameters:
Name Type Description
keys Array.<string> List of keys
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pfmerge(destkey, keys, handler) → {RedisClient}

Merge N different HyperLogLogs into a single one.
Parameters:
Name Type Description
destkey string Destination key
keys Array.<string> List of source keys
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

ping(handler) → {RedisClient}

Ping the server
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

psetex(key, millis, value, handler) → {RedisClient}

Set the value and expiration in milliseconds of a key
Parameters:
Name Type Description
key string Key string
millis number Number of milliseconds until the key expires
value string New value for key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

psubscribe(pattern, handler) → {RedisClient}

Listen for messages published to channels matching the given pattern
Parameters:
Name Type Description
pattern string Pattern string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

psubscribeMany(patterns, handler) → {RedisClient}

Listen for messages published to channels matching the given patterns
Parameters:
Name Type Description
patterns Array.<string> List of patterns
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pttl(key, handler) → {RedisClient}

Get the time to live for a key in milliseconds
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

publish(channel, message, handler) → {RedisClient}

Post a message to a channel
Parameters:
Name Type Description
channel string Channel key
message string Message to send to channel
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pubsubChannels(pattern, handler) → {RedisClient}

Lists the currently active channels - only those matching the pattern
Parameters:
Name Type Description
pattern string A glob-style pattern - an empty string means no pattern
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pubsubNumpat(handler) → {RedisClient}

Returns the number of subscriptions to patterns (that are performed using the PSUBSCRIBE command)
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

pubsubNumsub(channels, handler) → {RedisClient}

Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels
Parameters:
Name Type Description
channels Array.<string> List of channels
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

punsubscribe(patterns, handler) → {RedisClient}

Stop listening for messages posted to channels matching the given patterns
Parameters:
Name Type Description
patterns Array.<string> List of patterns to match against
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

randomkey(handler) → {RedisClient}

Return a random key from the keyspace
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

rename(key, newkey, handler) → {RedisClient}

Rename a key
Parameters:
Name Type Description
key string Key string to be renamed
newkey string New key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

renamenx(key, newkey, handler) → {RedisClient}

Rename a key, only if the new key does not exist
Parameters:
Name Type Description
key string Key string to be renamed
newkey string New key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

restore(key, millis, serialized, handler) → {RedisClient}

Create a key using the provided serialized value, previously obtained using DUMP.
Parameters:
Name Type Description
key string Key string
millis number Expiry time in milliseconds to set on the key
serialized string Serialized form of the key value as obtained using DUMP
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

role(handler) → {RedisClient}

Return the role of the instance in the context of replication
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

rpop(key, handler) → {RedisClient}

Remove and get the last element in a list
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

rpoplpush(key, destkey, handler) → {RedisClient}

Remove the last element in a list, append it to another list and return it
Parameters:
Name Type Description
key string Key string identifying source list
destkey string Key string identifying destination list
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

rpush(key, value, handler) → {RedisClient}

Append one or multiple values to a list
Parameters:
Name Type Description
key string Key string
value string Value to be added to the end of the list
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

rpushMany(key, values, handler) → {RedisClient}

Append one or multiple values to a list
Parameters:
Name Type Description
key string Key string
values Array.<string> List of values to add to the end of the list
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

rpushx(key, value, handler) → {RedisClient}

Append a value to a list, only if the list exists
Parameters:
Name Type Description
key string Key string
value string Value to be added to the end of the list
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sadd(key, member, handler) → {RedisClient}

Add a member to a set
Parameters:
Name Type Description
key string Key string
member string Value to be added to the set
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

saddMany(key, members, handler) → {RedisClient}

Add one or more members to a set
Parameters:
Name Type Description
key string Key string
members Array.<string> Values to be added to the set
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

save(handler) → {RedisClient}

Synchronously save the dataset to disk
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

scan(cursor, options, handler) → {RedisClient}

Incrementally iterate the keys space
Parameters:
Name Type Description
cursor string Cursor id
options Object Scan options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

scard(key, handler) → {RedisClient}

Get the number of members in a set
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

scriptDebug(scriptDebugOptions, handler) → {RedisClient}

Set the debug mode for executed scripts.
Parameters:
Name Type Description
scriptDebugOptions Object the option
handler function
Source:
Returns:
Type
RedisClient

scriptExists(script, handler) → {RedisClient}

Check existence of script in the script cache.
Parameters:
Name Type Description
script string SHA1 digest identifying a script in the script cache
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

scriptExistsMany(scripts, handler) → {RedisClient}

Check existence of scripts in the script cache.
Parameters:
Name Type Description
scripts Array.<string> List of SHA1 digests identifying scripts in the script cache
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

scriptFlush(handler) → {RedisClient}

Remove all the scripts from the script cache.
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

scriptKill(handler) → {RedisClient}

Kill the script currently in execution.
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

scriptLoad(script, handler) → {RedisClient}

Load the specified Lua script into the script cache.
Parameters:
Name Type Description
script string Lua script
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sdiff(key, cmpkeys, handler) → {RedisClient}

Subtract multiple sets
Parameters:
Name Type Description
key string Key identifying the set to compare with all other sets combined
cmpkeys Array.<string> List of keys identifying sets to subtract from the key set
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sdiffstore(destkey, key, cmpkeys, handler) → {RedisClient}

Subtract multiple sets and store the resulting set in a key
Parameters:
Name Type Description
destkey string Destination key where the result should be stored
key string Key identifying the set to compare with all other sets combined
cmpkeys Array.<string> List of keys identifying sets to subtract from the key set
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

select(dbindex, handler) → {RedisClient}

Change the selected database for the current connection
Parameters:
Name Type Description
dbindex number Index identifying the new active database
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

set(key, value, handler) → {RedisClient}

Set the string value of a key
Parameters:
Name Type Description
key string Key of which value to set
value string New value for the key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setBinary(key, value, handler) → {RedisClient}

Set the binary string value of a key - without encoding as utf-8
Parameters:
Name Type Description
key string Key of which value to set
value Buffer New value for the key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setBinaryWithOptions(key, value, options, handler) → {RedisClient}

Set the string value of a key
Parameters:
Name Type Description
key string Key of which value to set
value Buffer New value for the key
options Object Set options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setbit(key, offset, bit, handler) → {RedisClient}

Sets or clears the bit at offset in the string value stored at key
Parameters:
Name Type Description
key string Key string
offset number Bit offset
bit number New value - must be 1 or 0
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setex(key, seconds, value, handler) → {RedisClient}

Set the value and expiration of a key
Parameters:
Name Type Description
key string Key string
seconds number Number of seconds until the key expires
value string New value for key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setnx(key, value, handler) → {RedisClient}

Set the value of a key, only if the key does not exist
Parameters:
Name Type Description
key string Key of which value to set
value string New value for the key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setrange(key, offset, value, handler) → {RedisClient}

Overwrite part of a string at key starting at the specified offset
Parameters:
Name Type Description
key string Key string
offset number Offset - the maximum offset that you can set is 2^29 -1 (536870911), as Redis Strings are limited to 512 megabytes
value string Value to overwrite with
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

setWithOptions(key, value, options, handler) → {RedisClient}

Set the string value of a key
Parameters:
Name Type Description
key string Key of which value to set
value string New value for the key
options Object Set options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sinter(keys, handler) → {RedisClient}

Intersect multiple sets
Parameters:
Name Type Description
keys Array.<string> List of keys to perform intersection on
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sinterstore(destkey, keys, handler) → {RedisClient}

Intersect multiple sets and store the resulting set in a key
Parameters:
Name Type Description
destkey string Key where to store the results
keys Array.<string> List of keys to perform intersection on
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sismember(key, member, handler) → {RedisClient}

Determine if a given value is a member of a set
Parameters:
Name Type Description
key string Key string
member string Member to look for
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

slaveof(host, port, handler) → {RedisClient}

Make the server a slave of another instance
Parameters:
Name Type Description
host string Host to become this server's master
port number Port of our new master
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

slaveofNoone(handler) → {RedisClient}

Make this server a master
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

slowlogGet(limit, handler) → {RedisClient}

Read the Redis slow queries log
Parameters:
Name Type Description
limit number Number of log entries to return. If value is less than zero all entries are returned
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

slowlogLen(handler) → {RedisClient}

Get the length of the Redis slow queries log
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

slowlogReset(handler) → {RedisClient}

Reset the Redis slow queries log
Parameters:
Name Type Description
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

smembers(key, handler) → {RedisClient}

Get all the members in a set
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

smove(key, destkey, member, handler) → {RedisClient}

Move a member from one set to another
Parameters:
Name Type Description
key string Key of source set currently containing the member
destkey string Key identifying the destination set
member string Member to move
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sort(key, options, handler) → {RedisClient}

Sort the elements in a list, set or sorted set
Parameters:
Name Type Description
key string Key string
options Object Sort options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

spop(key, handler) → {RedisClient}

Remove and return a random member from a set
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

spopMany(key, count, handler) → {RedisClient}

Remove and return random members from a set
Parameters:
Name Type Description
key string Key string
count number Number of members to remove
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

srandmember(key, handler) → {RedisClient}

Get one or multiple random members from a set
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

srandmemberCount(key, count, handler) → {RedisClient}

Get one or multiple random members from a set
Parameters:
Name Type Description
key string Key string
count number Number of members to get
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

srem(key, member, handler) → {RedisClient}

Remove one member from a set
Parameters:
Name Type Description
key string Key string
member string Member to remove
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sremMany(key, members, handler) → {RedisClient}

Remove one or more members from a set
Parameters:
Name Type Description
key string Key string
members Array.<string> Members to remove
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sscan(key, cursor, options, handler) → {RedisClient}

Incrementally iterate Set elements
Parameters:
Name Type Description
key string Key string
cursor string Cursor id
options Object Scan options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

strlen(key, handler) → {RedisClient}

Get the length of the value stored in a key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

subscribe(channel, handler) → {RedisClient}

Listen for messages published to the given channels
Parameters:
Name Type Description
channel string Channel to subscribe to
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

subscribeMany(channels, handler) → {RedisClient}

Listen for messages published to the given channels
Parameters:
Name Type Description
channels Array.<string> List of channels to subscribe to
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sunion(keys, handler) → {RedisClient}

Add multiple sets
Parameters:
Name Type Description
keys Array.<string> List of keys identifying sets to add up
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sunionstore(destkey, keys, handler) → {RedisClient}

Add multiple sets and store the resulting set in a key
Parameters:
Name Type Description
destkey string Destination key
keys Array.<string> List of keys identifying sets to add up
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

sync(handler) → {RedisClient}

Internal command used for replication
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

time(handler) → {RedisClient}

Return the current server time
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
RedisClient

touch(key, handler) → {RedisClient}

Alters the last access time of a key(s). Returns the number of existing keys specified.
Parameters:
Name Type Description
key string Key String
handler function
Source:
Returns:
Type
RedisClient

touchMany(keys, handler) → {RedisClient}

Alters the last access time of a key(s). Returns the number of existing keys specified.
Parameters:
Name Type Description
keys Array.<string> list of keys
handler function
Source:
Returns:
Type
RedisClient

transaction() → {RedisTransaction}

Return a RedisTransaction instance
Source:
Returns:
transaction instance
Type
RedisTransaction

ttl(key, handler) → {RedisClient}

Get the time to live for a key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

type(key, handler) → {RedisClient}

Determine the type stored at key
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

unsubscribe(channels, handler) → {RedisClient}

Stop listening for messages posted to the given channels
Parameters:
Name Type Description
channels Array.<string> List of channels to subscribe to
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

wait(numSlaves, timeout, handler) → {RedisClient}

Wait for the synchronous replication of all the write commands sent in the context of the current connection.
Parameters:
Name Type Description
numSlaves number
timeout number
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zadd(key, score, member, handler) → {RedisClient}

Add one or more members to a sorted set, or update its score if it already exists
Parameters:
Name Type Description
key string Key string
score number Score used for sorting
member string New member key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zaddMany(key, members, handler) → {RedisClient}

Add one or more members to a sorted set, or update its score if it already exists
Parameters:
Name Type Description
key string Key string
members Array.<string> New member keys and their scores
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zcard(key, handler) → {RedisClient}

Get the number of members in a sorted set
Parameters:
Name Type Description
key string Key string
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zcount(key, min, max, handler) → {RedisClient}

Count the members in a sorted set with scores within the given values
Parameters:
Name Type Description
key string Key string
min number Minimum score
max number Maximum score
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zincrby(key, increment, member, handler) → {RedisClient}

Increment the score of a member in a sorted set
Parameters:
Name Type Description
key string Key string
increment number Increment amount
member string Member key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zinterstore(destkey, sets, options, handler) → {RedisClient}

Intersect multiple sorted sets and store the resulting sorted set in a new key
Parameters:
Name Type Description
destkey string Destination key
sets Array.<string> List of keys identifying sorted sets to intersect
options Object Aggregation options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zinterstoreWeighed(destkey, sets, options, handler) → {RedisClient}

Intersect multiple sorted sets and store the resulting sorted set in a new key using weights for scoring
Parameters:
Name Type Description
destkey string Destination key
sets Array.<string> List of keys identifying sorted sets to intersect
options Object Aggregation options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zlexcount(key, min, max, handler) → {RedisClient}

Count the number of members in a sorted set between a given lexicographical range
Parameters:
Name Type Description
key string Key string
min string Pattern to compare against for minimum value
max string Pattern to compare against for maximum value
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrange(key, start, stop, handler) → {RedisClient}

Return a range of members in a sorted set, by index
Parameters:
Name Type Description
key string Key string
start number Start index for the range
stop number Stop index for the range - inclusive
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrangebylex(key, min, max, options, handler) → {RedisClient}

Return a range of members in a sorted set, by lexicographical range
Parameters:
Name Type Description
key string Key string
min string Pattern representing a minimum allowed value
max string Pattern representing a maximum allowed value
options Object Limit options where limit can be specified
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrangebyscore(key, min, max, options, handler) → {RedisClient}

Return a range of members in a sorted set, by score
Parameters:
Name Type Description
key string Key string
min string Pattern defining a minimum value
max string Pattern defining a maximum value
options Object Range and limit options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrangeWithOptions(key, start, stop, options, handler) → {RedisClient}

Return a range of members in a sorted set, by index
Parameters:
Name Type Description
key string Key string
start number Start index for the range
stop number Stop index for the range - inclusive
options Object Range options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrank(key, member, handler) → {RedisClient}

Determine the index of a member in a sorted set
Parameters:
Name Type Description
key string Key string
member string Member in the sorted set identified by key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrem(key, member, handler) → {RedisClient}

Remove one member from a sorted set
Parameters:
Name Type Description
key string Key string
member string Member in the sorted set identified by key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zremMany(key, members, handler) → {RedisClient}

Remove one or more members from a sorted set
Parameters:
Name Type Description
key string Key string
members Array.<string> Members in the sorted set identified by key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zremrangebylex(key, min, max, handler) → {RedisClient}

Remove all members in a sorted set between the given lexicographical range
Parameters:
Name Type Description
key string Key string
min string Pattern defining a minimum value
max string Pattern defining a maximum value
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zremrangebyrank(key, start, stop, handler) → {RedisClient}

Remove all members in a sorted set within the given indexes
Parameters:
Name Type Description
key string Key string
start number Start index
stop number Stop index
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zremrangebyscore(key, min, max, handler) → {RedisClient}

Remove all members in a sorted set within the given scores
Parameters:
Name Type Description
key string Key string
min string Pattern defining a minimum value
max string Pattern defining a maximum value
handler function
Source:
Returns:
Type
RedisClient

zrevrange(key, start, stop, options, handler) → {RedisClient}

Return a range of members in a sorted set, by index, with scores ordered from high to low
Parameters:
Name Type Description
key string Key string
start number Start index for the range
stop number Stop index for the range - inclusive
options Object Range options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrevrangebylex(key, max, min, options, handler) → {RedisClient}

Return a range of members in a sorted set, by score, between the given lexicographical range with scores ordered from high to low
Parameters:
Name Type Description
key string Key string
max string Pattern defining a maximum value
min string Pattern defining a minimum value
options Object Limit options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrevrangebyscore(key, max, min, options, handler) → {RedisClient}

Return a range of members in a sorted set, by score, with scores ordered from high to low
Parameters:
Name Type Description
key string Key string
max string Pattern defining a maximum value
min string Pattern defining a minimum value
options Object Range and limit options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zrevrank(key, member, handler) → {RedisClient}

Determine the index of a member in a sorted set, with scores ordered from high to low
Parameters:
Name Type Description
key string Key string
member string Member in the sorted set identified by key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zscan(key, cursor, options, handler) → {RedisClient}

Incrementally iterate sorted sets elements and associated scores
Parameters:
Name Type Description
key string Key string
cursor string Cursor id
options Object Scan options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zscore(key, member, handler) → {RedisClient}

Get the score associated with the given member in a sorted set
Parameters:
Name Type Description
key string Key string
member string Member in the sorted set identified by key
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zunionstore(destkey, sets, options, handler) → {RedisClient}

Add multiple sorted sets and store the resulting sorted set in a new key
Parameters:
Name Type Description
destkey string Destination key
sets Array.<string> List of keys identifying sorted sets
options Object Aggregation options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient

zunionstoreWeighed(key, sets, options, handler) → {RedisClient}

Add multiple sorted sets using weights, and store the resulting sorted set in a new key
Parameters:
Name Type Description
key string Destination key
sets Array.<string> Map containing set-key:weight pairs
options Object Aggregation options
handler function Handler for the result of this call.
Source:
Returns:
Type
RedisClient