Add hstrlen (note: only available in Redis 3.2)

This commit is contained in:
fbraem
2015-11-18 22:17:13 +01:00
parent fd5579cb8c
commit 2d10de0c30
4 changed files with 74 additions and 0 deletions

View File

@@ -215,6 +215,15 @@ Command Command::hset(const std::string& hash, const std::string& field, Int64 v
return hset(hash, field, NumberFormatter::format(value), create);
}
Command Command::hstrlen(const std::string& hash, const std::string& field)
{
Command cmd("HSTRLEN");
cmd << hash << field;
return cmd;
}
Command Command::incr(const std::string& key, Int64 by)
{
Command cmd(by == 0 ? "INCR" : "INCRBY");