From fa1be7ccf890805664827ae87c632840fd8ac27b Mon Sep 17 00:00:00 2001 From: Kelvin Mwinuka Date: Thu, 4 Jul 2024 01:37:41 +0800 Subject: [PATCH 1/2] Updated README.md to include new commands --- README.md | 12 +++++++++++- internal/modules/connection/commands.go | 4 ++-- internal/modules/generic/commands.go | 8 ++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ca36e56f..85296d6a 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,6 @@ Redis clients. # Supported Commands ## ACL -* [AUTH](https://echovault.io/docs/commands/acl/auth) * [ACL CAT](https://echovault.io/docs/commands/acl/acl_cat) * [ACL DELUSER](https://echovault.io/docs/commands/acl/acl_deluser) * [ACL GETUSER](https://echovault.io/docs/commands/acl/acl_getuser) @@ -144,19 +143,30 @@ Redis clients. * [SAVE](https://echovault.io/docs/commands/admin/save) ## CONNECTION +* [AUTH](https://echovault.io/docs/commands/connection/auth) +* [HELLO](https://echovault.io/docs/commands/connection/hello) * [PING](https://echovault.io/docs/commands/connection/ping) +* [SELECT](https://echovault.io/docs/commands/connection/select) +* [SWAPDB](https://echovault.io/docs/commands/connection/swapdb) ## GENERIC +* [DECR](https://echovault.io/docs/commands/generic/decr) +* [DECRBY](https://echovault.io/docs/commands/generic/decrby) * [DEL](https://echovault.io/docs/commands/generic/del) * [EXPIRE](https://echovault.io/docs/commands/generic/expire) * [EXPIRETIME](https://echovault.io/docs/commands/generic/expiretime) +* [FLUSHALL](https://echovault.io/docs/commands/generic/flushall) +* [FLUSHDB](https://echovault.io/docs/commands/generic/flushdb) * [GET](https://echovault.io/docs/commands/generic/get) +* [INCR](https://echovault.io/docs/commands/generic/incr) +* [INCRBY](https://echovault.io/docs/commands/generic/incrby) * [MGET](https://echovault.io/docs/commands/generic/mget) * [MSET](https://echovault.io/docs/commands/generic/mset) * [PERSIST](https://echovault.io/docs/commands/generic/persist) * [PEXPIRE](https://echovault.io/docs/commands/generic/pexpire) * [PEXPIRETIME](https://echovault.io/docs/commands/generic/pexpiretime) * [PTTL](https://echovault.io/docs/commands/generic/pttl) +* [RENAME](https://echovault.io/docs/commands/generic/rename) * [SET](https://echovault.io/docs/commands/generic/set) * [TTL](https://echovault.io/docs/commands/generic/ttl) diff --git a/internal/modules/connection/commands.go b/internal/modules/connection/commands.go index 182a3452..387cf3f2 100644 --- a/internal/modules/connection/commands.go +++ b/internal/modules/connection/commands.go @@ -227,8 +227,8 @@ Otherwise, the server will return "PONG".`, Module: constants.ConnectionModule, Categories: []string{constants.FastCategory, constants.ConnectionCategory}, Description: `(HELLO [protover [AUTH username password] [SETNAME clientname]]) -Switch to a different protocol, optionally authenticating and setting the connection's name, -or provide a contextual client report.`, +Switch to a different protocol, optionally authenticating and setting the connection's name. +This command returns a contextual client report.`, Sync: false, KeyExtractionFunc: func(cmd []string) (internal.KeyExtractionFuncResult, error) { return internal.KeyExtractionFuncResult{ diff --git a/internal/modules/generic/commands.go b/internal/modules/generic/commands.go index f28d9f2b..dbff86d0 100644 --- a/internal/modules/generic/commands.go +++ b/internal/modules/generic/commands.go @@ -854,7 +854,7 @@ LT - Only set the expiry time if the new expiry time is less than the current on { Command: "incr", Module: constants.GenericModule, - Categories: []string{constants.KeyspaceCategory, constants.WriteCategory, constants.FastCategory}, + Categories: []string{constants.WriteCategory, constants.FastCategory}, Description: `(INCR key) Increments the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that cannot be represented as integer. @@ -866,7 +866,7 @@ This operation is limited to 64 bit signed integers.`, { Command: "decr", Module: constants.GenericModule, - Categories: []string{constants.KeyspaceCategory, constants.WriteCategory, constants.FastCategory}, + Categories: []string{constants.WriteCategory, constants.FastCategory}, Description: `(DECR key) Decrements the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. @@ -879,7 +879,7 @@ This operation is limited to 64 bit signed integers.`, { Command: "incrby", Module: constants.GenericModule, - Categories: []string{constants.KeyspaceCategory, constants.WriteCategory, constants.FastCategory}, + Categories: []string{constants.WriteCategory, constants.FastCategory}, Description: `(INCRBY key increment) Increments the number stored at key by increment. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.`, @@ -901,7 +901,7 @@ An error is returned if the key contains a value of the wrong type or contains a { Command: "decrby", Module: constants.GenericModule, - Categories: []string{constants.KeyspaceCategory, constants.WriteCategory, constants.FastCategory}, + Categories: []string{constants.WriteCategory, constants.FastCategory}, Description: `(DECRBY key decrement) The DECRBY command reduces the value stored at the specified key by the specified decrement. If the key does not exist, it is initialized with a value of 0 before performing the operation. From 05b42a89a44f949fff2eea6f083125b2e0ede103 Mon Sep 17 00:00:00 2001 From: Kelvin Mwinuka Date: Thu, 4 Jul 2024 09:56:56 +0800 Subject: [PATCH 2/2] Added multi-database support to the list of features in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 85296d6a..49315b80 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Features offered by EchoVault include: 7) Key Eviction Policies. 8) Command extension via shared object files. 9) Command extension via embedded API. +10) Multi-database support for key namespacing. We are working hard to add more features to EchoVault to make it much more powerful. Features in the roadmap include: