Java.Sql.IDatabaseMetaData.GetAttributes Method
Returns a ResultSet describing a subset of the attributes of a specified SQL User Defined Type (UDT) for a specified schema and catalog.

Syntax

[Android.Runtime.Register("getAttributes", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetAttributes_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public IResultSet GetAttributes (string catalog, string schemaPattern, string typeNamePattern, string attributeNamePattern)

Parameters

catalog
a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern
a schema name pattern. null is used to imply no narrowing of the search by a schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
typeNamePattern
a type name. This pattern must match the type name stored in the database.
attributeNamePattern
an Attribute name. This pattern must match the attribute name as stored in the database.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Sql.SQLExceptionif there is a database error.

Remarks

Returns a ResultSet describing a subset of the attributes of a specified SQL User Defined Type (UDT) for a specified schema and catalog. The subset is determined by restricting to those attributes whose name matches the attributeNamePattern and whose type name matches the typeNamePattern. Each row of the ResultSet describes one attribute, and the rows are ordered by the columns TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. Inherited attributes are not included.

The columns of the returned ResultSet object have the following names and meanings:

  1. TYPE_CAT - String - the type catalog name (possibly null)
  2. TYPE_SCHEM - String - the type schema name (possibly null)
  3. TYPE_NAME - String - the type name
  4. ATTR_NAME - String - the attribute name
  5. DATA_TYPE - int - the attribute type as defined in java.sql.Types
  6. ATTR_TYPE_NAME - String - the attribute type name. This depends on the data source. For a UDT the name is fully qualified. For a REF it is both fully qualified and represents the target type of the reference.
  7. ATTR_SIZE - int - the column size. When referring to char and date types this value is the maximum number of characters. When referring to numeric types is is the precision.
  8. DECIMAL_DIGITS - int - how many fractional digits are supported
  9. NUM_PREC_RADIX - int - numeric values radix
  10. NULLABLE - int - whether NULL is permitted:
    • DatabaseMetaData.attributeNoNulls - NULL values not permitted
    • DatabaseMetaData.attributeNullable - NULL values definitely permitted
    • DatabaseMetaData.attributeNullableUnknown - unknown
    • REMARKS - String - a comment describing the attribute (possibly null)
    • ATTR_DEF - String - Default value for the attribute (possibly null)
    • SQL_DATA_TYPE - int - not used
    • SQL_DATETIME_SUB - int - not used
    • CHAR_OCTET_LENGTH - int - for CHAR types, the max number of bytes in the column
    • ORDINAL_POSITION - int - The index of the column in the table (where the count starts from 1, not 0)
    • IS_NULLABLE - String - "NO" = the column does not allow NULLs, "YES" = the column allows NULLs, "" = status unknown
    • SCOPE_CATALOG - String - if the DATA_TYPE is REF, this gives the catalog of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
    • SCOPE_SCHEMA - String - if the DATA_TYPE is REF, this gives the schema of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
    • SCOPE_TABLE - String - if the DATA_TYPE is REF, this gives the name of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
    • SOURCE_DATA_TYPE - String - The source type for a user generated REF type or for a Distinct type. (NULL if DATA_TYPE is not DISTINCT or a user generated REF)

    [Android Documentation]

    Requirements

    Namespace: Java.Sql
    Assembly: Mono.Android (in Mono.Android.dll)
    Assembly Versions: 0.0.0.0
    Since: Added in API level 1