Skip to content

Commit e3b4777

Browse files
addressing comments
Signed-off-by: Sarthak Aggarwal <[email protected]>
1 parent d5ec915 commit e3b4777

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/commands/set.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
[
2424
"7.0.0",
2525
"Allowed the `NX` and `GET` options to be used together."
26+
],
27+
[
28+
"8.2.0",
29+
"Added the `IFEQ` option."
2630
]
2731
],
2832
"command_flags": [
@@ -89,6 +93,7 @@
8993
"name": "comparison-value",
9094
"type": "string",
9195
"token": "IFEQ",
96+
"since": "8.2.0",
9297
"optional": true,
9398
"summary": "Sets the key's value only if the current value matches the specified comparison value.",
9499
"arguments": [

src/t_string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ int parseExtendedStringArgumentsOrReply(client *c, int *flags, int *unit, robj *
336336
return C_OK;
337337
}
338338

339-
/* SET key value [IFEQ <comparison-value>] [NX] [XX] [KEEPTTL] [GET] [EX <seconds>]
340-
* [PX <milliseconds>] [EXAT <seconds-timestamp>][PXAT <milliseconds-timestamp>] */
339+
/* SET key value [NX] [XX] [KEEPTTL] [GET] [EX <seconds>] [PX <milliseconds>]
340+
* [EXAT <seconds-timestamp>][PXAT <milliseconds-timestamp>] [IFEQ <comparison-value>] */
341341
void setCommand(client *c) {
342342
robj *expire = NULL;
343343
robj *comparison = NULL;

0 commit comments

Comments
 (0)