This is the cl-redis Reference Manual, version 2.3.8, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:19:23 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-redis
A fast and robust Common Lisp client for Redis
Vsevolod Dyomkin <vseloved@gmail.com>
Vsevolod Dyomkin <vseloved@gmail.com>
MIT
2.3.8
rutils
(system).
cl-ppcre
(system).
usocket
(system).
flexi-streams
(system).
babel
(system).
package.lisp
(file).
float.lisp
(file).
connection.lisp
(file).
redis.lisp
(file).
commands.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-redis/cl-redis.asd
cl-redis/package.lisp
cl-redis/float.lisp
cl-redis/connection.lisp
cl-redis/redis.lisp
cl-redis/commands.lisp
cl-redis/float.lisp
package.lisp
(file).
cl-redis
(system).
parse-float
(function).
radix-values
(function).
cl-redis/connection.lisp
float.lisp
(file).
cl-redis
(system).
*connection*
(special variable).
*echo-p*
(special variable).
*echo-stream*
(special variable).
close-connection
(function).
connect
(function).
connected-p
(function).
disconnect
(function).
initialize-instance
(method).
open-connection
(function).
reconnect
(function).
redis-connection
(class).
with-connection
(macro).
with-persistent-connection
(macro).
with-recursive-connection
(macro).
+utf8+
(special variable).
conn-auth
(reader method).
conn-host
(reader method).
conn-port
(reader method).
conn-socket
(reader method).
(setf conn-socket)
(writer method).
conn-stream
(method).
conn-stream
(reader method).
(setf conn-stream)
(writer method).
connection-open-p
(function).
reconnect-restart-case
(macro).
reopen-connection
(function).
with-reconnect-restart
(macro).
cl-redis/redis.lisp
connection.lisp
(file).
cl-redis
(system).
*cmd-prefix*
(special variable).
def-cmd
(macro).
def-expect-method
(macro).
expect
(generic function).
redis-bad-reply
(condition).
redis-connection-error
(condition).
redis-error
(condition).
redis-error-message
(reader method).
redis-error-reply
(condition).
tell
(generic function).
with-pipelining
(macro).
*pipeline*
(special variable).
*pipelined*
(special variable).
ensure-string
(function).
format-redis-number
(function).
format-redis-string
(function).
read-bulk-reply
(macro).
redis-error-error
(reader method).
with-redis-in
(macro).
cl-redis/commands.lisp
redis.lisp
(file).
cl-redis
(system).
append
(function).
auth
(function).
bgrewriteaof
(function).
bgsave
(function).
bitcount
(function).
bitop
(function).
bitpos
(function).
blpop
(function).
brpop
(function).
brpoplpush
(function).
client-getname
(function).
client-pause
(function).
client-setname
(function).
cluster-slots
(function).
command
(function).
command-count
(function).
command-getkeys
(function).
command-info
(function).
config-get
(function).
config-resetstat
(function).
config-rewrite
(function).
config-set
(function).
dbsize
(function).
decr
(function).
decrby
(function).
del
(function).
discard
(function).
dump
(function).
echo
(function).
eval
(function).
evalsha
(function).
exec
(function).
exists
(function).
expire
(function).
expireat
(function).
flushall
(function).
flushdb
(function).
get
(function).
getbit
(function).
getrange
(function).
getset
(function).
hdel
(function).
hexists
(function).
hget
(function).
hgetall
(function).
hincrby
(function).
hincrbyfloat
(function).
hkeys
(function).
hlen
(function).
hmget
(function).
hmset
(function).
hscan
(function).
hset
(function).
hsetnx
(function).
hvals
(function).
incr
(function).
incrby
(function).
incrbyfloat
(function).
info
(function).
keys
(function).
lastsave
(function).
lindex
(function).
linsert
(function).
llen
(function).
lpop
(function).
lpush
(function).
lpushx
(function).
lrange
(function).
lrem
(function).
lset
(function).
ltrim
(function).
mget
(function).
migrate
(function).
move
(function).
mset
(function).
msetnx
(function).
multi
(function).
object-encoding
(function).
object-idletime
(function).
object-refcount
(function).
persist
(function).
pexpire
(function).
pexpireat
(function).
pfadd
(function).
pfcount
(function).
pfmerge
(function).
ping
(function).
psubscribe
(function).
pttl
(function).
publish
(function).
punsubscribe
(function).
quit
(function).
randomkey
(function).
rename
(function).
renamenx
(function).
restore
(function).
role
(function).
rpop
(function).
rpoplpush
(function).
rpush
(function).
rpushx
(function).
sadd
(function).
save
(function).
scan
(function).
scard
(function).
script-exists
(function).
script-flush
(function).
script-kill
(function).
script-load
(function).
sdiff
(function).
sdiffstore
(function).
select
(function).
set
(function).
setbit
(function).
setex
(function).
setnx
(function).
setrange
(function).
shutdown
(function).
sinter
(function).
sinterstore
(function).
sismember
(function).
slaveof
(function).
slowlog
(function).
smembers
(function).
smove
(function).
sort
(function).
spop
(function).
srandmember
(function).
srem
(function).
sscan
(function).
strlen
(function).
subscribe
(function).
substr
(function).
sunion
(function).
sunionstore
(function).
sync
(function).
time
(function).
ttl
(function).
type
(function).
unsubscribe
(function).
unwatch
(function).
watch
(function).
zadd
(function).
zcard
(function).
zcount
(function).
zincrby
(function).
zinterstore
(function).
zlexcount
(function).
zrange
(function).
zrangebyscore
(function).
zrank
(function).
zrem
(function).
zremrangebylex
(function).
zremrangebyrank
(function).
zremrangebyscore
(function).
zrevrange
(function).
zrevrangebylex
(function).
zrevrangebyscore
(function).
zrevrank
(function).
zscan
(function).
zscore
(function).
zunionstore
(function).
Packages are listed by definition order.
redis
common-lisp
.
rtl
.
*cmd-prefix*
(special variable).
*connection*
(special variable).
*echo-p*
(special variable).
*echo-stream*
(special variable).
close-connection
(function).
connect
(function).
connected-p
(function).
def-cmd
(macro).
def-expect-method
(macro).
disconnect
(function).
expect
(generic function).
open-connection
(function).
reconnect
(function).
red-append
(function).
red-auth
(function).
red-bgrewriteaof
(function).
red-bgsave
(function).
red-bitcount
(function).
red-bitop
(function).
red-bitpos
(function).
red-blpop
(function).
red-brpop
(function).
red-brpoplpush
(function).
red-client-getname
(function).
red-client-pause
(function).
red-client-setname
(function).
red-cluster-slots
(function).
red-command
(function).
red-command-count
(function).
red-command-getkeys
(function).
red-command-info
(function).
red-config-get
(function).
red-config-resetstat
(function).
red-config-rewrite
(function).
red-config-set
(function).
red-dbsize
(function).
red-decr
(function).
red-decrby
(function).
red-del
(function).
red-discard
(function).
red-dump
(function).
red-echo
(function).
red-eval
(function).
red-evalsha
(function).
red-exec
(function).
red-exists
(function).
red-expire
(function).
red-expireat
(function).
red-flushall
(function).
red-flushdb
(function).
red-get
(function).
red-getbit
(function).
red-getrange
(function).
red-getset
(function).
red-hdel
(function).
red-hexists
(function).
red-hget
(function).
red-hgetall
(function).
red-hincrby
(function).
red-hincrbyfloat
(function).
red-hkeys
(function).
red-hlen
(function).
red-hmget
(function).
red-hmset
(function).
red-hscan
(function).
red-hset
(function).
red-hsetnx
(function).
red-hvals
(function).
red-incr
(function).
red-incrby
(function).
red-incrbyfloat
(function).
red-info
(function).
red-keys
(function).
red-lastsave
(function).
red-lindex
(function).
red-linsert
(function).
red-llen
(function).
red-lpop
(function).
red-lpush
(function).
red-lpushx
(function).
red-lrange
(function).
red-lrem
(function).
red-lset
(function).
red-ltrim
(function).
red-mget
(function).
red-migrate
(function).
red-move
(function).
red-mset
(function).
red-msetnx
(function).
red-multi
(function).
red-object-encoding
(function).
red-object-idletime
(function).
red-object-refcount
(function).
red-persist
(function).
red-pexpire
(function).
red-pexpireat
(function).
red-pfadd
(function).
red-pfcount
(function).
red-pfmerge
(function).
red-ping
(function).
red-psubscribe
(function).
red-pttl
(function).
red-publish
(function).
red-punsubscribe
(function).
red-quit
(function).
red-randomkey
(function).
red-rename
(function).
red-renamenx
(function).
red-restore
(function).
red-role
(function).
red-rpop
(function).
red-rpoplpush
(function).
red-rpush
(function).
red-rpushx
(function).
red-sadd
(function).
red-save
(function).
red-scan
(function).
red-scard
(function).
red-script-exists
(function).
red-script-flush
(function).
red-script-kill
(function).
red-script-load
(function).
red-sdiff
(function).
red-sdiffstore
(function).
red-select
(function).
red-set
(function).
red-setbit
(function).
red-setex
(function).
red-setnx
(function).
red-setrange
(function).
red-shutdown
(function).
red-sinter
(function).
red-sinterstore
(function).
red-sismember
(function).
red-slaveof
(function).
red-slowlog
(function).
red-smembers
(function).
red-smove
(function).
red-sort
(function).
red-spop
(function).
red-srandmember
(function).
red-srem
(function).
red-sscan
(function).
red-strlen
(function).
red-subscribe
(function).
red-substr
(function).
red-sunion
(function).
red-sunionstore
(function).
red-sync
(function).
red-time
(function).
red-ttl
(function).
red-type
(function).
red-unsubscribe
(function).
red-unwatch
(function).
red-watch
(function).
red-zadd
(function).
red-zcard
(function).
red-zcount
(function).
red-zincrby
(function).
red-zinterstore
(function).
red-zlexcount
(function).
red-zrange
(function).
red-zrangebyscore
(function).
red-zrank
(function).
red-zrem
(function).
red-zremrangebylex
(function).
red-zremrangebyrank
(function).
red-zremrangebyscore
(function).
red-zrevrange
(function).
red-zrevrangebylex
(function).
red-zrevrangebyscore
(function).
red-zrevrank
(function).
red-zscan
(function).
red-zscore
(function).
red-zunionstore
(function).
redis-bad-reply
(condition).
redis-connection
(class).
redis-connection-error
(condition).
redis-error
(condition).
redis-error-message
(generic reader).
redis-error-reply
(condition).
tell
(generic function).
with-connection
(macro).
with-persistent-connection
(macro).
with-pipelining
(macro).
with-recursive-connection
(macro).
*pipeline*
(special variable).
*pipelined*
(special variable).
+utf8+
(special variable).
append
(function).
auth
(function).
bgrewriteaof
(function).
bgsave
(function).
bitcount
(function).
bitop
(function).
bitpos
(function).
blpop
(function).
brpop
(function).
brpoplpush
(function).
client-getname
(function).
client-pause
(function).
client-setname
(function).
cluster-slots
(function).
command
(function).
command-count
(function).
command-getkeys
(function).
command-info
(function).
config-get
(function).
config-resetstat
(function).
config-rewrite
(function).
config-set
(function).
conn-auth
(generic reader).
conn-host
(generic reader).
conn-port
(generic reader).
conn-socket
(generic reader).
(setf conn-socket)
(generic writer).
conn-stream
(generic function).
(setf conn-stream)
(generic writer).
connection-open-p
(function).
dbsize
(function).
decr
(function).
decrby
(function).
del
(function).
discard
(function).
dump
(function).
echo
(function).
ensure-string
(function).
eval
(function).
evalsha
(function).
exec
(function).
exists
(function).
expire
(function).
expireat
(function).
flushall
(function).
flushdb
(function).
format-redis-number
(function).
format-redis-string
(function).
get
(function).
getbit
(function).
getrange
(function).
getset
(function).
hdel
(function).
hexists
(function).
hget
(function).
hgetall
(function).
hincrby
(function).
hincrbyfloat
(function).
hkeys
(function).
hlen
(function).
hmget
(function).
hmset
(function).
hscan
(function).
hset
(function).
hsetnx
(function).
hvals
(function).
incr
(function).
incrby
(function).
incrbyfloat
(function).
info
(function).
keys
(function).
lastsave
(function).
lindex
(function).
linsert
(function).
llen
(function).
lpop
(function).
lpush
(function).
lpushx
(function).
lrange
(function).
lrem
(function).
lset
(function).
ltrim
(function).
mget
(function).
migrate
(function).
move
(function).
mset
(function).
msetnx
(function).
multi
(function).
object-encoding
(function).
object-idletime
(function).
object-refcount
(function).
parse-float
(function).
persist
(function).
pexpire
(function).
pexpireat
(function).
pfadd
(function).
pfcount
(function).
pfmerge
(function).
ping
(function).
psubscribe
(function).
pttl
(function).
publish
(function).
punsubscribe
(function).
quit
(function).
radix-values
(function).
randomkey
(function).
read-bulk-reply
(macro).
reconnect-restart-case
(macro).
redis-error-error
(generic reader).
rename
(function).
renamenx
(function).
reopen-connection
(function).
restore
(function).
role
(function).
rpop
(function).
rpoplpush
(function).
rpush
(function).
rpushx
(function).
sadd
(function).
save
(function).
scan
(function).
scard
(function).
script-exists
(function).
script-flush
(function).
script-kill
(function).
script-load
(function).
sdiff
(function).
sdiffstore
(function).
select
(function).
set
(function).
setbit
(function).
setex
(function).
setnx
(function).
setrange
(function).
shutdown
(function).
sinter
(function).
sinterstore
(function).
sismember
(function).
slaveof
(function).
slowlog
(function).
smembers
(function).
smove
(function).
sort
(function).
spop
(function).
srandmember
(function).
srem
(function).
sscan
(function).
strlen
(function).
subscribe
(function).
substr
(function).
sunion
(function).
sunionstore
(function).
sync
(function).
time
(function).
ttl
(function).
type
(function).
unsubscribe
(function).
unwatch
(function).
watch
(function).
with-reconnect-restart
(macro).
with-redis-in
(macro).
zadd
(function).
zcard
(function).
zcount
(function).
zincrby
(function).
zinterstore
(function).
zlexcount
(function).
zrange
(function).
zrangebyscore
(function).
zrank
(function).
zrem
(function).
zremrangebylex
(function).
zremrangebyrank
(function).
zremrangebyscore
(function).
zrevrange
(function).
zrevrangebylex
(function).
zrevrangebyscore
(function).
zrevrank
(function).
zscan
(function).
zscore
(function).
zunionstore
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Prefix for functions names that implement Redis commands.
The current Redis connection.
Whether the server-client communication should be echoed to the stream specified by *ECHO-STREAM*. The default is NIL, meaning no echoing.
A stream to which the server-client communication will be echoed for debugging purposes. The default is *STANDARD-OUTPUT*.
Define and export a function with the name <*CMD-REDIX*>-<CMD> for processing a Redis command CMD. Here REPLY-TYPE is the expected reply format.
Define a specialized EXPECT method. BODY may refer to the ~ variable REPLY, which is bound to the reply received from Redis ~ server with the first character removed.
Evaluate BODY with the current connection bound to a new connection specified by the given HOST and PORT
Execute BODY inside WITH-CONNECTION. But if connection is broken due to REDIS-CONNECTION-ERROR (a network error or timeout), transparently reopen it.
Delay execution of EXPECT’s inside BODY to the end, so that all commands are first sent to the server and then their output is received and collected into a list. So commands return :PIPELINED instead of the expected results.
Execute BODY with *CONNECTION* bound to the default Redis connection. If connection is already established, reuse it.
Close the socket of CONN.
Connect to Redis server.
Is there a current connection?
Disconnect from Redis server.
Create a socket connection to the host and port of CONNECTION and set the socket of CONN to the associated socket.
Close and reopen the connection to Redis server.
Append the specified string to the string stored at key.
Simple password authentication if enabled.
Rewrite the append only file in background when it gets too big.
Count set bits in a string at KEY
(with optional bounding indices START and END).
Perform bitwise OPERATION between strings ar KEY and KEYS and store the result ad DSTKEY.
Return the position of the first bit set to 1 or 0 in a string.
BRPOPLPUSH is the blocking variant of RPOPLPUSH. When source contains elements, this command behaves exactly like RPOPLPUSH. When source is empty, Redis will block the connection until another client pushes to it or until TIMEOUT is reached. A TIMEOUT of zero can be used to block indefinitely. See RPOPLPUSH for more information.
The CLIENT GETNAME returns the name of the current connection as set by CLIENT SETNAME. Since every new connection starts without an associated name, if no name was assigned a null bulk reply is returned.
CLIENT PAUSE is a connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds).
The CLIENT SETNAME command assigns a name to the current connection. The assigned name is displayed in the output of CLIENT LIST so that it is possible to identify the client that performed a given connection.
CLUSTER SLOTS returns details about which cluster slots map to which Redis instances.
Returns Array reply of details about all Redis commands.
Cluster clients must be aware of key positions in commands so commands can go
to matching instances, but Redis commands vary between accepting one key,
multiple keys, or even multiple keys separated by other data.
You can use COMMAND to cache a mapping between commands and key positions
for each command to enable exact routing of commands to cluster instances.
Returns Integer reply of number of total commands in this Redis server.
Returns Array reply of keys from a full Redis command.
COMMAND GETKEYS is a helper command to let you find the keys from
a full Redis command.
COMMAND shows some commands as having movablekeys meaning the entire command
must be parsed to discover storage or retrieval keys.
You can use COMMAND GETKEYS to discover key positions directly from how Redis
parses the commands.
Returns Array reply of details about multiple Redis commands.
Same result format as COMMAND except you can specify which commands get
returned.
If you request details about non-existing commands, their return position
will be nil.
Configure a Redis server at runtime: get glob PATTERN value.
Resets the statistics reported by Redis using the INFO command.
The CONFIG REWRITE command rewrites the redis.conf file the server
was started with, applying the minimal changes needed to make it reflecting
the configuration currently used by the server, that may be different
compared to the original one because of the use of the CONFIG SET command.
Configure a Redis server at runtime: set PARAMETER VALUE.
Return the number of keys in the current db.
Decrement the integer value of KEY by DECREMENT.
Return a serialized version of the value stored at the specified KEY.
Execute a Lua script server side.
Execute a stored Lua script server side.
Set a time to live in SECS on KEY.
Set a timeout on KEY. After the timeout has expired, the key will
automatically be deleted.
EXPIREAT has the same effect and semantic as EXPIRE, but instead of
specifying the number of seconds representing the TTL, it takes
an absolute UNIX timestamp (seconds since January 1, 1970).
As in the case of EXPIRE command, if key is updated before the timeout has
expired, then the timeout is removed as if the PERSIST command was invoked
on KEY.
Remove all the keys from all the databases.
Remove all the keys of the currently selected DB.
Returns the bit value at OFFSET in the string value stored at KEY.
Returns the substring of the string value stored at key, determined by the offsets START and END (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth.
Set a key to a string returning the old value of the key.
Remove the specified FIELD from a hash.
Test for existence of a specified FIELD in a hash.
Retrieve the value of the specified hash FIELD.
Return all the fields and associated values in a hash.
Increment the integer value of the hash at KEY on FIELD with INTEGER.
Increment the float value of the hash at KEY on FIELD with INCREMENT.
Get the values associated with the specified FIELDS in the hash stored at KEY.
Set the hash FIELDS to their respective VALUES.
The HSCAN command and the closely related commands SCAN, SSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements. HSCAN iterates fields of Hash types and their associated values.
Set the hash FIELD to the specified VALUE. Creates the hash if needed.
Set the hash FIELD to the specified VALUE, if the KEY doesn’t exist yet.
Increment the integer value of KEY by .
Increment the float value of KEY by INCREMENT.
Provide information and statistics about the server.
Return all the keys matching a given pattern.
Return the UNIX time stamp of the last successfully saving of the dataset on disk.
Return the element at index position from the List at key.
Inserts VALUE in the list stored at KEY either BEFORE or AFTER
the reference value PIVOT. When KEY does not exist, it is considered an empty
list and no operation is performed. An error is returned when KEY exists,
but does not hold a list value PIVOT.
Note: before/after can only have 2 values: :before or :after.
Return the length of the List value at key.
Return and remove (atomically) the first element of the List at key.
Append an element to the head of the list value at KEY.
Inserts value at the head of the list stored at KEY, only if KEY already exists and holds a list. In contrary to LPUSH, no operation will be performed when KEY does not yet exist.
Return a range of elements from the List at key.
Remove the first-N, last-N, or all the elements matching value from the List at key.
Set a new value as the element at index position of the List at key.
Trim the list at key to the specified range of elements.
Multi-get, return the strings values of the keys.
Atomically transfer a key from a Redis instance to another one.
Move the key from the currently selected DB to the DB having as index dbindex.
Set multiple keys to multiple values in a single atomic operation.
Set multiple keys to multiple values in a single atomic operation if none of the keys already exist.
The OBJECT command allows to inspect the internals of Redis Objects
associated with keys. It is useful for debugging or to understand if your keys
are using the specially encoded data types to save space. Your application may
also use the information reported by the OBJECT command to implement application
level key eviction policies when using Redis as a Cache.
OBJECT ENCODING <key> returns the kind of internal representation used in order
to store the value associated with a key.
The OBJECT command allows to inspect the internals of Redis Objects
associated with keys. It is useful for debugging or to understand if your keys
are using the specially encoded data types to save space. Your application may
also use the information reported by the OBJECT command to implement application
level key eviction policies when using Redis as a Cache.
OBJECT IDLETIME <key> returns the number of seconds since the object stored
at the specified key is idle (not requested by read or write operations). While
the value is returned in seconds the actual resolution of this timer is 10
seconds, but may vary in future implementations.
The OBJECT command allows to inspect the internals of Redis Objects
associated with keys. It is useful for debugging or to understand if your keys
are using the specially encoded data types to save space. Your application may
also use the information reported by the OBJECT command to implement application
level key eviction policies when using Redis as a Cache.
OBJECT REFCOUNT <key> returns the number of references of the value associated
with the specified key.
Set a KEY’s time to live in MILLISECONDS.
Set the expiration for a KEY as a Unix timestamp specified in milliseconds.
Adds all the element arguments to the HyperLogLog data structure stored
at the variable name specified as first argument.
As a side effect of this command the HyperLogLog internals may be updated
to reflect a different estimation of the number of unique items added so far
(the cardinality of the set).
If the approximated cardinality estimated by the HyperLogLog changed after
executing the command, PFADD returns 1, otherwise 0 is returned.
The command automatically creates an empty HyperLogLog structure (that is,
a Redis String of a specified length and with a given encoding) if
the specified key does not exist.
To call the command without elements but just the variable name is valid,
this will result into no operation performed if the variable already exists,
or just the creation of the data structure if the key does not exist
(in the latter case 1 is returned).
When called with a single key, returns the approximated cardinality computed
by the HyperLogLog data structure stored at the specified variable,
which is 0 if the variable does not exist.
When called with multiple keys, returns the approximated cardinality of
the union of the HyperLogLogs passed, by internally merging the HyperLogLogs
stored at the provided keys into a temporary hyperLogLog.
The HyperLogLog data structure can be used in order to count unique elements
in a set using just a small constant amount of memory, specifically 12k bytes
for every HyperLogLog (plus a few bytes for the key itself).
The returned cardinality of the observed set is not exact, but approximated
with a standard error of 0.81%.
For example, in order to take the count of all the unique search queries
performed in a day, a program needs to call PFADD every time a query is
processed. The estimated number of unique queries can be retrieved with
PFCOUNT at any time.
Note: as a side effect of calling this function, it is possible that
the HyperLogLog is modified, since the last 8 bytes encode the latest
computed cardinality for caching purposes. So PFCOUNT is technically
a write command.
Merge multiple HyperLogLog values into an unique value that will approximate
the cardinality of the union of the observed Sets of the source HyperLogLog
structures.
The computed merged HyperLogLog is set to the destination variable,
which is created if does not exist (defaulting to an empty HyperLogLog).
Redis Public/Subscribe messaging paradigm implementation.
Get the time to live in milliseconds of KEY.
Redis Public/Subscribe messaging paradigm implementation.
Redis Public/Subscribe messaging paradigm implementation.
Return a random key from the key space.
Rename the old key in the new one, destroing the newname key if it already exists.
Rename the old key in the new one, if the newname key does not already exist.
Create a KEY using the provided SERIALIZED-VALUE, previously obtained using DUMP.
Provide information on the role of a Redis instance in the context
of replication, by returning if the instance is currently a master, slave,
or sentinel. The command also returns additional information about the state
of the replication (if the role is master or slave) or the list of monitored
master names (if the role is sentinel).
Return and remove (atomically) the last element of the List at key.
Atomically returns and removes the last element (tail) of the list
stored at SOURCE, and pushes the element at the first element (head) of the list
stored at DESTINATION.
For example: consider SOURCE holding the list a,b,c, and DESTINATION holding
the list x,y,z. Executing RPOPLPUSH results in SOURCE holding a,b and
DESTINATION holding c,x,y,z.
If SOURCE does not exist, the value nil is returned and no operation is
performed. If SOURCE and DESTINATION are the same, the operation is equivalent
to removing the last element from the list and pushing it as first element
of the list, so it can be considered as a list rotation command.
Append an element to the tail of the list value at KEY.
Inserts value at the tail of the list stored at KEY, only if KEY already exists and holds a list. In contrary to RPUSH, no operation will be performed when KEY does not yet exist.
Add the specified member to the Set value at key.
The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements. SCAN iterates the set of keys in the currently selected Redis database.
Return the number of elements (the cardinality) of the Set at key.
Check existence of scripts in the script cache.
Remove all the scripts from the script cache.
Kill the script currently in execution.
Load the specified Lua script into the script cache.
Return the difference between the Set stored at key1 and all the Sets key2, ..., keyN.
Compute the difference between the Set key1 and all the Sets key2, ..., keyN, and store the resulting Set at dstkey.
Select the DB having the specified index.
Sets or clears the bit at OFFSET in the string value stored at KEY.
Set KEY to hold the string VALUE and set KEY to timeout after a given number
of seconds. This command is equivalent to executing the following commands:
SET mykey value
EXPIRE mykey seconds
SETEX is atomic, and can be reproduced by using the previous two commands inside
an MULTI/EXEC block. It is provided as a faster alternative to the given
sequence of operations, because this operation is very common when Redis is used
as a cache.
An error is returned when seconds is invalid.
Set a key to a string value if the key does not exist.
Overwrites part of the string stored at KEY, starting at the specified OFFSET, for the entire length of VALUE. If the OFFSET is larger than the current length of the string at KEY, the string is padded with zero-bytes to make OFFSET fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at OFFSET. Note that the maximum OFFSET that you can set is 229^-1 (536870911), as Redis Strings are limited to 512 megabytes.
Synchronously save the DB on disk, then shutdown the server.
Return the intersection between the Sets stored at key1, key2, ..., keyN.
Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey.
Test if the specified value is a member of the Set at key.
Change the replication settings.
Manages the Redis slow queries log.
Return all the members of the Set value at key.
Move the specified member from one Set to another atomically.
Sort a Set or a List accordingly to the specified parameters.
Remove and return (pop) a random element from the Set value at key.
Get one or COUNT random members from a set at KEY.
When called with the additional count argument,
return an array of count distinct elements if count is positive.
If called with a negative count the behavior changes and the command
is allowed to return the same element multiple times.
In this case the numer of returned elements is the absolute
value of the specified count.
Remove the specified member from the Set value at key.
The SCAN command and the closely related commands SCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements. SSCAN iterates elements of Sets types.
Returns the length of the string value stored at KEY.
Redis Public/Subscribe messaging paradigm implementation.
Return a substring out of a larger string.
Warning: left for backwards compatibility. It is now called: GETRANGE.
Return the union between the Sets stored at key1, key2, ..., keyN.
Compute the union between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey.
The TIME command returns the current server time as a two items lists:
a Unix timestamp and the amount of microseconds already elapsed
in the current second.
Basically the interface is very similar to the one of the
gettimeofday system call.
Return the type of the value stored at key.
Redis Public/Subscribe messaging paradigm implementation.
Flushes all the previously watched keys for a transaction.
If you call EXEC or DISCARD, there’s no need to manually call UNWATCH.
Marks the given keys to be watched for conditional execution of a transaction.
Add the specified MEMBER to the Set value at KEY or update the SCORE if it already exist. If nil is returned, the element already existed in the set. Just the score was updated.
Return the cardinality (number of elements) of the sorted set at KEY.
Returns the number of elements in the sorted set at KEY with a score between MIN and MAX.
If the MEMBER already exists increment its score by INCREMENT, otherwise add the member setting INCREMENT as score.
Perform an intersection in DSTKEY over a number (N) of sorted sets at KEYS with optional WEIGHTS and AGGREGATE.
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering,
this command returns the number of elements in the sorted set at key
with a value between min and max.
The min and max arguments have the same meaning as described for ZRANGEBYLEX.
Return a range of elements from the sorted set at KEY.
Returns all the elements in the sorted set at KEY with a score between
MIN and MAX (including elements with score equal to MIN or MAX).
The elements are considered to be ordered from low to high scores.
The elements having the same score are returned in lexicographical order
(this follows from a property of the sorted set implementation in Redis and
does not involve further computation).
The optional LIMIT argument can be used to only get a range of the matching
elements (similar to SELECT LIMIT offset, count in SQL).
The optional WITHSCORES argument makes the command return both the element and
its score, instead of the element alone.
Return the rank (or index) or MEMBER in the sorted set at KEY, with scores being ordered from low to high.
Remove the specified MEMBER from the Set value at KEY.
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering, this command removes all elements
in the sorted set stored at KEY between the lexicographical range
specified by MIN and MAX.
The meaning of MIN and MAX are the same of the ZRANGEBYLEX command.
Similarly, this command actually returns the same elements that ZRANGEBYLEX
would return if called with the same min and max arguments.
Remove all the elements with rank >= MIN and rank <= MAX from the sorted set.
Remove all the elements with score >= MIN and score <= MAX from the sorted set.
Return a range of elements from the sorted set at KEY, exactly like ZRANGE, but the sorted set is ordered in traversed in reverse order, from the greatest to the smallest score.
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering, this command returns
all the elements in the sorted set at key with a value between max and min.
Apart from the reversed ordering, ZREVRANGEBYLEX is similar to ZRANGEBYLEX.
Returns all the elements in the sorted set at KEY with a score between
MAX and MIN (including elements with score equal to MAX or MIN).
In contrary to the default ordering of sorted sets, for this command the
elements are considered to be ordered from high to low scores.
The elements having the same score are returned in reverse lexicographical
order. Apart from the reversed ordering,
ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE.
Return the rank (or index) or MEMBER in the sorted set at KEY, with scores being ordered from high to low.
The ZSCAN command and the closely related commands SCAN, SSCAN and HSCAN are used in order to incrementally iterate over a collection of elements. ZSCAN iterates elements of Sorted Set types and their associated scores.
Return the score associated with the specified ELEMENT of the sorted set at KEY.
Perform a union in DSTKEY over a number (N) of sorted sets at KEYS with optional WEIGHTS and AGGREGATE.
Receive and process the reply of the given type from Redis server.
If specified, TIMEOUT is the number of seconds to wait for a reply before
returning.
Returns two values, the first is the reply or NIL. The second is a real number indicating the time remaining in the timeout or NIL if the read timed out/there was no timeout.
(eql :bytes)
) &key &allow-other-keys) ¶Receive and process the reply of type BYTES.
(eql :float)
) &key &allow-other-keys) ¶Receive and process the reply of type FLOAT.
(eql :list)
) &key &allow-other-keys) ¶(eql :end)
) &key &allow-other-keys) ¶(eql :pubsub)
) &key &allow-other-keys) ¶(eql :queued)
) &key &allow-other-keys) ¶Receive and process the reply of type QUEUED.
(eql :multi)
) &key &allow-other-keys) ¶Receive and process the reply of type MULTI.
(eql :bulk)
) &key &allow-other-keys) ¶Receive and process the reply of type BULK.
(eql :integer)
) &key &allow-other-keys) ¶Receive and process the reply of type INTEGER.
(eql :boolean)
) &key &allow-other-keys) ¶Receive and process the reply of type BOOLEAN.
(eql :inline)
) &key &allow-other-keys) ¶Receive and process the reply of type INLINE.
(eql :status)
) &key &allow-other-keys) ¶Receive and process status reply, which is just a string, preceeded with +.
(eql :anything)
) &key &allow-other-keys) ¶Receive and process status reply, which is just a string, preceeded with +.
redis-error
)) ¶Send a command to Redis server over a socket connection.
CMD is the command name (a string or a symbol), and ARGS are its arguments
(keyword arguments are also supported).
(eql redis::zinterstore)
) &rest args) ¶(eql redis::zunionstore)
) &rest args) ¶(eql redis::zrevrangebylex)
) &rest args) ¶(eql redis::zrevrangebyscore)
) &rest args) ¶(eql redis::zrangebyscore)
) &rest args) ¶(eql redis::zrevrange)
) &rest args) ¶(eql redis::zrange)
) &rest args) ¶(eql redis::linsert)
) &rest args) ¶(eql redis::bitcount)
) &rest args) ¶(eql redis::zscan)
) &rest args) ¶(eql redis::hscan)
) &rest args) ¶(eql redis::sscan)
) &rest args) ¶(eql redis::scan)
) &rest args) ¶(eql redis::restore)
) &rest args) ¶(eql redis::sort)
) &rest args) ¶Redis protocol error is detected.
Conditions of this type are signaled when errors occur
that break the connection stream. They offer a :RECONNECT restart.
Any Redis-related error.
Error reply is received from Redis server.
A list of expected results from the current pipeline.
Indicates, that commands are sent in pipelined mode.
Signal the condition of type REDIS-CONNECTION-ERROR denoted by
the given ERROR and COMMENT offering a :RECONNECT restart to re-evaluate BODY.
When, during the execution of BODY, an error occurs that breaks the connection, a REDIS-CONNECTION-ERROR is signalled, offering a :RECONNECT restart that will re-evaluate body after the conenction is re-established.
Append the specified string to the string stored at key.
Simple password authentication if enabled.
Rewrite the append only file in background when it gets too big.
Asynchronously save the DB on disk.
Count set bits in a string at KEY
(with optional bounding indices START and END).
Perform bitwise OPERATION between strings ar KEY and KEYS and store the result ad DSTKEY.
Return the position of the first bit set to 1 or 0 in a string.
Blocking LPOP.
Blocking RPOP.
BRPOPLPUSH is the blocking variant of RPOPLPUSH. When source contains elements, this command behaves exactly like RPOPLPUSH. When source is empty, Redis will block the connection until another client pushes to it or until TIMEOUT is reached. A TIMEOUT of zero can be used to block indefinitely. See RPOPLPUSH for more information.
The CLIENT GETNAME returns the name of the current connection as set by CLIENT SETNAME. Since every new connection starts without an associated name, if no name was assigned a null bulk reply is returned.
CLIENT PAUSE is a connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds).
The CLIENT SETNAME command assigns a name to the current connection. The assigned name is displayed in the output of CLIENT LIST so that it is possible to identify the client that performed a given connection.
CLUSTER SLOTS returns details about which cluster slots map to which Redis instances.
Returns Array reply of details about all Redis commands.
Cluster clients must be aware of key positions in commands so commands can go
to matching instances, but Redis commands vary between accepting one key,
multiple keys, or even multiple keys separated by other data.
You can use COMMAND to cache a mapping between commands and key positions
for each command to enable exact routing of commands to cluster instances.
Returns Integer reply of number of total commands in this Redis server.
Returns Array reply of keys from a full Redis command.
COMMAND GETKEYS is a helper command to let you find the keys from
a full Redis command.
COMMAND shows some commands as having movablekeys meaning the entire command
must be parsed to discover storage or retrieval keys.
You can use COMMAND GETKEYS to discover key positions directly from how Redis
parses the commands.
Returns Array reply of details about multiple Redis commands.
Same result format as COMMAND except you can specify which commands get
returned.
If you request details about non-existing commands, their return position
will be nil.
Configure a Redis server at runtime: get glob PATTERN value.
Resets the statistics reported by Redis using the INFO command.
The CONFIG REWRITE command rewrites the redis.conf file the server
was started with, applying the minimal changes needed to make it reflecting
the configuration currently used by the server, that may be different
compared to the original one because of the use of the CONFIG SET command.
Configure a Redis server at runtime: set PARAMETER VALUE.
Is the socket of CONNECTION open?
Return the number of keys in the current db.
Decrement the integer value of KEY.
Decrement the integer value of KEY by DECREMENT.
Delete a key.
Redis atomic transactions’ rollback.
Return a serialized version of the value stored at the specified KEY.
Returns message.
Execute a Lua script server side.
Execute a stored Lua script server side.
Redis atomic transactions’ commit.
Test if a key exists.
Set a time to live in SECS on KEY.
Set a timeout on KEY. After the timeout has expired, the key will
automatically be deleted.
EXPIREAT has the same effect and semantic as EXPIRE, but instead of
specifying the number of seconds representing the TTL, it takes
an absolute UNIX timestamp (seconds since January 1, 1970).
As in the case of EXPIRE command, if key is updated before the timeout has
expired, then the timeout is removed as if the PERSIST command was invoked
on KEY.
Remove all the keys from all the databases.
Remove all the keys of the currently selected DB.
Write a prefix char and a number to the stream of the current connection. If *ECHOP-P* is not NIL, write that string to *ECHO-STREAM*, too.
Write a string and CRLF-terminator to the stream of the current connection. If *ECHOP-P* is not NIL, write that string to *ECHO-STREAM*, too.
Return the string value of the key.
Returns the bit value at OFFSET in the string value stored at KEY.
Returns the substring of the string value stored at key, determined by the offsets START and END (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth.
Set a key to a string returning the old value of the key.
Remove the specified FIELD from a hash.
Test for existence of a specified FIELD in a hash.
Retrieve the value of the specified hash FIELD.
Return all the fields and associated values in a hash.
Increment the integer value of the hash at KEY on FIELD with INTEGER.
Increment the float value of the hash at KEY on FIELD with INCREMENT.
Return all the fields in a hash.
Return the number of items in a hash.
Get the values associated with the specified FIELDS in the hash stored at KEY.
Set the hash FIELDS to their respective VALUES.
The HSCAN command and the closely related commands SCAN, SSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements. HSCAN iterates fields of Hash types and their associated values.
Set the hash FIELD to the specified VALUE. Creates the hash if needed.
Set the hash FIELD to the specified VALUE, if the KEY doesn’t exist yet.
Return all the values in a hash.
Increment the integer value of KEY.
Increment the integer value of KEY by .
Increment the float value of KEY by INCREMENT.
Provide information and statistics about the server.
Return all the keys matching a given pattern.
Return the UNIX time stamp of the last successfully saving of the dataset on disk.
Return the element at index position from the List at key.
Inserts VALUE in the list stored at KEY either BEFORE or AFTER
the reference value PIVOT. When KEY does not exist, it is considered an empty
list and no operation is performed. An error is returned when KEY exists,
but does not hold a list value PIVOT.
Note: before/after can only have 2 values: :before or :after.
Return the length of the List value at key.
Return and remove (atomically) the first element of the List at key.
Append an element to the head of the list value at KEY.
Inserts value at the head of the list stored at KEY, only if KEY already exists and holds a list. In contrary to LPUSH, no operation will be performed when KEY does not yet exist.
Return a range of elements from the List at key.
Remove the first-N, last-N, or all the elements matching value from the List at key.
Set a new value as the element at index position of the List at key.
Trim the list at key to the specified range of elements.
Multi-get, return the strings values of the keys.
Atomically transfer a key from a Redis instance to another one.
Move the key from the currently selected DB to the DB having as index dbindex.
Set multiple keys to multiple values in a single atomic operation.
Set multiple keys to multiple values in a single atomic operation if none of the keys already exist.
Redis atomic transactions’ start.
The OBJECT command allows to inspect the internals of Redis Objects
associated with keys. It is useful for debugging or to understand if your keys
are using the specially encoded data types to save space. Your application may
also use the information reported by the OBJECT command to implement application
level key eviction policies when using Redis as a Cache.
OBJECT ENCODING <key> returns the kind of internal representation used in order
to store the value associated with a key.
The OBJECT command allows to inspect the internals of Redis Objects
associated with keys. It is useful for debugging or to understand if your keys
are using the specially encoded data types to save space. Your application may
also use the information reported by the OBJECT command to implement application
level key eviction policies when using Redis as a Cache.
OBJECT IDLETIME <key> returns the number of seconds since the object stored
at the specified key is idle (not requested by read or write operations). While
the value is returned in seconds the actual resolution of this timer is 10
seconds, but may vary in future implementations.
The OBJECT command allows to inspect the internals of Redis Objects
associated with keys. It is useful for debugging or to understand if your keys
are using the specially encoded data types to save space. Your application may
also use the information reported by the OBJECT command to implement application
level key eviction policies when using Redis as a Cache.
OBJECT REFCOUNT <key> returns the number of references of the value associated
with the specified key.
Remove the existing timeout on KEY.
Set a KEY’s time to live in MILLISECONDS.
Set the expiration for a KEY as a Unix timestamp specified in milliseconds.
Adds all the element arguments to the HyperLogLog data structure stored
at the variable name specified as first argument.
As a side effect of this command the HyperLogLog internals may be updated
to reflect a different estimation of the number of unique items added so far
(the cardinality of the set).
If the approximated cardinality estimated by the HyperLogLog changed after
executing the command, PFADD returns 1, otherwise 0 is returned.
The command automatically creates an empty HyperLogLog structure (that is,
a Redis String of a specified length and with a given encoding) if
the specified key does not exist.
To call the command without elements but just the variable name is valid,
this will result into no operation performed if the variable already exists,
or just the creation of the data structure if the key does not exist
(in the latter case 1 is returned).
When called with a single key, returns the approximated cardinality computed
by the HyperLogLog data structure stored at the specified variable,
which is 0 if the variable does not exist.
When called with multiple keys, returns the approximated cardinality of
the union of the HyperLogLogs passed, by internally merging the HyperLogLogs
stored at the provided keys into a temporary hyperLogLog.
The HyperLogLog data structure can be used in order to count unique elements
in a set using just a small constant amount of memory, specifically 12k bytes
for every HyperLogLog (plus a few bytes for the key itself).
The returned cardinality of the observed set is not exact, but approximated
with a standard error of 0.81%.
For example, in order to take the count of all the unique search queries
performed in a day, a program needs to call PFADD every time a query is
processed. The estimated number of unique queries can be retrieved with
PFCOUNT at any time.
Note: as a side effect of calling this function, it is possible that
the HyperLogLog is modified, since the last 8 bytes encode the latest
computed cardinality for caching purposes. So PFCOUNT is technically
a write command.
Merge multiple HyperLogLog values into an unique value that will approximate
the cardinality of the union of the observed Sets of the source HyperLogLog
structures.
The computed merged HyperLogLog is set to the destination variable,
which is created if does not exist (defaulting to an empty HyperLogLog).
Ping server.
Redis Public/Subscribe messaging paradigm implementation.
Get the time to live in milliseconds of KEY.
Redis Public/Subscribe messaging paradigm implementation.
Redis Public/Subscribe messaging paradigm implementation.
Close the connection.
Return a random key from the key space.
Rename the old key in the new one, destroing the newname key if it already exists.
Rename the old key in the new one, if the newname key does not already exist.
Close and reopen CONN.
Create a KEY using the provided SERIALIZED-VALUE, previously obtained using DUMP.
Provide information on the role of a Redis instance in the context
of replication, by returning if the instance is currently a master, slave,
or sentinel. The command also returns additional information about the state
of the replication (if the role is master or slave) or the list of monitored
master names (if the role is sentinel).
Return and remove (atomically) the last element of the List at key.
Atomically returns and removes the last element (tail) of the list
stored at SOURCE, and pushes the element at the first element (head) of the list
stored at DESTINATION.
For example: consider SOURCE holding the list a,b,c, and DESTINATION holding
the list x,y,z. Executing RPOPLPUSH results in SOURCE holding a,b and
DESTINATION holding c,x,y,z.
If SOURCE does not exist, the value nil is returned and no operation is
performed. If SOURCE and DESTINATION are the same, the operation is equivalent
to removing the last element from the list and pushing it as first element
of the list, so it can be considered as a list rotation command.
Append an element to the tail of the list value at KEY.
Inserts value at the tail of the list stored at KEY, only if KEY already exists and holds a list. In contrary to RPUSH, no operation will be performed when KEY does not yet exist.
Add the specified member to the Set value at key.
Synchronously save the DB on disk.
The SCAN command and the closely related commands SSCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements. SCAN iterates the set of keys in the currently selected Redis database.
Return the number of elements (the cardinality) of the Set at key.
Check existence of scripts in the script cache.
Remove all the scripts from the script cache.
Kill the script currently in execution.
Load the specified Lua script into the script cache.
Return the difference between the Set stored at key1 and all the Sets key2, ..., keyN.
Compute the difference between the Set key1 and all the Sets key2, ..., keyN, and store the resulting Set at dstkey.
Select the DB having the specified index.
Set a key to a string value.
Sets or clears the bit at OFFSET in the string value stored at KEY.
Set KEY to hold the string VALUE and set KEY to timeout after a given number
of seconds. This command is equivalent to executing the following commands:
SET mykey value
EXPIRE mykey seconds
SETEX is atomic, and can be reproduced by using the previous two commands inside
an MULTI/EXEC block. It is provided as a faster alternative to the given
sequence of operations, because this operation is very common when Redis is used
as a cache.
An error is returned when seconds is invalid.
Set a key to a string value if the key does not exist.
Overwrites part of the string stored at KEY, starting at the specified OFFSET, for the entire length of VALUE. If the OFFSET is larger than the current length of the string at KEY, the string is padded with zero-bytes to make OFFSET fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at OFFSET. Note that the maximum OFFSET that you can set is 229^-1 (536870911), as Redis Strings are limited to 512 megabytes.
Synchronously save the DB on disk, then shutdown the server.
Return the intersection between the Sets stored at key1, key2, ..., keyN.
Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey.
Test if the specified value is a member of the Set at key.
Change the replication settings.
Manages the Redis slow queries log.
Return all the members of the Set value at key.
Move the specified member from one Set to another atomically.
Sort a Set or a List accordingly to the specified parameters.
Remove and return (pop) a random element from the Set value at key.
Get one or COUNT random members from a set at KEY.
When called with the additional count argument,
return an array of count distinct elements if count is positive.
If called with a negative count the behavior changes and the command
is allowed to return the same element multiple times.
In this case the numer of returned elements is the absolute
value of the specified count.
Remove the specified member from the Set value at key.
The SCAN command and the closely related commands SCAN, HSCAN and ZSCAN are used in order to incrementally iterate over a collection of elements. SSCAN iterates elements of Sets types.
Returns the length of the string value stored at KEY.
Redis Public/Subscribe messaging paradigm implementation.
Return a substring out of a larger string.
Warning: left for backwards compatibility. It is now called: GETRANGE.
Return the union between the Sets stored at key1, key2, ..., keyN.
Compute the union between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey.
Synchronize with slave.
The TIME command returns the current server time as a two items lists:
a Unix timestamp and the amount of microseconds already elapsed
in the current second.
Basically the interface is very similar to the one of the
gettimeofday system call.
Get the time to live in seconds of KEY.
Return the type of the value stored at key.
Redis Public/Subscribe messaging paradigm implementation.
Flushes all the previously watched keys for a transaction.
If you call EXEC or DISCARD, there’s no need to manually call UNWATCH.
Marks the given keys to be watched for conditional execution of a transaction.
Add the specified MEMBER to the Set value at KEY or update the SCORE if it already exist. If nil is returned, the element already existed in the set. Just the score was updated.
Return the cardinality (number of elements) of the sorted set at KEY.
Returns the number of elements in the sorted set at KEY with a score between MIN and MAX.
If the MEMBER already exists increment its score by INCREMENT, otherwise add the member setting INCREMENT as score.
Perform an intersection in DSTKEY over a number (N) of sorted sets at KEYS with optional WEIGHTS and AGGREGATE.
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering,
this command returns the number of elements in the sorted set at key
with a value between min and max.
The min and max arguments have the same meaning as described for ZRANGEBYLEX.
Return a range of elements from the sorted set at KEY.
Returns all the elements in the sorted set at KEY with a score between
MIN and MAX (including elements with score equal to MIN or MAX).
The elements are considered to be ordered from low to high scores.
The elements having the same score are returned in lexicographical order
(this follows from a property of the sorted set implementation in Redis and
does not involve further computation).
The optional LIMIT argument can be used to only get a range of the matching
elements (similar to SELECT LIMIT offset, count in SQL).
The optional WITHSCORES argument makes the command return both the element and
its score, instead of the element alone.
Return the rank (or index) or MEMBER in the sorted set at KEY, with scores being ordered from low to high.
Remove the specified MEMBER from the Set value at KEY.
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering, this command removes all elements
in the sorted set stored at KEY between the lexicographical range
specified by MIN and MAX.
The meaning of MIN and MAX are the same of the ZRANGEBYLEX command.
Similarly, this command actually returns the same elements that ZRANGEBYLEX
would return if called with the same min and max arguments.
Remove all the elements with rank >= MIN and rank <= MAX from the sorted set.
Remove all the elements with score >= MIN and score <= MAX from the sorted set.
Return a range of elements from the sorted set at KEY, exactly like ZRANGE, but the sorted set is ordered in traversed in reverse order, from the greatest to the smallest score.
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering, this command returns
all the elements in the sorted set at key with a value between max and min.
Apart from the reversed ordering, ZREVRANGEBYLEX is similar to ZRANGEBYLEX.
Returns all the elements in the sorted set at KEY with a score between
MAX and MIN (including elements with score equal to MAX or MIN).
In contrary to the default ordering of sorted sets, for this command the
elements are considered to be ordered from high to low scores.
The elements having the same score are returned in reverse lexicographical
order. Apart from the reversed ordering,
ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE.
Return the rank (or index) or MEMBER in the sorted set at KEY, with scores being ordered from high to low.
The ZSCAN command and the closely related commands SCAN, SSCAN and HSCAN are used in order to incrementally iterate over a collection of elements. ZSCAN iterates elements of Sorted Set types and their associated scores.
Return the score associated with the specified ELEMENT of the sorted set at KEY.
Perform a union in DSTKEY over a number (N) of sorted sets at KEYS with optional WEIGHTS and AGGREGATE.
redis-connection
)) ¶automatically generated reader method
auth
.
redis-connection
)) ¶automatically generated reader method
host
.
redis-connection
)) ¶automatically generated reader method
port
.
redis-connection
)) ¶automatically generated reader method
redis-connection
)) ¶automatically generated writer method
null
)) ¶redis-connection
)) ¶automatically generated reader method
redis-connection
)) ¶automatically generated writer method
redis-error
)) ¶Jump to: | (
A B C D E F G H I K L M O P Q R S T U W Z |
---|
Jump to: | (
A B C D E F G H I K L M O P Q R S T U W Z |
---|
Jump to: | *
+
A E H M P S |
---|
Jump to: | *
+
A E H M P S |
---|
Jump to: | C F P R S |
---|
Jump to: | C F P R S |
---|