CMS Feature: Add the INFO command - #116
Open
zmccoy wants to merge 12 commits into
Open
Conversation
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
…consistent Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
…r INFO Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
…tatements Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
Signed-off-by: Zach McCoy <zmccoy@jackhenry.com>
zackcam
reviewed
Aug 26, 2026
| Ok(obj) | ||
| } | ||
|
|
||
| pub fn width(&self) -> u64 { |
Collaborator
There was a problem hiding this comment.
With width and depth now being public do we need these getters?
| match cms { | ||
| Some(cms) => { | ||
| let result = vec![ | ||
| ValkeyValue::SimpleStringStatic("Width"), |
Collaborator
There was a problem hiding this comment.
I think these should be fully lower case to maintain compatibility with redis, was looking at example in https://redis.io/docs/latest/commands/cms.info/ for the fields returned
| ]; | ||
| Ok(ValkeyValue::Array(result)) | ||
| } | ||
| None => Err(ValkeyError::Str(utils::NOT_FOUND)), |
Collaborator
There was a problem hiding this comment.
Should this be ValkeyError::nonexistent_key() to match the other commands as well
| //Function that implements logic to handle the CMS.INFO command. | ||
| pub fn cms_info(ctx: &Context, args: Vec<ValkeyString>) -> ValkeyResult { | ||
| let args_count = args.len(); | ||
| if args_count != 2 { |
Collaborator
There was a problem hiding this comment.
Weird that specific info fields are not allowed to be called individually to be got. I wonder if we would want to expand this as it wouldn't break functionality and would make it consistent for the other probabilistic data types as well. Let me know what you think
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched from: #111
This adds the INFO command to the list of supported commands for CMS.