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

SCAN result not processed correctly #16

Open
bveldhoen opened this issue Jun 2, 2015 · 3 comments
Open

SCAN result not processed correctly #16

bveldhoen opened this issue Jun 2, 2015 · 3 comments

Comments

@bveldhoen
Copy link
Contributor

I've tried to get the SCAN command to work, but ran into a problem that the redis reply is not processed correctly.

According to the Redis documentation:

SCAN, SSCAN, HSCAN and ZSCAN return a two elements multi-bulk reply, where the first element is a string representing an unsigned 64 bit number (the cursor), and the second element is a multi-bulk with an array of elements.

When using redox, the only result I get back is the first element (cursor). While debugging, I noticed that the reader in the redis context does have the entire result (including the 2nd part), so this doesn't seem to be a hiredis issue.

@hmartiro
Copy link
Owner

hmartiro commented Jun 8, 2015

Show some code! Are you templating on redisReply*?

@bveldhoen
Copy link
Contributor Author

No, I was using std::vectorstd::string for the result type. When it turns out that using redisReply for the result type works, I'll close this issue.

Thanks!

@hmartiro
Copy link
Owner

hmartiro commented Jun 8, 2015

Ok. I believe it should, since that is the direct hiredis reply. The SCAN
reply doesn't fit the form of any others of the current templates
On Jun 8, 2015 12:17 AM, "bveldhoen" [email protected] wrote:

No, I was using std::vectorstd::string for the result type. When it turns
out that using redisReply for the result type works, I'll close this issue.

Thanks!


Reply to this email directly or view it on GitHub
#16 (comment).

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

2 participants