skip to main content
SQL Engine parse tree methods for Java : damex_describeValExp
 

damex_describeValExp

This method retrieves the description of the value expression. The value expression has one of the following formats:
*value
*function(value): – functions: MIN, MAX, AVG, SUM, COUNT, VAR, VAR_SAMP, STDDEV, STDDEV_SAMP, STDEV, VARP, VAR_POP, STDDEVP, STDDEV_POP, STDEVP
*COUNT(*)
*val_exp {+ | – | * | /} val_exp
*scalar_val_exp
int damex_describeValExp(
    long   hValExp,
    xo_int piType,
    xo_int piFuncType,
    long   phLeftValExp,
    long   phRightValExp,
    long   phVal,
    long   phScalarValExp)
Table 270. Parameters for damex_describeValExp
Parameter
Type
Description
INPUT
hValExp
long
The value expression handle.
OUTPUT
piType
xo_int
The type of the value expression:
*SQL_VAL_EXP_VAL
*SQL_VAL_EXP_ADD
*SQL_VAL_EXP_SUBTRACT
*SQL_VAL_EXP_MULTIPLY
*SQL_VAL_EXP_DIVIDE
*SQL_VAL_EXP_SCALAR
piFuncType
xo_int
The type of the set function can be a bitwise OR of the following values:
*SQL_F_COUNT_ALL
*SQL_F_COUNT
*SQL_F_MIN
*SQL_F_MAX
*SQL_F_AVG
*SQL_F_SUM
*SQL_F_DISTINCT
*SQL_F_VAR
*SQL_F_VARP
*SQL_F_STDDEV
*SQL_F_STDDEVP
This value is 0 if no set function exists.
phLeftValExp
long
The handle to the left value expression. This value is set only when the val expression type is one of the following:
*SQL_VAL_EXP_ADD
*SQL_VAL_EXP_SUBTRACT
*SQL_VAL_EXP_MULTIPLY
*SQL_VAL_EXP_DIVIDE
Otherwise the value is 0.
phRightValExp
long
The handle to the right value expression. This value is set only when the value expression type is one of the following:
*SQL_VAL_EXP_ADD
*SQL_VAL_EXP_SUBTRACT
*SQL_VAL_EXP_MULTIPLY
*SQL_VAL_EXP_DIVIDE
Otherwise the value is 0.
phVal
long
The handle to the value. This value is set only when the value expression type is SQL_VAL_EXP_VAL. Use damex_describeVal to get the details of the value.
phScalarValExp
long
The handle to the scalar value. This value is set only when the value expression type is
SQL_VAL_EXP_SCALAR.
Use damex_describeScalarValExp to get the details of the scalar method.
Use damex_getFirstValExp and damex_getNextValExp to navigate the argument list returned by damex_describeScalarValExp.
RETURN
int
DAM_SUCCESS – on success
DAM_FAILURE – on failure

See also

*damex_describeScalarValExp
*damex_describeVal
*damex_getFirstValExp
*damex_getNextValExp