mirror of
https://github.com/KingDuckZ/incredis
synced 2025-02-17 09:35:49 +00:00
Implement synchronous del() method.
This commit is contained in:
parent
045675c808
commit
b92d0f38e5
1 changed files with 10 additions and 0 deletions
|
@ -89,6 +89,8 @@ namespace redis {
|
||||||
bool flushdb ( void );
|
bool flushdb ( void );
|
||||||
RedisInt dbsize ( void );
|
RedisInt dbsize ( void );
|
||||||
bool expire ( boost::string_view parKey, RedisInt parTTL );
|
bool expire ( boost::string_view parKey, RedisInt parTTL );
|
||||||
|
template <typename... Args>
|
||||||
|
bool del (Args&&... parArgs);
|
||||||
|
|
||||||
//String
|
//String
|
||||||
opt_string get ( boost::string_view parKey );
|
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)...));
|
const auto ret = redis::get<StatusString>(m_command.run("HMSET", parKey, std::forward<Args>(parArgs)...));
|
||||||
return ret.is_ok();
|
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
|
} //namespace redis
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue