skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_getRestrictionList : Usage
 
Usage
In a query of the form:
SELECT * FROM emp WHERE dept_id = 1 OR dept_id=2;
calling dam_getRestrictionList on column dept_id returns a restriction list with two conditions, C1 and C2, and column dept_id.
The first condition, C1, has the operator set to '=' and value set to 1.
The second condition, C2, has the operator set to '=' and value set to 2.
The IP should build rows where the dept_id is 1 and rows where the dept_id is 2.
/* Get restriction on column dept_id assuming hDeptId is the */
/* column handle */
hCondList = dam_getRestrictionList( hstmt, hDeptId);
hCond1 = dam_getFirstCond( hstmt, hCondList);
/* Call dam_describeCondEx() to get the operator type, operand and the */
/* data type */
hCond2 = dam_getNextCond(hstmt, hCondList );

See also

*dam_getRestrictionList