skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : dam_add_schemaobj
 

dam_add_schemaobj

This method adds a Java schema object to the list of objects that are returned to the OpenAccess SDK SQL engine. This method should be called by the IP to add a table, column, index, foreign key, procedure, or procedure column objects.
void dam_add_schemaobj(
long   pMemTree,
long   iType,
long   pList,
Object pSearchObj,
Object pSchemaObj)
Table 129. Parameters for dam_add_schemaobj
Parameter
Type
Description
INPUT
pMemTree
long
The memory tree handle.
iType
long
Type of schema information being returned:
DAMOBJ_TYPE_CATALOG - catalogs
DAMOBJ_TYPE_SCHEMA - schemas
DAMOBJ_TYPE_TABLETYPE - table types
DAMOBJ_TYPE_TABLE - tables information as defined by OA_TABLES
DAMOBJ_TYPE_COLUMN - column information as defined by OA_COLUMNS
DAMOBJ_TYPE_STAT - index information as defined by OA_STATISTICS
DAMOBJ_TYPE_FKEY - foreign key information as defined by OA_FKEYS
DAMOBJ_TYPE_PROC - procedures information
DAMOBJ_TYPE_PROC_COLUMN - procedure columns information
pList
long
The list on which the objects are to be added. It is passed in the call to the IP. The IP can pass the pSearchObj filter to dam_add_schemaobj () to have the OpenAccess SDK SQL engine filter the objects before adding to the list.
pSearchObj
Object
Java schema object to use for filtering the objects added to the list. If you have taken care of only adding the objects that are requested, then set this to NULL. If you want the OpenAccess SDK SQL engine to do the filtering, then pass in the same value as passed into your IP.
pSchemaObj
Object
Java schema object. Depending upon iType, you will pass the schemaobj_xxx Java object. Type of object to pass in based on iType:
DAMOBJ_TYPE_CATALOG - schemaobj_table
DAMOBJ_TYPE_SCHEMA - schemaobj_table
DAMOBJ_TYPE_TABLETYPE - schemaobj_table
DAMOBJ_TYPE_TABLE - schemaobj_table
DAMOBJ_TYPE_COLUMN - schemaobj_column
DAMOBJ_TYPE_STAT - schemaobj_stat
DAMOBJ_TYPE_FKEY - schemaobj_fkey
DAMOBJ_TYPE_PKEY - schemaobj_pkey
DAMOBJ_TYPE_PROC - schemaobj_proc
DAMOBJ_TYPE_PROC_COLUMN - schemaobj_proccolumn
RETURN
long
DAM_SUCCESS - on success
DAM_FAILURE - on failure