命令兼容性

最近更新时间: 2025-01-15 17:01:00

各版本命令兼容性说明如下表:

命令族命令4.0标准版4.0集群版5.0标准版5.0集群版集群版跨 Slot 支持

connection 族
auth-
echo-
ping-
quit-
select-
swapdbxx-

hash 族
hdel-
hexists-
hget
-
hgetall-
hincrby-
hincrbyfloat-
hkeys-
hlen-
hmget-
hmset>
-
hset-
hsetnx-
hstrlen-
hvals-
hscan-
touch-
restore-
object-
unlinkx
waitxx-
migratexxxx-
dump-
del
scan-
exists
expire-
expireat-
keys-
type-
move-
ttl-
persist-
pexpire-
pexpireat-
pttl-
randomkey-
renamex
renamenxx
sort-

list 族
lindex-
linsert-
llen-
lpop-
lpush-
lpushx-
lrange-
lrem-
lset-
ltrim-
rpop-
rpoplpushx
rpush-
rpushx-
blpopx
brpopx
brpoplpushx

pub/sub 族
psubscribe-
pubsub-
publish-
punsubscribe-
subscribe-
unsubscribe-

sets 族
sadd-
scard-
sdiffx
sdiffstorex
sinterx
sinterstorex
sismember-
smembers-
smovex
spop-
srandmember-
srem-
sscan-
sunionx
sunionstorex

sorted sets 族
zadd-
zcard-
zcount-
zincrby-
zinterstorex
zlexcount-
zrange-
zrangebylex-
zrangebyscore-
zrank-
zrem-
zremrangebylex-
zremrangebyrank-
zremrangebyscore-
zrevrange-
zrevrangebylex-
zrevrangebyscore-
zscore-
zrevrank-
zscan-
zunionstorex

zpopmax
xx-

zpopmin
xx-

bzpopmax
xx-

bzpopmin
xx-

strings 族
append-
bitcount-
bitopx
bitpos-
decr-
decrby-
get-
getbit-
getrange-
getset-
incr-
incrby-
incrbyfloat-
mget
mset
msetnxx
psetex-
setex-
set-
setbit-
setnx-
setrange-
strlen-
bitfield-

transactions 族
discard-
exec-
multi-
unwatch-
watch-

hyperloglog 族
pfadd-
pfcountx
pfmergex

scripting 族
evalx
evalshax
script debug-
script existsx
script flush-
script load-
script kill-

geo 族
geoadd-
geohash-
geopos-
geodist-
georadius-
georadiusbymember-

server 族
bgrewriteaofxxxx-
bgsavexxxx-
client killxxxx-
syncxxxx-
psyncxxxx-
client list-
client getname-
client pausexxxx-
client replyxxxx-
client setname-
command count-
command getkeys-
command info-
slaveofxxxx-
config rewrite







-
config setxxxx-
config resetstat







-
debug objectxxxx-
debug segfaultxxxx-
role-
savexxxx-
lastsave-
shutdownxxxx-
MEMORYxx-
command-
dbsize-
info-
time-
config get-
monitor-
flushdb-
flushall-
slowlogxx-
cluster keyslotxx-
cluster nodesxx-
cluster getkeysinslotxx-
cluster slotsxx-
cluster infoxx-
cluster countkeysinslotxx-
cluster 其他xxxx-
modulexxxx-
lolwutxx-

Stream 族
xinfoxx-
xaddxx-
xtrimxx-
xdelxx-
xrangexx-
xrevrangexx-
xlenxx-
xreadxxx
xgroupxx-
xreadgroupxxx
xackxx-
xclaimxx-
xpendingxx-