skip to main content
SQL Engine Parse Tree API : SQL Engine Parse Tree functions reference : damex_describeCaseValExp
 

damex_describeCaseValExp

This function is used to retrieve the description of conditional CASE expression. The function returns a description of two formats for CASE expression, as follows:
1. Simple CASE expression
CASE input_expression
    WHEN when_expression THEN result_expression
        [...]
    [
        ELSE else_result_expression
    ]
END
2. Searched CASE expression:
CASE
     WHEN Boolean_expression THEN result_expression
        [...]
    [
        ELSE else_result_expression
    ]
END

Syntax

int damex_describeCaseValExp(
     DAM_HCASE_VALEXP hCaseValExp,
    DAM_HVALEXP * phInputValExp,
    DAM_HCASE_ELEM_LIST * phCaseElemList,
    DAM_HVALEXP * phElseValExp)
Table 185. Parameters for damex_describeCaseValExp
Parameter
Type
Description
IN
hCaseValExp
DAM_HCASE_VALEXP
Case value expression handle.
OUT
phInputValExp
DAM_HVALEXP *
Handle to the input expression This value is set only when the CASE is a simple expression.
phCaseElemList
DAM_HCASE_ELEM_LIST
Handle to the input expression. This value is set only when the CASE is a simple CASE expression.
phElseValExp
DAM_HVALEXP
Handle to the WHEN-THEN expression list. Use damex_getFirstCaseElem and damex_getNextCaseElem to navigate the list.
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure

See also

*damex_getFirstCaseElem
*damex_getNextCaseElem