From 3026a5a7fdd7b3b78c11a9e04cfbb5161585cdb3 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Wed, 28 Feb 2024 21:05:48 +0600 Subject: [PATCH] Add HSCAN NOVALUES in pipelines and transactions --- src/main/java/redis/clients/jedis/PipeliningBase.java | 10 ++++++++++ .../clients/jedis/commands/HashBinaryCommands.java | 4 ++-- .../redis/clients/jedis/commands/HashCommands.java | 4 ++-- .../jedis/commands/HashPipelineBinaryCommands.java | 6 ++++++ .../clients/jedis/commands/HashPipelineCommands.java | 6 ++++++ 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/java/redis/clients/jedis/PipeliningBase.java b/src/main/java/redis/clients/jedis/PipeliningBase.java index 5c6cd45f07..bf6711b632 100644 --- a/src/main/java/redis/clients/jedis/PipeliningBase.java +++ b/src/main/java/redis/clients/jedis/PipeliningBase.java @@ -706,6 +706,11 @@ public Response>> hscan(String key, String return appendCommand(commandObjects.hscan(key, cursor, params)); } + @Override + public Response> hscanNoValues(String key, String cursor, ScanParams params) { + return appendCommand(commandObjects.hscanNoValues(key, cursor, params)); + } + @Override public Response hstrlen(String key, String field) { return appendCommand(commandObjects.hstrlen(key, field)); @@ -1972,6 +1977,11 @@ public Response>> hscan(byte[] key, byte[] return appendCommand(commandObjects.hscan(key, cursor, params)); } + @Override + public Response> hscanNoValues(byte[] key, byte[] cursor, ScanParams params) { + return appendCommand(commandObjects.hscanNoValues(key, cursor, params)); + } + @Override public Response hstrlen(byte[] key, byte[] field) { return appendCommand(commandObjects.hstrlen(key, field)); diff --git a/src/main/java/redis/clients/jedis/commands/HashBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/HashBinaryCommands.java index d0695302b3..15a462c9b7 100644 --- a/src/main/java/redis/clients/jedis/commands/HashBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/HashBinaryCommands.java @@ -47,12 +47,12 @@ default ScanResult> hscan(byte[] key, byte[] cursor) { return hscan(key, cursor, new ScanParams()); } + ScanResult> hscan(byte[] key, byte[] cursor, ScanParams params); + default ScanResult hscanNoValues(byte[] key, byte[] cursor) { return hscanNoValues(key, cursor, new ScanParams()); } - ScanResult> hscan(byte[] key, byte[] cursor, ScanParams params); - ScanResult hscanNoValues(byte[] key, byte[] cursor, ScanParams params); long hstrlen(byte[] key, byte[] field); diff --git a/src/main/java/redis/clients/jedis/commands/HashCommands.java b/src/main/java/redis/clients/jedis/commands/HashCommands.java index ad3bed4e32..ef18e34aee 100644 --- a/src/main/java/redis/clients/jedis/commands/HashCommands.java +++ b/src/main/java/redis/clients/jedis/commands/HashCommands.java @@ -47,12 +47,12 @@ default ScanResult> hscan(String key, String cursor) { return hscan(key, cursor, new ScanParams()); } + ScanResult> hscan(String key, String cursor, ScanParams params); + default ScanResult hscanNoValues(String key, String cursor) { return hscanNoValues(key, cursor, new ScanParams()); } - ScanResult> hscan(String key, String cursor, ScanParams params); - ScanResult hscanNoValues(String key, String cursor, ScanParams params); long hstrlen(String key, String field); diff --git a/src/main/java/redis/clients/jedis/commands/HashPipelineBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/HashPipelineBinaryCommands.java index e87dcacdb3..cf104f7a33 100644 --- a/src/main/java/redis/clients/jedis/commands/HashPipelineBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/HashPipelineBinaryCommands.java @@ -50,6 +50,12 @@ default Response>> hscan(byte[] key, byte[] Response>> hscan(byte[] key, byte[] cursor, ScanParams params); + default Response> hscanNoValues(byte[] key, byte[] cursor) { + return hscanNoValues(key, cursor, new ScanParams()); + } + + Response> hscanNoValues(byte[] key, byte[] cursor, ScanParams params); + Response hstrlen(byte[] key, byte[] field); } diff --git a/src/main/java/redis/clients/jedis/commands/HashPipelineCommands.java b/src/main/java/redis/clients/jedis/commands/HashPipelineCommands.java index 3aa256cb78..dabcac4e90 100644 --- a/src/main/java/redis/clients/jedis/commands/HashPipelineCommands.java +++ b/src/main/java/redis/clients/jedis/commands/HashPipelineCommands.java @@ -50,5 +50,11 @@ default Response>> hscan(String key, String Response>> hscan(String key, String cursor, ScanParams params); + default Response> hscanNoValues(String key, String cursor) { + return hscanNoValues(key, cursor, new ScanParams()); + } + + Response> hscanNoValues(String key, String cursor, ScanParams params); + Response hstrlen(String key, String field); }