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

Add novalues option to HSCAN. #2612

Merged

Conversation

CharlesChen888
Copy link
Contributor

@CharlesChen888 CharlesChen888 commented Nov 29, 2023

Copy link

netlify bot commented Nov 29, 2023

👷 Deploy request for redis-doc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 814ae75

commands/scan.md Outdated
@@ -172,6 +172,39 @@ redis 127.0.0.1:6379> SCAN 0 TYPE zset

It is important to note that the **TYPE** filter is also applied after elements are retrieved from the database, so the option does not reduce the amount of work the server has to do to complete a full iteration, and for rare types you may receive no elements in many iterations.

## The NOSCORES/NOVALUES option

When using `HSCAN`, you can use `NOVALUES` option to make Redis return only the keys in the hash table, without their corresponding values.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I hope you don't mind a little bit of copy-editing.

Suggested change
When using `HSCAN`, you can use `NOVALUES` option to make Redis return only the keys in the hash table, without their corresponding values.
When using `HSCAN`, you can use the `NOVALUES` option to make Redis return only the keys in the hash table without their corresponding values.

commands/scan.md Outdated

When using `HSCAN`, you can use `NOVALUES` option to make Redis return only the keys in the hash table, without their corresponding values.

Similarly, when using `ZSCAN`, you can use `NOSCORES` option to make Redis return only the members in the zset, without their corresponding scores.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Similarly, when using `ZSCAN`, you can use `NOSCORES` option to make Redis return only the members in the zset, without their corresponding scores.
Similarly, when using `ZSCAN`, you can use the `NOSCORES` option to make Redis return only the members in the sorted set without their corresponding scores.

commands/scan.md Outdated
Similarly, when using `ZSCAN`, you can use `NOSCORES` option to make Redis return only the members in the zset, without their corresponding scores.

```
redis 127.0.0.1:6379> HMSET myhash a 1 b 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since HMSET is deprecated, let's use HSET.

Suggested change
redis 127.0.0.1:6379> HMSET myhash a 1 b 2
redis 127.0.0.1:6379> HSET myhash a 1 b 2

Copy link
Collaborator

@dwdougherty dwdougherty left a comment

Choose a reason for hiding this comment

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

LGTM

@zuiderkwast zuiderkwast added the waiting-for-upstream waiting for a redis PR to be merged label Jan 5, 2024
@oranagra oranagra added to-be-merged should probably be merged soon and removed waiting-for-upstream waiting for a redis PR to be merged labels Jan 30, 2024
@CharlesChen888 CharlesChen888 changed the title Add noscores/novalues option to zscan/hscan. Add novalues option to HSCAN. Jan 30, 2024
@soloestoy soloestoy merged commit 438e8b1 into redis:master Mar 1, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-be-merged should probably be merged soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants