Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
jduo committed Jun 29, 2024
1 parent 325e12c commit e441a2c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ public interface SetBaseCommands {
*
* @see <a href="https://valkey.io/commands/sscan">valkey.io</a> for details.
* @param key The key of the set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @return An <code>Array</code> of <code>Objects</code>. The first element is always the <code>
* cursor</code> for the next iteration of results. <code>0</code> will be the <code>cursor
* </code> returned on the last iteration of the set. The second element is always an <code>
Expand All @@ -588,8 +588,8 @@ public interface SetBaseCommands {
*
* @see <a href="https://valkey.io/commands/sscan">valkey.io</a> for details.
* @param key The key of the set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @param sScanOptions The {@link SScanOptions}.
* @return An <code>Array</code> of <code>Objects</code>. The first element is always the <code>
* cursor</code> for the next iteration of results. <code>0</code> will be the <code>cursor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1584,8 +1584,8 @@ CompletableFuture<Map<String, Double>> zinterWithScores(
*
* @see <a href="https://valkey.io/commands/zscan">valkey.io</a> for details.
* @param key The key of the set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @return An <code>Array</code> of <code>Objects</code>. The first element is always the <code>
* cursor</code> for the next iteration of results. <code>0</code> will be the <code>cursor
* </code> returned on the last iteration of the set. The second element is always an <code>
Expand Down Expand Up @@ -1619,8 +1619,8 @@ CompletableFuture<Map<String, Double>> zinterWithScores(
*
* @see <a href="https://valkey.io/commands/zscan">valkey.io</a> for details.
* @param key The key of the set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @param zScanOptions The {@link ZScanOptions}.
* @return An <code>Array</code> of <code>Objects</code>. The first element is always the <code>
* cursor</code> for the next iteration of results. <code>0</code> will be the <code>cursor
Expand Down
26 changes: 13 additions & 13 deletions java/client/src/main/java/glide/api/models/BaseTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -5509,8 +5509,8 @@ public T geosearchstore(
*
* @see <a href="https://valkey.io/commands/sscan">valkey.io</a> for details.
* @param key The key of the set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @return Command Response - An <code>Array</code> of <code>Objects</code>. The first element is
* always the <code>cursor</code> for the next iteration of results. <code>0</code> will be
* the <code>cursor</code> returned on the last iteration of the set. The second element is
Expand All @@ -5526,8 +5526,8 @@ public T sscan(@NonNull String key, @NonNull String cursor) {
*
* @see <a href="https://valkey.io/commands/sscan">valkey.io</a> for details.
* @param key The key of the set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @param sScanOptions The {@link SScanOptions}.
* @return Command Response - An <code>Array</code> of <code>Objects</code>. The first element is
* always the <code>cursor</code> for the next iteration of results. <code>0</code> will be
Expand All @@ -5546,14 +5546,14 @@ public T sscan(@NonNull String key, @NonNull String cursor, @NonNull SScanOption
*
* @see <a href="https://valkey.io/commands/zscan">valkey.io</a> for details.
* @param key The key of the sorted set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @return Command Response - An <code>Array</code> of <code>Objects</code>. The first element is
* always the <code>cursor</code> for the next iteration of results. <code>0</code> will be
* the <code>cursor</code> returned on the last iteration of the set. The second element is
* always an <code>Array</code> of the subset of the sorted set held in <code>key</code>. The array
* in the second element is always a flattened series of String pairs, where the value is at
* even indices and the score is at odd indices.
* always an <code>Array</code> of the subset of the sorted set held in <code>key</code>. The
* array in the second element is always a flattened series of String pairs, where the value
* is at even indices and the score is at odd indices.
*/
public T zscan(@NonNull String key, @NonNull String cursor) {
protobufTransaction.addCommands(buildCommand(ZScan, buildArgs(key, cursor)));
Expand All @@ -5565,15 +5565,15 @@ public T zscan(@NonNull String key, @NonNull String cursor) {
*
* @see <a href="https://valkey.io/commands/zscan">valkey.io</a> for details.
* @param key The key of the sorted set.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates the start of the
* search.
* @param cursor The cursor that points to the next iteration of results. A value of 0 indicates
* the start of the search.
* @param zScanOptions The {@link ZScanOptions}.
* @return Command Response - An <code>Array</code> of <code>Objects</code>. The first element is
* always the <code>cursor</code> for the next iteration of results. <code>0</code> will be
* the <code>cursor</code> returned on the last iteration of the set. The second element is
* always an <code>Array</code> of the subset of the set held in <code>key</code>. The array
* in the second element is always a flattened series of <code>String</code> pairs, where the value is at
* even indices and the score is at odd indices.
* in the second element is always a flattened series of <code>String</code> pairs, where the
* value is at even indices and the score is at odd indices.
*/
public T zscan(@NonNull String key, @NonNull String cursor, @NonNull ZScanOptions zScanOptions) {
ArgsArray commandArgs =
Expand Down
22 changes: 20 additions & 2 deletions java/client/src/test/java/glide/api/models/TransactionTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1344,13 +1344,31 @@ InfScoreBound.NEGATIVE_INFINITY, new ScoreBoundary(3, false), new Limit(1, 2)),
results.add(Pair.of(SScan, buildArgs("key1", "0")));

transaction.sscan("key1", "0", SScanOptions.builder().matchPattern("*").count(10L).build());
results.add(Pair.of(SScan, buildArgs("key1", "0", SScanOptions.MATCH_OPTION_STRING, "*", SScanOptions.COUNT_OPTION_STRING, "10")));
results.add(
Pair.of(
SScan,
buildArgs(
"key1",
"0",
SScanOptions.MATCH_OPTION_STRING,
"*",
SScanOptions.COUNT_OPTION_STRING,
"10")));

transaction.zscan("key1", "0");
results.add(Pair.of(ZScan, buildArgs("key1", "0")));

transaction.zscan("key1", "0", ZScanOptions.builder().matchPattern("*").count(10L).build());
results.add(Pair.of(ZScan, buildArgs("key1", "0", ZScanOptions.MATCH_OPTION_STRING, "*", ZScanOptions.COUNT_OPTION_STRING, "10")));
results.add(
Pair.of(
ZScan,
buildArgs(
"key1",
"0",
ZScanOptions.MATCH_OPTION_STRING,
"*",
ZScanOptions.COUNT_OPTION_STRING,
"10")));

var protobufTransaction = transaction.getProtobufTransaction().build();

Expand Down

0 comments on commit e441a2c

Please sign in to comment.