Add hgetall / hincrby

This commit is contained in:
fbraem
2015-11-17 22:02:25 +01:00
parent 8d08cc3909
commit 2f850b8a43
4 changed files with 135 additions and 0 deletions

View File

@@ -81,9 +81,18 @@ public:
static Command hget(const std::string& hash, const std::string& field);
/// Returns an HGET command
static Command hgetall(const std::string& hash);
/// Returns an HGETALL command
static Command hincrby(const std::string& hash, const std::string& field, Int64 by = 1);
/// Returns an HINCRBY command
static Command hset(const std::string& hash, const std::string& field, const std::string& value, bool create = true);
/// Returns an HSET or HSETNX (when create is false) command
static Command hset(const std::string& hash, const std::string& field, Int64 value, bool create = true);
/// Returns an HSET or HSETNX (when create is false) command
static Command incr(const std::string& key, Int64 by = 0);
/// Returns an INCR or INCRBY command. Calls INCR when by is omitted or zero.