Java.Sql.IDatabaseMetaData.GetExportedKeys Method
Returns a list of the foreign key columns that reference the primary key columns of a specified table (the foreign keys exported by a table).

Syntax

[Android.Runtime.Register("getExportedKeys", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetExportedKeys_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 GetExportedKeys (string catalog, string schema, string table)

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.
schema
a schema name. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table
a table name, which must match the name of a table in the database

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Sql.SQLExceptiona database error occurred

Remarks

Returns a list of the foreign key columns that reference the primary key columns of a specified table (the foreign keys exported by a table).

The list is returned as a ResultSet with a row for each of the foreign key columns, ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ, with the format for each row being:

  1. PKTABLE_CAT - String - from the primary key table : the catalog (possibly null)
  2. PKTABLE_SCHEM - String - from the primary key table : the schema (possibly null)
  3. PKTABLE_NAME - String - from the primary key table : the name
  4. PKCOLUMN_NAME - String - from the primary key column : the name
  5. FKTABLE_CAT - String - from the foreign key table : the catalog name being exported (possibly null)
  6. FKTABLE_SCHEM - String - from the foreign key table : the schema name being exported (possibly null)
  7. FKTABLE_NAME - String - from the foreign key table : the name being exported
  8. FKCOLUMN_NAME - String - from the foreign key column : the name being exported
  9. KEY_SEQ - short - the sequence number (in the foreign key)
  10. UPDATE_RULE - short - a value giving the rule for how to treat the foreign key when the corresponding primary key is updated:
    • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be updated if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - change the imported key to match the primary key update
    • DatabaseMetaData.importedKeySetNull - set the imported key to null
    • DatabaseMetaData.importedKeySetDefault - set the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
    • DELETE_RULE - short - how to treat the foreign key when the corresponding primary key is deleted:
      • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be deleted if it is imported as a foreign key
      • DatabaseMetaData.importedKeyCascade - the deletion should also delete rows that import a deleted key
      • DatabaseMetaData.importedKeySetNull - the deletion sets the imported key to null
      • DatabaseMetaData.importedKeySetDefault - the deletion sets the imported key to its default value
      • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
      • FK_NAME - String - the foreign key name (possibly null)
      • PK_NAME - String - the primary key name (possibly null)
      • DEFERRABILITY - short - defines whether the foreign key constraints can be deferred until commit (see the SQL92 specification for definitions):
        • DatabaseMetaData.importedKeyInitiallyDeferred
        • DatabaseMetaData.importedKeyInitiallyImmediate
        • DatabaseMetaData.importedKeyNotDeferrable

        [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