PragmaTwice commented on code in PR #1841:
URL: https://github.com/apache/kvrocks/pull/1841#discussion_r1375942096
##########
src/commands/cmd_json.cc:
##########
@@ -204,11 +204,62 @@ class CommandJsonArrLen : public Commander {
}
};
+class CommandJsonStrAppend : public Commander {
+ public:
+ Status Execute(Server *svr, Connection *conn, std::string *output) override {
+ redis::Json json(svr->storage, conn->GetNamespace());
+
+ // path default, if not provided
+ std::string path = "$";
+ if (args_.size() == 4) {
+ path = args_[2];
+ }
+ std::vector<uint64_t> results;
+ auto s = json.StrAppend(args_[1], path, args_[3], results);
Review Comment:
The argument processing is wrong if `size() != 4`.
--
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]