nzLua code libraries
nzLua provides a mechanism to create libraries of nzLua code that can then be reused by many programs.
An nzLua code library is created by using a .nzll extension instead of
.nzl for the nzLua program. The library can then be loaded by any other nzLua UDX
by using the require statement. For example, if a file was named mylualib.nzll,
another nzLua UDX could dynamically load the code in that library by using:
require "mylualib"
See Examples for a sample code library, as well as the /nz/extensions/nz/nzlua/examples directory of the nzLua distribution, which has several sample nzLua code libraries.
/nz/extensions/nz/nzlua/examples directory of the nzLua distribution, which has several sample nzLua code libraries.
The Netezza database system view
_v_library contains a list of all of the nzLua
libraries that are installed. The library names are always prefixed with NZLUALIB_.
For example, if the original source file is named testlib.nzll, the library in the
Netezza database is named NZLUALIB_TESTLIB. The SQL below can be used to see all of
the nzLua code
libraries:select library from _v_library where upper(library) like 'NZLUALIB%';The
nzLua require function replaces the require function in the Lua language.