Skip to main content

Supported commands

String commands

CommandSupported OR NotSince VersionDesc
APPENDv1.0.0
DECRv1.0.0
DECRBYv1.0.0
GETv1.0.0
GETEXv2.2.0
GETRANGEv1.0.0
SUBSTRv2.4.0
GETSETv1.0.0
INCRv1.0.0
INCRBYv1.0.0
INCRBYFLOATv1.0.0
MGETv1.0.0
MSETv1.0.0
MSETNXv1.3.0
PSETEXv1.3.0precision is in seconds if old encoding is used (see #1033)
SETv1.0.0supported KEEPTTL and GET options since v2.8.0
SETEXv1.0.0
SETNXv1.0.0
SETRANGEv1.0.0
STRLENv1.0.0
CASv2.0.5see #415
CADv2.0.5see #415
GETDELv2.2.0
LCSunstable

Hash commands

CommandSupported OR NotSince VersionDesc
HDELv1.0.0
HEXISTSv1.0.0
HGETv1.0.0
HGETALLv1.0.0
HINCRBYv1.0.0
HINCRBYFLOATv1.0.0
HKEYSv1.0.0
HLENv1.0.0
HMGETv1.0.0
HMSETv1.0.0
HRANGEBYLEXv2.3.0
HSETv1.0.0
HSETNXv1.0.0
HSTRLENv1.0.0
HVALSv1.0.0
HSCANv1.0.0
HRANDFIELDv2.6.0

List commands

CommandSupported OR NotSince VersionDesc
BLPOPv1.0.0
BRPOPv1.0.0
BRPOPLPUSHX-deprecated
LINDEXv1.0.0O(N) operation, do not use it when the list is too long
LINSERTv1.0.0O(N) operation, do not use it when the list is too long
LLENv1.0.0
LPOPv1.0.0
LPUSHv1.0.0
LPUSHXv1.0.0
LRANGEv1.0.0
LREMv1.0.0O(N) operation, do not use it when the list is too long
LSETv1.0.0
LTRIMv1.0.0O(N) operation, do not use it when the list is too long
RPOPv1.0.0
RPOPLPUSHv1.0.0
RPUSHv1.0.0
RPUSHXv1.0.0
LMOVEv2.1.0
BLMOVEv2.6.0
LPOSv2.6.0
LMPOPv2.6.0
BLMPOPv2.7.0

Set commands

CommandSupported OR NotSince VersionDesc
SADDv1.0.0
SCARDv1.0.0
SDIFFv1.0.0
SDIFFSTOREv1.0.0
SINTERv1.0.0
SINTERCARDv2.5.0
SINTERSTOREv1.0.0
SISMEMBERv1.0.0
SMEMBERSv1.0.0
SMOVEv1.0.0
SPOPv1.0.0pop members in the order of keys
SRANDMEMBERv1.0.0always first N members if not changed
SREMv1.0.0
SUNIONv1.0.0
SUNIONSTOREv1.0.0
SSCANv1.0.0

ZSet commands

CommandSupported OR NotSince VersionDesc
BZMPOPv2.5.0
BZPOPMINv2.5.0
BZPOPMAXv2.5.0
ZADDv1.0.0
ZCARDv1.0.0
ZCOUNTv1.0.0
ZINCRBYv1.0.0
ZINTERSTOREv1.0.0
ZLEXCOUNTv1.0.0
ZMPOPv2.5.0
ZMSCOREv1.1.20multi ZSCORE
ZPOPMINv1.0.0
ZPOPMAXv1.0.0
ZRANGESTOREv2.5.0
ZRANGEv1.0.0
ZRANGEBYLEXv1.0.0
ZRANGEBYSCOREv1.0.0
ZRANKv1.0.0
ZREMv1.0.0
ZREMRANGEBYLEXv1.0.0
ZREMRANGEBYRANKv1.0.0
ZREMRANGEBYSCOREv1.0.0
ZREVRANKv1.0.0
ZREVRANGEv1.0.0
ZREVRANGEBYLEXv2.0.5
ZREVRANGEBYSCOREv1.0.0
ZSCANv1.0.0
ZSCOREv1.0.0
ZUNIONv2.5.0
ZUNIONSTOREv1.0.0
ZINTERv2.8.0
ZINTERCARDv2.8.0
ZRANDMEMBERv2.8.0

Key commands

CommandSupported OR NotSince VersionDesc
DELv1.0.0
DUMPX-
EXISTSv1.0.0
EXPIREv1.0.0
EXPIREATv1.0.0
EXPIRETIMEv2.8.0
PEXPIRETIMEv2.8.0
KEYSv1.0.0
PERSISTv1.0.0
PEXPIREv1.0.0precision is in seconds if old encoding is used (see #1033)
PEXPIREATv1.0.0precision is in seconds if old encoding is used (see #1033)
PTTLv1.0.0precision is in seconds if old encoding is used (see #1033)
TTLv1.0.0
TYPEv1.0.0
SCANv1.0.0
RENAMEX-
RANDOMKEYv1.0.0
UNLINKv2.1.0
MOVEv2.6.0if the key does not exist, the command returns 0, otherwise it will always return 1
MOVEXunstablemove a key between namespaces, see #2225
COPYunstable

Bit commands

CommandSupported OR NotSince VersionDesc
GETBITv1.0.0
SETBITv1.0.0
BITCOUNTv1.0.0
BITPOSv1.0.0
BITFIELDv2.7.0
BITFIELD_ROv2.8.0
BITOPv2.1.0
note

String and bitmap are different types in Kvrocks, so you cannot do bit operations with string, and vice versa.

Script commands

CommandSupported OR NotSince VersionDesc
EVALv2.0.4
EVALSHAv2.0.4
EVAL_ROv2.2.0
EVALSHA_ROv2.2.0
SCRIPTv2.0.4SCRIPT KILL and DEBUG subcommand are not supported

PubSub commands

CommandSupported OR NotSince VersionDesc
PSUBSCRIBEv1.0.0
PUBLISHv1.0.0
MPUBLISHv2.6.0
PUBSUBv1.0.0
PUNSUBSCRIBEv1.0.0
SUBSCRIBEv1.0.0
UNSUBSCRIBEv1.0.0
SSUBSCRIBEv2.8.0
SUNSUBSCRIBEv2.8.0

Transaction commands

CommandSupported OR NotSince VersionDesc
MULTIv2.0.2
EXECv2.0.2
DISCARDv2.0.2
WATCHv2.4.0
UNWATCHv2.4.0

SortedInt commands

CommandSupported OR NotSince VersionDesc
SICARDv1.0.2like SCARD
SIADDv1.0.2like SADD, but members are integers
SIREMv1.0.2like SREM, but members are integers
SIRANGEv1.0.2SIRANGE key offset count cursor since_id
SIREVRANGEv1.0.2SIREVRANGE key offset count cursor max_id
SIEXISTSv1.1.20SIEXISTS key member1 [member2 ...]
SIRANGEBYVALUEv1.1.31SIRANGEBYVALUE key min max [LIMIT offset count]
SIREVRANGEBYVALUEv1.1.31SIREVRANGEBYVALUE key max min [LIMIT offset count]

Cluster commands

SUBCOMMANDSupported OR NotSince VersionDesc
CLUSTERv2.0.2
CLUSTERXv2.0.2
READONLYunstable
READWRITEunstable

CLUSTER subcommands

These commands are subcommands for CLUSTER, using as CLUSTER INFO etc.

SUBCOMMANDSupported OR NotSince VersionDesc
INFOv2.0.2
NODESv2.0.2
SLOTSv2.0.2
KEYSLOTv2.0.2
RESETunstable
REPLICASunstable

CLUSTERX subcommands

These commands are subcommands for CLUSTERX, using as CLUSTERX VERSION etc.

SUBCOMMANDSupported OR NotSince VersionDesc
VERSIONv2.0.2
SETNODEIDv2.0.2
SETNODESv2.0.2
SETSLOTv2.0.6
MIGRATEv2.0.6
note

To guarantee the correctness of client SDK, we rename the CLUSTER command to CLUSTERX to prevent the topology can being modified casually, but we can still use the CLUSTER command to fetch the cluster topology information.

Server commands

CommandSupported OR NotSince VersionDesc
BGSAVEv1.0.0
LASTSAVEv2.6.0
PINGv1.0.0
SELECTv1.0.0simply returns OK
ECHOv2.0.6
MONITORv1.0.0
SHUTDOWNv1.0.0
INFOv1.0.0
ROLEv1.1.30
CONFIGv1.0.0
DBSIZEv1.0.0
DISKv2.2.0DISK USAGE user_key to get the disk usage of the user_key, see #874
MEMORYv2.4.0MEMORY USAGE command is an alias to DISK USAGE command
DEBUGv1.3.0only DEBUG SLEEP is supported
NAMESPACEv1.0.0
FLUSHDBv1.0.0
FLUSHALLv1.0.0
FLUSHBACKUPv1.3.1
COMMANDv2.0.1
CLIENTv1.0.0
AUTHv1.0.0
QUITv1.0.0
SLAVEOFv1.0.0
SLOWLOGv1.0.0
PERFLOGv1.0.0
HELLOv2.2.0
TIMEv2.4.0
STATSv1.0.0dump the rocksdb statistics in JSON format
RESTOREv2.6.0create the new key with Redis serialized value, now supports String/List/Hash/Set/ZSet data types
COMPACTv1.0.0
RDBv2.7.0RDB LOAD command is used to load RDB file from local path into Kvrocks
DUMPunstable
note

The db size is updated async after execute DBSIZE SCAN command.

GEO commands

CommandSupported OR NotSince VersionDesc
GEOADDv1.1.12
GEODISTv1.1.12
GEOHASHv1.1.12
GEOPOSv1.1.12
GEORADIUSv1.1.12
GEORADIUS_rov1.1.12
GEORADIUSBYMEMBERv1.1.12
GEORADIUSBYMEMBER_rov1.1.12
GEOSEARCHv2.6.0
GEOSEARCHSTOREv2.6.0

Stream commands

CommandSupported OR NotSince VersionDesc
XADDv2.2.0
XDELv2.2.0
XINFOv2.2.0STREAM only
XLENv2.2.0
XRANGEv2.2.0
XREADv2.2.0
XREVRANGEv2.2.0
XTRIMv2.2.0
XCLAIMX-
XAUTOCLAIMX-
XGROUPunstable
XPENDINGX-
XREADGROUPunstable
XACKunstable
XSETIDv2.3.0

BloomFilter commands

CommandSupported OR NotSince VersionDesc
BF.RESERVEv2.6.0
BF.ADDv2.6.0
BF.EXISTSv2.6.0
BF.CARDv2.6.0
BF.INFOv2.6.0
BF.MADDv2.6.0
BF.INSERTv2.7.0
BF.MEXISTSv2.6.0

Function commands

CommandSupported OR NotSince VersionDesc
FUNCTIONv2.7.0
FCALLv2.7.0
FCALL_ROv2.7.0
note

Currently only LOAD, DELETE, LIST subcommands are supported in FUNCTION. In addition, LISTFUNC subcommand is added as an extension to list all functions and their libraries in which they are located.

JSON commands

CommandSupported OR NotSince VersionDesc
JSON.ARRAPPENDv2.7.0
JSON.ARRINDEXv2.7.0
JSON.ARRINSERTv2.7.0
JSON.ARRLENv2.7.0
JSON.ARRPOPv2.7.0
JSON.ARRTRIMv2.7.0
JSON.CLEARv2.7.0
JSON.DELv2.7.0
JSON.FORGETv2.7.0
JSON.GETv2.7.0
JSON.MERGEv2.7.0
JSON.MGETv2.8.0
JSON.MSETunstable
JSON.NUMINCRBYv2.7.0
JSON.NUMMULTBYv2.7.0
JSON.OBJKEYSv2.7.0
JSON.OBJLENv2.7.0
JSON.RESPX-
JSON.SETv2.7.0
JSON.STRAPPENDv2.7.0
JSON.STRLENv2.7.0
JSON.TOGGLEv2.7.0
JSON.TYPEv2.7.0