MDAC 2.5 SDK - OLE DB Programmer's Reference
Appendix B: Schema Rowsets
The INDEXES rowset identifies the indexes defined in the catalog that are owned by a given user.
The INDEXES rowset contains the following columns
Column name | Type indicator | Description |
TABLE_CATALOG | DBTYPE_WSTR | Catalog name. NULL if the provider does not support catalogs. |
TABLE_SCHEMA | DBTYPE_WSTR | Unqualified schema name. NULL if the provider does not support schemas. |
TABLE_NAME | DBTYPE_WSTR | Table name. |
INDEX_CATALOG | DBTYPE_WSTR | Catalog name. NULL if the provider does not support catalogs. |
INDEX_SCHEMA | DBTYPE_WSTR | Unqualified schema name. NULL if the provider does not support schemas. |
INDEX_NAME | DBTYPE_WSTR | Index name. |
PRIMARY_KEY | DBTYPE_BOOL | Whether the index represents the primary key on the table. NULL if this is not known. |
UNIQUE | DBTYPE_BOOL | Whether index keys must be unique. One of the following:
VARIANT_TRUE—The index keys must be unique. VARIANT_FALSE—Duplicate keys are allowed. |
CLUSTERED | DBTYPE_BOOL | Whether an index is clustered. One of the following:
VARIANT_TRUE—The leaf nodes of the index contain full rows, not bookmarks. This is a way to represent a table clustered by key value. VARIANT_FALSE—The leaf nodes of the index contain bookmarks of the base table rows whose key value matches the key value of the index entry. |
TYPE | DBTYPE_UI2 | The type of the index. One of the following:
DBPROPVAL_IT_BTREE—The index is a B+-tree. DBPROPVAL_IT_HASH—The index is a hash file using, for example, linear or extensible hashing. DBPROPVAL_IT_CONTENT—The index is a content index. DBPROPVAL_IT_OTHER—The index is some other type of index. |
FILL_FACTOR | DBTYPE_I4 | For a B+-tree index, this property represents the storage utilization factor of page nodes during the creation of the index. The value is an integer from 1 to 100 representing the percentage of use of an index node. For a linear hash index, this property represents the storage utilization of the entire hash structure (the ratio of used area to total allocated area) before a file structure expansion occurs. |
INITIAL_SIZE | DBTYPE_I4 | The total amount of bytes allocated to this structure at creation time. |
NULLS | DBTYPE_I4 | Whether null keys are allowed. One of the following:
DBPROPVAL_IN_DISALLOWNULL—The index does not allow entries where the key columns are NULL. If the consumer attempts to insert an index entry with a NULL key, the provider returns an error. DBPROPVAL_IN_IGNORENULL—The index does not insert entries containing NULL keys. If the consumer attempts to insert an index entry with a NULL key, the provider ignores that entry and no error code is returned. DBPROPVAL_IN_IGNOREANYNULL—The index does not insert entries where some column key has a NULL value. For an index having a multicolumn search key, if the consumer inserts an index entry with NULL value in some column of the search key, the provider ignores that entry and no error code is returned. DBPROPVAL_IN_ALLOWNULL—The index allows entries where the key columns are NULL and sorts according to the collation described by DBPROP_INDEX_NULLCOLLATION. |
SORT_BOOKMARKS | DBTYPE_BOOL | How the index treats repeated keys. One of the following:
VARIANT_TRUE—The index sorts repeated keys by bookmark. VARIANT_FALSE—The index does not sort repeated keys by bookmark. |
AUTO_UPDATE | DBTYPE_BOOL | Whether the index is maintained automatically when changes are made to the corresponding base table. One of the following:
VARIANT_TRUE—The index is automatically maintained. VARIANT_FALSE—The index must be maintained by the consumer through explicit calls to IRowsetChange. Ensuring consistency of the index as a result of updates to the associated base table is the responsibility of the consumer. |
NULL_COLLATION | DBTYPE_I4 | How NULLs are collated in the index. One of the following:
DBPROPVAL_NC_END—NULLs are collated at the end of the list, regardless of the collation order. DBPROPVAL_NC_START—NULLs are collated at the start of the list, regardless of the collation order. DBPROPVAL_NC_HIGH—NULLs are collated at the high end of the list. DBPROPVAL_NC_LOW—NULLs are collated at the low end of the list. |
ORDINAL_POSITION | DBTYPE_UI4 | Ordinal position of the column in the index, starting with one. |
COLUMN_NAME | DBTYPE_WSTR | Column name. This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL, depending on which elements of the DBID structure the provider uses. |
COLUMN_GUID | DBTYPE_GUID | Column GUID. |
COLUMN_PROPID | DBTYPE_UI4 | Column property ID. |
COLLATION | DBTYPE_I2 | One of the following:
DB_COLLATION_ASC—The sort sequence for the column is ascending. DB_COLLATION_DESC—The sort sequence for the column is descending. NULL—A column sort sequence is not supported. |
CARDINALITY | DBTYPE_UI8 | Number of unique values in the index. |
PAGES | DBTYPE_I4 | Number of pages used to store the index. |
FILTER_CONDITION | DBTYPE_WSTR | The WHERE clause identifying the filtering restriction. |
INTEGRATED | DBTYPE_BOOL | Whether the index is integrated. That is, all base table columns are available from the index. One of the following:
VARIANT_TRUE—The index is integrated. For clustered indexes, this value must always be VARIANT_TRUE. VARIANT_FALSE—The index is not integrated. This column is not returned by 1.x providers. |
Default Sort Order: UNIQUE, TYPE, INDEX_CATALOG, INDEX_SCHEMA, INDEX_NAME, ORDINAL_POSITION