Learn R Programming

rredis (version 1.7.0)

redisType: Query a Redis value type.

Description

Return a description of the type of the value corresponding to the specified key.

Usage

redisType(key)

Arguments

key
The key to look up.

Value

A descriptive character string that may be one of "none", "string", "list", or "set". "none" is returned if the key does not exist.

Details

The Redis database differentiates three types of values. The value types determine how Redis operates on the key/value pairs, not what kind of data may be contained within. Each value type may store generic R objects, binary blobs, or character strings. The Redis value types are:

string: A single value is associated with the key

list: A stack of values is associated with the key

set: A set of values is associated with the key.

Values of "list" and "set" types have available to them special stack and set operations, respectively.

References

http://redis.io/commands

See Also

redisKeys

Examples

Run this code
## Not run: 
# redisConnect()
# redisSet('x',5)
# redisLPush('y',6)
# redisType('x')
# redisType('y')
# ## End(Not run)

Run the code above in your browser using DataLab