-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SET IFEQ command implemented in Java + tests #2978
base: main
Are you sure you want to change the base?
Conversation
@Yury-Fridlyand |
Java is not so flexible, unfortunately. |
So for now I see two options.
What do you think is better? |
8894244
to
772e82f
Compare
@@ -223,6 +224,12 @@ public interface StringBaseCommands { | |||
* String value = client.set("key", "value", options).get(); | |||
* assert value.equals("OK"); | |||
* }</pre> | |||
* <pre>{@code | |||
* client.set("key", "value").get(); | |||
* SetOptions options = SetOptions.builder().conditionalSet(ONLY_IF_EQUAL).comparisonValue("value")).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With customized builder you can do something like
* SetOptions options = SetOptions.builder().conditionalSet(ONLY_IF_EQUAL).comparisonValue("value")).build(); | |
* SetOptions options = SetOptions.builder().conditionalSetIfEqualTo("value").build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Yury-Fridlyand, could you please approve it or provide feedback by Sunday? The exam period starts next week.
5b73b9f
to
97041b8
Compare
java/client/src/main/java/glide/api/commands/StringBaseCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/commands/SetOptions.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/commands/SetOptions.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/commands/SetOptions.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Maayan Shani <maayan.shani@mail.huji.ac.il>
Signed-off-by: Maayan Shani <maayan.shani@mail.huji.ac.il>
Signed-off-by: Maayan Shani <maayan.shani@mail.huji.ac.il>
Signed-off-by: Maayan Shani <maayan.shani@mail.huji.ac.il>
…to NonNull Signed-off-by: Maayan Shani <maayan.shani@mail.huji.ac.il>
b09199f
to
384af07
Compare
Issue link
This Pull Request is linked to issue (URL): [/issues/2811]
Description
This pull Request is implemented the
IFEQ
option in theSET
commamnd. Tests were added, and docstring to the command and the related method.Checklist
Before submitting the PR make sure the following are checked: