📄 databasemetadata.java
字号:
* This method returns the maximum length of a table name. * * @return The maximum length of a table name. * * @exception SQLException If an error occurs. */public abstract intgetMaxTableNameLength() throws SQLException;/*************************************************************************//** * This method returns the maximum number of tables that may be referenced * in a SELECT statement. * * @return The maximum number of tables allowed in a SELECT statement. * * @exception SQLException If an error occurs. */public abstract intgetMaxTablesInSelect() throws SQLException;/*************************************************************************//** * This method returns the maximum length of a user name. * * @return The maximum length of a user name. * * @exception SQLException If an error occurs. */public abstract intgetMaxUserNameLength() throws SQLException;/*************************************************************************//** * This method returns the default transaction isolation level of the * database. * * @return The default transaction isolation level of the database. * * @exception SQLException If an error occurs. * * @see Connection */public abstract intgetDefaultTransactionIsolation() throws SQLException;/*************************************************************************//** * This method tests whether or not the database supports transactions. * * @return <code>true</code> if the database supports transactions, * <code>false</code> otherwise. * * @exception SQLException If an error occurs. */public abstract booleansupportsTransactions() throws SQLException;/*************************************************************************//** * This method tests whether or not the database supports the specified * transaction isolation level. * * @param level The transaction isolation level. * * @return <code>true</code> if the specified transaction isolation level * is supported, <code>false</code> otherwise. * * @exception SQLException If an error occurs. */public abstract booleansupportsTransactionIsolationLevel(int level) throws SQLException;/*************************************************************************//** * This method tests whether or not DDL and DML statements allowed within * the same transaction. * * @return <code>true</code> if DDL and DML statements are allowed in the * same transaction, <code>false</code> otherwise. * * @exception SQLException If an error occurs. */public abstract booleansupportsDataDefinitionAndDataManipulationTransactions() throws SQLException;/*************************************************************************//** * This method tests whether or not only DML statement are allowed * inside a transaction. * * @return <code>true</code> if only DML statements are allowed in * transactions, <code>false</code> otherwise. * * @exception SQLException If an error occurs. */public abstract booleansupportsDataManipulationTransactionsOnly() throws SQLException;/*************************************************************************//** * This method tests whether or not a DDL statement will cause the * current transaction to be automatically committed. * * @return <code>true</code> if DDL causes an immediate transaction commit, * <code>false</code> otherwise. * * @exception SQLException If an error occurs. */public abstract booleandataDefinitionCausesTransactionCommit() throws SQLException;/*************************************************************************//** * This method tests whether or not DDL statements are ignored in * transactions. * * @return <code>true</code> if DDL statements are ignored in transactions, * <code>false</code> otherwise. * * @exception SQLException If an error occurs. */public abstract booleandataDefinitionIgnoredInTransactions() 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 <code>ResultSet</code> with the following columns: * <p> * <ol> * <li>PROCEDURE_CAT - The catalog the procedure is in, which may be * <code>null</code>. * <li>PROCEDURE_SCHEM - The schema the procedures is in, which may be * <code>null</code>. * <li>PROCEDURE_NAME - The name of the procedure. * <li>Unused * <li>Unused * <li>Unused * <li>REMARKS - A description of the procedure * <li>PROCEDURE_TYPE - Indicates the return type of the procedure, which * is one of the contstants defined in this class * (<code>procedureResultUnknown</code>, <code>procedureNoResult</code>, or * <code>procedureReturnsResult</code>). * </ol> * * @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 <code>ResultSet</code> with all the requested procedures. * * @exception SQLException If an error occurs. */public abstract ResultSetgetProcedures(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 * <code>ResultSet</code> with the following columns: * <p> * <ol> * <li>PROCEDURE_CAT - The catalog the procedure is in, which may be * <code>null</code>. * <li>PROCEDURE_SCHEM - The schema the procedures is in, which may be * <code>null</code>. * <li>PROCEDURE_NAME - The name of the procedure. * <li>COLUMN_NAME - The name of the column * <li>COLUMN_TYPE - The type of the column, which will be one of the * contants defined in this class (<code>procedureColumnUnknown</code>, * <code>procedureColumnIn</code>, <code>procedureColumnInOut</code>, * <code>procedureColumnOut</code>, <code>procedureColumnReturn</code>, * or <code>procedureColumnResult</code>). * <li>DATA_TYPE - The SQL type of the column. This is one of the constants * defined in <code>Types</code>. * <li>TYPE_NAME - The string name of the data type for this column. * <li>PRECISION - The precision of the column. * <li>LENGTH - The length of the column in bytes * <li>SCALE - The scale of the column. * <li>RADIX - The radix of the column. * <li>NULLABLE - Whether or not the column is NULLABLE. This is one of * the constants defined in this class (<code>procedureNoNulls</code>, * <code>procedureNullable</code>, or <code>procedureNullableUnknown</code>) * <li>REMARKS - A description of the column. * </ol> * * @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 <code>ResultSet</code> with all the requested procedures. * * @exception SQLException If an error occurs. */public abstract ResultSetgetProcedureColumns(String catalog, String schemaPattern, String namePattern, String columnPattern) throws SQLException;/*************************************************************************//** * This method returns a list of the requested table as 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>TABLE_SCHEM - The schema the table is in, which may be <code>null</code>. * <li>TABLE_NAME - The name of the table. * <li>TABLE_TYPE - A string describing the table type. This will be one * of the values returned by the <code>getTableTypes()</code> method. * <li>REMARKS - Comments about the table. * </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. */public abstract ResultSetgetTables(String catalog, String schemaPattern, String namePattern, 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. */public abstract ResultSetgetSchemas() 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. */public abstract ResultSetgetCatalogs() 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. */public abstract ResultSetgetTableTypes() 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>TABLE_SCHEM - The schema the tables is in, which may be * <code>null</code>. * <li>TABLE_NAME - The name of the table. * <li>COLUMN_NAME - The name of the column * <li>DATA_TYPE - The SQL type of the column. This is one of the constants * defined in <code>Types</code>. * <li>TYPE_NAME - The string name of the data type for this column. * <li>COLUMN_SIZE - The size of the column. * <li>Unused * <li>NUM_PREC_RADIX - The radix of the column. * <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>REMARKS - A description of the column. * <li>COLUMN_DEF - The default value for the column, may be <code>null</code>. * <li>SQL_DATA_TYPE - Unused * <li>SQL_DATETIME_SUB - Unused * <li>CHAR_OCTET_LENGTH - For character columns, the maximum number of bytes * in the column. * <li>ORDINAL_POSITION - The index of the column in the table. * <li>IS_NULLABLE - "NO" means no, "YES" means maybe, and an empty string * means unknown. * </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. */public abstract ResultSetgetColumns(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 <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>TABLE_SCHEM - The schema the tables is in, which may be * <code>null</code>. * <li>TABLE_NAME - The name of the table. * <li>COLUMN_NAME - The name of the column. * <li>GRANTOR - The entity that granted the access. * <li>GRANTEE - The entity granted the access. * <li>PRIVILEGE - The name of the privilege granted. * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to * others, "NO" if not, and <code>null</code> if unknown. * </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. */public abstract ResultSetgetColumnPrivileges(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 <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>TABLE_SCHEM - The schema the tables is in, which may be * <code>null</code>. * <li>TABLE_NAME - The name of the table. * <li>GRANTOR - The entity that granted the access. * <li>GRANTEE - The entity granted the access. * <li>PRIVILEGE - The name of the privilege granted. * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to * others, "NO" if not, and <code>null</code> if unknown. * </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. */public abstract ResultSetgetTablePrivileges(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 <code>ResultSet</code> with * the following columns: * <p> * <ol> * <li>SCOPE - The scope of the results returned. This is one of the * constants
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -