Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

redisHSet

Store a hash value in Redis.


Description

Store a value identified by a character key name and field in the Redis database. Any existing value with the same key/field will be replaced by the new value unless NX is set to TRUE.

Usage

redisHSet(key, field, value, NX = FALSE)

Arguments

key

The (required) character identifier for the key name.

field

The (required) character identifier for the field name.

value

The (required) object to associate with the key/field.

NX

If NX = TRUE, existing values will not be replaced.

Details

Redis hash values store values in one or more fields associated with a single key name.

The value to be stored can be any serializable R object up to the Redis maximum object size (excluding, for example, external pointer references). References to other R objects or environments inside the value are not guaranteed to be preserved.

In order to store strings that can easily be read by other clients, first convert the character object using the charToRaw function as shown in the examples.

Value

TRUE is returned on success. If NX = FALSE and a value already exists, the value will not be replaced and FALSE will be returned.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

Examples

## Not run: 
redisHSet('A', 'x',runif(5))

## End(Not run)

rredis

"Redis" Key/Value Database Client

v1.7.0
Apache License (>= 2.0)
Authors
B. W. Lewis
Initial release
2015-07-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.