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

Calling mget with an empty array of keys throws an error #125

Closed
gpascale opened this issue Aug 8, 2011 · 4 comments
Closed

Calling mget with an empty array of keys throws an error #125

gpascale opened this issue Aug 8, 2011 · 4 comments

Comments

@gpascale
Copy link

gpascale commented Aug 8, 2011

as in redis.mget([ ], mycallback).

I get the error: "Error: ERR wrong number of arguments for 'mget' command"

@DTrejo
Copy link
Contributor

DTrejo commented Apr 28, 2012

Here is an example of mget, does this solve the issue?

client.mget(["sessions started", "sessions started", "foo"], function (err, res) {
    console.dir(res);
});

@DTrejo DTrejo closed this as completed Apr 28, 2012
@piskvorky
Copy link

I'm getting the same error as OP (wrong number of args...) for mget([ ]); how was this resolved?

Having zero-length input array is no special case IMO, it makes client code logic unnecessarily ugly.

Using redis-2.4.17 + node-redis v0.8.1.

@skenqbx
Copy link

skenqbx commented Sep 28, 2012

@piskvorky What kind of behaviour are you expecting when calling mget([])?

@piskvorky
Copy link

I expect mget(keys) to behave like map(keys, get) conceptually ([] => []).

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

4 participants