You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2023/06/28 10:18:06 UTC
[kvrocks] branch unstable updated: List each command on a separate line in list type (#1531)
This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 8539ee50 List each command on a separate line in list type (#1531)
8539ee50 is described below
commit 8539ee50c7ed74dfd35a396d138efbc8bde65542
Author: clundro <in...@outlook.com>
AuthorDate: Wed Jun 28 18:17:59 2023 +0800
List each command on a separate line in list type (#1531)
---
src/commands/cmd_list.cc | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/commands/cmd_list.cc b/src/commands/cmd_list.cc
index a296a872..f4ccba35 100644
--- a/src/commands/cmd_list.cc
+++ b/src/commands/cmd_list.cc
@@ -551,19 +551,22 @@ class CommandLMove : public Commander {
bool dst_left_;
};
-REDIS_REGISTER_COMMANDS(
- MakeCmdAttr<CommandLPush>("lpush", -3, "write", 1, 1, 1), MakeCmdAttr<CommandRPush>("rpush", -3, "write", 1, 1, 1),
- MakeCmdAttr<CommandLPushX>("lpushx", -3, "write", 1, 1, 1),
- MakeCmdAttr<CommandRPushX>("rpushx", -3, "write", 1, 1, 1), MakeCmdAttr<CommandLPop>("lpop", -2, "write", 1, 1, 1),
- MakeCmdAttr<CommandRPop>("rpop", -2, "write", 1, 1, 1),
- MakeCmdAttr<CommandBLPop>("blpop", -3, "write no-script", 1, -2, 1),
- MakeCmdAttr<CommandBRPop>("brpop", -3, "write no-script", 1, -2, 1),
- MakeCmdAttr<CommandLRem>("lrem", 4, "write", 1, 1, 1), MakeCmdAttr<CommandLInsert>("linsert", 5, "write", 1, 1, 1),
- MakeCmdAttr<CommandLRange>("lrange", 4, "read-only", 1, 1, 1),
- MakeCmdAttr<CommandLIndex>("lindex", 3, "read-only", 1, 1, 1),
- MakeCmdAttr<CommandLTrim>("ltrim", 4, "write", 1, 1, 1), MakeCmdAttr<CommandLLen>("llen", 2, "read-only", 1, 1, 1),
- MakeCmdAttr<CommandLSet>("lset", 4, "write", 1, 1, 1),
- MakeCmdAttr<CommandRPopLPUSH>("rpoplpush", 3, "write", 1, 2, 1),
- MakeCmdAttr<CommandLMove>("lmove", 5, "write", 1, 2, 1), )
+REDIS_REGISTER_COMMANDS(MakeCmdAttr<CommandBLPop>("blpop", -3, "write no-script", 1, -2, 1),
+ MakeCmdAttr<CommandBRPop>("brpop", -3, "write no-script", 1, -2, 1),
+ MakeCmdAttr<CommandLIndex>("lindex", 3, "read-only", 1, 1, 1),
+ MakeCmdAttr<CommandLInsert>("linsert", 5, "write", 1, 1, 1),
+ MakeCmdAttr<CommandLLen>("llen", 2, "read-only", 1, 1, 1),
+ MakeCmdAttr<CommandLMove>("lmove", 5, "write", 1, 2, 1),
+ MakeCmdAttr<CommandLPop>("lpop", -2, "write", 1, 1, 1), //
+ MakeCmdAttr<CommandLPush>("lpush", -3, "write", 1, 1, 1),
+ MakeCmdAttr<CommandLPushX>("lpushx", -3, "write", 1, 1, 1),
+ MakeCmdAttr<CommandLRange>("lrange", 4, "read-only", 1, 1, 1),
+ MakeCmdAttr<CommandLRem>("lrem", 4, "write", 1, 1, 1),
+ MakeCmdAttr<CommandLSet>("lset", 4, "write", 1, 1, 1),
+ MakeCmdAttr<CommandLTrim>("ltrim", 4, "write", 1, 1, 1),
+ MakeCmdAttr<CommandRPop>("rpop", -2, "write", 1, 1, 1),
+ MakeCmdAttr<CommandRPopLPUSH>("rpoplpush", 3, "write", 1, 2, 1),
+ MakeCmdAttr<CommandRPush>("rpush", -3, "write", 1, 1, 1),
+ MakeCmdAttr<CommandRPushX>("rpushx", -3, "write", 1, 1, 1), )
} // namespace redis