COMMAND GETKEYS

COMMAND GETKEYS

COMMAND GETKEYS command [arg]
Available since
2.8.13
Time complexity
O(N) where N is the number of arguments to the command
ACL categories
@slow, @connection

Returns @array-reply of keys from a full Redict command.

COMMAND GETKEYS is a helper command to let you find the keys from a full Redict command.

COMMAND provides information on how to find the key names of each command (see firstkey, key specifications, and movablekeys), but in some cases it’s not possible to find keys of certain commands and then the entire command must be parsed to discover some / all key names. You can use COMMAND GETKEYS or COMMAND GETKEYSANDFLAGS to discover key names directly from how Redict parses the commands.

Examples #

COMMAND GETKEYS MSET a b c d e f
COMMAND GETKEYS EVAL "not consulted" 3 key1 key2 key3 arg1 arg2 arg3 argN
COMMAND GETKEYS SORT mylist ALPHA STORE outlist

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.