-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
added example usage of set datastructure #2534
base: master
Are you sure you want to change the base?
Conversation
Maybe just extend and rename this example instead of creating a new one? BTW, respect for facing some difficulties, solving them yourself, and then trying to help others as well! :) |
Made changes as suggested @leibale |
@avinashkrishna613 I made some more changes, I think it's ready.. wanna review my changes please? 🙏 |
examples/set.js
Outdated
console.log(member); | ||
}); | ||
iCursor = cursor; | ||
} while (iCursor !== 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can keep this. Let's say for example, if user needs some kind of pagination or something then he can make use of this method.
Rest everything looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avinashkrishna613 this is exactly how "sScanIterator" works, there is no reason to implement it again..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leibale Then it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to update the README.md
file to remove the old set example and add the new one: /~https://github.com/redis/node-redis/blob/master/examples/README.md
0a4884e
to
02f2757
Compare
02f2757
to
474c074
Compare
Updated readme @simonprickett |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with suggestion.
Any update on this @guyroyse ? |
Anything needs to be done on this? @leibale @simonprickett |
Co-authored-by: Simon Prickett <simon@crudworks.org>
Description
I faced some difficulties while working on sets and later found the value for set should be string. So i just add the example for how to use set datastructure in a node application.