git-hulk commented on code in PR #1872:
URL: https://github.com/apache/kvrocks/pull/1872#discussion_r1383175308


##########
src/commands/cmd_json.cc:
##########
@@ -167,6 +167,29 @@ class CommandJsonType : public Commander {
   }
 };
 
+class CommandJsonObjkeys : public Commander {
+ public:
+  Status Execute(Server *srv, Connection *conn, std::string *output) override {
+    redis::Json json(srv->storage, conn->GetNamespace());
+
+    std::vector<std::optional<std::vector<std::string>>> results;
+
+    auto s = json.ObjKeys(args_[1], args_[2], results);
+    if (!s.ok()) return {Status::RedisExecErr, s.ToString()};

Review Comment:
   Should return null if key is non-exists, rest are good to me.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to