Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Nov 25, 2024
1 parent 3dc3407 commit 62b8832
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/commands/set.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
[
"7.0.0",
"Allowed the `NX` and `GET` options to be used together."
],
[
"8.2.0",
"Added the `IFEQ` option."
]
],
"command_flags": [
Expand Down Expand Up @@ -89,6 +93,7 @@
"name": "comparison-value",
"type": "string",
"token": "IFEQ",
"since": "8.2.0",
"optional": true,
"summary": "Sets the key's value only if the current value matches the specified comparison value.",
"arguments": [
Expand Down
4 changes: 2 additions & 2 deletions src/t_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ int parseExtendedStringArgumentsOrReply(client *c, int *flags, int *unit, robj *
return C_OK;
}

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

0 comments on commit 62b8832

Please sign in to comment.