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

Node: added zpopmin command. #1008

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

adanWattad
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* @internal
*/
export function createZpopmin(key: string, count?: number): redis_request.Command {
return createCommand(RequestType.ZPopMin, [key, count ? count.toString() : "1"]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

if count is undefined, we don't want to pass "1", but instead to pass only they key. This way, if redis changes its default count value it won't break us

Copy link
Collaborator

@barshaul barshaul left a comment

Choose a reason for hiding this comment

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

fix & merge

@adanWattad adanWattad merged commit fd54e7c into valkey-io:main Feb 21, 2024
6 checks passed
@adanWattad adanWattad deleted the node/zpopmin branch February 21, 2024 13:52
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 this pull request may close these issues.

2 participants