diff --git a/actions.jsonc b/actions.jsonc index 75527cb7..8159b5be 100644 --- a/actions.jsonc +++ b/actions.jsonc @@ -117,7 +117,7 @@ "since": "0.4.3", "complexity": "O(1)", "args": "DBSIZE", - "desc": "Returns the number of key/value pairs stored in the database", + "desc": "Number of key/value pairs stored in the database", "return": "Number of keys that exist in the database as an unsigned int" }, { @@ -127,5 +127,13 @@ "args": "FLUSHDB", "desc": "Removes all the key/value pairs stored in the database", "return": "(Code: 0) if the operation succeeded" + }, + { + "name": "USET", + "since": "0.4.4", + "complexity": "O(n)", + "args": "USET ...", + "desc": "SET all keys if they don't exist, or UPDATE them if they do exist", + "return": "Number of keys that were `USET`ed, as an integer" } ] \ No newline at end of file diff --git a/server/src/kvengine/dbsize.rs b/server/src/kvengine/dbsize.rs index f0409e7f..e9f914d8 100644 --- a/server/src/kvengine/dbsize.rs +++ b/server/src/kvengine/dbsize.rs @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ +// HACK(@ohsayan): `len` needs to be set to zero, but clippy doesn't like it,so we'll do this +#![allow(unused_assignments)] use crate::coredb::CoreDB; use crate::protocol::{responses, ActionGroup, Connection};