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

redisEval

Evaluate a Lua script in the Redis server.


Description

Evaluate a Lua script in the Redis server.

Usage

redisEval(script, keys = vector("list",0), SHA = FALSE, ...)

Arguments

script

A Redis server-side Lua script (character).

keys

An optional list of script key arguments.

SHA

If TRUE, the script is a SHA1-encoded string, otherwise plan text.

...

Optional list of script arguments.

Value

"OK" is returned on success. Errors are displayed if the script fails.

Author(s)

B. W. Lewis

References

http://redis.io/commands

Examples

## Not run: 
redisConnect()
redisEval("return redis.call('set','foo','bar')")

# Supply a key argument to the script
redisEval("return redis.call('set',KEYS[1],'bar')", "foo")

# Supply a key and other arguments to the script
redisEval("return redis.call('set',KEYS[1],ARGV[1])", "foo", pi)

## 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.