mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-12 15:44:13 +00:00
Implement locate_in_db() by hash.
This commit is contained in:
parent
01be1a94e5
commit
afb2e68849
5 changed files with 71 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
|||
namespace redis {
|
||||
namespace {
|
||||
inline IncRedis::opt_string optional_string ( const Reply& parReply ) a_always_inline;
|
||||
inline IncRedis::opt_string_list optional_string_list ( const Reply& parReply ) a_always_inline;
|
||||
IncRedis::opt_string_list optional_string_list ( const Reply& parReply );
|
||||
|
||||
IncRedis::opt_string optional_string (const Reply& parReply) {
|
||||
assert(parReply.which() == RedisVariantType_Nil or parReply.which() == RedisVariantType_String);
|
||||
|
@ -115,6 +115,10 @@ namespace redis {
|
|||
return optional_string(m_command.run("SRANDMEMBER", parKey));
|
||||
}
|
||||
|
||||
auto IncRedis::smembers (boost::string_ref parKey) -> opt_string_list {
|
||||
return optional_string_list(m_command.run("SMEMBERS", parKey));
|
||||
}
|
||||
|
||||
bool IncRedis::script_flush() {
|
||||
const auto ret = get<StatusString>(m_command.run("SCRIPT", "FLUSH"));
|
||||
return ret.is_ok();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue