Skip to content

Commit 945cbda

Browse files
authored
Update set.md (#1983)
As requested in redis/redis#8900 (comment)
1 parent 7fe9a7f commit 945cbda

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

content/commands/set.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,20 @@ The script should be called with `EVAL ...script... 1 resource-name token-value`
180180
tab1="RESP2"
181181
tab2="RESP3" >}}
182182

183-
Any of the following:
184-
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): `GET` not given: Operation was aborted (conflict with one of the `XX`/`NX` options).
185-
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. `GET` not given: The key was set.
186-
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The key didn't exist before the `SET`.
187-
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The previous value of the key.
183+
* If `GET` was not specified, any of the following:
184+
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): Operation was aborted (conflict with one of the `XX`/`NX` options). The key was not set.
185+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`: The key was set.
186+
* If `GET` was specified, any of the following:
187+
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): The key didn't exist before the `SET`. If `XX` was specified, the key was not set. Otherwise, the key was set.
188+
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The previous value of the key. If `NX` was specified, the key was not set. Otherwise, the key was set.
188189

189190
-tab-sep-
190191

191-
Any of the following:
192-
* [Null reply](../../develop/reference/protocol-spec#nulls): `GET` not given: Operation was aborted (conflict with one of the `XX`/`NX` options).
193-
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`. `GET` not given: The key was set.
194-
* [Null reply](../../develop/reference/protocol-spec#nulls): `GET` given: The key didn't exist before the `SET`.
195-
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): `GET` given: The previous value of the key.
192+
* If `GET` was not specified, any of the following:
193+
* [Null reply](../../develop/reference/protocol-spec#nulls): Operation was aborted (conflict with one of the `XX`/`NX` options). The key was not set.
194+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`: The key was set.
195+
* If `GET` was specified, any of the following:
196+
* [Null reply](../../develop/reference/protocol-spec#nulls): The key didn't exist before the `SET`. If `XX` was specified, the key was not set. Otherwise, the key was set.
197+
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): The previous value of the key. If `NX` was specified, the key was not set. Otherwise, the key was set.
196198

197199
{{< /multitabs >}}

0 commit comments

Comments
 (0)