skip to main content
OpenAccess SDK SQL Engine Core Functions API : Function Reference : dam_describeIndex
 

dam_describeIndex

This function is used to retrieve the description of the optimal index returned by dam_getOptimalIndexAndConditions. The information for the index is retrieved from the OA_STATISTICS table. Pass in NULL for any descriptor in which you have no interest.
int dam_describeIndex(
DAM_HINDEX hIndex,
char * pszIndexQualifier,
char * pszIndexName
int * piType,
int * piNonUnique,
int * piIndexLen)

int dam_describeIndexW(
DAM_HINDEX hIndex,
OAWCHAR * pszIndexQualifier,
OAWCHAR * pszIndexName
int * piType,
int * piNonUnique,
int * piIndexLen)
Table 81. Parameters for dam_describeIndex
Parameter
Type
Description
IN
hIndex
DAM_HINDEX
The index handle.
pszIndexQualifier
char *
OAWCHAR *
The qualifier of the index.
pszIndexName
char *
OAWCHAR *
The name of the index.
ptType
int *
Type of information being returned.
SQL_TABLE_STAT (0) - indicates a statistic for the table
SQL_INDEX_CLUSTERED(1) - indicates a clustered index.
SQL_INDEX_HASHED(2) - indicates a hashed index.
SQL_INDEX_OTHER(3) - indicates another type of index.
piNonUnique
int *
This parameter indicates whether the index prohibits duplicate values:
TRUE (1) if the index values can be non-unique.
FALSE (0) if the index values must be unique.
piIndexLen
int *
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.
RETURN
int
DAM_SUCCESS - valid information returned
DAM_FAILURE - failure

See also

*dam_getOptimalIndexAndConditions