node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

Support the NOVALUES option of HSCAN

Open gerzse opened this issue 1 year ago • 2 comments

Description

Issue #2705

The NOVALUES option instructs HSCAN to only return keys, without their values. The new option will become available from Redis 7.6.

Checklist

  • [ ] Does npm test pass with this change (including linting)?
  • [ ] Is the new or changed code fully tested?
  • [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

gerzse avatar Feb 27 '24 08:02 gerzse

@gerzse arguments that change the reply type should be implemented as their own command, see HRANDFIELD_COUNT and HRANDFIELD_COUNT_WITHVALUES for example.

For this command, we should have:

  1. HSCAN/hScan
  2. HSCAN_NOVALUES/hScanNoValues
  3. hScanIterator
  4. hScanNoValuesIterator

leibale avatar Feb 27 '24 16:02 leibale

@gerzse arguments that change the reply type should be implemented as their own command, see HRANDFIELD_COUNT and HRANDFIELD_COUNT_WITHVALUES for example.

For this command, we should have:

  1. HSCAN/hScan
  2. HSCAN_NOVALUES/hScanNoValues
  3. hScanIterator
  4. hScanNoValuesIterator

@leibale Got it, thanks! Makes sense, the same is done in other clients too. I'll adapt the code.

gerzse avatar Mar 04 '24 07:03 gerzse