VALKEY-COMMAND-ARGUMENTS(7)
β¨ valkey-command-arguments(7) β¨
the one and only command-arguments page, fresh from the Valkey Manual π
πΈ NAME πΈ
valkey-command-arguments β Command arguments. That's it, that's the topic, and bestie it's a whole vibe π
π¦ DESCRIPTION π¦
So the COMMAND DOCS command hands you documentation-flavored info about all the available Valkey commands, right? And the map reply it gives back has this key called arguments in it. That key is where an array lives, and that array describes the command's arguments. Periodt. β¨
Every single element in the arguments array is a map, and that map has these fields:
nameβ the argument's name, and it's always there, no exceptions. The name exists for identification purposes alone, okay? It is not displayed when the command's syntax gets rendered. Fun fact: the same name can pop up more than once across the whole argument tree, but it stays unique compared to its sibling arguments' names. Why does that matter? Because it lets you build a unique identifier for every argument β just concatenate all the names along the path from the root down to whatever argument you're looking at. Iconic. π«Άdisplay_textβ the argument's display string. It's present in arguments that actually have a displayable representation (aka all arguments that aren'toneof/block). This is literally the string used in the command's syntax rendering.typeβ the argument's type, always present, always required. An argument must be one of these:string: a string argument.integer: an integer argument.double: a double-precision argument.key: a string that represents the name of a key.pattern: a string that represents a glob-like pattern.unix-time: an integer that represents a Unix timestamp.pure-token: the argument is a token, meaning a reserved keyword, which may or may not be provided. Do not confuse this with free-text user input, bestie, they are not the same thing πoneof: the argument is a container for nested arguments. This type lets you choose among several nested arguments (peep theXADDexample below π).block: the argument is a container for nested arguments too. This type lets you group arguments together and apply a property (likeoptional) to all of them (again,XADDexample below π).
key_spec_indexβ this value shows up for every argument of thekeytype. It's a 0-based index of the specification in the command's key specifications that corresponds to the argument.tokenβ a constant literal that precedes the argument (the user input) itself.summaryβ a short description of the argument.sinceβ the debut Redis OSS version of the argument (or, for module commands, the module version).deprecated_sinceβ the Redis OSS version that deprecated the command (or, for module commands, the module version).flagsβ an array of argument flags. The possible flags are:optional: denotes that the argument is optional (for example, theGETclause of theSETcommand).multiple: denotes that the argument may be repeated (such as the key argument ofDEL).multiple-token: denotes the possible repetition of the argument with its preceding token (seeSORT'sGETpattern clause).
valueβ the argument's value. For argument types other thanoneofandblock, this is a string that describes the value in the command's syntax. For theoneofandblocktypes, this is an array of nested arguments, and each one of those is a map exactly as described in this section. Recursion, but make it cute π§
π Example π
The trimming clause of XADD, like, [MAXLEN|MINID [=|~] threshold [LIMIT count]], is represented at the top-level as a block-typed argument.
It's made of four nested arguments:
- trimming strategy: this nested argument has an
oneoftype with two nested arguments. Each of those nested arguments,MAXLENandMINID, is typed aspure-token. - trimming operator: this nested argument is an
optionaloneoftype with two nested arguments. Each of those nested arguments,=and~, is apure-token. - threshold: this nested argument is a
string. - count: this nested argument is an
optionalintegerwith a token (LIMIT).
And here's XADD's arguments array, in all its glory π₯:
1) 1) "name"
2) "key"
3) "type"
4) "key"
5) "value"
6) "key"
2) 1) "name"
2) "nomkstream"
3) "type"
4) "pure-token"
5) "token"
6) "NOMKSTREAM"
7) "since"
8) "6.2"
9) "flags"
10) 1) optional
3) 1) "name"
2) "trim"
3) "type"
4) "block"
5) "flags"
6) 1) optional
7) "value"
8) 1) 1) "name"
2) "strategy"
3) "type"
4) "oneof"
5) "value"
6) 1) 1) "name"
2) "maxlen"
3) "type"
4) "pure-token"
5) "token"
6) "MAXLEN"
2) 1) "name"
2) "minid"
3) "type"
4) "pure-token"
5) "token"
6) "MINID"
7) "since"
8) "6.2"
2) 1) "name"
2) "operator"
3) "type"
4) "oneof"
5) "flags"
6) 1) optional
7) "value"
8) 1) 1) "name"
2) "equal"
3) "type"
4) "pure-token"
5) "token"
6) "="
2) 1) "name"
2) "approximately"
3) "type"
4) "pure-token"
5) "token"
6) "~"
3) 1) "name"
2) "threshold"
3) "type"
4) "string"
5) "value"
6) "threshold"
4) 1) "name"
2) "count"
3) "type"
4) "integer"
5) "token"
6) "LIMIT"
7) "since"
8) "6.2"
9) "flags"
10) 1) optional
11) "value"
12) "count"
4) 1) "name"
2) "id_or_auto"
3) "type"
4) "oneof"
5) "value"
6) 1) 1) "name"
2) "auto_id"
3) "type"
4) "pure-token"
5) "token"
6) "*"
2) 1) "name"
2) "id"
3) "type"
4) "string"
5) "value"
6) "id"
5) 1) "name"
2) "field_value"
3) "type"
4) "block"
5) "flags"
6) 1) multiple
7) "value"
8) 1) 1) "name"
2) "field"
3) "type"
4) "string"
5) "value"
6) "field"
2) 1) "name"
2) "value"
3) "type"
4) "string"
5) "value"
6) "value"
okay that's the whole page, you understood all of it, you ate π
this little love letter comes to you from version 9.0.0, dated 2025-10-21, straight out of the Valkey Manual πβ¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms