luca3m / redis3m

A C++ Redis client
Apache License 2.0
190 stars 78 forks source link

hi, does this work with hget and hset, zrange? if so, please provide examples. thanks. #13

Closed hwongcom closed 9 years ago

hwongcom commented 9 years ago

hi, does this work with hget and hset, zrange? if so, please provide examples. thanks.

luca3m commented 9 years ago

Hi,

Yes it works for any Redis command:

using namespace redis3m;
connection::ptr_t conn = connection::create();
conn->run(command("HSET") << "foo" << "bar" << "biz");
reply r = conn->run(command("HGET") << "foo" << "bar");
reply r2 = conn->run(command("ZRANGE") << "key" << 0 << -1);