Add hkeys / hlen

This commit is contained in:
fbraem
2015-11-17 22:18:18 +01:00
parent 2f850b8a43
commit 8015d827f4
4 changed files with 83 additions and 0 deletions

View File

@@ -176,6 +176,24 @@ Command Command::hincrby(const std::string& hash, const std::string& field, Int6
return cmd;
}
Command Command::hkeys(const std::string& hash)
{
Command cmd("HKEYS");
cmd << hash;
return cmd;
}
Command Command::hlen(const std::string& hash)
{
Command cmd("HLEN");
cmd << hash;
return cmd;
}
Command Command::hset(const std::string& hash, const std::string& field, const std::string& value, bool create)
{
Command cmd(create ? "HSET" : "HSETNX");