-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
sugardb/api_generic.go
Outdated
// 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
sugardb/api_generic.go
Outdated
// 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. |
There was a problem hiding this comment.
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.
#158