skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_setOption : Connection Options
 
Connection Options
For the connection options, set the option type to DAM_CONN_OPTION and the object handle to the current connection handle.
Table 176. Connection Options for dam_setOption
Option (iOption)
Option Value
DAM_CONN_OPTION_BLANKS_​IN_STRINGS
Determines whether the OpenAccess SDK SQL engine ignores trailing blanks in strings when performing string comparisons and LIKE processing. The actual string values in and out of the IP are not stripped. This is useful when the database stores information with space padding but the user in the query does not provide the padded blanks. Valid values are:
*DAM_BIS_IGNORE_NONE (default) - compare as is unless the SQL_OP_IGNORE_BLANKS bit is set in the OA_SUPPORT field of the column.
*DAM_BIS_IGNORE_TRAILING - ignore trailing blanks and compare; applies to all columns.
If this option is set, the strings 'Joe' and 'Joe ' are considered equal.
DAM_CONN_OPTION_CASE_​IN_STRINGS
Determines whether the OpenAccess SDK SQL engine ignores case when performing string compares. This option is useful when the database has case insensitive data. Valid values are:
*DAM_CIS_IGNORE_NONE (default) - compare as is unless the SQL_OP_IGNORE_CASE_IN_STRINGS bit is set in the OA_SUPPORT field of the column.
*DAM_CIS_IGNORE_ALL - perform case insensitive string comparisons.
This is a global setting. To apply this to specific columns, leave this option as DAM_CIS_IGNORE_NONE and set the SQL_OP_IGNORE_CASE_IN_STRINGS flag in the OA_SUPPORT field of the schema definition for those columns.
DAM_CONN_OPTION_CASE_​IN_LIKE
Determines whether LIKE processing is case sensitive. Valid values are:
*DAM_CIL_IGNORE_NONE - case sensitive unless the SQL_OP_IGNORE_CASE_IN_LIKE bit is set in the OA_SUPPORT field of the column.
*DAM_CIL_IGNORE_ALL (default) - case insensitive. Applies to all columns.
DAM_CONN_OPTION_INDEX_​OPTIMIZATION
Determines whether the OpenAccess SDK SQL engine performs optimization when identifying a search column. This option should not be changed unless your IP handles most of the optimization. Valid values are:
*DAM_INDEX_IGNORE_NONE (default) - perform default optimization
*DAM_INDEX_IGNORE_ALL - disable default optimization
DAM_CONN_OPTION_JOINORDER_​USING_FKEY
Determines whether OA_FKEYS information is used when determining the join order. Valid values are:
*DAM_PROCESSING_OFF - ignore foreign keys in determining the join order.
*DAM_PROCESSING_ON (default) - make use of foreign keys in determining the join order as detailed in the Join Processing section in the OpenAccess SDK SQL Engine Programmer's Guide.
DAM_CONN_OPTION_JOINORDER_​USING_JOINCONDITION
Determines whether to use conditions in the query to compute join order for the tables. The join ordering algorithm uses the index information of the columns in the conditions to calculate Join ordering for the tables in the query.
*DAM_PROCESSING_ON - ignore conditions in determining the join order for the tables.
*DAM_PROCESSING_OFF (default) - Use conditions for determining the best join ordering for the tables.
DAM_CONN_OPTION_JOINORDER_​USING_SEARCHCONDITION
Determines whether search conditions are used when determining the join order. Valid values are:
*DAM_PROCESSING_OFF - ignore search conditions in determining the join order.
*DAM_IPROCESSING_ON (default) - make use of search conditions in determining the join order as detailed in the Join Processing section in the OpenAccess SDK SQL Engine Programmer's Guide.
DAM_CONN_OPTION_JOINORDER_​USING_STARJOIN
Enables star join detection and optimization.
*DAM_PROCESSING_ON - Star join detection and optimization is enabled.
*DAM_PROCESSING_OFF (default) - Star join detection and optimization is disabled.
DAM_CONN_OPTION_JOINORDER_​USING_STATISTICS
Determines whether the OpenAccess SDK SQL engine considers the cost-based join order algorithm when determining the order to join tables when executing a query.
Valid values are:
*DAM_PROCESSING_OFF (default) - do not use the cost-based join order algorithm to determine the table join order.
*DAM_PROCESSING_ON - use the cost-based join order algorithm to determine the table join order. Whether the cost-based join order algorithm is actually used depends on whether conditions are met in the priority hierarchy for join algorithms. For more information about join processing and the join algorithm hierarchy, refer to the OpenAccess SDK SQL Engine Programmer's Guide.
DAM_CONN_OPTION_JOINORDER_​VERIFY_INDEX_ON_JOIN_CONDITION
Determines whether the OpenAccess SDK SQL engine checks if inner tables have an index on the join conditions. If inner tables do not have an index on join conditions, the join ordering should not be used. This is used to check if join ordering based on search condition or foreign keys should be used. Valid values are:
*DAM_PROCESSING_OFF (default) - do not check indexes on join conditions
*DAM_PROCESSING_ON - check indexes on join conditions
DAM_CONN_OPTION_NEGATIVE_​ZERO_RESULT
Determines whether the OpenAccess SDK SQL engine converts negative zero to zero. Valid values are:
*DAM_NZR_CONVERT_NONE (default) - Return negative zero result as is.
*DAM_NZR_CONVERT_ALL - convert negative zero (-0.0) to zero (0.0).
DAM_CONN_OPTION_NUMERIC_​RESULT
Determines whether the result from an aggregate function that operates on SQL_NUMERIC data is rounded to the scale of the input.
*DAM_NR_ROUND_NONE (default) - the output of an aggregate function is returned with higher scale then the input. In the following example, this option returns a value of 518.8766667 for the avg(numerictype) expression.
*DAM_NR_ROUND_ALL - the output of an aggregate function is rounded to the scale of the numeric argument. In the example below, this option returns a value of 518.88 for the avg(numerictype) expression.
For example,
CREATE TABLE atypes(id integer, numerictype numeric(8,2))
INSERT INTO atypes(id, numerictype) values (1, 349.61);
INSERT INTO atypes(id, numerictype) values (2, 572.21);
INSERT INTO atypes(id, numerictype) values (3, 634.81);
DAM_CONN_OPTION_POST_​PROCESSING
Determines whether the OpenAccess SDK SQL engine performs post-processing (GROUP BY, ORDER BY). This option is used when using SQL pass-through mode. Valid values are:
*DAM_PROCESSING_ON (default) - the OpenAccess SDK SQL engine should handle post-processing.
*DAM_PROCESSING_OFF - the OpenAccess SDK SQL engine should skip post-processing operations.
DAM_CONN_OPTION_SKIP_JOINORDER_​REVERSING_PKFK
Determines the order in which to process primary key and foreign keys based on the relationship between tables in a query. Valid values are:
*DAM_PROCESSING_BEFORE - the OpenAccess SDK SQL engine reverses the processing order of foreign keys, processing them first.
*DAM_PROCESSING_AFTER - the OpenAccess SDK SQL engine processes primary key tables first.