redis3m  1.0.0
 All Classes Functions Variables Enumerations Pages
Public Member Functions | List of all members
redis3m::patterns::script_exec Class Reference

Helps to run Lua scripts on a Redis instance. It will take care to use EVALSHA to optimize performance and then EVAL if the script is not yet available on Redis server. See http://redis.io/commands/eval for other infos. More...

#include <script_exec.h>

Public Member Functions

 script_exec (const std::string &script, bool is_path=false)
 Create script_exec. More...
 
reply exec (connection::ptr_t connection, const std::vector< std::string > &keys=std::vector< std::string >(), const std::vector< std::string > &args=std::vector< std::string >())
 Execute the script. First trying with EVALSHA, then with EVAL. More...
 

Detailed Description

Helps to run Lua scripts on a Redis instance. It will take care to use EVALSHA to optimize performance and then EVAL if the script is not yet available on Redis server. See http://redis.io/commands/eval for other infos.

Constructor & Destructor Documentation

patterns::script_exec::script_exec ( const std::string &  script,
bool  is_path = false 
)

Create script_exec.

Parameters
scriptscript content or a path to a file which contains the script
is_pathtrue if previous argument is a path, false otherwise. The latter is default.

Member Function Documentation

reply patterns::script_exec::exec ( connection::ptr_t  connection,
const std::vector< std::string > &  keys = std::vector<std::string>(),
const std::vector< std::string > &  args = std::vector<std::string>() 
)

Execute the script. First trying with EVALSHA, then with EVAL.

Parameters
connection
keysvector of keys used by the script
args
Returns

The documentation for this class was generated from the following files: