修改本页
Redis

COMMAND GETKEYS

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.

返回值

Array reply: list of keys from your command.

例子

redis>  COMMAND GETKEYS MSET a b c d e f
1) "a"
2) "c"
3) "e"
redis>  COMMAND GETKEYS EVAL "not consulted" 3 key1 key2 key3 arg1 arg2 arg3 argN
1) "key1"
2) "key2"
3) "key3"
redis>  COMMAND GETKEYS SORT mylist ALPHA STORE outlist
1) "mylist"
redis> 
Comments powered by Disqus