@@ -1003,6 +1003,16 @@ namespace cpp_redis {
10031003 return *this ;
10041004 }
10051005
1006+ client &
1007+ client::eval (const std::string &script, const std::vector<std::string> &keys,
1008+ const std::vector<std::string> &args, const reply_callback_t &reply_callback) {
1009+ std::vector<std::string> cmd = {" EVAL" , script, std::to_string (keys.size ())};
1010+ cmd.insert (cmd.end (), keys.begin (), keys.end ());
1011+ cmd.insert (cmd.end (), args.begin (), args.end ());
1012+ send (cmd, reply_callback);
1013+ return *this ;
1014+ }
1015+
10061016 client &
10071017 client::evalsha (const std::string &sha1, int numkeys, const std::vector<std::string> &keys,
10081018 const std::vector<std::string> &args, const reply_callback_t &reply_callback) {
@@ -1013,6 +1023,16 @@ namespace cpp_redis {
10131023 return *this ;
10141024 }
10151025
1026+ client &
1027+ client::evalsha (const std::string &sha1, const std::vector<std::string> &keys,
1028+ const std::vector<std::string> &args, const reply_callback_t &reply_callback) {
1029+ std::vector<std::string> cmd = {" EVALSHA" , sha1, std::to_string (keys.size ())};
1030+ cmd.insert (cmd.end (), keys.begin (), keys.end ());
1031+ cmd.insert (cmd.end (), args.begin (), args.end ());
1032+ send (cmd, reply_callback);
1033+ return *this ;
1034+ }
1035+
10161036 client &
10171037 client::exec (const reply_callback_t &reply_callback) {
10181038 send ({" EXEC" }, reply_callback);
@@ -3671,13 +3691,27 @@ namespace cpp_redis {
36713691 std::future<reply>
36723692 client::eval (const std::string &script, int numkeys, const std::vector<std::string> &keys,
36733693 const std::vector<std::string> &args) {
3674- return exec_cmd ([=](const reply_callback_t &cb) -> client & { return eval (script, numkeys, keys, args, cb); });
3694+ (void ) numkeys;
3695+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return eval (script, keys, args, cb); });
3696+ }
3697+
3698+ std::future<reply>
3699+ client::eval (const std::string &script, const std::vector<std::string> &keys,
3700+ const std::vector<std::string> &args) {
3701+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return eval (script, keys, args, cb); });
3702+ }
3703+
3704+ std::future<reply>
3705+ client::evalsha (const std::string &sha1, const std::vector<std::string> &keys,
3706+ const std::vector<std::string> &args) {
3707+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return evalsha (sha1, keys, args, cb); });
36753708 }
36763709
36773710 std::future<reply>
36783711 client::evalsha (const std::string &sha1, int numkeys, const std::vector<std::string> &keys,
36793712 const std::vector<std::string> &args) {
3680- return exec_cmd ([=](const reply_callback_t &cb) -> client & { return evalsha (sha1, numkeys, keys, args, cb); });
3713+ (void ) numkeys;
3714+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return evalsha (sha1, keys, args, cb); });
36813715 }
36823716
36833717 std::future<reply>
0 commit comments