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

dam_getSetOfConditionListsEx

This function is used to retrieve expressions from the WHERE clause on one or more columns in the form of AND or OR expressions. It can be used to retrieve all the expressions in the WHERE clause by passing NULL for the column handle.
As in the case of the condition list returned by the dam_getRestrictionList function, each of the condition lists contained in this set can be marked as evaluated by using the dam_setOption function.
The OpenAccess SDK SQL engine handles all condition lists not marked as evaluated. This feature can be used to take a look at all the available expressions but will only handle the expressions your IP implements. If the condition list returned is a partial list, as indicated by the pbPartialLists output, then the OpenAccess SDK SQL engine evaluates all the conditions. When finished with the list, the IP must call dam_freeSetOfConditionList to free the set of conditions list.
Refer to "Advanced Optimization" in the OpenAccess SDK SQL Engine Programmer's Guide for more information using this function.
DAM_HSET_OF_CONDLIST dam_getSetOfConditionListsEx(
DAM_HSTMT hstmt,
int iType,
DAM_HCOL hcol,
int * pbPartialLists)
Table 154. Parameters for dam_getSetOfConditionListsEx
Parameter
Type
Description
IN
hstmt
DAM_HSTMT
The statement handle.
iType
int
The type of condition list requested:
SQL_SET_CONDLIST_INTERSECT - transforms the where clause into set of AND conditions and returns these as a list. This is valid only if IP_SUPPORT_UNION_CONDLIST is set to 0.
SQL_SET_CONDLIST_UNION - transforms the where clause into a set of OR conditions and returns these as a list. This is valid only if IP_SUPPORT_UNION_CONDLIST is set to 1.
hcol
DAM_HCOL
The column on which to retrieve expressions.
Set to NULL to specify all columns.
OUT
pbPartialLists
int *
TRUE - the condition list provided to the IP is a partial list. This happens in cases where the query contains expressions like (A=B). In this case the OpenAccess SDK SQL engine builds temporary condition lists which contain all the conditions that can be exposed to IP. So IP cannot mark these condition lists as evaluated. The OpenAccess SDK SQL engine is forced to evaluate all the original condition lists of the search expression.
FALSE - the condition list provided to the IP contains the full expression.
RETURN
DAM_HSET_​OF_CONDLIST
The search condition list.
Navigate it by using dam_getFirstCondList and dam_getNextCondList.
A NULL is returned if no search list is available. The IP must call the function dam_freeSetOfConditionList to this handle when finished with the query.

See also

*dam_freeSetOfConditionList
*dam_getFirstCondList
*dam_getNextCondList
*dam_getRestrictionList
*dam_setOption