getArgs()
The getArgs() method returns a table that contains one row for each
argument that is accepted by the UDX.
In the Netezza database, arguments are always positional, therefore the first argument in the list represents the first argument to the UDX, the second row in the table represents the second argument, etc.
The data types that are accepted by an nzLua UDX are listed in Table 1.
| Datatype | Description |
| date | A date value, encoded as Unix time (seconds since January 1, 1970) |
| bigint | A 64-bit integer value. Depending on the OPT_FORCE_BIGNUM option, a bigint may be stored as a double or as a bignum value. |
| boolean | True or false encoded as a Lua boolean value. |
| byteint | A 1-byte integer (-128 through 127), encoded as a double in nzLua.fixed-width |
| date | A date value, encoded as Unix time (seconds since January 1, 1970) |
| char(size) | A fixed-width character string, encoded as a Lua string. |
| double | IEEE double precision floating point number. |
| float | IEEE single precision floating point number, encoded as a double |
| integer | A 32-bit signed integer encoded as a double. |
| nchar(size) | A fixed-width UTF8 string value encoded as a Lua string. |
| nvarchar(size) | A variable-width UTF8 string value encoded as a Lua string. |
| numeric(any) | A numeric value that can have any scale and precision. Depending on the value and the OPT_FORCE_BIGNUM setting, a numeric(any) may be passed into nzLua as a double or a BigNum value. |
| numeric(scale,precision) | A numeric value with a predefined scale and precision. Depending on the value and the OPT_FORCE_BIGNUM setting, a numeric(any) may be passed into nzLua as a double or a BigNum value. Large numeric values (beyond 14 digits) will always be passed into nzLua as a BigNum and not as a normal Lua number. |
| smallint | A 16-bit integer value encoded as a double. |
| timestamp | A timestamp value with millisecond precision encoded as Unix time (seconds since January 1, 1970). |
| varchar(any) | A string of any length encoded as a Lua string value. |
| varchar(size) | A variable-width string of predefined length encoded as Lua string |
| varargs | If the varargs datatype is used, it can be the only argument accepted by the nzLua UDX. A UDX defined to accept Vargas can be called with any combination of datatypes. The UDX is responsible for checking the datatypes and behaving appropriately. |
The getArgs() method returns a nested table in the form below. The argument name
is not currently used by nzLua or the Netezza database.