added example usage of set datastructure by avinashkrishna613 · Pull Request #2534 · redis/node-redis
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.
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! :)
@avinashkrishna613 I made some more changes, I think it's ready.. wanna review my changes please? 🙏
| console.log(member); | ||
| }); | ||
| iCursor = cursor; | ||
| } while (iCursor !== 0) |
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.
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..
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with suggestion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters