From 1d1596e77aba218d5a469d145595a562d2ebe126 Mon Sep 17 00:00:00 2001 From: "Aaron M. Renn" Date: Sun, 17 Jan 1999 04:09:17 +0000 Subject: Checkin of completed interface --- java/sql/DatabaseMetaData.java | 991 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 964 insertions(+), 27 deletions(-) (limited to 'java/sql/DatabaseMetaData.java') diff --git a/java/sql/DatabaseMetaData.java b/java/sql/DatabaseMetaData.java index fb5885695..601e5350e 100644 --- a/java/sql/DatabaseMetaData.java +++ b/java/sql/DatabaseMetaData.java @@ -460,7 +460,7 @@ usesLocalFiles() throws SQLException; * * @exception SQLException If an error occurs. */ -pubilc abstract boolean +public abstract boolean usesLocalFilePerTable() throws SQLException; /*************************************************************************/ @@ -647,7 +647,7 @@ getSystemFunctions() throws SQLException; * @exception SQLException If an error occurs. */ public abstract String -getDateTimeFunctions throws SQLException; +getDateTimeFunctions() throws SQLException; /*************************************************************************/ @@ -1022,7 +1022,7 @@ supportsIntegrityEnhancementFacility() throws SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsOuterJoins throws SQLException; +supportsOuterJoins() throws SQLException; /*************************************************************************/ @@ -1035,7 +1035,7 @@ supportsOuterJoins throws SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsFullOuterJoins throws SQLException; +supportsFullOuterJoins() throws SQLException; /*************************************************************************/ @@ -1048,7 +1048,7 @@ supportsFullOuterJoins throws SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsLimitedOuterJoins throws SQLException; +supportsLimitedOuterJoins() throws SQLException; /*************************************************************************/ @@ -1125,7 +1125,7 @@ getCatalogSeparator() throws SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInDataManipulation() thows SQLException; +supportsSchemasInDataManipulation() throws SQLException; /*************************************************************************/ @@ -1139,7 +1139,7 @@ supportsSchemaInDataManipulation() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInProcedureCalls() thows SQLException; +supportsSchemasInProcedureCalls() throws SQLException; /*************************************************************************/ @@ -1152,7 +1152,7 @@ supportsSchemaInProcedureCalls() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInTableDefinitions() thows SQLException; +supportsSchemasInTableDefinitions() throws SQLException; /*************************************************************************/ @@ -1165,7 +1165,7 @@ supportsSchemaInTableDefinitions() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInIndexDefinitions() thows SQLException; +supportsSchemasInIndexDefinitions() throws SQLException; /*************************************************************************/ @@ -1178,7 +1178,7 @@ supportsSchemaInIndexDefinitions() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInPrivilegeDefinitions() thows SQLException; +supportsSchemasInPrivilegeDefinitions() throws SQLException; /*************************************************************************/ @@ -1192,7 +1192,7 @@ supportsSchemaInPrivilegeDefinitions() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInDataManipulation() thows SQLException; +supportsCatalogsInDataManipulation() throws SQLException; /*************************************************************************/ @@ -1206,7 +1206,7 @@ supportsSchemaInDataManipulation() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInProcedureCalls() thows SQLException; +supportsCatalogsInProcedureCalls() throws SQLException; /*************************************************************************/ @@ -1219,7 +1219,7 @@ supportsSchemaInProcedureCalls() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInTableDefinitions() thows SQLException; +supportsCatalogsInTableDefinitions() throws SQLException; /*************************************************************************/ @@ -1232,7 +1232,7 @@ supportsSchemaInTableDefinitions() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsSchemaInIndexDefinitions() thows SQLException; +supportsCatalogsInIndexDefinitions() throws SQLException; /*************************************************************************/ @@ -1245,7 +1245,7 @@ supportsSchemaInIndexDefinitions() thows SQLException; * @exception SQLException If an error occurs. */ public abstract boolean -supportsCatalogInPrivilegeDefinitions() thows SQLException; +supportsCatalogInPrivilegeDefinitions() throws SQLException; /*************************************************************************/ @@ -1509,18 +1509,6 @@ getMaxColumnsInGroupBy() throws SQLException; /*************************************************************************/ -/** - * This method returns the maximum number of columns in an ORDER BY statement. - * - * @return The maximum number of columns in an ORDER BY statement. - * - * @exception SQLException If an error occurs. - */ -public abstract int -getMaxColumnsInOrderBy() throws SQLException; - -/*************************************************************************/ - /** * This method returns the maximum number of columns in an index. * @@ -1773,15 +1761,964 @@ supportsTransactionIsolationLevel(int level) throws SQLException; /*************************************************************************/ +/** + * This method tests whether or not DDL and DML statements allowed within + * the same transaction. + * + * @return true if DDL and DML statements are allowed in the + * same transaction, false otherwise. + * + * @exception SQLException If an error occurs. + */ +public abstract boolean +supportsDataDefinitionAndDataManipulationTransactions() throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not only DML statement are allowed + * inside a transaction. + * + * @return true if only DML statements are allowed in + * transactions, false otherwise. + * + * @exception SQLException If an error occurs. + */ +public abstract boolean +supportsDataManipulationTransactionsOnly() throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not a DDL statement will cause the + * current transaction to be automatically committed. + * + * @return true if DDL causes an immediate transaction commit, + * false otherwise. + * + * @exception SQLException If an error occurs. + */ +public abstract boolean +dataDefinitionCausesTransactionCommit() throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not DDL statements are ignored in + * transactions. + * + * @return true if DDL statements are ignored in transactions, + * false otherwise. + * + * @exception SQLException If an error occurs. + */ +public abstract boolean +dataDefinitionIgnoredInTransactions() throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of all the stored procedures matching the + * specified pattern in the given schema and catalog. This is returned + * a ResultSet with the following columns: + *

+ *

    + *
  1. PROCEDURE_CAT - The catalog the procedure is in, which may be + * null. + *
  2. PROCEDURE_SCHEM - The schema the procedures is in, which may be + * null. + *
  3. PROCEDURE_NAME - The name of the procedure. + *
  4. Unused + *
  5. Unused + *
  6. Unused + *
  7. REMARKS - A description of the procedure + *
  8. PROCEDURE_TYPE - Indicates the return type of the procedure, which + * is one of the contstants defined in this class + * (procedureResultUnknown, procedureNoResult, or + * procedureReturnsResult). + *
+ * + * @param catalog The name of the catalog to return stored procedured from, + * or "" to return procedures from all catalogs. + * @param schemaPattern A schema pattern for the schemas to return stored + * procedures from, or "" to return procedures from all schemas. + * @param namePattern The pattern of procedures names to return. + * + * @returns A ResultSet with all the requested procedures. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getProcedures(String catalog, String schemaPattern, String namePattern) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of the parameter and result columns for + * the requested stored procedures. This is returned in the form of a + * ResultSet with the following columns: + *

+ *

    + *
  1. PROCEDURE_CAT - The catalog the procedure is in, which may be + * null. + *
  2. PROCEDURE_SCHEM - The schema the procedures is in, which may be + * null. + *
  3. PROCEDURE_NAME - The name of the procedure. + *
  4. COLUMN_NAME - The name of the column + *
  5. COLUMN_TYPE - The type of the column, which will be one of the + * contants defined in this class (procedureColumnUnknown, + * procedureColumnIn, procedureColumnInOut, + * procedureColumnOut, procedureColumnReturn, + * or procedureColumnResult). + *
  6. DATA_TYPE - The SQL type of the column. This is one of the constants + * defined in Types. + *
  7. TYPE_NAME - The string name of the data type for this column. + *
  8. PRECISION - The precision of the column. + *
  9. LENGTH - The length of the column in bytes + *
  10. SCALE - The scale of the column. + *
  11. RADIX - The radix of the column. + *
  12. NULLABLE - Whether or not the column is NULLABLE. This is one of + * the constants defined in this class (procedureNoNulls, + * procedureNullable, or procedureNullableUnknown) + *
  13. REMARKS - A description of the column. + *
