Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Commit

Permalink
[3.5.4] fix zadd params (change from const to const&). Also add zadd …
Browse files Browse the repository at this point in the history
…to future_client and remove temporary gtest fix as gtest is now fixed. (#100)
  • Loading branch information
Cylix authored Aug 18, 2017
1 parent a73f286 commit 1d14efe
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ IF (BUILD_TESTS)
add_subdirectory(tests)
ExternalProject_Add("googletest"
GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_TAG "461713fec4603806d2049835c0790bf94d2db631"
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${PROJECT_SOURCE_DIR}/deps")
# Reset variable to false to ensure tacopie does no build tests
set (BUILD_TESTS false)
Expand Down
2 changes: 1 addition & 1 deletion includes/cpp_redis/future_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class future_client {
future unwatch();
future wait(int numslaves, int timeout);
future watch(const std::vector<std::string>& keys);
// future zadd() key [nx|xx] [ch] [incr] score member [score member ...]
future zadd(const std::string& key, const std::vector<std::string>& options, const std::map<std::string, std::string>& score_members);
future zcard(const std::string& key);
future zcount(const std::string& key, int min, int max);
future zcount(const std::string& key, double min, double max);
Expand Down
2 changes: 1 addition & 1 deletion includes/cpp_redis/redis_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class redis_client {
redis_client& unwatch(const reply_callback_t& reply_callback = nullptr);
redis_client& wait(int numslaves, int timeout, const reply_callback_t& reply_callback = nullptr);
redis_client& watch(const std::vector<std::string>& keys, const reply_callback_t& reply_callback = nullptr);
redis_client& zadd(const std::string& key, const std::vector<std::string> options, const std::map<std::string, std::string> score_members, const reply_callback_t& reply_callback = nullptr);
redis_client& zadd(const std::string& key, const std::vector<std::string>& options, const std::map<std::string, std::string>& score_members, const reply_callback_t& reply_callback = nullptr);
redis_client& zcard(const std::string& key, const reply_callback_t& reply_callback = nullptr);
redis_client& zcount(const std::string& key, int min, int max, const reply_callback_t& reply_callback = nullptr);
redis_client& zcount(const std::string& key, double min, double max, const reply_callback_t& reply_callback = nullptr);
Expand Down
5 changes: 5 additions & 0 deletions sources/future_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,11 @@ future_client::watch(const std::vector<std::string>& keys) {
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.watch(keys, cb); });
}

future_client::future
future_client::zadd(const std::string& key, const std::vector<std::string>& options, const std::map<std::string, std::string>& score_members) {
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.zadd(key, options, score_members, cb); });
}

future_client::future
future_client::zcard(const std::string& key) {
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.zcard(key, cb); });
Expand Down
2 changes: 1 addition & 1 deletion sources/redis_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ redis_client::watch(const std::vector<std::string>& keys, const reply_callback_t
}

redis_client&
redis_client::zadd(const std::string& key, const std::vector<std::string> options, const std::map<std::string, std::string> score_members, const reply_callback_t& reply_callback) {
redis_client::zadd(const std::string& key, const std::vector<std::string>& options, const std::map<std::string, std::string>& score_members, const reply_callback_t& reply_callback) {
std::vector<std::string> cmd = {"ZADD", key};

//! options
Expand Down

0 comments on commit 1d14efe

Please sign in to comment.