skip to main content
Interface Provider API : Reference : OAIP_getInfo
 

OAIP_getInfo

This IP function returns the requested information in the buffer pInfoValue. The function is used by the OpenAccess SDK SQL engine to query the IP about its version and its behavior in various areas. It is called after the INIT and may be called before processing some other functions. Most IPs can ignore all the information types and use the implementation shown in the IP template file, which returns DAM_NOT_AVAILABLE.
See Table 13 for the types of information that the IP can provide.
int OAIP_getInfo(
    IP_HENV henv,
    IP_HDBC ip_hdbc,
    IP_HSTMT hstmt,
    int iInfoType,
    void * pInfoValue,
    int iInfoValueMax,
    int * piInfoValueLen)
Table 12. Parameters for OAIP_getInfo
Parameter
Type
Description
IN
henv
IP_HENV
The data structure allocated by the IP to keep its information.
ip_hdbc
IP_HDBC
A pointer to the connection data you allocated.
hstmt
IP_HSTMT
A pointer to the statement data you allocated.
iInfoType
int
Type of information requested. See Table 13 for the types of information that the IP can provide.
If the IP does not handle the information request, the default value is used.
pInfoValue
void *
A pointer to the buffer in which to return the information. Some iInfoTypes require strings and others integers.
iInfoValueMax
int
The size of the buffer.
OUT
piInfoValueLen
int *
Returns the number of bytes written in the buffer.
RETURN
int
DAM_SUCCESS - on success
DAM_NOT_AVAILABLE - use the default value set by the OpenAccess SDK SQL engine.
Table 13. Information Type for OAIP_getInfo
Information Type
Description
IP_INFO_ALLOW_BLOCK_JOIN_ON_NON_ EQUAL_COND
Return TRUE if block joins should be supported on join conditions that do not use the EQUAL operator. The value is returned as a short.
The default value is FALSE.
IP_INFO_ALLOW_SCHEMA_UPDATE
Return TRUE if static schema can be modified. The value is returned as a short.
The default value is the value specified for the service attribute ServiceSQLSchemaUpdateAllowed.
IP_INFO_COND_LIST_NORMALIZATION_ LIMIT
Return the limit on the number of condition lists that can be generated to normalize the search condition. If the search condition cannot be normalized within the limit, the query will be processed without exposing the condition lists to the IP. The value is returned as a short.
The default value is 1024.
IP_INFO_CONVERT_NUMERIC_VAL
Return TRUE if the OpenAccess SDK SQL engine should convert numeric strings to have correct number of scale digits based on Scale/Precision. Return FALSE if no conversion should be applied. The value is returned as a short.
The default value is FALSE
.
IP_INFO_DDL_RESULT_ROWS
Returns the value for the result row count.
The IP can specify the required result row count for DDL operations. If the IP does not specify any value, a value of -1 is reported.
The default value is -1.
IP_INFO_ERROR_COUNT_LIMIT
Return the limit on the number of errors that should be reported per query. Any errors that exceed the limit will be ignored. The value is returned as a short.
The default value is 10.
IP_INFO_FILTER_VIEWS_WITH_QUALIFIER_ NAME
Return TRUE if you want the Catalog functions to only return views that belong to the current qualifier. Return FALSE if you want all views to be exposed to client applications. The value is returned as a short.
The default value is FALSE.
IP_INFO_GENERATE_COL_NAME_FOR_EXP
Connection level information. Specifies whether to generate the column name for the constant expression in the query. Return FALSE if no column name is generated for a constant expression in the query.
The default value is TRUE.
IP_INFO_IN_COND_LIST_NORMALIZATION_ LIMIT
Return the limit on condition lists that are expanded for IN (subquery). dam_getSetOfConditionListsEx should skip expansion of IN condition list when it exceeds the limit. The value is returned as a short.
The default value is 1024.
IP_INFO_IGNORE_DATETIME_PARSE_ERROR
Return TRUE if you want to ignore DATE, TIME, and DATETIME literal errors in pass-through and selective pass-through modes.
The default value is FALSE.
IP_INFO_JOINORDER_UNORDERED_ PERCENT_LIMIT
Return the percent of tables that can remain unordered when a star join relation is used for deciding the join order. When join ordering is decided using star join relation of a single fact table related to multiple Dimension tables, this limit is used to check whether ordering can be decided even if all tables cannot be ordered. Any tables that cannot be ordered will be processed at the end of the ordered list in the order in which they appear in the query. The value is returned as a short.
The default value is 40.
IP_INFO_MINIMUM_NUMERIC_SCALE
Return the min scale value for NUMERIC/DECIMAL data types to OpenAccess SDK SQL engine to perform numeric calculations.
If this value is not specified in the IP, a default value of 3 is returned. An error is reported if the value is greater than 127 or is less than 0.
IP_INFO_MULTI_COLUMN_INDEX_FILTER
Return a flag indicating what conditions should be passed through to the IP in case of multi- column indexes. Should return a bitwise OR of the following options:
*IP_MCI_FILTER_NONE - pass in all conditions.
*IP_MCI_FILTER_LIKE - filter out like.
*IP_MCI_FILTER_ISNULL - filter out IS NULL.
*IP_MCI_FILTER_NOT - filter out NOT.
*IP_MCI_FILTER_COLLATION_ORDER - filter out COLLATION ORDER.
*IP_MCI_FILTER_DEFAULT - filter out LIKE, IS NULL, NOT and COLLATION ORDER.
If the IP returns IP_MCI_FILTER_NONE as the value, then the OpenAccess SDK SQL engine only checks operator support for the condition and does not apply any additional filtering. If the IP returns IP_MCI_FILTER_DEFAULT as the value, then the OpenAccess SDK SQL engine filters out columns with LIKE, IS NULL, NOT, and COLLATION ORDER conditions.
The value is returned as a short.The default value is IP_MCI_FILTER_DEFAULT.
IP_INFO_OWNER_NAME, IP_INFO_OWNER_NAMEW
The IP should return the current login name or a fixed name like "OAUSER". The owner name is used by the OpenAccess SDK SQL engine as the default owner name during query validation. Information is requested in Unicode with IP_INFO_OWNER_NAMEW if OAIP_getSupport(IP_SUPPORT_UNICODE_INFO) returned 1.
The default value is OAUSER.
IP_INFO_OWNER_TERM, IP_INFO_OWNER_TERMW
The term used to refer to the second part of the three part object name. The value is returned as a string. Information is requested in Unicode with IP_INFO_OWNER_TERMW if OAIP_getSupport(IP_SUPPORT_UNICODE_INFO) returned 1.
The default value is Owner.
IP_INFO_QUALIFIER_NAME, IP_INFO_QUALIFIER_NAMEW
Return the default qualifier value for this connection. If CREATE VIEW/DROP VIEW commands do not specify the qualifier, this value is used as the Qualifier. The value is returned as a null terminated string. The value returned here and the value returned as the TABLE_QUALIFIER for the table/column objects within this database must match. Information is requested in Unicode with IP_INFO_QUALIFIER_NAMEW if OAIP_getSupport(IP_SUPPORT_UNICODE_INFO) returned 1.
The default value is SCHEMA.
IP_INFO_QUALIFIER_TERM, IP_INFO_QUALIFIER_TERMW
The term used to describe what the first part of the three-part object name refers to. The information is returned as a string.
The default value is Database.
IP_INFO_SUPPORT_SCHEMA_SEARCH_ PATTERN
Return TRUE if you want the schema search objects to include search pattern. Return FALSE if you cannot support search patterns. The value is returned as a short.
The default value is FALSE.
IP_INFO_SUPPORT_VALUE_FOR_RESULT_ ALIAS
Return TRUE if you want the IP to be able to return the result value based on the result column alias name. Return FALSE if you want the base column value to be returned for the corresponding result columns. The value is returned as a short.
The default behavior is FALSE.
IP_INFO_TABLE_ROWSET_REPORT_ MEMSIZE_LIMIT
Return TRUE to indicate that the OpenAccess SDK SQL engine should report an error when TableRowset limit is exceeded. The default behavior is for the OpenAccess SDK SQL engine to convert the table rowset into data required for current outer block rows being processed and not raise any errors. The value is returned as a short.
The default behavior is FALSE.
IP_INFO_TXN_ISOLATION
The transaction isolation level supported by the IP. Should return one of the following:
*SQL_TXN_READ_UNCOMMITTED
*SQL_TXN_READ_COMMITTED
*SQL_TXN_REPEATABLE_READ
*SQL_TXN_SERIALIZABLE.
The value is returned as an integer.
The default value is SQL_TXN_READ_COMMITTED.
IP_INFO_USE_PKEY_FOR_INDEX_ OPTIMIZATION
Return TRUE if the OpenAccess SQL Engine should use Primary Key as the Unique index for query optimization. The value is returned as a short.
The default value is FALSE.
IP_INFO_USE_ROWID_FOR_INDEX_ OPTIMIZATION
Return TRUE if the OpenAccess SDK SQL Engine should use the ROWID column as the Unique index for query optimization. The value is returned as a short.
The default value is FALSE.
IP_INFO_VALIDATE_NULL_CONSTRAINT
Indicates to the OpenAccess SDK SQL Engine whether or not it should enforce a check constraint when null values are specified in non-nullable result columns.
Valid values:
TRUE | FALSE
If set to TRUE, the default value, the OpenAccess SDK SQL engine enforces the check constraint and reports the integrity constraint violation.
If set to FALSE, the OpenAccess SDK SQL engine ignores the violation and allows null values.
Note: This option is only applicable when working in SQL pass-through mode.
IP_INFO_VALIDATE_QUERY_SEMANTICS
Return FALSE if you do not want the OpenAccess SDK SQL engine to validate query semantics in pass-through query mode. This is useful when the backend query engine supports non-standard SQL syntax. The value is returned as a short.
The default value is TRUE.
All columns of the SELECT list and ORDER BY should have set functions.
Example: SELECT COUNT(empno) FROM emp ORDER BY empno;
IP_INFO_VALIDATE_SCALAR_FUNC
Return FALSE if scalar function validation should be optional. If the query uses a scalar function that is not registered, the SQL Engine will not report an error during query planning. The value is returned as a short.
The default value is TRUE.
IP_INFO_VALIDATE_TABLE_WITH_OWNER
Return TRUE if the OpenAccess SDK SQL engine should validate the table using the value returned for IP_INFO_OWNER_NAME. This option is used when the query does not qualify the table reference with the owner. Note that if the query is fully qualified this option is not applicable. The table owner validation is applied to User Tables and Views and not to System Tables.
Applications that have a fixed schema can return FALSE. The value is returned as a short.
The default value is FALSE.
IP_INFO_VALIDATE_TABLE_WITH_QUALIFIER
Return TRUE if the OpenAccess SDK SQL engine should validate the table reference in the query using the value returned for IP_INFO_QUALIFIER_NAME. This option is used when the query does not qualify the table reference with the qualifier. Note that if the query is fully qualified, this option is not applicable. The table qualifier validation is applied to User Tables and Views and not to System Tables.
Applications that have a fixed schema can return FALSE. The value is returned as a short.
The default value is FALSE.
IP_INFO_USE_CURRENT_QUALIFIER_FOR_SYSTEM_SCHEMA
Return TRUE if the OpenAccess SDK SQL engine should use the current qualifier for the System table schema instead of default, "SCHEMA". The value is returned as a short.
The default value is FALSE.