NAME
Net::Async::Redis::Commands - mixin that defines the Redis commands available
DESCRIPTION
This is autogenerated from the list of commands available in https://redis.io/commands.
It is intended to be loaded by Net::Async::Redis to provide methods for each available Redis command.
METHODS - Cluster
cluster_addslots
Assign new hash slots to receiving node.
slot [slot ...]
cluster_count_failure_reports
Return the number of failure reports active for a given node.
node-id
cluster_countkeysinslot
Return the number of local keys in the specified hash slot.
slot
cluster_delslots
Set hash slots as unbound in receiving node.
slot [slot ...]
cluster_failover
Forces a slave to perform a manual failover of its master..
[FORCE|TAKEOVER]
cluster_forget
Remove a node from the nodes table.
node-id
cluster_getkeysinslot
Return local key names in the specified hash slot.
slot
count
cluster_info
Provides info about Redis Cluster node state.
cluster_keyslot
Returns the hash slot of the specified key.
key
cluster_meet
Force a node cluster to handshake with another node.
ip
port
cluster_nodes
Get Cluster config for the node.
cluster_replicate
Reconfigure a node as a slave of the specified master node.
node-id
cluster_reset
Reset a Redis Cluster node.
[HARD|SOFT]
cluster_saveconfig
Forces the node to save cluster state on disk.
cluster_set_config_epoch
Set the configuration epoch in a new node.
config-epoch
cluster_setslot
Bind a hash slot to a specific node.
slot
IMPORTING|MIGRATING|STABLE|NODE
[node-id]
cluster_slaves
List slave nodes of the specified master node.
node-id
cluster_slots
Get array of Cluster slot to node mappings.
readonly
Enables read queries for a connection to a cluster slave node.
readwrite
Disables read queries for a connection to a cluster slave node.
METHODS - Connection
auth
Authenticate to the server.
password
echo
Echo the given string.
message
ping
Ping the server.
[message]
quit
Close the connection.
select
Change the selected database for the current connection.
index
swapdb
Swaps two Redis databases.
index
index
METHODS - Generic
del
Delete a key.
key [key ...]
dump
Return a serialized version of the value stored at the specified key..
key
exists
Determine if a key exists.
key [key ...]
expire
Set a key's time to live in seconds.
key
seconds
expireat
Set the expiration for a key as a UNIX timestamp.
key
timestamp
keys
Find all keys matching the given pattern.
pattern
migrate
Atomically transfer a key from a Redis instance to another one..
host
port
key|""
destination-db
timeout
[COPY]
[REPLACE]
[KEYS key [key ...]]
move
Move a key to another database.
key
db
object
Inspect the internals of Redis objects.
subcommand
[arguments [arguments ...]]
persist
Remove the expiration from a key.
key
pexpire
Set a key's time to live in milliseconds.
key
milliseconds
pexpireat
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
key
milliseconds-timestamp
pttl
Get the time to live for a key in milliseconds.
key
randomkey
Return a random key from the keyspace.
rename
Rename a key.
key
newkey
renamenx
Rename a key, only if the new key does not exist.
key
newkey
restore
Create a key using the provided serialized value, previously obtained using DUMP..
key
ttl
serialized-value
[REPLACE]
sort
Sort the elements in a list, set or sorted set.
key
[BY pattern]
[LIMIT offset count]
[GET pattern [GET pattern ...]]
[ASC|DESC]
[ALPHA]
[STORE destination]
touch
Alters the last access time of a key(s). Returns the number of existing keys specified..
key [key ...]
ttl
Get the time to live for a key.
key
type
Determine the type stored at key.
key
unlink
Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking..
key [key ...]
wait
Wait for the synchronous replication of all the write commands sent in the context of the current connection.
numslaves
timeout
scan
Incrementally iterate the keys space.
cursor
[MATCH pattern]
[COUNT count]
METHODS - Geo
geoadd
Add one or more geospatial items in the geospatial index represented using a sorted set.
key
longitude latitude member [longitude latitude member ...]
geohash
Returns members of a geospatial index as standard geohash strings.
key
member [member ...]
geopos
Returns longitude and latitude of members of a geospatial index.
key
member [member ...]
geodist
Returns the distance between two members of a geospatial index.
key
member1
member2
[unit]
georadius
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point.
key
longitude
latitude
radius
m|km|ft|mi
[WITHCOORD]
[WITHDIST]
[WITHHASH]
[COUNT count]
[ASC|DESC]
[STORE key]
[STOREDIST key]
georadiusbymember
Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member.
key
member
radius
m|km|ft|mi
[WITHCOORD]
[WITHDIST]
[WITHHASH]
[COUNT count]
[ASC|DESC]
[STORE key]
[STOREDIST key]
METHODS - Hash
hdel
Delete one or more hash fields.
key
field [field ...]
hexists
Determine if a hash field exists.
key
field
hget
Get the value of a hash field.
key
field
hgetall
Get all the fields and values in a hash.
key
hincrby
Increment the integer value of a hash field by the given number.
key
field
increment
hincrbyfloat
Increment the float value of a hash field by the given amount.
key
field
increment
hkeys
Get all the fields in a hash.
key
hlen
Get the number of fields in a hash.
key
hmget
Get the values of all the given hash fields.
key
field [field ...]
hmset
Set multiple hash fields to multiple values.
key
field value [field value ...]
hset
Set the string value of a hash field.
key
field
value
hsetnx
Set the value of a hash field, only if the field does not exist.
key
field
value
hstrlen
Get the length of the value of a hash field.
key
field
hvals
Get all the values in a hash.
key
hscan
Incrementally iterate hash fields and associated values.
key
cursor
[MATCH pattern]
[COUNT count]
METHODS - Hyperloglog
pfadd
Adds the specified elements to the specified HyperLogLog..
key
element [element ...]
pfcount
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s)..
key [key ...]
pfmerge
Merge N different HyperLogLogs into a single one..
destkey
sourcekey [sourcekey ...]
METHODS - List
blpop
Remove and get the first element in a list, or block until one is available.
key [key ...]
timeout
brpop
Remove and get the last element in a list, or block until one is available.
key [key ...]
timeout
brpoplpush
Pop a value from a list, push it to another list and return it; or block until one is available.
source
destination
timeout
lindex
Get an element from a list by its index.
key
index
linsert
Insert an element before or after another element in a list.
key
BEFORE|AFTER
pivot
value
llen
Get the length of a list.
key
lpop
Remove and get the first element in a list.
key
lpush
Prepend one or multiple values to a list.
key
value [value ...]
lpushx
Prepend a value to a list, only if the list exists.
key
value
lrange
Get a range of elements from a list.
key
start
stop
lrem
Remove elements from a list.
key
count
value
lset
Set the value of an element in a list by its index.
key
index
value
ltrim
Trim a list to the specified range.
key
start
stop
rpop
Remove and get the last element in a list.
key
rpoplpush
Remove the last element in a list, prepend it to another list and return it.
source
destination
rpush
Append one or multiple values to a list.
key
value [value ...]
rpushx
Append a value to a list, only if the list exists.
key
value
METHODS - Pubsub
psubscribe
Listen for messages published to channels matching the given patterns.
pattern [pattern ...]
pubsub
Inspect the state of the Pub/Sub subsystem.
subcommand
[argument [argument ...]]
publish
Post a message to a channel.
channel
message
punsubscribe
Stop listening for messages posted to channels matching the given patterns.
[pattern [pattern ...]]
subscribe
Listen for messages published to the given channels.
channel [channel ...]
unsubscribe
Stop listening for messages posted to the given channels.
[channel [channel ...]]
METHODS - Scripting
eval
Execute a Lua script server side.
script
numkeys
key [key ...]
arg [arg ...]
evalsha
Execute a Lua script server side.
sha1
numkeys
key [key ...]
arg [arg ...]
script_debug
Set the debug mode for executed scripts..
YES|SYNC|NO
script_exists
Check existence of scripts in the script cache..
sha1 [sha1 ...]
script_flush
Remove all the scripts from the script cache..
script_kill
Kill the script currently in execution..
script_load
Load the specified Lua script into the script cache..
script
METHODS - Server
bgrewriteaof
Asynchronously rewrite the append-only file.
bgsave
Asynchronously save the dataset to disk.
client_kill
Kill the connection of a client.
[ip:port]
[ID client-id]
[TYPE normal|master|slave|pubsub]
[ADDR ip:port]
[SKIPME yes/no]
client_list
Get the list of client connections.
client_getname
Get the current connection name.
client_pause
Stop processing commands from clients for some time.
timeout
client_reply
Instruct the server whether to reply to commands.
ON|OFF|SKIP
client_setname
Set the current connection name.
connection-name
command
Get array of Redis command details.
command_count
Get total number of Redis commands.
command_getkeys
Extract keys given a full Redis command.
command_info
Get array of specific Redis command details.
command-name [command-name ...]
config_get
Get the value of a configuration parameter.
parameter
config_rewrite
Rewrite the configuration file with the in memory configuration.
config_set
Set a configuration parameter to the given value.
parameter
value
config_resetstat
Reset the stats returned by INFO.
dbsize
Return the number of keys in the selected database.
debug_object
Get debugging information about a key.
key
debug_segfault
Make the server crash.
flushall
Remove all keys from all databases.
[ASYNC]
flushdb
Remove all keys from the current database.
[ASYNC]
info
Get information and statistics about the server.
[section]
lastsave
Get the UNIX time stamp of the last successful save to disk.
monitor
Listen for all requests received by the server in real time.
role
Return the role of the instance in the context of replication.
save
Synchronously save the dataset to disk.
shutdown
Synchronously save the dataset to disk and then shut down the server.
[NOSAVE|SAVE]
slaveof
Make the server a slave of another instance, or promote it as master.
host
port
slowlog
Manages the Redis slow queries log.
subcommand
[argument]
sync
Internal command used for replication.
time
Return the current server time.
METHODS - Set
sadd
Add one or more members to a set.
key
member [member ...]
scard
Get the number of members in a set.
key
sdiff
Subtract multiple sets.
key [key ...]
sdiffstore
Subtract multiple sets and store the resulting set in a key.
destination
key [key ...]
sinter
Intersect multiple sets.
key [key ...]
sinterstore
Intersect multiple sets and store the resulting set in a key.
destination
key [key ...]
sismember
Determine if a given value is a member of a set.
key
member
smembers
Get all the members in a set.
key
smove
Move a member from one set to another.
source
destination
member
spop
Remove and return one or multiple random members from a set.
key
[count]
srandmember
Get one or multiple random members from a set.
key
[count]
srem
Remove one or more members from a set.
key
member [member ...]
sunion
Add multiple sets.
key [key ...]
sunionstore
Add multiple sets and store the resulting set in a key.
destination
key [key ...]
sscan
Incrementally iterate Set elements.
key
cursor
[MATCH pattern]
[COUNT count]
METHODS - Sorted_set
zadd
Add one or more members to a sorted set, or update its score if it already exists.
key
[NX|XX]
[CH]
[INCR]
score member [score member ...]
zcard
Get the number of members in a sorted set.
key
zcount
Count the members in a sorted set with scores within the given values.
key
min
max
zincrby
Increment the score of a member in a sorted set.
key
increment
member
zinterstore
Intersect multiple sorted sets and store the resulting sorted set in a new key.
destination
numkeys
key [key ...]
[WEIGHTS weight [weight ...]]
[AGGREGATE SUM|MIN|MAX]
zlexcount
Count the number of members in a sorted set between a given lexicographical range.
key
min
max
zrange
Return a range of members in a sorted set, by index.
key
start
stop
[WITHSCORES]
zrangebylex
Return a range of members in a sorted set, by lexicographical range.
key
min
max
[LIMIT offset count]
zrevrangebylex
Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings..
key
max
min
[LIMIT offset count]
zrangebyscore
Return a range of members in a sorted set, by score.
key
min
max
[WITHSCORES]
[LIMIT offset count]
zrank
Determine the index of a member in a sorted set.
key
member
zrem
Remove one or more members from a sorted set.
key
member [member ...]
zremrangebylex
Remove all members in a sorted set between the given lexicographical range.
key
min
max
zremrangebyrank
Remove all members in a sorted set within the given indexes.
key
start
stop
zremrangebyscore
Remove all members in a sorted set within the given scores.
key
min
max
zrevrange
Return a range of members in a sorted set, by index, with scores ordered from high to low.
key
start
stop
[WITHSCORES]
zrevrangebyscore
Return a range of members in a sorted set, by score, with scores ordered from high to low.
key
max
min
[WITHSCORES]
[LIMIT offset count]
zrevrank
Determine the index of a member in a sorted set, with scores ordered from high to low.
key
member
zscore
Get the score associated with the given member in a sorted set.
key
member
zunionstore
Add multiple sorted sets and store the resulting sorted set in a new key.
destination
numkeys
key [key ...]
[WEIGHTS weight [weight ...]]
[AGGREGATE SUM|MIN|MAX]
zscan
Incrementally iterate sorted sets elements and associated scores.
key
cursor
[MATCH pattern]
[COUNT count]
METHODS - String
append
Append a value to a key.
key
value
bitcount
Count set bits in a string.
key
[start end]
bitfield
Perform arbitrary bitfield integer operations on strings.
key
[GET type offset]
[SET type offset value]
[INCRBY type offset increment]
[OVERFLOW WRAP|SAT|FAIL]
bitop
Perform bitwise operations between strings.
operation
destkey
key [key ...]
bitpos
Find first bit set or clear in a string.
key
bit
[start]
[end]
decr
Decrement the integer value of a key by one.
key
decrby
Decrement the integer value of a key by the given number.
key
decrement
get
Get the value of a key.
key
getbit
Returns the bit value at offset in the string value stored at key.
key
offset
getrange
Get a substring of the string stored at a key.
key
start
end
getset
Set the string value of a key and return its old value.
key
value
incr
Increment the integer value of a key by one.
key
incrby
Increment the integer value of a key by the given amount.
key
increment
incrbyfloat
Increment the float value of a key by the given amount.
key
increment
mget
Get the values of all the given keys.
key [key ...]
mset
Set multiple keys to multiple values.
key value [key value ...]
msetnx
Set multiple keys to multiple values, only if none of the keys exist.
key value [key value ...]
psetex
Set the value and expiration in milliseconds of a key.
key
milliseconds
value
set
Set the string value of a key.
key
value
[EX seconds]
[PX milliseconds]
[NX|XX]
setbit
Sets or clears the bit at offset in the string value stored at key.
key
offset
value
setex
Set the value and expiration of a key.
key
seconds
value
setnx
Set the value of a key, only if the key does not exist.
key
value
setrange
Overwrite part of a string at key starting at the specified offset.
key
offset
value
strlen
Get the length of the value stored in a key.
key
METHODS - Transactions
discard
Discard all commands issued after MULTI.
exec
Execute all commands issued after MULTI.
multi
Mark the start of a transaction block.
unwatch
Forget about all watched keys.
watch
Watch the given keys to determine execution of the MULTI/EXEC block.
key [key ...]
AUTHOR
Tom Molesworth <TEAM@cpan.org>
LICENSE
Copyright Tom Molesworth 2015-2017. Licensed under the same terms as Perl itself.