skip to main content
IP API Reference for Java : IP API Interfaces for Java : oajava.sql.sqlip_stmt Interface
 

oajava.sql.sqlip_stmt Interface

A new instance of an object that implements the oajava.sql.sqlip_stmt interface is created for each statement executed. The connection object for which the statement is being created is passed to this object’s constructor and a reference to it is added at the OpenAccess SDK layer. If you are going to maintain a reference to the statement object within the IP, you must release that reference when sqlipCloseStmt is called.
Any name (for example, mySQLeng) can be given to the class that implements the oajava.sql.sqlip interface. The class name for the class that implements the oajava.sql.sqlip_stmt must be oajava.sql.sqlip class name with "_stmt" appended to it (for example, mySQLeng_stmt).
The IP can also expose optional methods that are not part of the interface. These methods allow enhanced functionality to be supported. An example of this method is sqlipFetchRowsInBuffer. This method is called if the ServiceJavaIPUseBulkFetch service attribute is configured to specify using batch fetching.
public interface sqlip_stmt{
public int sqlipCloseCursor();
public int sqlipCloseStmt();
public int sqlipDeclareCursor();
public int sqlipError();
public int sqlipFetchRow();
public int sqlipGetColattr();
public int sqlipGetColspec();
public Object sqlipGetColval();
public int sqlipGetInfo();
public int sqlipGetNumcols();
public int sqlipGetNumparams();
public int sqlipInitParam();
public int sqlipExecuteStmt();
public int sqlipOpenNextCursor();
public int sqlipOpenOutputCursor();
public int sqlipPrepareStmt();
public int sqlipSetInfo();
public int sqlipGetParamSpec();
public int sqlipMapToXoType();
public int sqlipTables();
public int sqlipColumns();
public int sqlipPrimaryKeys();
public int sqlipCatalogs();
public int sqlipSchemas();
public int sqlipTableTypes();
public int sqlipIndexInfo();
public int sqlipProcedures();
public int sqlipProcedureColumns();
public int sqlipBestRowIdentifier();
public int sqlipVersionColumns();
public int sqlipForeignKeys();
public int sqlipTypeInfo();
}
Optional methods:
public int sqlipFetchIntoBuffer()
The class also implements a constructor with the following signature, where xxx is the name of the class implementing the oajava.sql.sqlip_stmt interface.
public xxx(oajava.sql.sqlip IPObj, long sqlip_hstmt, long pMemTree)
 
Table 66: Parameters for Class Implementing oajava.sql.sqlip_stmt
Parameter
Type
Description
INPUT
 
 
IPObj
oajava.sql.sqlip
Reference to the connection object on which this statement is being created. Typecast it to the object type of your connection object.
sqlip_hstmt
long
OpenAccess SDK layer statement handle that may be required in callback methods in the future.
pMemTree
long
Memory tree handle for the statement level processing which may be used in the future.
When this constructor is called, it typecasts the passed argument to that of the connection object type. Assuming the connection object type is xxx:
public xxx_stmt(oajava.sql.sqlip IPObj, long sqlip_hstmt, long pMemTree)
{
MyDbConnection con;
PrintMessage("\n xxx_stmt(oajava.sql.sqlip) called");
xxx MyIPObj = (xxx) IPObj;
con = MyIPObj.getConnectionObj();
}

See also 

sqlipCloseStmt
sqlipFetchRowsInBuffer