openresty / lua-resty-redis

Lua redis client driver for the ngx_lua based on the cosocket API
1.9k stars 448 forks source link

hmget能否增加一个传入fied数组的方法? #29

Open andex1988 opened 10 years ago

andex1988 commented 10 years ago

现在 red:hmget 传入的是可变参数,能否想hmset一样传入数组啊,或者安装redis 原生的命令 hmget hashname field1 field2?

agentzh commented 10 years ago

@andex1988 This place is supposed to be English only. If you want to post in Chinese, please join the openresty (Chinese) mailing list and post there instead: https://groups.google.com/group/openresty

Below are some working examples using the hmget method:

-- HMGET myhash field1 field2 nofield
local res, err = red:hmget("myhash", "field1", "field2", "nofield")

-- HMGET myhash field1 field2 nofield
local fields = {"field1", "field2", "nofield"}
local res, err = red:hmget("myhash", unpack(fields))
andex1988 commented 10 years ago

ok,thanks

ThomasHaiKuan commented 10 years ago

问个问题,lua中的table数据集合太大了没办法返回数据是什么原因?

agentzh commented 10 years ago

@88069684 Please, do not use Chinese here because this place is considered English only (as mentioned above). You're recommended to post your Chinese questions to the openresty Chinese mailing list instead. See http://openresty.org/#Community

Thank you for your cooperation.