mirror of
https://github.com/KingDuckZ/incredis
synced 2024-11-23 00:33:46 +00:00
DEL returns an integer, it seems.
This commit is contained in:
parent
b92d0f38e5
commit
a9de3643f4
2 changed files with 6 additions and 6 deletions
|
@ -72,7 +72,7 @@ namespace redis {
|
||||||
opt_string_list hmget ( boost::string_view parKey, Args&&... parArgs );
|
opt_string_list hmget ( boost::string_view parKey, Args&&... parArgs );
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
bool hmset ( boost::string_view parKey, Args&&... parArgs );
|
bool hmset ( boost::string_view parKey, Args&&... parArgs );
|
||||||
int hincrby ( boost::string_view parKey, boost::string_view parField, int parInc );
|
RedisInt hincrby ( boost::string_view parKey, boost::string_view parField, int parInc );
|
||||||
|
|
||||||
//Set
|
//Set
|
||||||
opt_string_list srandmember ( boost::string_view parKey, int parCount );
|
opt_string_list srandmember ( boost::string_view parKey, int parCount );
|
||||||
|
@ -90,7 +90,7 @@ namespace redis {
|
||||||
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>
|
template <typename... Args>
|
||||||
bool del (Args&&... parArgs);
|
RedisInt del (Args&&... parArgs);
|
||||||
|
|
||||||
//String
|
//String
|
||||||
opt_string get ( boost::string_view parKey );
|
opt_string get ( boost::string_view parKey );
|
||||||
|
@ -118,10 +118,10 @@ namespace redis {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
bool IncRedis::del (Args&&... parArgs) {
|
RedisInt IncRedis::del (Args&&... parArgs) {
|
||||||
static_assert(sizeof...(Args) > 0, "No keys specified");
|
static_assert(sizeof...(Args) > 0, "No keys specified");
|
||||||
const auto ret = redis::get<StatusString>(m_command.run("DEL", std::forward<Args>(parArgs)...));
|
const auto ret = m_command.run("DEL", std::forward<Args>(parArgs)...);
|
||||||
return ret.is_ok();
|
return get_integer(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace redis
|
} //namespace redis
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace redis {
|
||||||
return optional_string(m_command.run("HGET", parKey, parField));
|
return optional_string(m_command.run("HGET", parKey, parField));
|
||||||
}
|
}
|
||||||
|
|
||||||
int IncRedis::hincrby (boost::string_view parKey, boost::string_view parField, int parInc) {
|
RedisInt IncRedis::hincrby (boost::string_view parKey, boost::string_view parField, int parInc) {
|
||||||
const auto inc = dhandy::lexical_cast<std::string>(parInc);
|
const auto inc = dhandy::lexical_cast<std::string>(parInc);
|
||||||
auto reply = m_command.run("HINCRBY", parKey, parField, inc);
|
auto reply = m_command.run("HINCRBY", parKey, parField, inc);
|
||||||
return get_integer(reply);
|
return get_integer(reply);
|
||||||
|
|
Loading…
Reference in a new issue