Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jduo committed Jun 29, 2024
1 parent 316410d commit 80b7a9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
38 changes: 0 additions & 38 deletions java/client/src/main/java/glide/api/models/BaseTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -5218,25 +5218,6 @@ public T zscan(@NonNull String key, @NonNull String cursor, @NonNull ZScanOption
* always an <code>Array</code> of the subset of the hash held in <code>key</code>. The array
* in the second element is always a flattened series of String pairs, where the key is at
* even indices and the value is at odd indices.
* @example
* <pre>{@code
* // Assume key contains a set with 200 member-score pairs
* String cursor = "0";
* Object[] result;
* do {
* result = client.hscan(key1, cursor).get();
* cursor = result[0].toString();
* Object[] stringResults = (Object[]) result[1];
*
* System.out.println("\nHSCAN iteration:");
* for (int i = 0; i < stringResults.length; i += 2) {
* System.out.printf("{%s=%s}", stringResults[i], stringResults[i + 1]);
* if (i + 2 < stringResults.length) {
* System.out.print(", ");
* }
* }
* } while (!cursor.equals("0"));
* }</pre>
*/
public T hscan(@NonNull String key, @NonNull String cursor) {
protobufTransaction.addCommands(buildCommand(HScan, buildArgs(key, cursor)));
Expand All @@ -5256,25 +5237,6 @@ public T hscan(@NonNull String key, @NonNull String cursor) {
* always an <code>Array</code> of the subset of the hash held in <code>key</code>. The array
* in the second element is always a flattened series of String pairs, where the key is at
* even indices and the value is at odd indices.
* @example
* <pre>{@code
* // Assume key contains a set with 200 member-score pairs
* String cursor = "0";
* Object[] result;
* do {
* result = client.hscan(key1, cursor, HScanOptions.builder().matchPattern("*").count(20L).build()).get();
* cursor = result[0].toString();
* Object[] stringResults = (Object[]) result[1];
*
* System.out.println("\nHSCAN iteration:");
* for (int i = 0; i < stringResults.length; i += 2) {
* System.out.printf("{%s=%s}", stringResults[i], stringResults[i + 1]);
* if (i + 2 < stringResults.length) {
* System.out.print(", ");
* }
* }
* } while (!cursor.equals("0"));
* }</pre>
*/
public T hscan(@NonNull String key, @NonNull String cursor, @NonNull HScanOptions hScanOptions) {
final ArgsArray commandArgs =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ private static Object[] hashCommands(BaseTransaction<?> transaction) {
String hashKey1 = "{HashKey}-1-" + UUID.randomUUID();

// This extra key is for HScan testing. It is a key with only one field. HScan doesn't guarantee
// a
// return order but this test compares arrays so order is significant.
// a return order but this test compares arrays so order is significant.
String hashKey2 = "{HashKey}-2-" + UUID.randomUUID();

transaction
Expand Down

0 comments on commit 80b7a9f

Please sign in to comment.