+ * + * @param catalog The name of the catalog to return stored procedured from, + * or "" to return procedures from all catalogs. + * @param schemaPattern A schema pattern for the schemas to return stored + * procedures from, or "" to return procedures from all schemas. + * @param namePattern The pattern of procedures names to return. + * @param columnPattern The pattern of column names to return. + * + * @returns A ResultSet with all the requested procedures. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getProcedureColumns(String catalog, String schemaPattern, String namePattern, + String columnPattern) throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of the requested table as a + * ResultSet with the following columns: + *

+ *

    + *
  1. TABLE_CAT - The catalog the table is in, which may be null. + *
  2. TABLE_SCHEM - The schema the table is in, which may be null. + *
  3. TABLE_NAME - The name of the table. + *
  4. TABLE_TYPE - A string describing the table type. This will be one + * of the values returned by the getTableTypes() method. + *
  5. REMARKS - Comments about the table. + *
+ * + * @param catalog The name of the catalog to return tables from, + * or "" to return tables from all catalogs. + * @param schemaPattern A schema pattern for the schemas to return tables + * from, or "" to return tables from all schemas. + * @param namePattern The pattern of table names to return. + * + * @returns A ResultSet with all the requested tables. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getTables(String catalog, String schemaPattern, String namePattern) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the list of database schemas as a + * ResultSet, with one column - TABLE_SCHEM - that is the + * name of the schema. + * + * @return A ResultSet with all the requested schemas. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getSchemas() throws SQLException; +/*************************************************************************/ +/** + * This method returns the list of database catalogs as a + * ResultSet with one column - TABLE_CAT - that is the + * name of the catalog. + * + * @return A ResultSet with all the requested catalogs. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getCatalogs() throws SQLException; +/*************************************************************************/ +/** + * This method returns the list of database table types as a + * ResultSet with one column - TABLE_TYPE - that is the + * name of the table type. + * + * @return A ResultSet with all the requested table types. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getTableTypes() throws SQLException; +/*************************************************************************/ +/** + * This method returns a list of the tables columns for + * the requested tables. This is returned in the form of a + * ResultSet with the following columns: + *

+ *

    + *
  1. TABLE_CAT - The catalog the table is in, which may be + * null. + *
  2. TABLE_SCHEM - The schema the tables is in, which may be + * null. + *
  3. TABLE_NAME - The name of the table. + *
  4. COLUMN_NAME - The name of the column + *
  5. DATA_TYPE - The SQL type of the column. This is one of the constants + * defined in Types. + *
  6. TYPE_NAME - The string name of the data type for this column. + *
  7. COLUMN_SIZE - The size of the column. + *
  8. Unused + *
  9. NUM_PREC_RADIX - The radix of the column. + *
  10. NULLABLE - Whether or not the column is NULLABLE. This is one of + * the constants defined in this class (tableNoNulls, + * tableNullable, or tableNullableUnknown) + *
  11. REMARKS - A description of the column. + *
  12. COLUMN_DEF - The default value for the column, may be null. + *
  13. SQL_DATA_TYPE - Unused + *
  14. SQL_DATETIME_SUB - Unused + *
  15. CHAR_OCTET_LENGTH - For character columns, the maximum number of bytes + * in the column. + *
  16. ORDINAL_POSITION - The index of the column in the table. + *
  17. IS_NULLABLE - "NO" means no, "YES" means maybe, and an empty string + * means unknown. + *
+ * + * @param catalog The name of the catalog to return table from, + * or "" to return tables from all catalogs. + * @param schemaPattern A schema pattern for the schemas to return + * tables from, or "" to return tables from all schemas. + * @param namePattern The pattern of tables names to return. + * @param columnPattern The pattern of column names to return. + * + * @returns A ResultSet with all the requested tables. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getColumns(String catalog, String schemaPattern, String namePattern, + String columnPattern) throws SQLException; +/*************************************************************************/ +/** + * This method returns the access rights that have been granted to the + * requested columns. This information is returned as a ResultSet + * with the following columns: + *

+ *

    + *
  1. TABLE_CAT - The catalog the table is in, which may be + * null. + *
  2. TABLE_SCHEM - The schema the tables is in, which may be + * null. + *
  3. TABLE_NAME - The name of the table. + *
  4. COLUMN_NAME - The name of the column. + *
  5. GRANTOR - The entity that granted the access. + *
  6. GRANTEE - The entity granted the access. + *
  7. PRIVILEGE - The name of the privilege granted. + *
  8. IS_GRANTABLE - "YES" if the grantee can grant the privilege to + * others, "NO" if not, and null if unknown. + *
+ * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * @param columnPattern A pattern of column names to return information for. + * + * @return A ResultSet with all the requested privileges. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getColumnPrivileges(String catalog, String schema, String table, + String columnPattern) throws SQLException; +/*************************************************************************/ + +/** + * This method returns the access rights that have been granted to the + * requested tables. This information is returned as a ResultSet + * with the following columns: + *

+ *

    + *
  1. TABLE_CAT - The catalog the table is in, which may be + * null. + *
  2. TABLE_SCHEM - The schema the tables is in, which may be + * null. + *
  3. TABLE_NAME - The name of the table. + *
  4. GRANTOR - The entity that granted the access. + *
  5. GRANTEE - The entity granted the access. + *
  6. PRIVILEGE - The name of the privilege granted. + *
  7. IS_GRANTABLE - "YES" if the grantee can grant the privilege to + * others, "NO" if not, and null if unknown. + *
+ * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param tablePattern The table name pattern of tables to return + * information for. + * + * @return A ResultSet with all the requested privileges. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getTablePrivileges(String catalog, String schema, String table) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the best set of columns for uniquely identifying + * a row. It returns this information as a ResultSet with + * the following columns: + *

+ *

    + *
  1. SCOPE - The scope of the results returned. This is one of the + * constants defined in this class (bestRowTemporary, + * bestRowTransaction, or bestRowSessionCOLUMN_NAME - The name of the column. + *
  2. DATA_TYPE - The SQL type of the column. This is one of the constants + * defined in Types. + *
  3. TYPE_NAME - The string name of the data type for this column. + *
  4. COLUMN_SIZE - The precision of the columns + *
  5. BUFFER_LENGTH - Unused + *
  6. DECIMAL_DIGITS - The scale of the column. + *
  7. PSEUDO_COLUMN - Whether or not the best row identifier is a + * pseudo_column. This is one of the constants defined in this class + * (bestRowUnknown, bestRowNotPseudo, or + * bestRowPseudo). + *
+ * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * @param columnPattern A pattern of column names to return information for. + * @param scope One of the best row id scope constants from this class. + * @param nullable true to include columns that are nullable, + * false otherwise. + * + * @return A ResultSet with the best row identifier. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getBestRowIdentifier(String catalog, String schema, String table, + int scope, boolean nullable) throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the set of columns that are automatically updated + * when the row is update. It returns this information as a + * ResultSet with the following columns: + *

+ *

    + *
  1. SCOPE - Unused + *
  2. COLUMN_NAME - The name of the column. + *
  3. DATA_TYPE - The SQL type of the column. This is one of the constants + * defined in Types. + *
  4. TYPE_NAME - The string name of the data type for this column. + *
  5. COLUMN_SIZE - The precision of the columns + *
  6. BUFFER_LENGTH - Unused + *
  7. DECIMAL_DIGITS - The scale of the column. + *
  8. PSEUDO_COLUMN - Whether or not the best row identifier is a + * pseudo_column. This is one of the constants defined in this class + * (versionRowUnknown, versionRowNotPseudo, or + * versionRowPseudo). + *
+ * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * @param columnPattern A pattern of column names to return information for. + * + * @return A ResultSet with the version columns. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getVersionColumns(String catalog, String schema, String table) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of a table's primary key columns. These + * are returned as a ResultSet with the following columns. + *

+ *

    + *
  1. TABLE_CAT - The catalog of the table, which may be null. + *
  2. TABLE_SCHEM - The schema of the table, which may be null. + *
  3. TABLE_NAME - The name of the table. + *
  4. COLUMN_NAME - The name of the column. + *
  5. KEY_SEQ - The sequence number of the column within the primary key. + *
  6. PK_NAME - The name of the primary key, which may be null. + * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * @param columnPattern A pattern of column names to return information for. + * + * @return A ResultSet with the primary key columns. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getPrimaryKeys(String catalog, String schema, String table) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of the table's foreign keys. These are + * returned as a ResultSet with the following columns: + *

    + *

      + *
    1. PKTABLE_CAT - The catalog of the table the key was imported from. + *
    2. PKTABLE_SCHEM - The schema of the table the key was imported from. + *
    3. PKTABLE_NAME - The name of the table the key was imported from. + *
    4. PKCOLUMN_NAME - The name of the column that was imported. + *
    5. FKTABLE_CAT - The foreign key catalog name. + *
    6. FKTABLE_SCHEM - The foreign key schema name. + *
    7. FKTABLE_NAME - The foreign key table name. + *
    8. FKCOLUMN_NAME - The foreign key column name. + *
    9. KEY_SEQ - The sequence number of the column within the foreign key. + *
    10. UPDATE_RULE - How the foreign key behaves when the primary key is + * updated. This is one of the constants defined in this class + * (importedNoAction, importedKeyCascade, + * importedKeySetNull, importedKeySetDefault, or + * importedKeyRestrict). + *
    11. DELETE_RULE - How the foreign key behaves when the primary key is + * deleted. This is one of the constants defined in this class + * (importedNoAction, importedKeyCascade, + * importedKeySetNull, or importedKeySetDefault) + *
    12. FK_NAME - The name of the foreign key. + *
    13. PK_NAME - The name of the primary key. + *
    14. DEFERRABILITY - The deferrability value. This is one of the + * constants defined in this table (importedKeyInitiallyDeferred, + * importedKeyInitiallyImmediate, or + * importedKeyNotDeferrable). + * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * + * @return A ResultSet with the foreign key columns. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getImportedKeys(String catalog, String schema, String table) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of the table's which use this table's + * primary key as a foreign key. The information is + * returned as a ResultSet with the following columns: + *

      + *

        + *
      1. PKTABLE_CAT - The catalog of the table the key was imported from. + *
      2. PKTABLE_SCHEM - The schema of the table the key was imported from. + *
      3. PKTABLE_NAME - The name of the table the key was imported from. + *
      4. PKCOLUMN_NAME - The name of the column that was imported. + *
      5. FKTABLE_CAT - The foreign key catalog name. + *
      6. FKTABLE_SCHEM - The foreign key schema name. + *
      7. FKTABLE_NAME - The foreign key table name. + *
      8. FKCOLUMN_NAME - The foreign key column name. + *
      9. KEY_SEQ - The sequence number of the column within the foreign key. + *
      10. UPDATE_RULE - How the foreign key behaves when the primary key is + * updated. This is one of the constants defined in this class + * (importedNoAction, importedKeyCascade, + * importedKeySetNull, importedKeySetDefault, or + * importedKeyRestrict). + *
      11. DELETE_RULE - How the foreign key behaves when the primary key is + * deleted. This is one of the constants defined in this class + * (importedNoAction, importedKeyCascade, + * importedKeySetNull, or importedKeySetDefault) + *
      12. FK_NAME - The name of the foreign key. + *
      13. PK_NAME - The name of the primary key. + *
      14. DEFERRABILITY - The deferrability value. This is one of the + * constants defined in this table (importedKeyInitiallyDeferred, + * importedKeyInitiallyImmediate, or + * importedKeyNotDeferrable). + * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * + * @return A ResultSet with the requested information + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getExportedKeys(String catalog, String schema, String table) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a description of how one table imports another + * table's primary key as a foreign key. The information is + * returned as a ResultSet with the following columns: + *

        + *

          + *
        1. PKTABLE_CAT - The catalog of the table the key was imported from. + *
        2. PKTABLE_SCHEM - The schema of the table the key was imported from. + *
        3. PKTABLE_NAME - The name of the table the key was imported from. + *
        4. PKCOLUMN_NAME - The name of the column that was imported. + *
        5. FKTABLE_CAT - The foreign key catalog name. + *
        6. FKTABLE_SCHEM - The foreign key schema name. + *
        7. FKTABLE_NAME - The foreign key table name. + *
        8. FKCOLUMN_NAME - The foreign key column name. + *
        9. KEY_SEQ - The sequence number of the column within the foreign key. + *
        10. UPDATE_RULE - How the foreign key behaves when the primary key is + * updated. This is one of the constants defined in this class + * (importedNoAction, importedKeyCascade, + * importedKeySetNull, importedKeySetDefault, or + * importedKeyRestrict). + *
        11. DELETE_RULE - How the foreign key behaves when the primary key is + * deleted. This is one of the constants defined in this class + * (importedNoAction, importedKeyCascade, + * importedKeySetNull, or importedKeySetDefault) + *
        12. FK_NAME - The name of the foreign key. + *
        13. PK_NAME - The name of the primary key. + *
        14. DEFERRABILITY - The deferrability value. This is one of the + * constants defined in this table (importedKeyInitiallyDeferred, + * importedKeyInitiallyImmediate, or + * importedKeyNotDeferrable). + * + * @param primCatalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs, on the exporting side. + * @param primSchema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema, on the exporting side. + * @param primTable The table name to return information for, on the exporting + * side. + * @param forCatalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs, on the importing side. + * @param forSchema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema on the importing side. + * @param forTable The table name to return information for on the importing + * side. + * + * @return A ResultSet with the requested information + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getCrossReference(String primCatalog, String primSchema, String primTable, + String forCatalog, String forSchema, String forTable) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns a list of the SQL types supported by this + * database. The information is returned as a ResultSet + * with the following columns: + *

          + *

            + *
          1. TYPE_NAME - The name of the data type. + *
          2. DATA_TYPE - A data type constant from Types for this + * type. + *
          3. PRECISION - The maximum precision of this type. + *
          4. LITERAL_PREFIX - Prefix value used to quote a literal, which may be + * null. + *
          5. LITERAL_SUFFIX - Suffix value used to quote a literal, which may be + * null. + *
          6. CREATE_PARAMS - The parameters used to create the type, which may be + * null. + *
          7. NULLABLE - Whether or not this type supports NULL values. This will + * be one of the constants defined in this interface + * (typeNoNulls, typeNullable, or + * typeNullableUnknown). + *
          8. CASE_SENSITIVE - Whether or not the value is case sensitive. + *
          9. SEARCHABLE - Whether or not "LIKE" expressions are supported in + * WHERE clauses for this type. This will be one of the constants defined + * in this interface (typePredNone, typePredChar, + * typePredBasic, or typeSearchable). + *
          10. UNSIGNED_ATTRIBUTE - Is the value of this type unsigned. + *
          11. FIXED_PREC_SCALE - Whether or not this type can be used for money. + *
          12. AUTO_INCREMENT - Whether or not this type supports auto-incrementing. + *
          13. LOCAL_TYPE_NAME - A localized name for this data type. + *
          14. MINIMUM_SCALE - The minimum scale supported by this type. + *
          15. MAXIMUM_SCALE - The maximum scale supported by this type. + *
          16. SQL_DATA_TYPE - Unused. + *
          17. SQL_DATETIME_SUB - Unused. + *
          18. NUM_PREC_RADIX - The radix of this data type. + *
          + * + * @return A ResultSet with the list of available data types. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getTypeInfo() throws SQLException; + +/*************************************************************************/ + +/** + * This method returns information about a tables indices and statistics. + * It is returned as a ResultSet with the following columns: + *

          + *

            + *
          1. TABLE_CAT - The catalog of the table, which may be null. + *
          2. TABLE_SCHEM - The schema of the table, which may be null. + *
          3. TABLE_NAME - The name of the table. + *
          4. NON_UNIQUE - Are index values non-unique? + *
          5. INDEX_QUALIFIER The index catalog, which may be null + *
          6. INDEX_NAME - The name of the index. + *
          7. TYPE - The type of index, which will be one of the constants defined + * in this interface (tableIndexStatistic, + * tableIndexClustered, tableIndexHashed, or + * tableIndexOther). + *
          8. ORDINAL_POSITION - The sequence number of this column in the index. + * This will be 0 when the index type is tableIndexStatistic. + *
          9. COLUMN_NAME - The name of this column in the index. + *
          10. ASC_OR_DESC - "A" for an ascending sort sequence, "D" for a + * descending sort sequence or null if a sort sequence is not + * supported. + *
          11. CARDINALITY - The number of unique rows in the index, or the number + * of rows in the table if the index type is tableIndexStatistic. + *
          12. PAGES - The number of pages used for the index, or the number of pages + * in the table if the index type is tableIndexStatistic. + *
          13. FILTER_CONDITION - The filter condition for this index, which may be + * null. + * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param table The table name to return information for. + * @param unique true to return only unique indexes, + * false otherwise. + * @param approx true if data values can be approximations, + * false otherwise. + * + * @return A ResultSet with the requested index information + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getIndexInfo(String catalog, String schema, String table, boolean unique, + boolean approx) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the datbase supports the specified + * result type. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type is supported, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +supportsResultType(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether the specified result set type and result set + * concurrency type are supported by the database. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * @param concur The desired concurrency type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type is supported, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +supportsResultSetConcurrency(int type, int concur) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type sees its + * own updates. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type sees its own updates, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +ownUpdatesAreVisible(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type sees its + * own deletes. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type sees its own deletes, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +ownDeletesAreVisible(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type sees its + * own inserts. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type sees its own inserts, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +ownInsertsAreVisible(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type sees + * updates committed by others. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type sees other updates, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +othersUpdatesAreVisible(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type sees + * deletes committed by others. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type sees other deletes, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +othersDeletesAreVisible(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type sees + * inserts committed by others. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type sees other inserts, + * false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +othersInsertsAreVisible(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type can detect + * a visible update by calling the rowUpdated method. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type can detect visible updates + * using rowUpdated, false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +updatesAreDetected(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type can detect + * a visible delete by calling the rowUpdated method. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type can detect visible deletes + * using rowUpdated, false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +deletesAreDetected(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the specified result set type can detect + * a visible insert by calling the rowUpdated method. + * + * @param type The desired result type, which is one of the constants + * defined in ResultSet. + * + * @return true if the result set type can detect visible inserts + * using rowUpdated, false otherwise. + * + * @exception SQLException If an error occurs. + * + * @see ResultSet + */ +public abstract boolean +insertsAreDetected(int type) throws SQLException; + +/*************************************************************************/ + +/** + * This method tests whether or not the database supports batch updates. + * + * @return true if batch updates are supported, + * false otherwise. + * + * @exception SQLException If an error occurs. + */ +public abstract boolean +supportsBatchUpdates() throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the list of user defined data types in use. These + * are returned as a ResultSet with the following columns: + *

            + *

              + *
            1. TYPE_CAT - The catalog name, which may be null. + *
            2. TYPE_SCEHM - The schema name, which may be null. + *
            3. TYPE_NAME - The user defined data type name. + *
            4. CLASS_NAME - The Java class name this type maps to. + *
            5. DATA_TYPE - A type identifer from Types for this type. + * This will be one of JAVA_OBJECT, STRUCT, or + * DISTINCT. + *
            6. REMARKS - Comments about this data type. + *
            + * + * @param catalog The catalog to retrieve information from, or the empty string + * to return entities not associated with a catalog, or null + * to return information from all catalogs. + * @param schema The schema to retrieve information from, or the empty string + * to return entities not associated with a schema. + * @param typePattern The type name pattern to match. + * @param types The type identifer patterns (from Types) to + * match. + * + * @return A ResultSet with the requested type information + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSet +getUDTs(String catalog, String schema, String typePattern, int[] types) + throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the Connection object that was used + * to generate the metadata in this object. + * + * @return The connection for this object. + * + * @exception SQLException If an error occurs. + */ +public abstract Connection +getConnection() throws SQLException; } // interface DatabaseMetaData -- cgit v1.2.1