From b92d0f38e5092579f56d1b8f3b709226468da261 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Wed, 14 Jun 2017 19:58:35 +0100 Subject: [PATCH] Implement synchronous del() method. --- include/incredis/incredis.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/incredis/incredis.hpp b/include/incredis/incredis.hpp index ab9b8f3..14e1f60 100644 --- a/include/incredis/incredis.hpp +++ b/include/incredis/incredis.hpp @@ -89,6 +89,8 @@ namespace redis { bool flushdb ( void ); RedisInt dbsize ( void ); bool expire ( boost::string_view parKey, RedisInt parTTL ); + template + bool del (Args&&... parArgs); //String opt_string get ( boost::string_view parKey ); @@ -114,6 +116,14 @@ namespace redis { const auto ret = redis::get(m_command.run("HMSET", parKey, std::forward(parArgs)...)); return ret.is_ok(); } + + template + bool IncRedis::del (Args&&... parArgs) { + static_assert(sizeof...(Args) > 0, "No keys specified"); + const auto ret = redis::get(m_command.run("DEL", std::forward(parArgs)...)); + return ret.is_ok(); + } + } //namespace redis #endif