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

damex_describeSelectQuery

This function returns details about the SELECT query.
To get the list of tables on the SELECT query, use damex_getFirstTable and damex_getNextTable.
int damex_describeSelectQuery(
    DAM_HQUERY hquery,
    int * piSetQuantifier,
    DAM_HVALEXP_LIST * phSelectValExpList,
    DAM_HLOGEXP * phSearchExp,
    DAM_ HVALEXP _LIST * phGroupValExpList,
    DAM_HLOGEXP * phHavingExp,
    DAM_ HVALEXP _LIST * phOrderValExpList)
Table 195. Parameters for damex_describeSelectQuery
Parameter
Type
Description
IN
hquery
DAM_HQUERY
The query handle.
OUT
piSetQuantifier
int *
The quantifier of the result set:
SQL_SELECT_ALL - return all rows. Do not eliminate any duplicates from the resulting table.
SQL_SELECT_DISTINCT - eliminate any duplicate rows from the result table.
phSelectValExpList
DAM_HVALEXP_LIST *
The handle to the select list.
Use damex_getFirstValExp, damex_getNextValExp to navigate the SELECT list.
phSearchExp
DAM_HLOGEXP *
The handle to the search expression in the WHERE clause.
Use damex_describeLogicExp to get the logical search expression details.
phGroupValExpList
DAM_ HVALEXP _LIST *
The handle to the value-exp list of the GROUP BY clause.
Use damex_getFirstValExp, damex_getNextValExp to navigate the GROUP BY expressions.
phHavingExp
DAM_HLOGEXP *
The handle to the HAVING clause expression.
Use damex_describeLogicExp to get the logical HAVING expression details.
phOrderValExpList
DAM_ HVALEXP _LIST *
The handle to the value-exp list of the ORDER BY clause.
Use damex_getFirstValExp, damex_getNextValExp to navigate the ORDER BY expressions.
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure

See also

*damex_describeLogicExp
*damex_getFirstValExp
*damex_getNextValExp
*damex_getFirstTable
*damex_getNextTable