|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--oajava.sql.jdam
Expose Data Access Manager (DAM) API using Java.
| Constructor Summary | |
jdam()
|
|
| Method Summary | |
static int |
dam_add_damobj(int iType,
int pList,
int pSearchObj,
int pObj)
Add a schema object to the list of objects returned to the DAM. |
static int |
dam_addCharValToRow(int dam_hstmt,
int hRow,
int hCol,
java.lang.String pColVal,
int lColValLen)
Add the String value for the Column. |
static int |
dam_addDoubleValToRow(int dam_hstmt,
int hRow,
int hCol,
double pColVal,
int lColValLen)
Add the Double value for the Column. |
static void |
dam_addError(int hdbc,
int hstmt,
int iErrorIndex,
int iNativeError,
java.lang.String sErrorText)
Add an error to the error list maintained by the DAM. |
static int |
dam_addFloatValToRow(int dam_hstmt,
int hRow,
int hCol,
float colVal,
int lColValLen)
Add the Float value for the Column. |
static int |
dam_addIntValToRow(int dam_hstmt,
int hRow,
int hCol,
int pColVal,
int lColValLen)
Add the Integer value for the Column. |
static int |
dam_addJoinRowSet(int hrowset,
int hrow)
Associate the join rowset of the inner table with the outer table row. |
static int |
dam_addOutputRow(int hstmt,
int hrow)
Provide the row to the DAM for returning return values and output parameters from stored procedures. |
static int |
dam_addRowToRowSet(int hrowset,
int hrow)
Add the row to the join rowset. |
static int |
dam_addRowToTable(int dam_hstmt,
int hrow)
Add the row to the result set. |
static int |
dam_addShortValToRow(int dam_hstmt,
int hRow,
int hCol,
short pcolVal,
int lColValLen)
Add the Short value for the Column. |
static int |
dam_addTimeStampValToRow(int dam_hstmt,
int hRow,
int hCol,
xo_tm pColVal,
int lColValLen)
Add the Time Stamp value for the Column. |
static int |
dam_allocOutputRow(int hstmt)
Allocate a output and return its handle. |
static int |
dam_allocRow(int dam_hstmt)
Allocate a new row and return its handle. |
static int |
dam_allocRowSet(int hstmt)
Allocate a new rowset (result table) and return its handle. |
static int |
dam_compareCol(int hcol1,
int hcol2)
Check if the column handles refer to the same column. |
static int |
dam_createVal(int pMemTree,
int iXoType,
java.lang.Object pVal,
int iValLen)
This function is used to build the output value of a scalar function. |
static void |
dam_describeCol(int hcol,
xo_int piColNum,
java.lang.StringBuffer pColName,
xo_int piXOType,
xo_int piColType)
This function is used to retrieve the description of the specified column. |
static xo_type |
dam_describeColDetail(int hcol,
xo_int piPseudoColumn,
xo_int piColumnType,
xo_int piSortOrder,
xo_int piFuncType,
xo_int piIndexType,
java.lang.StringBuffer pUserData)
This function is used to retrieve the details of the specified column. |
static int |
dam_describeCond(int hcond,
xo_int piLeftOpType,
xo_int piLeftXoType,
xo_int piRightOpType,
xo_int piRightXoType)
This function is used to retrieve the description of the condition. |
static int |
dam_describeIndex(int hindex,
java.lang.StringBuffer sIndexQualifier,
java.lang.StringBuffer sIndexName,
xo_int piType,
xo_int piNonUnique,
xo_int piIndexLength)
This function is used to retrieve the description of the optimal index returned by the dam_getOptimalIndexAndConditions function. |
static int |
dam_describeIndexCol(int hindex_col,
xo_int piSeqInIndex,
java.lang.StringBuffer sColumnName,
xo_int piCollation)
This function is used to retrieve the description of a column associated with the optimal index returned by the dam_getOptimalIndexAndConditions function. |
static int |
dam_describeJoinCond(int hstmt,
xo_int piInnerTableColNum,
xo_int piOpType,
xo_int piOuterTableProcessOrder,
xo_int piOuterTableColNum)
This function is used by IP when building pushdown join result set. |
static int |
dam_describeJoinTable(int dam_hstmt,
int iTableProcessOrder,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pSchema,
java.lang.StringBuffer pTableName,
java.lang.StringBuffer pTablePath,
java.lang.StringBuffer pUserData)
Returns the attributes of the table with given TableProcessOrder in the join query being processed. |
static void |
dam_describeProcedure(int hstmt,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pSchema,
java.lang.StringBuffer pProcedureName,
java.lang.StringBuffer pUserData)
This function is called from the PROCEDURE function of the IP to find out about the stored procedure for which the IP has been called. |
static void |
dam_describeTable(int dam_hstmt,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pSchema,
java.lang.StringBuffer pTableName,
java.lang.StringBuffer pTablePath,
java.lang.StringBuffer pUserData)
Returns the attributes of the current table being processed. |
static int |
dam_describeTableByProcessOrder(int hstmt,
int iTableProcessOrder,
xo_int piTableNum,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pSchema,
java.lang.StringBuffer pTableName,
java.lang.StringBuffer pTablePath,
java.lang.StringBuffer pUserData)
Returns the attributes of the table with given TableProcessOrder in the join query being processed. |
static int |
dam_evaluateColCond(int hstmt,
int hcond,
int iXoType,
java.lang.Object pColVal,
int lColValLen)
Evaluate a search or restriction condition for the IP. |
static void |
dam_freeRow(int hrow)
Free a row of data. |
static int |
dam_freeSetOfConditionList(int hset_of_condlist)
Free the condition lists allocated by the dam_getOptimalIndexAndConditions and the dam_getSetOfConditionLists. |
static int |
dam_getCol(int dam_hstmt,
java.lang.String sColName)
Get column handle. |
static int |
dam_getColByNum(int hstmt,
int iColNum)
Returns the column handle for the given column number in schema. |
static int |
dam_getColCount(int hstmt,
int iColType,
xo_int piColCount)
This function is used to find out how many columns are in the various categories. |
static int |
dam_getColInCond(int hcond)
Gets the handle to the column on which a given condition applies. |
static int |
dam_getColToSet(int hRowElem)
Gets the column handle portion of a value set for update, insert or input row. |
static java.lang.Object |
dam_getCondRightVal(int hcond)
This function is used to retrieve the right value of a condition. |
static java.lang.Object |
dam_getCondVal(int hcond)
This function is used to retrieve the left value of a condition. |
static int |
dam_getFirstCol(int hstmt,
int iColType)
This function is used to navigate through the columns that appear in the select and where clause of the SQL query or through the columns in the schema definition of the table. |
static int |
dam_getFirstCond(int hstmt,
int hlist)
This function is used to navigate through the conditions in the condition list. |
static int |
dam_getFirstCondList(int hset_of_condlist)
Gets the first conditions list from the set of condition lists. |
static int |
dam_getFirstGrantedObject(int hstmt,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcSchema,
java.lang.StringBuffer pcObjName)
This function is used to navigate the granted object list in the GRANT and REVOKE commands. |
static int |
dam_getFirstGrantee(int hstmt,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcGranteeName)
This function is used to navigate the granted user list in the GRANT and REVOKE commands. |
static int |
dam_getFirstIndexCol(int hindex)
Gets the first column associated with the optimal index returned by the dam_getOptimalIndexAndConditions function. |
static int |
dam_getFirstInsertRow(int hstmt)
Gets the first row of data to be used for inserting into your data source. |
static int |
dam_getFirstPrivilege(int hstmt,
xo_int piPrivId,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcPrivRoleName)
This function is used to navigate the privilege list in the GRANT and REVOKE commands. |
static int |
dam_getFirstSchemaObject(int pList)
This function is used to navigate through the items in the schema object list returned by the dam_getSchemaObjectList call. |
static int |
dam_getFirstValExp(int hValExpList)
Gets the first argument passed into a scalar function implemented by the IP. |
static int |
dam_getFirstValueSet(int hstmt,
int hrow)
Gets the first value set of a row that has been retrieved from the DAM for the purpose of update, insert or stored procedure processing. |
static int |
dam_getFirstView(int hdbc,
java.lang.StringBuffer pTableQualifier,
java.lang.StringBuffer pTableOwner,
java.lang.StringBuffer pTableName)
Gets the first view from all currently active views. |
static int |
dam_getGroupByCol(int hstmt,
int iGroupByColNum,
xo_int piColNum,
java.lang.StringBuffer pColName)
Obtain column information about the columns specified as part of the GROUP BY clause. |
static int |
dam_getInfo(int hdbc,
int hstmt,
int iInfoType,
java.lang.StringBuffer pStrInfoValue,
xo_int pIntInfoValue)
Returns the requested connection and statement level information from the DAM. |
static int |
dam_getInputRow(int hstmt)
Retrieves the input arguments for a stored procedure call. |
static int |
dam_getIP_hstmt(int hstmt)
This function is used to retrieve the state information for a statement that is being processed. |
static java.lang.Object |
dam_getJoinColValue(int hstmt,
int hcol,
int iXoType,
xo_int piValLen,
xo_int piValStatus)
Gets the column value of the table already processed. |
static int |
dam_getMemTree(int hstmt)
Returns the tree to use for allocating memory associated with the specified statement. |
static int |
dam_getNextCol(int hstmt)
This function is used to navigate through the columns that appear in the select and where clause of the SQL query or through the columns in the schema definition of the table. |
static int |
dam_getNextCond(int hstmt,
int hlist)
This function is used to navigate through the conditions in the search and restriction condition list. |
static int |
dam_getNextCondList(int hset_of_condlist)
This function is used to navigate through the set of condition lists that was obtained by calling the dam_getSetOfConditionLists or the dam_getOptimalIndexAndConditions function. |
static int |
dam_getNextGrantedObject(int hstmt,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcSchema,
java.lang.StringBuffer pcObjName)
This function is used to navigate the granted object list in the GRANT and REVOKE commands. |
static int |
dam_getNextGrantee(int hstmt,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcGranteeName)
This function is used to navigate the granted user list in the GRANT and REVOKE commands. |
static int |
dam_getNextIndexCol(int hindex)
Gets the next column associated with the optimal index returned by the dam_getOptimalIndexAndConditions function. |
static int |
dam_getNextInsertRow(int hstmt)
Gets the next row of data to be used for inserting into your data source. |
static int |
dam_getNextJoinStmt(int hstmt_outer)
Get the DAM statement handle for the next table in the join. |
static int |
dam_getNextPrivilege(int hstmt,
xo_int piPrivId,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcPrivRoleName)
This function is used to navigate the privilege list in the GRANT and REVOKE commands. |
static int |
dam_getNextSchemaObject(int pList)
This function is used to navigate through the items in the schema object list returned by the dam_getSchemaObjectList call. |
static int |
dam_getNextValExp(int hValExpList)
Gets the next argument passed into a scalar function implemented by the IP. |
static int |
dam_getNextValueSet(int hstmt)
Gets the next value set of an update or an insert row. |
static int |
dam_getNextView(int hdbc,
java.lang.StringBuffer pTableQualifier,
java.lang.StringBuffer pTableOwner,
java.lang.StringBuffer pTableName)
Gets the next view from all currently active views. |
static int |
dam_getOptimalIndexAndConditions(int dam_hstmt,
xo_int phindex,
xo_int phset_of_condlist)
This function is used to get the optimal index and the set of search conditions associated with the columns of that index. |
static int |
dam_getOrderByCol(int hstmt,
int iOrderByColNum,
xo_int piColNum,
java.lang.StringBuffer pColName,
xo_int piSortOrder)
Obtain information about columns specified in the ORDER BY clause. |
static java.lang.Object |
dam_getQueryFirstResultValue(int hquery,
xo_int piXoType,
xo_int piValLen,
xo_int piValStatus)
Returns the first result value of the subquery. |
static java.lang.Object |
dam_getQueryNextResultValue(int hquery,
xo_int piXoType,
xo_int piValLen,
xo_int piValStatus)
Returns the next result value of the subquery. |
static int |
dam_getRestrictionList(int hstmt,
int hcol)
This function is used to get the handle to the list of restriction conditions on a column. |
static void |
dam_getRole(int hstmt,
java.lang.StringBuffer pcCatalog,
java.lang.StringBuffer pcRoleName)
Returns the user information in the CREATE ROLE and DROP ROLE commands. |
static int |
dam_getSchemaObjectList(int hstmt,
int iSchemaType)
Returns the list of schema objects of the specified type. |
static int |
dam_getSetOfConditionListsEx(int hstmt,
int iType,
int hcol,
xo_int pbPartialLists)
This function is used to retrieve expressions from the where clause on one or more columns in the form of AND or OR expressions. |
static int |
dam_getTableSearchExp(int hstmt,
int iTableProcessOrder,
xo_int phSearchExp,
xo_int piJoinType,
xo_int phJoinExp,
xo_int pbPartial)
Returns the search conditions (filter conditions) and join conditions for the given table. |
static int |
dam_getTableStmt(int hstmt,
int iTableNum)
Gets the DAM statement handle for the tableNum in the join. |
static int |
dam_getUpdateRow(int hstmt,
int pTargetRow)
Gets the row of data to be used for updating the selected rows in the database. |
static int |
dam_getUpdateRowAsExp(int hstmt)
Gets the update row that contains the values of columns and the corresponding update expressions. |
static void |
dam_getUser(int dam_hstmt,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pcUserName,
java.lang.StringBuffer pcPassword,
java.lang.StringBuffer pUserData)
Returns the user information in the CREATE USER and DROP USER commands. |
static java.lang.Object |
dam_getValueOfExp(int pMemTree,
int hValExpList,
int hValExp,
int iXoType,
xo_int iValStatus)
Gets the value of the argument passed into a scalar function implemented by the IP. |
static java.lang.Object |
dam_getValueToSet(int hRowElem,
int iXoType,
xo_int iValStatus)
Gets the value portion of a value object. |
static int |
dam_isTargetRow(int dam_hstmt,
int hrow)
This function evaluates the row against the where clause of the active SQL statement. |
static java.lang.Object |
dam_mapSchemaObj(int iType,
int pSearchObj)
Returns the search object mapped into the corresponding schema object. |
static int |
dam_new_damobj_column(int pMemTree)
Create an empty object of type DAMOBJ_TYPE_COLUMN to be used to return schema information about columns. |
static int |
dam_new_damobj_fkey(int pMemTree)
Create an empty object of type DAMOBJ_TYPE_FKEY to be used to return schema information about primary and foreign keys. |
static int |
dam_new_damobj_proc_column(int pMemTree)
Create an empty object of type DAMOBJ_TYPE_PROC_COLUMN to be used to return schema information about columns of stored procedures. |
static int |
dam_new_damobj_proc(int pMemTree)
Create an empty object of type DAMOBJ_TYPE_PROC to be used to return schema information about available stored procedures. |
static int |
dam_new_damobj_stat(int pMemTree)
Create an empty object of type DAMOBJ_TYPE_STAT to be used to return schema information about indexes. |
static int |
dam_new_damobj_table(int pMemTree)
Create an empty object of type DAMOBJ_TYPE_TABLE to be used to return schema information about tables. |
static int |
dam_set_damobj_column(int pObj,
java.lang.String table_qualifier,
java.lang.String table_owner,
java.lang.String table_name,
java.lang.String column_name,
short data_type,
java.lang.String type_name,
int char_max_length,
int numeric_precision,
short numeric_precision_radix,
short numeric_scale,
short nullable,
short scope,
java.lang.String userdata,
java.lang.String operator_support,
short psuedo_column,
short column_type,
java.lang.String remarks)
Set the values of the schema object of type DAMOBJ_TYPE_COLUMN to be used to return schema information about columns. |
static int |
dam_set_damobj_fkey(int pObj,
java.lang.String pktable_qualifier,
java.lang.String pktable_owner,
java.lang.String pktable_name,
java.lang.String pkcolumn_name,
java.lang.String fktable_qualifier,
java.lang.String fktable_owner,
java.lang.String fktable_name,
java.lang.String fkcolumn_name,
short key_seq,
short update_rule,
short delete_rule,
java.lang.String fk_name,
java.lang.String pk_name)
Set the values of the schema object of type DAMOBJ_TYPE_FKEY to be used to return schema information about primary and foreign keys. |
static int |
dam_set_damobj_proc_column(int pObj,
java.lang.String qualifier,
java.lang.String owner,
java.lang.String name,
java.lang.String column_name,
short column_type,
short data_type,
java.lang.String type_name,
int precision,
int length,
short scale,
short radix,
short nullable,
java.lang.String userdata,
java.lang.String remarks)
Set the values of the schema object of type DAMOBJ_TYPE_PROC_COLUMN to be used to return schema information about procedure columns. |
static int |
dam_set_damobj_proc(int pObj,
java.lang.String proc_qualifier,
java.lang.String proc_owner,
java.lang.String proc_name,
int num_input_params,
int num_output_params,
int num_result_sets,
short proc_type,
java.lang.String userdata,
java.lang.String remarks)
Set the values of the schema object of type DAMOBJ_TYPE_PROC to be used to return schema information about procedures. |
static int |
dam_set_damobj_stat(int pObj,
java.lang.String table_qualifier,
java.lang.String table_owner,
java.lang.String table_name,
short non_unique,
java.lang.String index_qualifier,
java.lang.String index_name,
short type,
short seq_in_index,
java.lang.String column_name,
java.lang.String collation,
int cardinality,
int pages,
java.lang.String filter_conditions)
Set the values of the schema object of type DAMOBJ_TYPE_STAT to be used to return schema information about indexes. |
static int |
dam_set_damobj_table(int pObj,
java.lang.String table_qualifier,
java.lang.String table_owner,
java.lang.String table_name,
java.lang.String table_type,
java.lang.String table_struct,
java.lang.String table_path,
java.lang.String table_userdata,
java.lang.String function_support,
java.lang.String remarks)
Set the values of the schema object of type DAMOBJ_TYPE_TABLE to be used to return schema information about tables. |
static int |
dam_setInfo(int hdbc,
int hstmt,
int iInfoType,
java.lang.String pStrInfoValue,
int pIntInfoValue)
Sets the specified global, connection or statement level information for use by the DAM. |
static void |
dam_setIP_hstmt(int hstmt,
int ip_hstmt)
This function is used to save state information for a statement that is being processed. |
static int |
dam_setOption(int iOptionType,
int ObjectHandle,
int iOption,
int lOptionValue)
Set the options related to the operations of the DAM. |
static int |
damex_describeCol(int hcol,
xo_int piTableNum,
xo_int piColNum,
java.lang.StringBuffer pColName,
xo_int piXOType,
xo_int piColType,
java.lang.StringBuffer pUserData,
xo_int piResultColNum)
This function is used to retrieve the description of the column when working in pass through or table expression pushdown modes. |
static int |
damex_describeCond(int hcond,
xo_int piType,
xo_int phLeftValExp,
xo_int phRightValExp,
xo_int phExtraValExp)
This function is used to retrieve the description of the condition. |
static int |
damex_describeLogicExp(int hLogExp,
xo_int piType,
xo_int phLeftLogExp,
xo_int phRightLogExp,
xo_int phCond)
Gets the description of a logical expression. |
static int |
damex_describeScalarValExp(int hScalarValExp,
java.lang.StringBuffer pName,
xo_int phValExpList)
Retrieve the description of the scalar value expression. |
static java.lang.Object |
damex_describeVal(int hVal,
xo_int piType,
xo_int piXoType,
xo_int phCol,
xo_int phQuery,
xo_int piValStatus)
Retrieve the description of the value. |
static int |
damex_describeValExp(int hValExp,
xo_int piType,
xo_int piFuncType,
xo_int phLeftValExp,
xo_int phRightValExp,
xo_int phVal,
xo_int phScalarValExp)
Retrieve the description of the value expression. |
static int |
damex_getFirstUpdateSet(int hquery,
int hrow,
xo_int phcol)
Return the details of the first update column-value pair in the update query. |
static int |
damex_getFirstValExp(int hValExpList)
Return the first value expression in the list. |
static int |
damex_getNextUpdateSet(int hquery,
xo_int phcol)
Return the details of the next update column=value pair in the update query. |
static int |
damex_getNextValExp(int hValExpList)
Return the next value expression in the list. |
static int |
damex_isCorrelatedCol(int hcol)
Returns a Boolean to indicate if the column is a correlated column. |
static void |
initStaticVars()
Reserved for internal use only. |
static void |
tm_trace(int tm_handle,
int masklevel,
java.lang.String pszMesg)
This function is used to trace a message in the trace file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public jdam()
| Method Detail |
public static void initStaticVars()
public static void dam_describeTable(int dam_hstmt,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pSchema,
java.lang.StringBuffer pTableName,
java.lang.StringBuffer pTablePath,
java.lang.StringBuffer pUserData)
dam_hstmt - Handle of the Statement.pCatalog - The table qualifier as entered in the OA_TABLES table.pSchema - The table owner as entered in the OA_TABLES table.pTableName - The name of the table. hhhhpTablePath - Path of the table specified in the path column of the OA_TABLES table.
This is IP specific field.pUserData - The Table_Userdata as entered in the OA_TABLES table.
This can be any string that the IP wants to know about the table.
public static int dam_getCol(int dam_hstmt,
java.lang.String sColName)
dam_hstmt - Handle of the Statement.sColName - Column namepublic static int dam_allocRow(int dam_hstmt)
dam_hstmt - Handle of the Statement.
public static int dam_addCharValToRow(int dam_hstmt,
int hRow,
int hCol,
java.lang.String pColVal,
int lColValLen)
dam_hstmt - Statement HandlehRow - Row HandlehCol - Column HandlepColVal - String value for the columnlColValLen -
public static int dam_addIntValToRow(int dam_hstmt,
int hRow,
int hCol,
int pColVal,
int lColValLen)
dam_hstmt - Statement HandlehRow - Row HandlehCol - Column HandlepColVal - Integer value for the columnlColValLen -
public static int dam_addDoubleValToRow(int dam_hstmt,
int hRow,
int hCol,
double pColVal,
int lColValLen)
dam_hstmt - Statement HandlehRow - Row HandlehCol - Column HandlepColVal - Double value for the columnlColValLen -
public static int dam_addTimeStampValToRow(int dam_hstmt,
int hRow,
int hCol,
xo_tm pColVal,
int lColValLen)
dam_hstmt - Statement HandlehRow - Row HandlehCol - Column HandlepColVal - Time Stamp value for the columnlColValLen -
public static int dam_addShortValToRow(int dam_hstmt,
int hRow,
int hCol,
short pcolVal,
int lColValLen)
dam_hstmt - Statement HandlehRow - Row HandlehCol - Column HandlepColVal - Short value for the columnlColValLen -
public static int dam_addFloatValToRow(int dam_hstmt,
int hRow,
int hCol,
float colVal,
int lColValLen)
dam_hstmt - Statement HandlehRow - Row HandlehCol - Column HandlepColVal - Float value for the columnlColValLen -
public static int dam_isTargetRow(int dam_hstmt,
int hrow)
This function evaluates the row against the where clause of the active SQL statement. It returns DAM_TRUE if the row matches the where clause and DAM_FALSE if it does not. If DAM_TRUE, then the dam_addRowToTable should be called. If DAM_FALSE is returned, then the row should be freed by calling the dam_freeRow. DAM_ERROR will be returned if the row handle is invalid or if all the required column values have not been set. In cases where the table had index(s) defined and the query contains restrictions on index columns, this function assumes that all rows provided by the IP satisfy the index conditions and will not do further validation.
dam_hstmt - Handle of the Statementhrow - Handle of the Row
public static int dam_addRowToTable(int dam_hstmt,
int hrow)
dam_hstmt - Statement Handlehrow - Handle of the Rowpublic static void dam_freeRow(int hrow)
hrow - Handle of the Row
public static void tm_trace(int tm_handle,
int masklevel,
java.lang.String pszMesg)
public static int dam_getOptimalIndexAndConditions(int dam_hstmt,
xo_int phindex,
xo_int phset_of_condlist)
The relationship between the individual condition elements in the list is that of AND (in the past versions the dam_getSearchList retrieved a single condition list where the relationship between each of the condition elements was that of OR). This means that each row the DAM builds for a condition list must satisfy all the conditions in that list and must then be validated using the dam_isTargetRow function. The order of the conditions will correspond to the order of the columns in the index.
The relationship between each of the condition lists is that of OR. This means the IP builds a set of rows for each of the condition lists. Note that you must have the following setup in order for the DAM to generate an optimal index:
dam_hstmt - Handle of the Statementphindex - The handle of the index identified as the optimal for the statement.
This value is 0 if no optimal index was identified. Use the function dam_describeIndex to get details about the index,
and functions dam_getFirstIndexCol, dam_damGetNextIndexCol, and dam_describeIndexCol to get details about the columns making up the index.
phset_of_condlist - If an optimal index is found, then this is a handle to the set of conditions that are present in the query.
Otherwise this is 0. Navigate it by using the dam_getFirstCondList and dam_getNextCondList functions.
The IP must call the dam_freeSetOfConditionList to this handle when finished with the query.
public static int dam_describeIndex(int hindex,
java.lang.StringBuffer sIndexQualifier,
java.lang.StringBuffer sIndexName,
xo_int piType,
xo_int piNonUnique,
xo_int piIndexLength)
hindex - Index handlesIndexQualifier - Qualifier of the index.
Must create an object of type StringBuffer of size DAMOBJ_MAX_ID_LEN .
sIndexName - Name of the index. Must create an object of type StringBuffer of size DAMOBJ_MAX_ID_LEN .piType - Type of information being returned.
piNonUnique - Indicates whether the index prohibits duplicate values
piIndexLength - The number of columns in this index.
This number is as indicated in the OA_STATISTICS and does not reflect how many of the columns belonging to the index are part of the query.public static int dam_freeSetOfConditionList(int hset_of_condlist)
hSetOfCondList - Handle to the set of condition list returned by the dam_getOptimalIndexAndConditions or the dam_getSetOfConditionLists functions.public static int dam_getFirstCondList(int hset_of_condlist)
hset_of_condlist - Handle to the set of condition lists
public static int dam_getFirstCond(int hstmt,
int hlist)
hstmt - Statement handlehlist - Either the search or the restriction condition list.
public static int dam_describeCond(int hcond,
xo_int piLeftOpType,
xo_int piLeftXoType,
xo_int piRightOpType,
xo_int piRightXoType)
hcond - Condition handlepiLeftOpType - Left operator type. See table below for the operators and the associated value. All conditions always have a left value. You must create and pass an object of type xo_int in for this argument.
piLeftXoType - Data type. You must create and pass an object of type xo_int in for this argument.piRightOpType - Right operator type. See table below for the operators and the associated value. This value only present in BETWEEN and LIKE type of statements. A value of 0 is returned if there is no right value. You must create and pass an object of type xo_int in for this argument.
piRightXoType - Data type. You must create and pass an object of type xo_int in for this argument.public static java.lang.Object dam_getCondVal(int hcond)
hcond - Condition handlepublic static java.lang.Object dam_getCondRightVal(int hcond)
hcond - Condition handlepublic static int dam_getNextCondList(int hset_of_condlist)
hset_of_condlist - Handle to the set of condition lists
public static int dam_getNextCond(int hstmt,
int hlist)
hstmt - Statement handlehlist - Condition list that was returned by dam_getSearchList or dam_getRestrictionList
public static int dam_getFirstCol(int hstmt,
int iColType)
hstmt - Statement handlesColName - Identifies the column list to navigate, Use a bitwise OR ( | ) of the following flags to scan through columns that are in multiple categories.:
public static int dam_getNextCol(int hstmt)
hstmt - Statement handle
public static void dam_describeCol(int hcol,
xo_int piColNum,
java.lang.StringBuffer pColName,
xo_int piXOType,
xo_int piColType)
hcol - Column HandlepiColNum - Column number as defined in the schema database. Create and pass in a xo_int object.pColName - Column name. Create and pass in a StringBuffer of DAM_MAX_ID_LEN+1.piXOType - Data type ( refer to the X/Open Data types table). Create and pass in a xo_int object.piColType - How the column appears in the query is specified by the setting of one or more of the following flags:
public static xo_type dam_describeColDetail(int hcol,
xo_int piPseudoColumn,
xo_int piColumnType,
xo_int piSortOrder,
xo_int piFuncType,
xo_int piIndexType,
java.lang.StringBuffer pUserData)
hcol - Column HandlepiPseudoColumn - Indicates if the column is marked as a PSEUDO column in which case the user is not allowed to insert or update its value. The output will be one of the following:
piColumnType - If the column has been marked as a SQL_PC_PSEUDO to indicate it is a pseudo column, then this field indicates whether it is a ROWID or ROWVER.
piSortOrder - No longer used in version 3.3 and higherpiFuncType - Reserved for future use.piIndexType - No longer used in version 3.3 and higherpUserData - User data as specified in the schema. Create and pass in a StringBuffer of DAM_MAX_ID_LEN+1.
public static void dam_addError(int hdbc,
int hstmt,
int iErrorIndex,
int iNativeError,
java.lang.String sErrorText)
Each error code has an error message string associated with it. This is the string sent to the client by default. You can override this string with your own. Refer to the OpenAccess Programmer's Referecne for a list of defined error codes.
hdbc - Connection handle. Set to NULL if the error is related to a statement and not to the connection.hstmt - Statement handle. Set to NULL if the error is related to a connection.iErrorIndex - Index into the error message list.iNativeError - Native error as defined by the IP.sErrorText - Text to use in place of the standard text. Data from this buffer is copied into the error queue.
Set to NULL to use the default error string.
public static int dam_compareCol(int hcol1,
int hcol2)
hcol1 - Handle to a column.hcol2 - Handle to a column.
public static int dam_getColByNum(int hstmt,
int iColNum)
hstmt - Statement handleiColumn - Column number in the schema. Numbers start from 0.
public static int dam_getColCount(int hstmt,
int iColType,
xo_int piColCount)
hstmt - Statement handleiColType - Identifies the column type. Use a bitwise OR ( | ) of the following flags to scan through columns that are in multiple categories.:
piColCount - Number of columns of the specified iColType. Create and pass in an object of type xo_int.public static int dam_getColInCond(int hcond)
hcond - Condition obtained from a DAM_HCONDLIST using dam_getFirstCond or dam_getNextCond functions.public static int dam_getFirstIndexCol(int hindex)
hindex - Index handle as returned by the dam_getOptimalIndexAndConidtions function.
public static int dam_getGroupByCol(int hstmt,
int iGroupByColNum,
xo_int piColNum,
java.lang.StringBuffer pColName)
hstmt - Statement handleiGroupByColNum - Group By column number to return information about. Valid numbers are 0 - (Value returned from dam_getInfo(DAM_INFO_GROUP_BY_OPTIMIZABLE) -1)
piColNum - Column number as defined in the schema databasepColName - Column name as defined in the schema databasepublic static int dam_getIP_hstmt(int hstmt)
hstmt - Statement handlepublic static int dam_getNextIndexCol(int hindex)
hindex - Index handle as returned by the dam_getOptimalIndexAndConditions function.
public static int dam_getOrderByCol(int hstmt,
int iOrderByColNum,
xo_int piColNum,
java.lang.StringBuffer pColName,
xo_int piSortOrder)
hstmt - Statement handle.iOrderByColNum - Order By column number to return information about. Valid numbers are 0 - (Value returned from dam_getInfo(DAM_INFO_ORDER_BY_OPTIMIZABLE) -1)
piColNum - Column number as defined in the schema databasepColName - Column name as defined in the schema databasepiSortOrder - Sort order for the column
public static int dam_getRestrictionList(int hstmt,
int hcol)
hstmt - Statement handleip_hstmt - Handle of the column for which the restriction is requested.
public static void dam_setIP_hstmt(int hstmt,
int ip_hstmt)
hstmt - Statement handleip_hstmt - A index into a vector into which the object allocated by the IP for storing information at statement level is saved.
public static void dam_describeProcedure(int hstmt,
java.lang.StringBuffer pCatalog,
java.lang.StringBuffer pSchema,
java.lang.StringBuffer pProcedureName,
java.lang.StringBuffer pUserData)
hstmt - Statement handle of the currently active statementpCatalog - The qualifier as entered in the OA_PROC table.pSchema - The owner as entered in the OA_PROC table.pProcedureName - The name of the procedurepUserData - The OA_USERDATA as entered in the OA_PROC table. This can be any string that the IP wants to know about the procedure.
public static int dam_describeIndexCol(int hindex_col,
xo_int piSeqInIndex,
java.lang.StringBuffer sColumnName,
xo_int piCollation)
hindex_col - Index column handle as returned by dam_getFirstIndexCol and dam_getNextIndexCol functions.piSeqInIndex - The sequence of this column in the index starting at 1.sColumnName - Name of the columnpiCollation - Collation sequence.
public static int dam_getInfo(int hdbc,
int hstmt,
int iInfoType,
java.lang.StringBuffer pStrInfoValue,
xo_int pIntInfoValue)
hdbc - DAM connection handle to be used for connection level options.
Set to NULL for statement level options.hstmt - Statement handle to be used for statement level options.
Set to NULL for connection level options.iInfoType - Type of information requested.
See Error! Reference source not found. below for list of options.pStrInfoValue - String information type is returned in this object.pIntInfoValue - Uint16 and Unit32 information types are returned in this object.
public static int dam_setInfo(int hdbc,
int hstmt,
int iInfoType,
java.lang.String pStrInfoValue,
int pIntInfoValue)
hdbc - DAM connection handle to be used for connection level options.
Set to NULL for statement level options.hstmt - Statement handle to be used for statement level options.
Set to NULL for connection level options.iInfoType - The information to set. See the table below for list of options.pStrInfoValue - String type options are passed in through this argument.pIntInfoValue - Interger type options are passed in through this argument.
public static int dam_setOption(int iOptionType,
int ObjectHandle,
int iOption,
int lOptionValue)
iOptionType - Type of option:
ObjectHandle - Object handle to which the option applies.
It can be the connection handle DAM_HDBC, statement handle DAM_HSTMT or the condition list handle DAM_HCONDLIST.
iOption - The option to set. See details below for the option.lOptionValue - The value to set for the option iOption. See details below for the option.
public static int dam_evaluateColCond(int hstmt,
int hcond,
int iXoType,
java.lang.Object pColVal,
int lColValLen)
hstmt - Statement handlehcond - Condition handleiXoType - Type of the data. Must be as defined in the schema database or XO_TYPE_CHAR.pColVal - The Java object containing the value of type iXoType.lColValLen - Length of the data.
public static int dam_addJoinRowSet(int hrowset,
int hrow)
hrowset - Handle of the outer table rowhrow - Handle to the inner table rowset to be associated with the outer table row.
public static int dam_addOutputRow(int hstmt,
int hrow)
hstmt - Statement handlehrow - Row handle obtained from dam_allocOutputRow
public static int dam_addRowToRowSet(int hrowset,
int hrow)
hrowset - Handle to the rowsethrow - Handle to the rowpublic static int dam_allocOutputRow(int hstmt)
hstmt - Statement handlepublic static int dam_allocRowSet(int hstmt)
For example, if tables DEPT and EMP are being joined, then for each row of DEPT you must allocate a new rowset and add the EMP rows to it.
hstmt - Statement handle
public static int dam_createVal(int pMemTree,
int iXoType,
java.lang.Object pVal,
int iValLen)