mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-21 20:35:06 +00:00
added new commands; fixed handling of broken connections
This commit is contained in:
@@ -119,6 +119,16 @@ Command Command::get(const std::string& key)
|
||||
}
|
||||
|
||||
|
||||
Command Command::exists(const std::string& key)
|
||||
{
|
||||
Command cmd("EXISTS");
|
||||
|
||||
cmd << key;
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
Command Command::hdel(const std::string& hash, const std::string& field)
|
||||
{
|
||||
Command cmd("HDEL");
|
||||
@@ -683,6 +693,16 @@ Command Command::rpush(const std::string& list, const StringVec& values, bool cr
|
||||
}
|
||||
|
||||
|
||||
Command Command::expire(const std::string& key, Int64 seconds)
|
||||
{
|
||||
Command cmd("EXPIRE");
|
||||
|
||||
cmd << key << NumberFormatter::format(seconds);
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
Command Command::ping()
|
||||
{
|
||||
Command cmd("PING");
|
||||
@@ -691,4 +711,28 @@ Command Command::ping()
|
||||
}
|
||||
|
||||
|
||||
Command Command::multi()
|
||||
{
|
||||
Command cmd("MULTI");
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
Command Command::exec()
|
||||
{
|
||||
Command cmd("EXEC");
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
Command Command::discard()
|
||||
{
|
||||
Command cmd("DISCARD");
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Redis
|
||||
|
||||
Reference in New Issue
Block a user