⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 databasemetadata.java

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
   * <li>TABLE_CAT - The catalog the table is in, which may be <code>null</code>.</li>   * <li>TABLE_SCHEM - The schema the table is in, which may be <code>null</code>.</li>   * <li>TABLE_NAME - The name of the table.</li>   * <li>TABLE_TYPE - A string describing the table type.  This will be one   * of the values returned by the <code>getTableTypes()</code> method.</li>   * <li>REMARKS - Comments about the table.</li>   * </ol>   *    * @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.   * @param types The list of table types to include; null returns all types.   * @returns A <code>ResultSet</code> with all the requested tables.   * @exception SQLException If an error occurs.   */  ResultSet getTables(String catalog, String schemaPattern, String      tableNamePattern, String[] types) throws SQLException;  /**   * This method returns the list of database schemas as a    * <code>ResultSet</code>, with one column - TABLE_SCHEM - that is the   * name of the schema.   *   * @return A <code>ResultSet</code> with all the requested schemas.   * @exception SQLException If an error occurs.   */  ResultSet getSchemas() throws SQLException;  /**   * This method returns the list of database catalogs as a   * <code>ResultSet</code> with one column - TABLE_CAT - that is the   * name of the catalog.   *   * @return A <code>ResultSet</code> with all the requested catalogs.   * @exception SQLException If an error occurs.   */  ResultSet getCatalogs() throws SQLException;  /**   * This method returns the list of database table types as a   * <code>ResultSet</code> with one column - TABLE_TYPE - that is the   * name of the table type.   *   * @return A <code>ResultSet</code> with all the requested table types.   * @exception SQLException If an error occurs.   */  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   * <code>ResultSet</code> with the following columns:   * <p>   * <ol>   * <li>TABLE_CAT - The catalog the table is in, which may be    * <code>null</code>.</li>   * <li>TABLE_SCHEM - The schema the tables is in, which may be   * <code>null</code>.</li>   * <li>TABLE_NAME - The name of the table.</li>   * <li>COLUMN_NAME - The name of the column</li>   * <li>DATA_TYPE - The SQL type of the column. This is one of the constants   * defined in <code>Types</code>.</li>   * <li>TYPE_NAME - The string name of the data type for this column.</li>   * <li>COLUMN_SIZE - The size of the column.</li>   * <li>Unused</li>   * <li>NUM_PREC_RADIX - The radix of the column.</li>   * <li>NULLABLE - Whether or not the column is NULLABLE.  This is one of   * the constants defined in this class (<code>tableNoNulls</code>,   * <code>tableNullable</code>, or <code>tableNullableUnknown</code>)</li>   * <li>REMARKS - A description of the column.</li>   * <li>COLUMN_DEF - The default value for the column, may be <code>null</code>.</li>   * <li>SQL_DATA_TYPE - Unused</li>   * <li>SQL_DATETIME_SUB - Unused</li>   * <li>CHAR_OCTET_LENGTH - For character columns, the maximum number of bytes   * in the column.</li>   * <li>ORDINAL_POSITION - The index of the column in the table.</li>   * <li>IS_NULLABLE - "NO" means no, "YES" means maybe, and an empty string   * means unknown.</li>   * </ol>   *   * @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 <code>ResultSet</code> with all the requested tables.   * @exception SQLException If an error occurs.   */  ResultSet getColumns(String catalog, String schemaPattern, String      tableNamePattern, String columnNamePattern) throws SQLException;  /**   * This method returns the access rights that have been granted to the   * requested columns.  This information is returned as a <code>ResultSet</code>   * with the following columns:   *   * <ol>   * <li>TABLE_CAT - The catalog the table is in, which may be    * <code>null</code>.</li>   * <li>TABLE_SCHEM - The schema the tables is in, which may be   * <code>null</code>.</li>   * <li>TABLE_NAME - The name of the table.</li>   * <li>COLUMN_NAME - The name of the column.</li>   * <li>GRANTOR - The entity that granted the access.</li>   * <li>GRANTEE - The entity granted the access.</li>   * <li>PRIVILEGE - The name of the privilege granted.</li>   * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to   * others, "NO" if not, and <code>null</code> if unknown.</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   *        to return entities not associated with a catalog, or <code>null</code>   *        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 <code>ResultSet</code> with all the requested privileges.   * @exception SQLException If an error occurs.   */  ResultSet getColumnPrivileges(String catalog, String schema, String      table, String columnNamePattern) throws SQLException;  /**   * This method returns the access rights that have been granted to the   * requested tables.  This information is returned as a <code>ResultSet</code>   * with the following columns:   *   * <ol>   * <li>TABLE_CAT - The catalog the table is in, which may be    * <code>null</code>.</li>   * <li>TABLE_SCHEM - The schema the tables is in, which may be   * <code>null</code>.</li>   * <li>TABLE_NAME - The name of the table.</li>   * <li>GRANTOR - The entity that granted the access.</li>   * <li>GRANTEE - The entity granted the access.</li>   * <li>PRIVILEGE - The name of the privilege granted.</li>   * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to   * others, "NO" if not, and <code>null</code> if unknown.</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   *        to return entities not associated with a catalog, or <code>null</code>   *        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 <code>ResultSet</code> with all the requested privileges.   * @exception SQLException If an error occurs.   */  ResultSet getTablePrivileges(String catalog, String schemaPattern,      String tableNamePattern) throws SQLException;  /**   * This method returns the best set of columns for uniquely identifying   * a row.  It returns this information as a <code>ResultSet</code> with   * the following columns:   *   * <ol>   * <li>SCOPE - The scope of the results returned.  This is one of the    * constants defined in this class (<code>bestRowTemporary</code>,   * <code>bestRowTransaction</code>, or <code>bestRowSession</code>).</li>   * <li>COLUMN_NAME - The name of the column.</li>   * <li>DATA_TYPE - The SQL type of the column. This is one of the constants   * defined in <code>Types</code>.</li>   * <li>TYPE_NAME - The string name of the data type for this column.</li>   * <li>COLUMN_SIZE - The precision of the columns</li>   * <li>BUFFER_LENGTH - Unused</li>   * <li>DECIMAL_DIGITS - The scale of the column.</li>   * <li>PSEUDO_COLUMN - Whether or not the best row identifier is a   * pseudo_column.  This is one of the constants defined in this class    * (<code>bestRowUnknown</code>, <code>bestRowNotPseudo</code>, or   * <code>bestRowPseudo</code>).</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   * to return entities not associated with a catalog, or <code>null</code>   * 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 <code>true</code> to include columns that are nullable,   * <code>false</code> otherwise.   * @return A <code>ResultSet</code> with the best row identifier.   * @exception SQLException If an error occurs.   */  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    * <code>ResultSet</code> with the following columns:   *   * <ol>   * <li>SCOPE - Unused</li>   * <li>COLUMN_NAME - The name of the column.</li>   * <li>DATA_TYPE - The SQL type of the column. This is one of the constants   * defined in <code>Types</code>.</li>   * <li>TYPE_NAME - The string name of the data type for this column.</li>   * <li>COLUMN_SIZE - The precision of the columns</li>   * <li>BUFFER_LENGTH - Unused</li>   * <li>DECIMAL_DIGITS - The scale of the column.</li>   * <li>PSEUDO_COLUMN - Whether or not the best row identifier is a   * pseudo_column.  This is one of the constants defined in this class    * (<code>versionRowUnknown</code>, <code>versionRowNotPseudo</code>, or   * <code>versionRowPseudo</code>).</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   *        to return entities not associated with a catalog, or <code>null</code>   *        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 <code>ResultSet</code> with the version columns.   * @exception SQLException If an error occurs.   */  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 <code>ResultSet</code> with the following columns.   *   * <ol>   * <li>TABLE_CAT - The catalog of the table, which may be <code>null</code>.</li>   * <li>TABLE_SCHEM - The schema of the table, which may be <code>null</code>.</li>   * <li>TABLE_NAME - The name of the table.</li>   * <li>COLUMN_NAME - The name of the column.</li>   * <li>KEY_SEQ - The sequence number of the column within the primary key.</li>   * <li>PK_NAME - The name of the primary key, which may be <code>null</code>.</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   *        to return entities not associated with a catalog, or <code>null</code>   *        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 <code>ResultSet</code> with the primary key columns.   * @exception SQLException If an error occurs.   */  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 <code>ResultSet</code> with the following columns:   *   * <ol>   * <li>PKTABLE_CAT - The catalog of the table the key was imported from.</li>   * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.</li>   * <li>PKTABLE_NAME - The name of the table the key was imported from.</li>   * <li>PKCOLUMN_NAME - The name of the column that was imported.</li>   * <li>FKTABLE_CAT - The foreign key catalog name.</li>   * <li>FKTABLE_SCHEM - The foreign key schema name.</li>   * <li>FKTABLE_NAME - The foreign key table name.</li>   * <li>FKCOLUMN_NAME - The foreign key column name.</li>   * <li>KEY_SEQ - The sequence number of the column within the foreign key.</li>   * <li>UPDATE_RULE - How the foreign key behaves when the primary key is   * updated.  This is one of the constants defined in this class    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,   * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or   * <code>importedKeyRestrict</code>).</li>   * <li>DELETE_RULE - How the foreign key behaves when the primary key is   * deleted.  This is one of the constants defined in this class    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,   * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)</li>   * <li>FK_NAME - The name of the foreign key.</li>   * <li>PK_NAME - The name of the primary key.</li>   * <li>DEFERRABILITY - The deferrability value.  This is one of the   * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,   * <code>importedKeyInitiallyImmediate</code>, or   * <code>importedKeyNotDeferrable</code>).</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   *        to return entities not associated with a catalog, or <code>null</code>   *        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 <code>ResultSet</code> with the foreign key columns.   *   * @exception SQLException If an error occurs.   */  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 <code>ResultSet</code> with the following columns:   *   * <ol>   * <li>PKTABLE_CAT - The catalog of the table the key was imported from.</li>   * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.</li>   * <li>PKTABLE_NAME - The name of the table the key was imported from.</li>   * <li>PKCOLUMN_NAME - The name of the column that was imported.</li>   * <li>FKTABLE_CAT - The foreign key catalog name.</li>   * <li>FKTABLE_SCHEM - The foreign key schema name.</li>   * <li>FKTABLE_NAME - The foreign key table name.</li>   * <li>FKCOLUMN_NAME - The foreign key column name.</li>   * <li>KEY_SEQ - The sequence number of the column within the foreign key.</li>   * <li>UPDATE_RULE - How the foreign key behaves when the primary key is   * updated.  This is one of the constants defined in this class    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,   * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or   * <code>importedKeyRestrict</code>).</li>   * <li>DELETE_RULE - How the foreign key behaves when the primary key is   * deleted.  This is one of the constants defined in this class    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,   * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)</li>   * <li>FK_NAME - The name of the foreign key.</li>   * <li>PK_NAME - The name of the primary key.</li>   * <li>DEFERRABILITY - The deferrability value.  This is one of the   * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,   * <code>importedKeyInitiallyImmediate</code>, or   * <code>importedKeyNotDeferrable</code>).</li>   * </ol>   *   * @param catalog The catalog to retrieve information from, or the empty string   *        to return entities not associated with a catalog, or <code>null</code>   *        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 <code>ResultSet</code> with the requested information   * @exception SQLException If an error occurs.   */  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 <code>ResultSet</code> with the following columns:   *   * <ol>   * <li>PKTABLE_CAT - The catalog of the table the key was imported from.</li>   * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.</li>   * <li>PKTABLE_NAME - The name of the table the key was imported from.</li>   * <li>PKCOLUMN_NAME - The name of the column that was imported.</li>   * <li>FKTABLE_CAT - The foreign key catalog name.</li>   * <li>FKTABLE_SCHEM - The foreign key schema name.</li>   * <li>FKTABLE_NAME - The foreign key table name.</li>   * <li>FKCOLUMN_NAME - The foreign key column name.</li>   * <li>KEY_SEQ - The sequence number of the column within the foreign key.</li>   * <li>UPDATE_RULE - How the foreign key behaves when the primary key is   * updated.  This is one of the constants defined in this class    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -