added example usage of set datastructure#2534
added example usage of set datastructure#2534avinashkrishna613 wants to merge 4 commits intoredis:masterfrom
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.
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.
@avinashkrishna613 this is exactly how "sScanIterator" works, there is no reason to implement it again..
simonprickett
left a comment
There was a problem hiding this comment.
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 |
simonprickett
left a comment
There was a problem hiding this comment.
Approved with suggestion.
|
Any update on this @guyroyse ? |
|
Anything needs to be done on this? @leibale @simonprickett |
Co-authored-by: Simon Prickett <[email protected]>
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.