aboutsummaryrefslogtreecommitdiff
path: root/pkg/commands/command-registry.go
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-11 11:57:44 +0200
committeralex <[email protected]>2026-07-11 11:57:44 +0200
commit1470772a00faad4a5b4130e0fe47513e5618e31d (patch)
tree981091c3175d1e5a62e8b8be5da4f6838b0b25d2 /pkg/commands/command-registry.go
parentc51e7f6d095153fa4d5358216271aeb4ad73ee0c (diff)
downloadredis-clone-1470772a00faad4a5b4130e0fe47513e5618e31d.tar.xz
redis-clone-1470772a00faad4a5b4130e0fe47513e5618e31d.zip
refactored some more commands to work with the new command registry
Diffstat (limited to 'pkg/commands/command-registry.go')
-rw-r--r--pkg/commands/command-registry.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/commands/command-registry.go b/pkg/commands/command-registry.go
index 0193da1..eaefc65 100644
--- a/pkg/commands/command-registry.go
+++ b/pkg/commands/command-registry.go
@@ -55,4 +55,24 @@ var Registry = map[string]CommandDef{
ExtractKeys: AllSubsequentKeys,
Execute: Del,
},
+ "EXISTS": {
+ MinArgs: 2,
+ ExtractKeys: SingleKey,
+ Execute: Exists,
+ },
+ "INCR": {
+ MinArgs: 2,
+ ExtractKeys: SingleKey,
+ Execute: Incr,
+ },
+ "DECR": {
+ MinArgs: 2,
+ ExtractKeys: SingleKey,
+ Execute: Decr,
+ },
+ "RENAME": {
+ MinArgs: 3,
+ ExtractKeys: SingleKey,
+ Execute: Rename,
+ },
} \ No newline at end of file