Skip to content
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

Java: Add SMOVE command. #1249

Merged
merged 13 commits into from
Apr 16, 2024
Merged

Conversation

Yury-Fridlyand
Copy link
Collaborator

Issue #, if available:
N/A

Description of changes:
https://redis.io/commands/smove/

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* Add `SMOVE` command.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Update javadoc.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Update javadoc.

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

---------

Signed-off-by: Yury-Fridlyand <[email protected]>
@Yury-Fridlyand Yury-Fridlyand added the java issues and fixes related to the java client label Apr 9, 2024
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner April 9, 2024 02:56
assertTrue(client.smove(setKey1, setKey2, "1").get());
assertEquals(Set.of("2", "3"), client.smembers(setKey1).get());
assertEquals(Set.of("1", "2", "3"), client.smembers(setKey2).get());
// move an elem which preset at destination
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt that you need this test case. // move an elem which is preset at the destination (you are testing how sets actually work here)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but it does not hurt.
It also shows use cases of the command. I like when IT could be interpreted as examples.

@acarbonetto acarbonetto self-assigned this Apr 16, 2024
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@acarbonetto acarbonetto merged commit 9fc70fa into valkey-io:main Apr 16, 2024
45 checks passed
@acarbonetto acarbonetto deleted the java/integ_yuryf_SMOVE branch April 16, 2024 23:24
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
* Add `SMOVE` command. (#182)

* Add `SMOVE` command.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Update javadoc.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Update javadoc.

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

---------

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Typo fix.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Update UT.

Signed-off-by: Yury-Fridlyand <[email protected]>

* PR comments.

Signed-off-by: Yury-Fridlyand <[email protected]>

* update doc.

Signed-off-by: Yury-Fridlyand <[email protected]>

* update doc.

Signed-off-by: Yury-Fridlyand <[email protected]>

---------

Signed-off-by: Yury-Fridlyand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java issues and fixes related to the java client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants