Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

redisHMSet not working #4

Closed
sherbert opened this issue May 9, 2012 · 3 comments
Closed

redisHMSet not working #4

sherbert opened this issue May 9, 2012 · 3 comments

Comments

@sherbert
Copy link

sherbert commented May 9, 2012

Using rredis 1.6.3, redisHMSet doesn't seem to work:

redisHMSet('A', list(x=1,y=2,z=3))
[1] TRUE
redisHKeys('A')
NULL
redisHSet('A', 'x', 1)
[1] TRUE
redisHKeys('A')
[[1]]
[1] "x"

Starting from an empty Redis:

redisFlushAll()
[1] "OK"
redisKeys()
NULL
redisHMSet('A', list(x=1,y=2,z=3))
[1] TRUE
redisKeys()
[1] 120 1

It also gives errors when the list of fields and values is not exactly 3 elements that make me suspect something is going wrong internally:

redisHMSet('A', list(x=1))
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERR wrong number of arguments for 'hmset' command
redisHMSet('A', list(x=1,y=2))
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERR wrong number of arguments for 'hmset' command
redisHMSet('A', list(x=1,y=2,z=3))
[1] TRUE
redisHMSet('A', list(x=1,y=2,z=3,w=4))
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERR wrong number of arguments for HMSET

@bwlewis
Copy link
Owner

bwlewis commented May 9, 2012

Thanks,

An update that includes HMSet and a few other fixes is in process.

Best,

Bryan
On May 9, 2012 6:23 PM, "sherbert" <
reply@reply.github.com>
wrote:

Using rredis 1.6.3, redisHMSet doesn't seem to work:

redisHMSet('A', list(x=1,y=2,z=3))
[1] TRUE
redisHKeys('A')
NULL
redisHSet('A', 'x', 1)
[1] TRUE
redisHKeys('A')
[[1]]
[1] "x"

Starting from an empty Redis:

redisFlushAll()
[1] "OK"
redisKeys()
NULL
redisHMSet('A', list(x=1,y=2,z=3))
[1] TRUE
redisKeys()
[1] 120 1

It also gives errors when the list of fields and values is not exactly 3
elements that make me suspect something is going wrong internally:

redisHMSet('A', list(x=1))
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERR wrong number of arguments for 'hmset' command
redisHMSet('A', list(x=1,y=2))
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERR wrong number of arguments for 'hmset' command
redisHMSet('A', list(x=1,y=2,z=3))
[1] TRUE
redisHMSet('A', list(x=1,y=2,z=3,w=4))
Error in doTryCatch(return(expr), name, parentenv, handler) :
ERR wrong number of arguments for HMSET


Reply to this email directly or view it on GitHub:
#4

@bwlewis
Copy link
Owner

bwlewis commented May 15, 2012

Fixed. Along with an improved HMSet, and a new redisCmd generic low-level interface function.

Best,

Bryan

@bwlewis bwlewis closed this as completed May 15, 2012
@sherbert
Copy link
Author

Works for us now, thanks.

eddelbuettel added a commit to eddelbuettel/rredis that referenced this issue Apr 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants