added example usage of set datastructure by avinashkrishna613 · Pull Request #2534 · redis/node-redis · GitHub
Skip to content

added example usage of set datastructure#2534

Open
avinashkrishna613 wants to merge 4 commits intoredis:masterfrom
avinashkrishna613:add-set-example
Open

added example usage of set datastructure#2534
avinashkrishna613 wants to merge 4 commits intoredis:masterfrom
avinashkrishna613:add-set-example

Conversation

@avinashkrishna613
Copy link
Copy Markdown
Contributor

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.

@leibale
Copy link
Copy Markdown
Contributor

leibale commented Jun 27, 2023

@avinashkrishna613
Copy link
Copy Markdown
Contributor Author

Made changes as suggested @leibale

@leibale
Copy link
Copy Markdown
Contributor

leibale commented Jun 29, 2023

@avinashkrishna613 I made some more changes, I think it's ready.. wanna review my changes please? 🙏

Comment thread examples/set.js Outdated
console.log(member);
});
iCursor = cursor;
} while (iCursor !== 0)
Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

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..

Copy link
Copy Markdown
Contributor Author

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.

@leibale leibale requested review from guyroyse and simonprickett July 1, 2023 06:54
Copy link
Copy Markdown
Contributor

@simonprickett simonprickett left a 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

@avinashkrishna613
Copy link
Copy Markdown
Contributor Author

Updated readme @simonprickett

Copy link
Copy Markdown
Contributor

@simonprickett simonprickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestion.

Comment thread examples/README.md Outdated
@avinashkrishna613
Copy link
Copy Markdown
Contributor Author

Any update on this @guyroyse ?

@avinashkrishna613
Copy link
Copy Markdown
Contributor Author

Anything needs to be done on this? @leibale @simonprickett

Co-authored-by: Simon Prickett <simon@crudworks.org>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

@github-actions github-actions Bot added the stale label Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants