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

[NEW] add 'count' option to the 'RANDOMKEY' command #117

Open
hwware opened this issue Mar 15, 2023 · 0 comments
Open

[NEW] add 'count' option to the 'RANDOMKEY' command #117

hwware opened this issue Mar 15, 2023 · 0 comments

Comments

@hwware
Copy link
Owner

hwware commented Mar 15, 2023

Regarding to redis#11915

Requirement:

Now RANDOMKEY command return a random key from the currently selected database OR nil when the database is empty
We want to enhancement this command for more features:

  1. Add count option to specified number of keys
  2. Add duplicate option to allow return duplicated or non-duplicated random key
  3. Add pattern option to allow client to specified the key pattern.

The command format could be like this:

RANDOMKEY [COUNT count] [Duplicated ] [Pattern XXXX]
Default: count = 1; non-duplicated; and no patten which means must match exactly keyname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant