Share via


IDatabaseMetaData.GetIndexInfo Method

Definition

Retrieves a description of the given table's indices and statistics.

[Android.Runtime.Register("getIndexInfo", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)Ljava/sql/ResultSet;", "GetGetIndexInfo_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_ZZHandler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.IResultSet? GetIndexInfo (string? catalog, string? schema, string? table, bool unique, bool approximate);
[<Android.Runtime.Register("getIndexInfo", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)Ljava/sql/ResultSet;", "GetGetIndexInfo_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_ZZHandler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetIndexInfo : string * string * string * bool * bool -> Java.Sql.IResultSet

Parameters

catalog
String

a catalog name; must match the catalog name as it is stored in this database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search

schema
String

a schema name; must match the schema name as it is stored in this database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search

table
String

a table name; must match the table name as it is stored in this database

unique
Boolean

when true, return only indices for unique values; when false, return indices regardless of whether unique or not

approximate
Boolean

when true, result is allowed to reflect approximate or out of data values; when false, results are requested to be accurate

Returns

ResultSet - each row is an index column description

Attributes

Exceptions

a database error occurred.

Remarks

Retrieves a description of the given table's indices and statistics. They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.

Each index column description has the following columns: <OL> <LI><B>TABLE_CAT</B> String => table catalog (may be null) <LI><B>TABLE_SCHEM</B> String => table schema (may be null) <LI><B>TABLE_NAME</B> String => table name <LI><B>NON_UNIQUE</B> boolean => Can index values be non-unique. false when TYPE is tableIndexStatistic <LI><B>INDEX_QUALIFIER</B> String => index catalog (may be null); null when TYPE is tableIndexStatistic <LI><B>INDEX_NAME</B> String => index name; null when TYPE is tableIndexStatistic <LI><B>TYPE</B> short => index type: <UL> <LI> tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions <LI> tableIndexClustered - this is a clustered index <LI> tableIndexHashed - this is a hashed index <LI> tableIndexOther - this is some other style of index </UL> <LI><B>ORDINAL_POSITION</B> short => column sequence number within index; zero when TYPE is tableIndexStatistic <LI><B>COLUMN_NAME</B> String => column name; null when TYPE is tableIndexStatistic <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending, "D" => descending, may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic <LI><B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index. <LI><B>PAGES</B> int => When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index. <LI><B>FILTER_CONDITION</B> String => Filter condition, if any. (may be null) </OL>

Java documentation for java.sql.DatabaseMetaData.getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to