ltagliamonte-dd commented on code in PR #2750:
URL: https://github.com/apache/kvrocks/pull/2750#discussion_r1932246028
##########
src/commands/cmd_hash.cc:
##########
@@ -258,6 +259,36 @@ class CommandHMSet : public Commander {
std::vector<FieldValue> field_values_;
};
+class CommandHSetEx : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ if (args.size() < 5) {
+ return {Status::RedisParseErr, errWrongNumOfArguments};
+ }
+ ttl_ = GET_OR_RET(ParseInt<uint64_t>(args[2], 10));
+ for (size_t i = 3; i < args_.size(); i += 2) {
+ field_values_.emplace_back(args_[i], args_[i + 1]);
+ }
Review Comment:
addressed via f9551a6071bd5612b7a4633ff82eaa78a8a21798
##########
src/commands/cmd_hash.cc:
##########
@@ -258,6 +259,36 @@ class CommandHMSet : public Commander {
std::vector<FieldValue> field_values_;
};
+class CommandHSetEx : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ if (args.size() < 5) {
+ return {Status::RedisParseErr, errWrongNumOfArguments};
+ }
Review Comment:
addressed via f9551a6071bd5612b7a4633ff82eaa78a8a21798
##########
src/commands/cmd_hash.cc:
##########
@@ -448,6 +479,7 @@ REDIS_REGISTER_COMMANDS(Hash,
MakeCmdAttr<CommandHGet>("hget", 3, "read-only", 1
MakeCmdAttr<CommandHIncrBy>("hincrby", 4, "write", 1,
1, 1),
MakeCmdAttr<CommandHIncrByFloat>("hincrbyfloat", 4,
"write", 1, 1, 1),
MakeCmdAttr<CommandHMSet>("hset", -4, "write", 1, 1,
1),
+ MakeCmdAttr<CommandHSetEx>("hsetex", -4, "write", 1,
1, 1),
Review Comment:
addressed via f9551a6071bd5612b7a4633ff82eaa78a8a21798
--
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]