How to define and use a SPUPad
The process to define a UDX that has a SPUPad is the same process as described in Create user-defined functions; you create a C++ program, which now includes special functions and code for a SPUPad, then you compile and register your UDX.
Note: SPUPads are not supported for UDXs that operate in fenced mode.
To use a SPUPad in your C++ programs, follow these high-level steps:
- Define the type of memory used for a SPUPad object.
- Define the data type contents of a SPUPad object.
- Define a SPUPad with a specific name.
- Write data to the SPUPad
- Read data from the SPUPad
Your UDX can be designed to create a SPUPad, write and manipulate the content, and return data all in one function call. You can also design several UDXs to do some or all of those tasks separately within a query transaction block.
The following sections show some examples of the code that you can add to your C++ programs.