Skip to content

Node: added zpopmin command.#1008

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

Node: added zpopmin command.#1008
adanWattad merged 1 commit intovalkey-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
* @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

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

node 🐢 Node.js wrapper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants