skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_getValueOfExpEx
 

dam_getValueOfExpEx

This function gets the value of the argument passed into a scalar function implemented by the IP. Use the functions dam_getFirstValExp and dam_getNextValExp to step through the argument list.
int dam_getValueOfExpEx(
XM_Tree * pMemTree,
DAM_HVALEXP_LIST hValExpList,
DAM_HVALEXP hValExp,
int iXoType,
void ** ppVal,
int * piValLen,
DAM_HVAL * phVal)
Table 161. Parameters for dam_getValueOfExpEx
Parameter
Type
Description
IN
pMemTree
XM_Tree *
The memory tree to use for temporary storage.
hValExpList
DAM_HVALEXP_LIST
The list of arguments as passed into the scalar function.
hValExp
DAM_HVALEXP
The argument for which you want to retrieve the data.
iXoType
int
The data type in which to get the value. It can be XO_TYPE_CHAR,XO_TYPE_WCHAR, the data type used to define the argument, or any data type to which conversion is supported.
OUT
ppVal
void **
The pointer to the data is returned in this location. The C type of the data corresponds to the iXoType value. See Table 33. Use this pointer only if the *piValLen is not set to XO_NULL_DATA. Do not attempt to free this data.
piValLen
int *
Length of the data pointed to by *ppVal:
*XO_NULL_DATA - null data
*XO_NTS - null terminated string
*>= 0 - length of the data
phVal
DAM_HVAL
Handle to the temporary value node that is created for returning the data in iXoType format. Call dam_freeVal to free the value node once the data returned in ppVal is used.
RETURN
int
Status of the function call:
*DAM_SUCCESS - all data retrieved
*DAM_SUCCESS_WITH_RESULT_PENDING - more data is available and should be retrieved by calling this function again. This occurs for large LONGVARBINARY, LONGVARCHAR, and WLONGVARCHAR data.
*DAM_FAILURE - error in getting the data. Most likely the data cannot be converted to the XO_Type asked for.

See also

*dam_freeVal
*dam_getFirstValExp
*dam_getNextValExp