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

Implement Set operations #10

Closed
ntietz opened this issue Oct 15, 2022 · 1 comment
Closed

Implement Set operations #10

ntietz opened this issue Oct 15, 2022 · 1 comment

Comments

@ntietz
Copy link
Owner

ntietz commented Oct 15, 2022

Another day, another data type! The set functionality in Redis would be handy to have around, so let's do a basic implementation of that.

@ntietz
Copy link
Owner Author

ntietz commented Oct 20, 2022

The operations we want for completion:

  • SADD
  • SMEMBERS
  • SREM
  • SINTER
  • SUNION

ntietz added a commit that referenced this issue Oct 20, 2022
This introduces Set and Hash types in the memory storage and support for
basic set operations. Principally, it adds the Redis commands SADD and
SMEMBERS.

This starts on #10 , although a few more operations would be nice to
implement before considering it "complete".
ntietz added a commit that referenced this issue Oct 20, 2022
Example output:

```
127.0.0.1:11311> SMEMBERS myset
1) "x"
2) "z"
127.0.0.1:11311> SMEMBERS myotherset
1) "zed"
2) "y"
3) "x"
127.0.0.1:11311> SINTER myset myotherset
1) "x"
127.0.0.1:11311> SUNION myotherset myset
1) "y"
2) "x"
3) "zed"
4) "z"

```

This completes #10.
@ntietz ntietz closed this as completed Oct 20, 2022
ntietz added a commit that referenced this issue Nov 5, 2023
This introduces Set and Hash types in the memory storage and support for
basic set operations. Principally, it adds the Redis commands SADD and
SMEMBERS.

This starts on #10 , although a few more operations would be nice to
implement before considering it "complete".
ntietz added a commit that referenced this issue Nov 5, 2023
Example output:

```
127.0.0.1:11311> SMEMBERS myset
1) "x"
2) "z"
127.0.0.1:11311> SMEMBERS myotherset
1) "zed"
2) "y"
3) "x"
127.0.0.1:11311> SINTER myset myotherset
1) "x"
127.0.0.1:11311> SUNION myotherset myset
1) "y"
2) "x"
3) "zed"
4) "z"

```

This completes #10.
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

No branches or pull requests

1 participant