Skip to content

Add support for HRANDFIELD through HashOperations and ReactiveHashOperations #2048

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

Closed
mp911de opened this issue Apr 19, 2021 · 0 comments
Closed
Assignees
Labels

Comments

@mp911de
Copy link
Member

mp911de commented Apr 19, 2021

Add support in BoundHashOperations, imperative and reactive …HashOperations and on the connection level.

HRANDFIELD changes its output depending on count and WITHVALUES. On the operations level we could have:

HK randomKey();

List<HK> randomKeys(int count);

// limitation that a negative count cannot render duplicate keys.
Map<HK, HV> randomValues(int count);

See https://redis.io/commands/hrandfield

@mp911de mp911de self-assigned this Jun 28, 2021
@mp911de mp911de linked a pull request Jun 28, 2021 that will close this issue
christophstrobl added a commit that referenced this issue Jun 30, 2021
Add randomKey() and randomEntry() to RedisHash.
Update documentation and align methods with java terminology around keys vs. fields in hashes.
Move Converters off their custom Map.Entry implementation and use SimpleImmutableEntry instead.
Switch code that creates Map.Entry to the newly introduced Converters.entryOf method.

See: #2048
Original Pull Request: #2104
@christophstrobl christophstrobl added this to the 2.6 M1 (2021.1.0) milestone Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants