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 SELECT() command for standalone #984

Conversation

acarbonetto
Copy link
Collaborator

Issue #, if available:

Description of changes:

Add the SELECT() command to the java wrapper.

Example:

boolean success = client.select(0).get();

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

@acarbonetto acarbonetto requested a review from a team as a code owner February 16, 2024 21:13
@acarbonetto acarbonetto force-pushed the java/integ_acarbo_add_select_command branch from 07cc8f1 to 9089494 Compare February 16, 2024 21:38
@acarbonetto acarbonetto self-assigned this Feb 17, 2024
@acarbonetto acarbonetto added the java issues and fixes related to the java client label Feb 17, 2024
@acarbonetto acarbonetto force-pushed the java/integ_acarbo_add_select_command branch from f4e33e0 to d8670de Compare February 21, 2024 02:34
@@ -54,4 +55,10 @@ public CompletableFuture<String> info() {
public CompletableFuture<String> info(@NonNull InfoOptions options) {
return commandManager.submitNewCommand(Info, options.toArgs(), this::handleStringResponse);
}

@Override
public CompletableFuture<String> select(long index) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There're only 15 DBs that can be selected, int should be enough :)

Copy link
Collaborator

@barshaul barshaul left a comment

Choose a reason for hiding this comment

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

Please fix the index to int and fix the tests accordingly

acarbonetto and others added 7 commits February 22, 2024 14:54
* Java: Add SELECT() command for standalone

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Fix IT tests

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
@SanHalacogluImproving SanHalacogluImproving merged commit 8629d26 into valkey-io:main Feb 22, 2024
11 checks passed
@SanHalacogluImproving SanHalacogluImproving deleted the java/integ_acarbo_add_select_command branch March 19, 2024 18:02
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
* Java: Add `SELECT()` command for standalone (#97)

* Java: Add SELECT() command for standalone

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Fix IT tests

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

---------

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Java: Add SADD, SREM, SMEMBERS, and SCARD commands (Set Commands)

* Spotless; Doc update

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Spotless

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Doc fixes

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Add tests for SELECT()

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Spotless

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>

* Spotless. Added Standalone TransactionTests.

---------

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Co-authored-by: aaron-congo <aaron.congo@improving.com>
Co-authored-by: SanHalacogluImproving <san.halacoglu@improving.com>
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.

6 participants