1
0
Fork 0
mirror of https://github.com/KingDuckZ/incredis synced 2024-11-23 00:33:46 +00:00

Implement synchronous del() method.

This commit is contained in:
King_DuckZ 2017-06-14 19:58:35 +01:00
parent 045675c808
commit b92d0f38e5

View file

@ -89,6 +89,8 @@ namespace redis {
bool flushdb ( void );
RedisInt dbsize ( void );
bool expire ( boost::string_view parKey, RedisInt parTTL );
template <typename... Args>
bool del (Args&&... parArgs);
//String
opt_string get ( boost::string_view parKey );
@ -114,6 +116,14 @@ namespace redis {
const auto ret = redis::get<StatusString>(m_command.run("HMSET", parKey, std::forward<Args>(parArgs)...));
return ret.is_ok();
}
template <typename... Args>
bool IncRedis::del (Args&&... parArgs) {
static_assert(sizeof...(Args) > 0, "No keys specified");
const auto ret = redis::get<StatusString>(m_command.run("DEL", std::forward<Args>(parArgs)...));
return ret.is_ok();
}
} //namespace redis
#endif