pub enum Command {
Show 209 variants
Get {
key: Vec<u8>,
},
Set {
key: Vec<u8>,
value: Vec<u8>,
ex: Option<u64>,
px: Option<u64>,
nx: bool,
xx: bool,
},
GetSet {
key: Vec<u8>,
value: Vec<u8>,
},
Append {
key: Vec<u8>,
value: Vec<u8>,
},
Strlen {
key: Vec<u8>,
},
Incr {
key: Vec<u8>,
},
Decr {
key: Vec<u8>,
},
IncrBy {
key: Vec<u8>,
delta: i64,
},
DecrBy {
key: Vec<u8>,
delta: i64,
},
MGet {
keys: Vec<Vec<u8>>,
},
MSet {
entries: Vec<(Vec<u8>, Vec<u8>)>,
},
SetNx {
key: Vec<u8>,
value: Vec<u8>,
},
IncrByFloat {
key: Vec<u8>,
delta: f64,
},
GetRange {
key: Vec<u8>,
start: i64,
end: i64,
},
SetRange {
key: Vec<u8>,
offset: usize,
value: Vec<u8>,
},
GetDel {
key: Vec<u8>,
},
GetEx {
key: Vec<u8>,
ex: Option<u64>,
px: Option<u64>,
exat: Option<u64>,
pxat: Option<u64>,
persist: bool,
},
MSetNx {
entries: Vec<(Vec<u8>, Vec<u8>)>,
},
Del {
keys: Vec<Vec<u8>>,
},
Exists {
keys: Vec<Vec<u8>>,
},
Expire {
key: Vec<u8>,
seconds: u64,
},
PExpire {
key: Vec<u8>,
millis: u64,
},
Persist {
key: Vec<u8>,
},
Ttl {
key: Vec<u8>,
},
PTtl {
key: Vec<u8>,
},
Type {
key: Vec<u8>,
},
Keys {
pattern: String,
},
Scan {
cursor: u64,
pattern: Option<String>,
count: Option<usize>,
},
ExpireAt {
key: Vec<u8>,
timestamp: u64,
},
PExpireAt {
key: Vec<u8>,
timestamp_ms: u64,
},
Rename {
key: Vec<u8>,
newkey: Vec<u8>,
},
RenameNx {
key: Vec<u8>,
newkey: Vec<u8>,
},
Unlink {
keys: Vec<Vec<u8>>,
},
Copy {
source: Vec<u8>,
destination: Vec<u8>,
replace: bool,
},
RandomKey,
Touch {
keys: Vec<Vec<u8>>,
},
ObjectRefCount {
key: Vec<u8>,
},
ObjectIdleTime {
key: Vec<u8>,
},
ObjectHelp,
DbSize,
FlushDb,
LPush {
key: Vec<u8>,
values: Vec<Vec<u8>>,
},
RPush {
key: Vec<u8>,
values: Vec<Vec<u8>>,
},
LPop {
key: Vec<u8>,
},
RPop {
key: Vec<u8>,
},
LLen {
key: Vec<u8>,
},
LRange {
key: Vec<u8>,
start: i64,
stop: i64,
},
LIndex {
key: Vec<u8>,
index: i64,
},
LSet {
key: Vec<u8>,
index: i64,
value: Vec<u8>,
},
LInsert {
key: Vec<u8>,
before: bool,
pivot: Vec<u8>,
value: Vec<u8>,
},
LRem {
key: Vec<u8>,
count: i64,
value: Vec<u8>,
},
LTrim {
key: Vec<u8>,
start: i64,
stop: i64,
},
LPos {
key: Vec<u8>,
value: Vec<u8>,
rank: Option<i64>,
count: Option<i64>,
maxlen: Option<i64>,
},
RPopLPush {
source: Vec<u8>,
destination: Vec<u8>,
},
LMove {
source: Vec<u8>,
destination: Vec<u8>,
from_left: bool,
to_left: bool,
},
HSet {
key: Vec<u8>,
fields: Vec<(Vec<u8>, Vec<u8>)>,
},
HGet {
key: Vec<u8>,
field: Vec<u8>,
},
HDel {
key: Vec<u8>,
fields: Vec<Vec<u8>>,
},
HGetAll {
key: Vec<u8>,
},
HLen {
key: Vec<u8>,
},
HExists {
key: Vec<u8>,
field: Vec<u8>,
},
HIncrBy {
key: Vec<u8>,
field: Vec<u8>,
delta: i64,
},
HMGet {
key: Vec<u8>,
fields: Vec<Vec<u8>>,
},
HKeys {
key: Vec<u8>,
},
HVals {
key: Vec<u8>,
},
HSetNx {
key: Vec<u8>,
field: Vec<u8>,
value: Vec<u8>,
},
HIncrByFloat {
key: Vec<u8>,
field: Vec<u8>,
delta: f64,
},
HRandField {
key: Vec<u8>,
count: Option<i64>,
withvalues: bool,
},
HScan {
key: Vec<u8>,
cursor: u64,
pattern: Option<String>,
count: Option<usize>,
},
SAdd {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
SRem {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
SMembers {
key: Vec<u8>,
},
SIsMember {
key: Vec<u8>,
member: Vec<u8>,
},
SCard {
key: Vec<u8>,
},
SPop {
key: Vec<u8>,
count: Option<usize>,
},
SRandMember {
key: Vec<u8>,
count: Option<i64>,
},
SUnion {
keys: Vec<Vec<u8>>,
},
SUnionStore {
destination: Vec<u8>,
keys: Vec<Vec<u8>>,
},
SInter {
keys: Vec<Vec<u8>>,
},
SInterStore {
destination: Vec<u8>,
keys: Vec<Vec<u8>>,
},
SDiff {
keys: Vec<Vec<u8>>,
},
SDiffStore {
destination: Vec<u8>,
keys: Vec<Vec<u8>>,
},
SInterCard {
numkeys: usize,
keys: Vec<Vec<u8>>,
limit: Option<usize>,
},
SMove {
source: Vec<u8>,
destination: Vec<u8>,
member: Vec<u8>,
},
SMisMember {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
SScan {
key: Vec<u8>,
cursor: u64,
pattern: Option<String>,
count: Option<usize>,
},
Ping {
message: Option<Vec<u8>>,
},
Echo {
message: Vec<u8>,
},
Info {
section: Option<String>,
},
BgSave,
BgRewriteAof,
FlushAll,
CommandInfo {
names: Vec<Vec<u8>>,
},
Hello {
version: Option<u8>,
},
Auth {
password: Vec<u8>,
},
Dump,
Multi,
Exec,
Discard,
Watch {
keys: Vec<Vec<u8>>,
},
Unwatch,
ConfigGet {
pattern: String,
},
ConfigSet {
parameter: String,
value: String,
},
ConfigResetStat,
ClientId,
ClientGetName,
ClientSetName {
name: Vec<u8>,
},
ClientList,
ClientInfo,
Time,
Select {
db: i64,
},
Quit,
Wait {
numreplicas: i64,
timeout: i64,
},
CommandCount,
CommandList,
CommandHelp,
CommandDocs {
names: Vec<Vec<u8>>,
},
DocCreate {
collection: Vec<u8>,
compression: Option<Vec<u8>>,
},
DocDrop {
collection: Vec<u8>,
},
DocInfo {
collection: Vec<u8>,
},
DocDictInfo {
collection: Vec<u8>,
},
DocStorage {
collection: Vec<u8>,
},
DocSet {
collection: Vec<u8>,
doc_id: Vec<u8>,
json: Vec<u8>,
},
DocInsert {
collection: Vec<u8>,
json: Vec<u8>,
},
DocMSet {
collection: Vec<u8>,
entries: Vec<(Vec<u8>, Vec<u8>)>,
},
DocGet {
collection: Vec<u8>,
doc_id: Vec<u8>,
fields: Vec<Vec<u8>>,
},
DocMGet {
collection: Vec<u8>,
doc_ids: Vec<Vec<u8>>,
},
DocUpdate {
collection: Vec<u8>,
doc_id: Vec<u8>,
mutations: Vec<DocUpdateMutation>,
},
DocDel {
collection: Vec<u8>,
doc_id: Vec<u8>,
},
DocExists {
collection: Vec<u8>,
doc_id: Vec<u8>,
},
DocCreateIndex {
collection: Vec<u8>,
field: Vec<u8>,
index_type: Vec<u8>,
},
DocDropIndex {
collection: Vec<u8>,
field: Vec<u8>,
},
DocIndexes {
collection: Vec<u8>,
},
DocFind {
collection: Vec<u8>,
where_clause: Vec<u8>,
fields: Vec<Vec<u8>>,
limit: Option<usize>,
offset: usize,
order_by: Option<Vec<u8>>,
order_desc: bool,
},
DocCount {
collection: Vec<u8>,
where_clause: Vec<u8>,
},
CdcPoll {
cursor: u64,
count: usize,
},
CdcGroupCreate {
key: Vec<u8>,
group: String,
start_seq: u64,
},
CdcGroupRead {
key: Vec<u8>,
group: String,
consumer: String,
count: usize,
},
CdcAck {
key: Vec<u8>,
group: String,
seqs: Vec<u64>,
},
CdcPending {
key: Vec<u8>,
group: String,
},
VecSet {
key: Vec<u8>,
dimensions: usize,
vector: Vec<f32>,
},
VecQuery {
key: Vec<u8>,
k: usize,
vector: Vec<f32>,
},
VecDel {
key: Vec<u8>,
},
ZAdd {
key: Vec<u8>,
members: Vec<(f64, Vec<u8>)>,
},
ZRem {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
ZScore {
key: Vec<u8>,
member: Vec<u8>,
},
ZRank {
key: Vec<u8>,
member: Vec<u8>,
},
ZRevRank {
key: Vec<u8>,
member: Vec<u8>,
},
ZCard {
key: Vec<u8>,
},
ZRange {
key: Vec<u8>,
start: i64,
stop: i64,
withscores: bool,
},
ZRevRange {
key: Vec<u8>,
start: i64,
stop: i64,
withscores: bool,
},
ZRangeByScore {
key: Vec<u8>,
min: f64,
max: f64,
withscores: bool,
offset: Option<usize>,
count: Option<usize>,
},
ZIncrBy {
key: Vec<u8>,
delta: f64,
member: Vec<u8>,
},
ZCount {
key: Vec<u8>,
min: f64,
max: f64,
},
ZRevRangeByScore {
key: Vec<u8>,
max: f64,
min: f64,
withscores: bool,
offset: Option<usize>,
count: Option<usize>,
},
ZPopMin {
key: Vec<u8>,
count: Option<usize>,
},
ZPopMax {
key: Vec<u8>,
count: Option<usize>,
},
ZRangeByLex {
key: Vec<u8>,
min: Vec<u8>,
max: Vec<u8>,
offset: Option<usize>,
count: Option<usize>,
},
ZRevRangeByLex {
key: Vec<u8>,
max: Vec<u8>,
min: Vec<u8>,
offset: Option<usize>,
count: Option<usize>,
},
ZLexCount {
key: Vec<u8>,
min: Vec<u8>,
max: Vec<u8>,
},
ZMScore {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
ZRandMember {
key: Vec<u8>,
count: Option<i64>,
withscores: bool,
},
ZScan {
key: Vec<u8>,
cursor: u64,
pattern: Option<String>,
count: Option<usize>,
},
XAdd {
key: Vec<u8>,
id: Vec<u8>,
fields: Vec<(Vec<u8>, Vec<u8>)>,
maxlen: Option<usize>,
},
XLen {
key: Vec<u8>,
},
XRange {
key: Vec<u8>,
start: Vec<u8>,
end: Vec<u8>,
count: Option<usize>,
},
XRevRange {
key: Vec<u8>,
start: Vec<u8>,
end: Vec<u8>,
count: Option<usize>,
},
XRead {
keys: Vec<Vec<u8>>,
ids: Vec<Vec<u8>>,
count: Option<usize>,
},
XTrim {
key: Vec<u8>,
maxlen: usize,
},
ObjectFreq {
key: Vec<u8>,
},
ObjectEncoding {
key: Vec<u8>,
},
StatsHotkeys {
count: usize,
},
StatsLatency {
command: Vec<u8>,
percentiles: Vec<f64>,
},
StatsMemory {
prefixes: Vec<Vec<u8>>,
},
Subscribe {
channels: Vec<Vec<u8>>,
},
Unsubscribe {
channels: Vec<Vec<u8>>,
},
PSubscribe {
patterns: Vec<Vec<u8>>,
},
PUnsubscribe {
patterns: Vec<Vec<u8>>,
},
Publish {
channel: Vec<u8>,
message: Vec<u8>,
},
PfAdd {
key: Vec<u8>,
elements: Vec<Vec<u8>>,
},
PfCount {
keys: Vec<Vec<u8>>,
},
PfMerge {
destkey: Vec<u8>,
sourcekeys: Vec<Vec<u8>>,
},
SetBit {
key: Vec<u8>,
offset: u64,
value: u8,
},
GetBit {
key: Vec<u8>,
offset: u64,
},
BitCount {
key: Vec<u8>,
start: Option<i64>,
end: Option<i64>,
use_bit: bool,
},
BitOp {
operation: BitOperation,
destkey: Vec<u8>,
keys: Vec<Vec<u8>>,
},
BitPos {
key: Vec<u8>,
bit: u8,
start: Option<i64>,
end: Option<i64>,
use_bit: bool,
},
BitField {
key: Vec<u8>,
operations: Vec<BitFieldOperation>,
},
GeoAdd {
key: Vec<u8>,
nx: bool,
xx: bool,
ch: bool,
members: Vec<(f64, f64, Vec<u8>)>,
},
GeoDist {
key: Vec<u8>,
member1: Vec<u8>,
member2: Vec<u8>,
unit: GeoUnit,
},
GeoHash {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
GeoPos {
key: Vec<u8>,
members: Vec<Vec<u8>>,
},
GeoSearch {
key: Vec<u8>,
from_member: Option<Vec<u8>>,
from_lonlat: Option<(f64, f64)>,
radius: f64,
unit: GeoUnit,
asc: Option<bool>,
count: Option<usize>,
withcoord: bool,
withdist: bool,
withhash: bool,
},
BLPop {
keys: Vec<Vec<u8>>,
timeout: f64,
},
BRPop {
keys: Vec<Vec<u8>>,
timeout: f64,
},
BLMove {
source: Vec<u8>,
destination: Vec<u8>,
from_left: bool,
to_left: bool,
timeout: f64,
},
BZPopMin {
keys: Vec<Vec<u8>>,
timeout: f64,
},
BZPopMax {
keys: Vec<Vec<u8>>,
timeout: f64,
},
XGroupCreate {
key: Vec<u8>,
group: String,
id: String,
mkstream: bool,
},
XGroupDestroy {
key: Vec<u8>,
group: String,
},
XGroupDelConsumer {
key: Vec<u8>,
group: String,
consumer: String,
},
XReadGroup {
group: String,
consumer: String,
count: Option<usize>,
keys: Vec<Vec<u8>>,
ids: Vec<Vec<u8>>,
},
XAck {
key: Vec<u8>,
group: String,
ids: Vec<Vec<u8>>,
},
XPending {
key: Vec<u8>,
group: String,
start: Option<Vec<u8>>,
end: Option<Vec<u8>>,
count: Option<usize>,
},
XClaim {
key: Vec<u8>,
group: String,
consumer: String,
min_idle_time: u64,
ids: Vec<Vec<u8>>,
},
XAutoClaim {
key: Vec<u8>,
group: String,
consumer: String,
min_idle_time: u64,
start: Vec<u8>,
count: Option<usize>,
},
XInfoStream {
key: Vec<u8>,
},
XInfoGroups {
key: Vec<u8>,
},
XDel {
key: Vec<u8>,
ids: Vec<Vec<u8>>,
},
}Expand description
A parsed command ready for execution by a shard.
Variants§
Get
GET key
Set
SET key value [EX seconds] [PX millis] [NX|XX]
Fields
GetSet
GETSET key value (deprecated but supported)
Append
APPEND key value
Strlen
STRLEN key
Incr
INCR key
Decr
DECR key
IncrBy
INCRBY key delta
DecrBy
DECRBY key delta
MGet
MGET key [key …]
MSet
MSET key value [key value …]
SetNx
SETNX key value
IncrByFloat
INCRBYFLOAT key delta
GetRange
GETRANGE key start end
SetRange
SETRANGE key offset value
GetDel
GETDEL key
GetEx
GETEX key [EX seconds | PX millis | EXAT timestamp | PXAT timestamp_ms | PERSIST]
Fields
MSetNx
MSETNX key value [key value …]
Del
DEL key [key …]
Exists
EXISTS key [key …]
Expire
EXPIRE key seconds
PExpire
PEXPIRE key milliseconds
Persist
PERSIST key
Ttl
TTL key
PTtl
PTTL key
Type
TYPE key
Keys
KEYS pattern
Scan
SCAN cursor [MATCH pattern] [COUNT count]
Fields
ExpireAt
EXPIREAT key timestamp
PExpireAt
PEXPIREAT key timestamp_ms
Rename
RENAME key newkey
RenameNx
RENAMENX key newkey
Unlink
UNLINK key [key …]
Copy
COPY source destination [REPLACE]
Fields
RandomKey
RANDOMKEY
Touch
TOUCH key [key …]
ObjectRefCount
OBJECT REFCOUNT key
ObjectIdleTime
OBJECT IDLETIME key
ObjectHelp
OBJECT HELP
DbSize
DBSIZE
FlushDb
FLUSHDB
LPush
LPUSH key value [value …]
RPush
RPUSH key value [value …]
LPop
LPOP key
RPop
RPOP key
LLen
LLEN key
LRange
LRANGE key start stop
Fields
LIndex
LINDEX key index
LSet
LSET key index value
LInsert
LINSERT key BEFORE|AFTER pivot value
Fields
LRem
LREM key count value
Fields
LTrim
LTRIM key start stop
LPos
LPOS key value [RANK rank] [COUNT count] [MAXLEN len]
Fields
RPopLPush
RPOPLPUSH source destination
LMove
LMOVE source destination LEFT|RIGHT LEFT|RIGHT
Fields
HSet
HSET key field value [field value …]
HGet
HGET key field
HDel
HDEL key field [field …]
HGetAll
HGETALL key
HLen
HLEN key
HExists
HEXISTS key field
HIncrBy
HINCRBY key field increment
HMGet
HMGET key field [field …]
HKeys
HKEYS key
HVals
HVALS key
HSetNx
HSETNX key field value
HIncrByFloat
HINCRBYFLOAT key field delta
HRandField
HRANDFIELD key [count [WITHVALUES]]
Fields
HScan
HSCAN key cursor [MATCH pattern] [COUNT count]
Fields
SAdd
SADD key member [member …]
SRem
SREM key member [member …]
SMembers
SMEMBERS key
SIsMember
SISMEMBER key member
SCard
SCARD key
SPop
SPOP key [count]
SRandMember
SRANDMEMBER key [count]
SUnion
SUNION key [key …]
SUnionStore
SUNIONSTORE destination key [key …]
SInter
SINTER key [key …]
SInterStore
SINTERSTORE destination key [key …]
SDiff
SDIFF key [key …]
SDiffStore
SDIFFSTORE destination key [key …]
SInterCard
SINTERCARD numkeys key [key …] [LIMIT limit]
Fields
SMove
SMOVE source destination member
Fields
SMisMember
SMISMEMBER key member [member …]
SScan
SSCAN key cursor [MATCH pattern] [COUNT count]
Fields
Ping
PING [message]
Echo
ECHO message
Info
INFO [section]
BgSave
BGSAVE — trigger a background RDB snapshot.
BgRewriteAof
BGREWRITEAOF — trigger a WAL rewrite.
FlushAll
FLUSHALL — flush all databases.
CommandInfo
COMMAND [INFO [command …]] — returns command metadata.
Hello
HELLO [protover] — protocol version negotiation (RESP3).
Auth
AUTH password — authenticate the connection.
Dump
DUMP — extract all key-value entries from a shard (internal).
Multi
MULTI — start a transaction block.
Exec
EXEC — execute all queued commands in a transaction.
Discard
DISCARD — discard all queued commands in a transaction.
Watch
WATCH key [key …] — optimistic locking (accepted, not enforced).
Unwatch
UNWATCH — clear all watched keys.
ConfigGet
CONFIG GET pattern
ConfigSet
CONFIG SET parameter value
ConfigResetStat
CONFIG RESETSTAT
ClientId
CLIENT ID — return connection unique ID.
ClientGetName
CLIENT GETNAME — return connection name.
ClientSetName
CLIENT SETNAME name — set connection name.
ClientList
CLIENT LIST — list all connections.
ClientInfo
CLIENT INFO — current connection info.
Time
TIME — return server time.
Select
SELECT db — select database (only db 0 supported).
Quit
QUIT — close connection gracefully.
Wait
WAIT numreplicas timeout — wait for replication acknowledgements.
CommandCount
COMMAND COUNT — return number of supported commands.
CommandList
COMMAND LIST — return the names of supported commands.
CommandHelp
COMMAND HELP — return command help text.
CommandDocs
COMMAND DOCS [command …] — return command documentation metadata.
DocCreate
DOC.CREATE collection [COMPRESSION profile] — create a collection.
Fields
DocDrop
DOC.DROP collection — drop a collection.
DocInfo
DOC.INFO collection — collection metadata.
DocDictInfo
DOC.DICTINFO collection — dictionary statistics for a collection.
DocStorage
DOC.STORAGE collection — storage statistics for a collection.
DocSet
DOC.SET collection doc_id json — insert or replace a document.
Fields
DocInsert
DOC.INSERT collection json — insert with auto-generated ID.
DocMSet
DOC.MSET collection doc_id json [doc_id json …] — batch insert/replace.
Fields
DocGet
DOC.GET collection doc_id [FIELDS path …] — fetch a document.
Fields
DocMGet
DOC.MGET collection doc_id [doc_id …] — batch fetch.
DocUpdate
DOC.UPDATE collection doc_id <mutation…> — apply field-level mutations.
Fields
mutations: Vec<DocUpdateMutation>Mutation operations to apply in order.
DocDel
DOC.DEL collection doc_id — delete a document.
DocExists
DOC.EXISTS collection doc_id — check document existence.
DocCreateIndex
DOC.CREATEINDEX collection field type — create a secondary index.
Fields
DocDropIndex
DOC.DROPINDEX collection field — drop a secondary index.
DocIndexes
DOC.INDEXES collection — list indexes.
DocFind
DOC.FIND collection WHERE expr [ORDER BY field [ASC|DESC]] [PROJECT f1 f2 …] [LIMIT n] [OFFSET n]
Fields
DocCount
DOC.COUNT collection WHERE expr
CdcPoll
CDCPOLL cursor count — poll CDC events from a shard.
CdcGroupCreate
CDC.GROUP CREATE key group start_seq — create a consumer group.
Fields
CdcGroupRead
CDC.GROUP READ key group consumer count — read from a consumer group.
Fields
CdcAck
CDC.ACK key group seq [seq …] — acknowledge events.
Fields
CdcPending
CDC.PENDING key group — list pending entries.
VecSet
VECSET key dim v1 v2 … — store a vector.
Fields
VecQuery
VECQUERY key k v1 v2 … — query nearest neighbors.
VecDel
VECDEL key — delete a vector.
ZAdd
ZADD key score member [score member …]
ZRem
ZREM key member [member …]
ZScore
ZSCORE key member
ZRank
ZRANK key member
ZRevRank
ZREVRANK key member
ZCard
ZCARD key
ZRange
ZRANGE key start stop [WITHSCORES]
Fields
ZRevRange
ZREVRANGE key start stop [WITHSCORES]
Fields
ZRangeByScore
ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]
Fields
ZIncrBy
ZINCRBY key increment member
ZCount
ZCOUNT key min max
ZRevRangeByScore
ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]
Fields
ZPopMin
ZPOPMIN key [count]
ZPopMax
ZPOPMAX key [count]
ZRangeByLex
ZRANGEBYLEX key min max [LIMIT offset count]
Fields
ZRevRangeByLex
ZREVRANGEBYLEX key max min [LIMIT offset count]
Fields
ZLexCount
ZLEXCOUNT key min max
ZMScore
ZMSCORE key member [member …]
ZRandMember
ZRANDMEMBER key [count [WITHSCORES]]
Fields
ZScan
ZSCAN key cursor [MATCH pattern] [COUNT count]
Fields
XAdd
XADD key [MAXLEN count] id field value [field value …]
Fields
XLen
XLEN key
XRange
XRANGE key start end [COUNT count]
Fields
XRevRange
XREVRANGE key end start [COUNT count]
Fields
XRead
XREAD [COUNT count] STREAMS key [key …] id [id …]
Fields
XTrim
XTRIM key MAXLEN count
ObjectFreq
OBJECT FREQ key — return the LFU frequency counter.
ObjectEncoding
OBJECT ENCODING key — return the encoding type.
StatsHotkeys
STATS.HOTKEYS count — return top hot keys.
StatsLatency
STATS.LATENCY command p1 p2 … — return latency percentiles.
Fields
StatsMemory
STATS.MEMORY prefix … — return memory usage for key prefixes.
Subscribe
SUBSCRIBE channel [channel …]
Unsubscribe
UNSUBSCRIBE [channel …]
PSubscribe
PSUBSCRIBE pattern [pattern …]
PUnsubscribe
PUNSUBSCRIBE [pattern …]
Publish
PUBLISH channel message
PfAdd
PFADD key element [element …]
PfCount
PFCOUNT key [key …]
PfMerge
PFMERGE destkey sourcekey [sourcekey …]
SetBit
SETBIT key offset value
GetBit
GETBIT key offset
BitCount
BITCOUNT key [start end [BYTE|BIT]]
Fields
BitOp
BITOP AND|OR|XOR|NOT destkey key [key …]
Fields
operation: BitOperationThe bitwise operation.
BitPos
BITPOS key bit [start [end [BYTE|BIT]]]
Fields
BitField
BITFIELD key [GET|SET|INCRBY|OVERFLOW …]
Fields
operations: Vec<BitFieldOperation>Ordered BITFIELD operations to execute.
GeoAdd
GEOADD key [NX|XX] [CH] longitude latitude member […]
Fields
GeoDist
GEODIST key member1 member2 [m|km|ft|mi]
Fields
GeoHash
GEOHASH key member [member …]
GeoPos
GEOPOS key member [member …]
GeoSearch
GEOSEARCH key FROMMEMBER member|FROMLONLAT lon lat BYRADIUS radius unit [ASC|DESC] [COUNT count] [WITHCOORD] [WITHDIST] [WITHHASH]
Fields
BLPop
BLPOP key [key …] timeout
Fields
BRPop
BRPOP key [key …] timeout
Fields
BLMove
BLMOVE source destination LEFT|RIGHT LEFT|RIGHT timeout
Fields
BZPopMin
BZPOPMIN key [key …] timeout
Fields
BZPopMax
BZPOPMAX key [key …] timeout
Fields
XGroupCreate
XGROUP CREATE key group id [MKSTREAM]
Fields
XGroupDestroy
XGROUP DESTROY key group
XGroupDelConsumer
XGROUP DELCONSUMER key group consumer
Fields
XReadGroup
XREADGROUP GROUP group consumer [COUNT count] STREAMS key [key …] id [id …]
Fields
XAck
XACK key group id [id …]
Fields
XPending
XPENDING key group [start end count]
Fields
XClaim
XCLAIM key group consumer min-idle-time id [id …]
Fields
XAutoClaim
XAUTOCLAIM key group consumer min-idle-time start [COUNT count]
Fields
XInfoStream
XINFO STREAM key
XInfoGroups
XINFO GROUPS key
XDel
XDEL key id [id …]
Implementations§
Source§impl Command
impl Command
Sourcepub fn key(&self) -> Option<&[u8]>
pub fn key(&self) -> Option<&[u8]>
Extract the primary key for routing, if this is a single-key command.
Sourcepub fn is_multi_key(&self) -> bool
pub fn is_multi_key(&self) -> bool
Returns true if this command operates on multiple keys that may span shards.
Sourcepub fn is_keyless(&self) -> bool
pub fn is_keyless(&self) -> bool
Returns true if this is a keyless/server command.
Sourcepub fn is_mutation(&self) -> bool
pub fn is_mutation(&self) -> bool
Returns true if this command mutates data (for WAL logging).