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

Zscan command gives issue #896

Closed
ghost opened this issue Oct 23, 2015 · 3 comments
Closed

Zscan command gives issue #896

ghost opened this issue Oct 23, 2015 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Oct 23, 2015

Hi,

I want to use 'ZSCAN' command but it throws the following.

Error:
Redis Error { [Error: ERR syntax error] command: 'ZSCAN', code: 'ERR' }

Code:
connection.zscan(key , 0 , {match : value + "*"} , function(err,data){
if(err){
console.log("Redis Error",err);
return err;
}else
cb(null,data);
});

Please guide me as to the proper usage of this. Thanks.

@BridgeAR
Copy link
Contributor

@vabnirvana The following should work:

client.zscan(key, 0, 'MATCH', value + '*', callback);

The object notation is only supported for HGETALL.

@ghost
Copy link
Author

ghost commented Oct 23, 2015

The result is ["0" , []] always empty array in all cases. Where as when i do the command in redis it gives me result.

@BridgeAR
Copy link
Contributor

I just wrote a test for it and it works as it should for me. Please check your key or pattern to really match your entries.

@BridgeAR BridgeAR mentioned this issue Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant