skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_setOption : Statement Options
 
Statement Options
For the statement options, set the option type to DAM_STMT_OPTION and the object handle to the current statement handle.
Table 177. Statement Options for dam_setOption
Option (iOption)
Option Value
DAM_STMT_OPTION_SUBQUERY_​CONDLISTS
Support for marking the entire list of condition lists of subquery as "Evaluated" by the IP so that the OpenAccess SDK SQL engine skips evaluation during dam_isTargetRow. The IP would use this option when dam_getSetOfConditionListsEx returns complete condition lists. Valid values are:
*DAM_PROCESS_ON (default) - the OpenAccess SDK SQL engine handles the evaluation.
*DAM_PROCESS_OFF - the IP performs the processing.
DAM_STMT_OPTION_DISTINCT
Determines whether the OpenAccess SDK SQL engine or the IP performs DISTINCT processing. The IP can use the dam_getInfo function to find out if a query has an optimizable SELECT DISTINCT clause. Valid values are:
*DAM_PROCESS_ON (default) - the OpenAccess SDK SQL engine handles the processing.
*DAM_PROCESS_OFF - the IP performs the processing.
DAM_STMT_OPTION_GROUP_BY
Determines whether the OpenAccess SDK SQL engine or the IP performs GROUP BY processing. Valid values are:
*DAM_PROCESS_ON (default) - the OpenAccess SDK SQL engine handles the processing.
*DAM_PROCESS_OFF - the IP performs the processing.
DAM_STMT_OPTION_ORDER_BY
Determines whether the OpenAccess SDK SQL engine or the IP performance ORDER BY processing. Valid values are:
*DAM_PROCESS_ON (default) - the OpenAccess SDK SQL engine handles the processing.
*DAM_PROCESS_OFF - the IP performs the processing.
DAM_STMT_OPTION_​PASSTHROUGH_QUERY
When working in Query Selection Mode, the IP sets this option to tell the OpenAccess SDK SQL engine which mode the IP wants to handle the query in. Set this option when OAIP_execute is called with DAM_SET_QUERY_MODE. Valid values are:
*DAM_PROCESS_ON - the IP is implemented to handle the query in SQL pass-through mode.
*DAM_PROCESS_OFF -the IP continues working in normal row-based mode.
DAM_STMT_OPTION_​TABLE_ROWSET
When operating in BLOCK JOIN mode, this option determines whether the OpenAccess SDK SQL engine or the IP returns Table Rowset results. Valid values are:
*DAM_PROCESS_ON (default) - the OpenAccess SDK SQL engine handles the processing.
*DAM_PROCESS_OFF - the IP has performed the processing.
If Table Rowset is being processed, the IP should not operate in Cursor Mode. The IP should process and add all rows before returning from IP execute.
dam_setOption returns DAM_NOT_AVAILABLE when query cannot be processed as Table Rowset. The IP should check the return status and modify its behavior based on if Table Rowset can be processed.

See also

*dam_setOption
*dam_getInfo
*dam_isTargetRow
*dam_getSetOfConditionListsEx