IDA REGISTERUDX command

The IDA REGISTERUDX CLPPlus command registers a UDX.

Note: All UDX functions work only in fenced mode.

Invocation

You must run this command from the CLPPlus interface.

Authorization

None

Required connection

CLPPlus must be connected to the database.

Command syntax

IDA REGISTERUDX

Read syntax diagramSkip visual syntax diagramIDA REGISTERUDXPARAMFILEparameter_filePROJECTprojectLANGCPPC++ parametersLANGLUALua parametersLANGPYTHONPython parameters
C++ parameters
Read syntax diagramSkip visual syntax diagramCLASSclass SIGNATURE signature RETURN data_type UDXLIBRARY name DETERMINISTICYES DETERMINISTICNO CALLONNULLINPUTNO[for a UDSF or UDTF] CALLONNULLINPUTYES[for a UDTF] CALLONNULLINPUTNO CALLONNULLINPUTYES ALLOWPARALLELYES[for a UDSF or UDTF] ALLOWPARALLELNO[for a UDTF] ALLOWPARALLELYES ALLOWPARALLELNO UDXLIBRARYname_of_project.soUDXLIBRARYname
Python parameters
Read syntax diagramSkip visual syntax diagram SIGNATURE signature RETURN data_type DETERMINISTICYES DETERMINISTICNO CALLEDONNULLINPUTNO[for a UDSF or UDTF] CALLEDONNULLINPUTYES[for a UDAF] CALLEDONNULLINPUTNO CALLEDONNULLINPUTYES ALLOWPARALLELYES[for a UDSF or UDAF] ALLOWPARALLELNO[for a UDTF] ALLOWPARALLELYES ALLOWPARALLELNO

Parameters

The following parameters apply to all UDXs regardless of the language in which they are written:
PARAMFILE
The name of an IDA parameter file that determines the default values of any parameters that are not explicitly specified for this command (see IDA parameter file).
Any mandatory main parameters that are not specified explicitly in the command string must be specified by means of a parameter file. The mandatory main parameters for this command are:
  • PROJECT | PROJ
  • SIGNATURE | SIG
  • CLASS
  • RETURN
LANG
The language (CPP for C++; LUA for Lua) in which the UDX is written. If the extension of the UDX library file (which is specified by the UDXLIBRARY parameter) is either .so or .nzl, the command determines the language automatically and this parameter is not needed. Specify this parameter only if the extension of the library file of the UDX is something other than either .so or .nzl.
PROJECT | PROJ
The name of the project directory that contains the files needed by the UDX that is to be registered.
SIGNATURE | SIG
The signature of the UDX. For example:
UDX Type Signature Description
UDSF udx42(VARCHAR,CHAR) A UDSF with the name udx42 that accepts two input arguments (one VARCHAR and one CHAR).
UDTF "sig=UDTFONEINT(integer)" A UDTF with the name UDTFONEINT that accepts one input argument (an integer).
UDAF "sandd(int,int) aggregate with (int,int)" A UDAF with the name sandd that accepts two input arguments (both integers).
RETURN
The data type of the data that is returned by the UDX:
  • For a UDSF or UDAF, this is a simple data type such as int or char.
  • For a UDTF, this is a string of the form "TABLE(<name> <data_type>)". For example, "TABLE(t1 integer)" indicates that the returned data is in a table with the name t1 that contains one column of integer data.
UDXLIBRARY | UDXLIB
The full name, including the path from the project directory and the extension, of the library file of the UDX to be registered. The extension must be:
.so
For a UDX written in C++.
.nzl
For a UDX written in Lua.
For example: release/libudxdbl.so.
DETERMINISTIC | DET
Whether the UDX is to be deterministic.
CALLEDONNULLINPUT | NULLCALL
Whether the UDX is to be called when one or more of the input values is NULL.
ALLOWPARALLEL | PARALLEL
Whether the UDX is to allow parallel processing. The value YES can be specified only for a UDSF or UDAF, not a UDTF.
CLASS
The class (that is, the label of the entry point in the shared library) of the UDX.

Examples

The following command specifies all of its parameters by means of a parameter file with the name pf1r.txt:
SQL> IDA REGISTERUDX PARAMFILE pf1r.txt
The following command overwrites some of the parameters specified in pf1r.txt.
SQL> IDA REGISTERUDX PARAMFILE pf1r.txt SRC udxin4.tar CLASS ZZBin UDXLIB release/libudxdbl.so
The following command does not specify a parameter file; all parameters are specified in the command string. Defaults are used for all unspecified parameters.
SQL> IDA REGISTERUDX SRC C:\udxdev\udx1.tar SIG udx1(int,int) CLASS ABin RETURN char