Closed mlanzuisi closed 1 year ago
You can try the following code:
std::unordered_map<std::string, std::string> m = {{"f1", "v1"}, {"f2", "v2"}};
redis.hset("hash", m.begin(), m.end());
redis.hset("hash", {std::make_pair("f1", "v1"), std::make_pair("f2", "v2")});
Also check redis.h for more info.
Regrads
Thank you for the support, I will check better redis.h in the future
I'm using the hset() function as described in the readme file examples. Is it possible to use it to match the
HSET key field value [field value ...]
syntax (with multiple fields/values)?