@@ -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,25 @@ 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+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return eval (script, numkeys, args, cb); });
3695+ }
3696+
3697+ std::future<reply>
3698+ client::eval (const std::string &script, const std::vector<std::string> &keys,
3699+ const std::vector<std::string> &args) {
3700+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return eval (script, keys, args, cb); });
3701+ }
3702+
3703+ std::future<reply>
3704+ client::evalsha (const std::string &sha1, const std::vector<std::string> &keys,
3705+ const std::vector<std::string> &args) {
3706+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return evalsha (sha1, keys, args, cb); });
36753707 }
36763708
36773709 std::future<reply>
36783710 client::evalsha (const std::string &sha1, int numkeys, const std::vector<std::string> &keys,
36793711 const std::vector<std::string> &args) {
3680- return exec_cmd ([=](const reply_callback_t &cb) -> client & { return evalsha (sha1, numkeys, keys, args, cb); });
3712+ return exec_cmd ([=](const reply_callback_t &cb) -> client & { return evalsha (sha1, keys, args, cb); });
36813713 }
36823714
36833715 std::future<reply>
0 commit comments