You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/19 14:51:27 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #895: Support hrange command

git-hulk commented on code in PR #895:
URL: https://github.com/apache/incubator-kvrocks/pull/895#discussion_r974352758


##########
src/redis_cmd.cc:
##########
@@ -1453,6 +1453,48 @@ class CommandHGetAll : public Commander {
   }
 };
 
+class CommandHRange : public Commander {
+ public:
+  Status Parse(const std::vector<std::string> &args) override {
+    if (args.size() != 6 && args.size() != 4) {
+      return Status(Status::RedisParseErr, errWrongNumOfArguments);
+    }
+    if (args.size() == 6 && Util::ToLower(args[4]) != "limit") {
+      return Status(Status::RedisInvalidCmd, errInvalidSyntax);
+    }
+    try {
+      start_ = std::stol(args[2]);

Review Comment:
   @tanruixiang The start/stop should be the string range instead of the index.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org