Share via


IDatabaseMetaData.GetBestRowIdentifier Method

Definition

Retrieves a description of a table's optimal set of columns that uniquely identifies a row.

[Android.Runtime.Register("getBestRowIdentifier", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Ljava/sql/ResultSet;", "GetGetBestRowIdentifier_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_IZHandler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.IResultSet? GetBestRowIdentifier (string? catalog, string? schema, string? table, int scope, bool nullable);
[<Android.Runtime.Register("getBestRowIdentifier", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)Ljava/sql/ResultSet;", "GetGetBestRowIdentifier_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_IZHandler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetBestRowIdentifier : string * string * string * int * bool -> Java.Sql.IResultSet

Parameters

catalog
String

a catalog name; must match the catalog name as it is stored in the 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 the 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 the database

scope
Int32

the scope of interest; use same values as SCOPE

nullable
Boolean

include columns that are nullable.

Returns

ResultSet - each row is a column description

Attributes

Exceptions

if there is a database error.

Remarks

Retrieves a description of a table's optimal set of columns that uniquely identifies a row. They are ordered by SCOPE.

Each column description has the following columns: <OL> <LI><B>SCOPE</B> short => actual scope of result <UL> <LI> bestRowTemporary - very temporary, while using row <LI> bestRowTransaction - valid for remainder of current transaction <LI> bestRowSession - valid for remainder of current session </UL> <LI><B>COLUMN_NAME</B> String => column name <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types <LI><B>TYPE_NAME</B> String => Data source dependent type name, for a UDT the type name is fully qualified <LI><B>COLUMN_SIZE</B> int => precision <LI><B>BUFFER_LENGTH</B> int => not used <LI><B>DECIMAL_DIGITS</B> short => scale - Null is returned for data types where DECIMAL_DIGITS is not applicable. <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column like an Oracle ROWID <UL> <LI> bestRowUnknown - may or may not be pseudo column <LI> bestRowNotPseudo - is NOT a pseudo column <LI> bestRowPseudo - is a pseudo column </UL> </OL>

The COLUMN_SIZE column represents the specified column size for the given column. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. Null is returned for data types where the column size is not applicable.

Java documentation for java.sql.DatabaseMetaData.getBestRowIdentifier(java.lang.String, java.lang.String, java.lang.String, int, 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