Skip to content

Node: added zpopmin command. - #1008

Merged
adanWattad merged 1 commit into
valkey-io:mainfrom
adanWattad:node/zpopmin
Feb 21, 2024
Merged

adanWattad merged 1 commit into
valkey-io:mainfrom
adanWattad:node/zpopmin

Conversation

@adanWattad

Copy link
Copy Markdown
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.

@adanWattad
adanWattad requested a review from a team as a code owner February 21, 2024 11:52
@adanWattad adanWattad added the node 🐢 Node.js wrapper label Feb 21, 2024
Comment thread node/src/Commands.ts Outdated
* @internal
*/
export function createZpopmin(key: string, count?: number): redis_request.Command {
return createCommand(RequestType.ZPopMin, [key, count ? count.toString() : "1"]);

Copy link
Copy Markdown
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

@barshaul barshaul left a comment

Copy link
Copy Markdown
Collaborator

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
@adanWattad
adanWattad deleted the node/zpopmin branch February 21, 2024 13:52
affonsov pushed a commit that referenced this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

node 🐢 Node.js wrapper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants