You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: commands/command-getkeys.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,9 @@ Returns @array-reply of keys from a full Redis command.
3
3
`COMMAND GETKEYS` is a helper command to let you find the keys
4
4
from a full Redis command.
5
5
6
-
`COMMAND` shows some commands as having movablekeys meaning
7
-
the entire command must be parsed to discover storage or retrieval
8
-
keys. You can use `COMMAND GETKEYS` to discover key positions
9
-
directly from how Redis parses the commands.
6
+
`COMMAND` provides information on how to find the key names of each command (see `firstkey`, [key specifications](/topics/key-specs#logical-operation-flags), and `movablekeys`),
7
+
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.
8
+
You can use `COMMAND GETKEYS` or `COMMAND GETKEYSANDFLAGS` to discover key names directly from how Redis parses the commands.
Returns @array-reply of keys from a full Redis command and their usage flags.
2
+
3
+
`COMMAND GETKEYSANDFLAGS` is a helper command to let you find the keys from a full Redis command together with flags indicating what each key is used for.
4
+
5
+
`COMMAND` provides information on how to find the key names of each command (see `firstkey`, [key specifications](/topics/key-specs#logical-operation-flags), and `movablekeys`),
6
+
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.
7
+
You can use `COMMAND GETKEYS` or `COMMAND GETKEYSANDFLAGS` to discover key names directly from how Redis parses the commands.
8
+
9
+
Refer to [key specifications](/topics/key-specs#logical-operation-flags) for information about the meaning of the key flags.
10
+
11
+
@return
12
+
13
+
@array-reply: list of keys from your command.
14
+
Each element of the array is an array containing key name in the first entry, and flags in the second.
0 commit comments