redis icon indicating copy to clipboard operation
redis copied to clipboard

Hset return value is not always correct

Open cpjolicoeur opened this issue 9 years ago • 0 comments

Reading the code for Hset, this package is comparing the return value to 1 to determine the bool return value.

According to the redis docs for HSET, a return value of 1 indicates a new field was added to the hash with the value given, while a return value of 0 means the given field was already in the hash and it's value was updated.

So a return of 0 or 1 both should indicate a successful return value, shouldn't it?

cpjolicoeur avatar Mar 06 '15 19:03 cpjolicoeur