skip to main content
Interface Provider API : Overview
 

Overview

The following table lists all of the functions that the OpenAccess SDK SQL engine can call to process queries. In addition to these functions, the IP must implement any functions it has registered for handling user-defined scalar functions and stored procedures.
Table 1. Functions to be Supported by an IP
Operation
Function Name the IP Exports
Description
CONNECT 
 Required
OAIP_connect
OAIP_connectW
Establish a connection on behalf of a client. Use OAIP_connectW for Unicode user name, password, and so on.
DCL
   Optional
OAIP_dcl
Execute a DCL command (create user, drop user, create role, drop role, grant, revoke).
DDL
   Optional
OAIP_ddl
Called by the OpenAccess SDK SQL engine to process DDL commands like CREATE TABLE. This function is only required if the IP indicates support for DDL Commands like CREATE TABLE, DROP TABLE in the Support Array.
DISCONNECT
   Required
OAIP_disconnect
A client is disconnecting from the data source that is managed by this IP.
DYNAMIC RESULTS
   Optional
OAIP_procedure_dynamic
Called to invoke a stored procedure that returns one or more result sets that can be defined at run-time.
END TRANSACTION
   Required
OAIP_endTransaction
COMMIT or ROLLBACK the current transaction.
EXECUTE 
  Required
OAIP_execute
Called to select, insert, update and delete rows.
EXECUTE DATA Types
   Required
OAIP_execute_datatypes
Called to select, insert, update and delete data types.
EXIT
   Required
OAIP_exit
Called when the OpenAccess SDK SQL engine is shutting down.
GETINFO
   Required
OAIP_getInfo
Called by the OpenAccess SDK SQL engine to get the version number and other information.
GETSUPPORT
   Required
OAIP_getSupport
Used to query the IP for the types of operators it can handle and the mode of operation.
INIT  Required
OAIP_init
Called at startup to initialize the IP.
INIT SCALAR
   Optional
OAIP_init_scalar
Register custom scalar functions.
NATIVE
   Optional
OAIP_native
OAIP_nativeW
Called to validate and execute commands that the OpenAccess SDK SQL engine cannot parse.
PRIVILEGE
   Optional
OAIP_privilege
Verify privileges on the specified user, object and operation combination.
PROCEDURE
   Optional
OAIP_procedure
Called by the OpenAccess SDK SQL engine to execute a stored procedure.
SCHEMA
   Optional
OAIP_schema
OAIP_schemaW
Called by the OpenAccess SDK SQL engine to retrieve the database schema information if the IP has selected to implement its own schema manager. Use OAIP_schemaW to expose Unicode object names.
SCHEMAEX
   Optional
OAIP_schemaEx
OAIP_schemaExW
Called by the OpenAccess SDK SQL engine to retrieve definition of result sets defined at run-time. Used for processing stored procedures that return results defined at runtime. Use schemaExW to expose Unicode object names.
SETINFO
   Required
OAIP_setInfo
Called by the OpenAccess SDK SQL engine to pass information to the IP.
START TRANSACTION
   Required
OAIP_startTransaction
Start a new transaction.

Unicode and Non-Unicode Function Differences

Some IP API functions have variations for a non-Unicode version (8-bit character) and a Unicode version. Unicode versions of the functions are indicated with names that end in W (for example, connectW).
Some operations like CONNECT and SCHEMA can be implemented using Unicode characters instead of 8-bit character strings. To use the Unicode interface, implement the Unicode version of the IP function instead of the non-Unicode function. For example, to support Unicode in user name and password, implement OAIP_connectW.

Multithreading

If you are going to execute in the multithreaded mode, then you must guarantee thread safety for all IP API functions except OAIP_init function and OAIP_exit. Also refer to OpenAccess SDK SQL Engine Programmer's Guide for more information on multithreading mode.