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 EXISTS command #160

Merged
merged 5 commits into from
Jan 11, 2025
Merged

Implement EXISTS command #160

merged 5 commits into from
Jan 11, 2025

Conversation

NicoleStrel
Copy link
Contributor

Comment on lines 810 to 811
// Exists returns the number of keys that exist from the provided list of keys.
// Note: Duplicate keys in the argument list are only counted once.
Copy link
Contributor Author

@NicoleStrel NicoleStrel Jan 7, 2025

Choose a reason for hiding this comment

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

I made it like this because I wanted to use the existing params.KeysExist function which counts the existence in a dictionary and therefore, eliminates duplicates.

is this fine?

If we want it the same as redis to count the duplicate keys multiple times I would need to add a workaround or create a new function

Copy link
Collaborator

Choose a reason for hiding this comment

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

@NicoleStrel the closer to the Redis behaviour, the better. So we should count duplicate keys here.

Copy link
Collaborator

@kelvinmwinuka kelvinmwinuka left a comment

Choose a reason for hiding this comment

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

@NicoleStrel let's count the duplicate keys.

Comment on lines 810 to 811
// Exists returns the number of keys that exist from the provided list of keys.
// Note: Duplicate keys in the argument list are only counted once.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@NicoleStrel the closer to the Redis behaviour, the better. So we should count duplicate keys here.

@kelvinmwinuka kelvinmwinuka merged commit 40527b1 into EchoVault:main Jan 11, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants