skip to main content
Interface Provider class : IP methods reference : ipGetSupport
 

ipGetSupport

This method is used by the OpenAccess SDK SQL Engine to query the IP about its support for the types of SQL operations allowed, the mode in which the IP is working, whether DCL is supported, and other features. The information reported by this method defines the mode in which the OpenAccess SDK SQL Engine operates and how it interacts with the IP. ipGetSupport is called after ipConnect and may be called multiple times among other IP method calls.
See Table 16 for IP support options.
int ipGetSupport(
int iSupportType)
 
Table 15: Parameters for ipGetSupport  
Parameter
Type
Description
IN
 
 
iSupportType
int
Type of support queried.
 
RETURN
 
 
 
int
1 – if the requested option is enabled.
0 – if the requested option is not supported.
The value for the IP_SUPPORT_OP_XX is the logical OR of the setting returned by this method and the setting in the OA_SUPPORT column of the OA_COLUMNS table for the specified column.
The value for the IP_SUPPORT_SELECT, IP_SUPPORT_INSERT, IP_SUPPORT_UPDATE, IP_SUPPORT_DELETE and IP_SUPPORT_SELECT_FOR_UPDATE is the logical OR of the setting returned by this method and the setting in the OA_SUPPORT column of the OA_TABLES table for the specified table name.
 
Table 16: IP support options  
Support option
Description
IP_SUPPORT_SELECT
The IP supports select.
IP_SUPPORT_INSERT
The IP supports insert.
IP_SUPPORT_UPDATE
The IP supports update.
IP_SUPPORT_DELETE
The IP supports delete.
IP_SUPPORT_SELECT_FOR_UPDATE
The IP supports select for update.
IP_SUPPORT_START_QUERY
The IP implementer wants the IP to be notified of starting of query execution on the same table through multiple queries.
IP_SUPPORT_END_QUERY
The IP implementer wants the IP to be notified of ending of query execution on the same table through multiple queries.
IP_SUPPORT_SCHEMA
The IP implements dynamic schema.
IP_SUPPORT_UNION_CONDLIST
The IP implementer wants the IP to receive the condition lists as a union condition list.
IP_SUPPORT_PRIVILEGES
The IP implements a privilege function.
IP_SUPPORT_PUSHDOWN_QUERY
The IP will work in pass through mode where it is responsible for executing the query.
IP_SUPPORT_TABLE_FUNCTIONS
The IP supports table functions.
IP_SUPPORT_NATIVE_COMMAND
The IP implements an ipNative method that should be called when the parser is unable to recognize the query.
IP_SUPPORT_BLOCK_JOIN
The IP has implemented block join optimization.
IP_SUPPORT_JOIN_ORDER_SELECTION
The IP supports the join order selection.
IP_SUPPORT_QUERY_MODE_SELECTION
The IP determines at EXECUTE call whether to use pass-through query mode or in row-based mode.
IP_SUPPORT_VALIDATE_SCHEMAOBJECTS_IN_USE
This options applies only when working in dynamic schema mode. The IP is designed to be called to return column information only for the columns referenced in the query. The IP SCHEMA function must be implemented to check for filter condition on the column name.
Operator support
 
IP_SUPPORT_OP_EQUAL
The IP can handle = conditions.
IP_SUPPORT_OP_NOT
The IP can handle NOT conditions.
IP_SUPPORT_OP_GREATER
The IP can handle > conditions.
IP_SUPPORT_OP_SMALLER
The IP can handle < conditions.
IP_SUPPORT_OP_BETWEEN
The IP can handle between conditions.
IP_SUPPORT_OP_LIKE
The IP can handle LIKE conditions.
IP_SUPPORT_OP_NULL
The IP can handle IS NULL condition.
DDL
SQL Data Definition Language support
IP_SUPPORT_CREATE_TABLE
The IP supports table creation.
IP_SUPPORT_DROP_TABLE
The IP supports table deletion.
IP_SUPPORT_CREATE_INDEX
The IP supports index creation.
IP_SUPPORT_DROP_INDEX
The IP supports index deletion.
IP_SUPPORT_ALTER_TABLE
The IP supports altering existing tables.
Stored procedure
 
IP_SUPPORT_PROCEDURE
The IP supports procedure execution.
Views
IP_SUPPORT_CREATE_VIEW
The IP supports view creation.
IP_SUPPORT_DROP_VIEW
The IP supports view deletion.
IP_SUPPORT_QUERY_VIEW
The IP supports querying views.
SQL Data Control Language support (DCL)
IP_SUPPORT_CREATE_USER
The IP supports CREATE USER DCL command.
IP_SUPPORT_DROP_USER
The IP supports DROP USER DCL command.
IP_SUPPORT_CREATE_ROLE
The IP supports CREATE ROLE DCL command.
IP_SUPPORT_DROP_ROLE
The IP supports DROP ROLE DCL command.
IP_SUPPORT_GRANT
The IP supports GRANT DCL command.
IP_SUPPORT_REVOKE
The IP supports REVOKE DCL command.
The value for the IP_SUPPORT_OP_XX is the logical OR of the setting returned by this function and the setting in the OA_SUPPORT column of the OA_COLUMNS table for the specified column.
The value for the IP_SUPPORT_SELECT, IP_SUPPORT_INSERT, IP_SUPPORT_UPDATE, IP_SUPPORT_DELETE and IP_SUPPORT_SELECT_FOR_UPDATE is the logical OR of the setting returned by this function and the setting in the OA_SUPPORT column of the OA_TABLES table for the specified table name.
One way to implement this feature, and the template uses this approach, is to set up an array as shown in the following example, and to use the iSupportType as an index into it.

Example 

IP_SUPPORT_ARRAY mem_support_array =
{0,
1, /* IP_SUPPORT_SELECT */
0, /* IP_SUPPORT_INSERT */
0, /* IP_SUPPORT_UPDATE */
0, /* IP_SUPPORT_DELETE */
0, /* IP_SUPPORT_SCHEMA - IP supports Schema methods */
0, /* IP_SUPPORT_PRIVILEGES - IP can validate user */
/* privileges */
1, /* IP_SUPPORT_OP_EQUAL */
0, /* IP_SUPPORT_OP_NOT */
0, /* IP_SUPPORT_OP_GREATER */
0, /* IP_SUPPORT_OP_SMALLER */
0, /* IP_SUPPORT_OP_BETWEEN */
0, /* IP_SUPPORT_OP_LIKE */
0, /* IP_SUPPORT_OP_NULL */
0, /* IP_SUPPORT_SELECT_FOR_UPDATE */
...
};