mapleFU commented on code in PR #2839:
URL: https://github.com/apache/kvrocks/pull/2839#discussion_r2028093100


##########
src/storage/redis_db.h:
##########
@@ -111,6 +111,7 @@ class Database {
   [[nodiscard]] rocksdb::Status Expire(engine::Context &ctx, const Slice 
&user_key, uint64_t timestamp);
   [[nodiscard]] rocksdb::Status Del(engine::Context &ctx, const Slice 
&user_key);
   [[nodiscard]] rocksdb::Status MDel(engine::Context &ctx, const 
std::vector<Slice> &keys, uint64_t *deleted_cnt);
+  [[nodiscard]] rocksdb::Status DeleteRange(engine::Context &ctx, const Slice 
&start, const Slice &end);

Review Comment:
   ```suggestion
     [[nodiscard]] rocksdb::Status DeleteRange(engine::Context &ctx, Slice 
start, Slice end);
   ```



##########
src/commands/cmd_key.cc:
##########
@@ -356,6 +357,33 @@ class CommandDel : public Commander {
   }
 };
 
+class CommandDeleteRange : public Commander {
+  Status Parse(const std::vector<std::string> &args) override {
+    if (args.size() != 3) {
+      if (args.size() != 2) {
+        return {Status::RedisParseErr, errInvalidSyntax};
+      }
+      if (args[1].find('*') != args[1].size() - 1) {
+        return {Status::RedisParseErr, errInvalidSyntax};
+      }
+      args_[1] = args[1].substr(0, args[1].size() - 1);

Review Comment:
   So this is a regex rule?



-- 
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