diff --git a/includes/cpp_redis/core/client.hpp b/includes/cpp_redis/core/client.hpp index e3ac14e0..4ef91582 100644 --- a/includes/cpp_redis/core/client.hpp +++ b/includes/cpp_redis/core/client.hpp @@ -808,6 +808,8 @@ namespace cpp_redis { std::future exec(); + client& exists(const std::string& key, const reply_callback_t& reply_callback); + client &exists(const std::vector &keys, const reply_callback_t &reply_callback); std::future exists(const std::vector &keys); diff --git a/sources/core/client.cpp b/sources/core/client.cpp index 659c0498..915d9a13 100644 --- a/sources/core/client.cpp +++ b/sources/core/client.cpp @@ -1039,6 +1039,13 @@ namespace cpp_redis { return *this; } + client& + client::exists(const std::string& key, const reply_callback_t& reply_callback) { + std::vector cmd = {"EXISTS", key}; + send(cmd, reply_callback); + return *this; + } + client & client::exists(const std::vector &keys, const reply_callback_t &reply_callback) { std::vector cmd = {"EXISTS"};