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

Support commands returning vector<int> #68

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

czinn
Copy link

@czinn czinn commented Aug 20, 2022

Some Redis commands, such as SMISMEMBER, return a list of integers. Trying to treat the reply as a vector doesn't work because the reply object has already parsed the data as integers, not strings. Supporting this is a simple change.

I've added an example of the usage in examples/data_types.cpp. It now prints:

Last 5 elements as a vector: 10 9 8 7 6 
Last 5 elements as a hash: 10 8 7 9 6 
Last 5 elements as a set: 10 6 7 8 9 
Are {1, 2, 3, 4, 5} in the set, respectively: 0 1 1 0 1 

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

Successfully merging this pull request may close these issues.

1 participant