COMMANDLIST [TYPE] [SFLAG]

Available since 1.0.0.

可通过一下命令来获知tendis的兼容性问题

参数说明

TYPE的值

  1. 不指定:默认显示所有命令
  2. readonly: 显示只读的命令
  3. write: 显示写数据的命令
  4. readwrite: 显示读写数据命令
  5. admin: 显示管理命令
  6. multikey: 显示涉及多个key的读写数据命令
  7. incompatible: 显示与`Redis 4.0`不完全兼容的指令,结合`SFLAG`
  8. notsupport: 显示在`Redis 4.0`存在,但在`Tendis存储版`还不支持的指令,结合`SFLAG`

SFLAG的值

  1. readonly: 显示只读的命令
  2. write: 显示写数据的命令
  3. readwrite: 显示读写数据命令,如果不指定,默认是`readwrite`
  4. admin: 显示管理命令
  5. all: 显示所有命令

只有当TYPE=incompatiblenotsupport时,才允许指定SFLAG.

命令返回

Bulk string reply:符合条件的命令信息

Examples

不支持的命令

  1. 127.0.0.1:12345> commandlist notsupport all
  2. 1) "module"
  3. 2) "brpop"
  4. 3) "brpoplpush"
  5. 4) "blpop"
  6. 5) "hmgetall"
  7. 6) "randomkey"
  8. 7) "swapdb"
  9. 8) "save"
  10. 9) "bgsave"
  11. 10) "bgrewriteaof"
  12. 11) "rotateaoflog"
  13. 12) "lastsave"
  14. 13) "discard"
  15. 14) "sync"
  16. 15) "psync"
  17. 16) "replconf"
  18. 17) "touch"
  19. 18) "role"
  20. 19) "subscribe"
  21. 20) "unsubscribe"
  22. 21) "psubscribe"
  23. 22) "punsubscribe"
  24. 23) "pubsub"
  25. 24) "watch"
  26. 25) "unwatch"
  27. 26) "restore-asking"
  28. 27) "migrate"
  29. 28) "asking"
  30. 29) "memory"
  31. 30) "eval"
  32. 31) "evalsha"
  33. 32) "script"
  34. 33) "wait"
  35. 34) "geoadd"
  36. 35) "georadius"
  37. 36) "georadius_ro"
  38. 37) "georadiusbymember"
  39. 38) "georadiusbymember_ro"
  40. 39) "geohash"
  41. 40) "geopos"
  42. 41) "geodist"
  43. 42) "post"
  44. 43) "host:"
  45. 44) "latency"

不兼容的命令(语义可能不一样)

  1. redis 127.0.0.1:12345> commandlist incompatible
  2. 1) "dbsize flags(8194,8194), arity(1,1), firstkey(0,0), lastkey(0,0), keystep(0,0) sameWithRedis(false)"
  3. 2) "keys flags(258,66), arity(2,-2), firstkey(0,0), lastkey(0,0), keystep(0,0) sameWithRedis(false)"
  4. 3) "move flags(8193,8193), arity(3,3), firstkey(1,1), lastkey(1,1), keystep(1,1) sameWithRedis(false)"
  5. 4) "object flags(2,2), arity(-2,-2), firstkey(2,2), lastkey(2,2), keystep(2,2) sameWithRedis(false)"
  6. 5) "scan flags(130,130), arity(-2,-2), firstkey(0,0), lastkey(0,0), keystep(0,0) sameWithRedis(false)"
  7. 6) "srandmember flags(130,130), arity(-2,-2), firstkey(1,1), lastkey(1,1), keystep(1,1) sameWithRedis(false)"

其他

还有其他命令,例如获取只读、只写、管理员命令、支持multikey命令等

  • commandlist readonly
  • commandlist write
  • commandlist readwrite
  • commandlist multikey