Lua Quick Start

In order to use User Defined Functions (UDF) in Lua, some environment variables need first to be set:

LUA_PATH: Must be set according to the rules for the LUA_PATH setting specified in the Lua documentation (see https://www.lua.org/pil/8.1.html). For example:

 
    LUA_PATH="?;?.lua;$MCO_ROOT/target/lua/?.lua"
     

LUA_CPATH: Where Lua will search for loadable compiled binary modules. It's not required by eXtremeDB itself, but may be needed when using 3rd party modules.

LD_LIBRARY_PATH: The eXtremeDB directory with the appropriate shared library modules. For example:

 
    LD_LIBRARY_PATH=$MCO_ROOT/target/bin.so
     

MCO_LUA_PATH: The directory that contains modules exdb.lua and kdb.lua. For example:

 
    MCO_LUA_PATH=$MCO_ROOT/target/lua
     

Once the environment is set up, Lua support will be loaded automatically, no additional steps are required!