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

📄 databasemetadata.java

📁 java数据库源代码 请看看啊 提点宝贵的意见
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
     *        as it is stored in the database      * @return <code>ResultSet</code> - each row describes a stored procedure parameter or      *      column     * @exception SQLException if a database access error occurs     * @see #getSearchStringEscape      */    ResultSet getProcedureColumns(String catalog,				  String schemaPattern,				  String procedureNamePattern, 				  String columnNamePattern) throws SQLException;    /**     * Indicates that type of the column is unknown.     * <P>     * A possible value for the column     * <code>COLUMN_TYPE</code>     * in the <code>ResultSet</code>      * returned by the method <code>getProcedureColumns</code>.     */    int procedureColumnUnknown = 0;    /**     * Indicates that the column stores IN parameters.     * <P>     * A possible value for the column     * <code>COLUMN_TYPE</code>     * in the <code>ResultSet</code>      * returned by the method <code>getProcedureColumns</code>.     */    int procedureColumnIn = 1;    /**     * Indicates that the column stores INOUT parameters.     * <P>     * A possible value for the column     * <code>COLUMN_TYPE</code>     * in the <code>ResultSet</code>      * returned by the method <code>getProcedureColumns</code>.     */    int procedureColumnInOut = 2;    /**     * Indicates that the column stores OUT parameters.     * <P>     * A possible value for the column     * <code>COLUMN_TYPE</code>     * in the <code>ResultSet</code>      * returned by the method <code>getProcedureColumns</code>.     */    int procedureColumnOut = 4;    /**     * Indicates that the column stores return values.     * <P>     * A possible value for the column     * <code>COLUMN_TYPE</code>     * in the <code>ResultSet</code>      * returned by the method <code>getProcedureColumns</code>.     */    int procedureColumnReturn = 5;    /**     * Indicates that the column stores results.     * <P>     * A possible value for the column     * <code>COLUMN_TYPE</code>     * in the <code>ResultSet</code>      * returned by the method <code>getProcedureColumns</code>.     */    int procedureColumnResult = 3;    /**     * Indicates that <code>NULL</code> values are not allowed.     * <P>     * A possible value for the column     * <code>NULLABLE</code>     * in the <code>ResultSet</code> object     * returned by the method <code>getProcedureColumns</code>.     */    int procedureNoNulls = 0;    /**     * Indicates that <code>NULL</code> values are allowed.     * <P>     * A possible value for the column     * <code>NULLABLE</code>     * in the <code>ResultSet</code> object     * returned by the method <code>getProcedureColumns</code>.     */    int procedureNullable = 1;    /**     * Indicates that whether <code>NULL</code> values are allowed     * is unknown.     * <P>     * A possible value for the column     * <code>NULLABLE</code>     * in the <code>ResultSet</code> object     * returned by the method <code>getProcedureColumns</code>.     */    int procedureNullableUnknown = 2;    /**     * Retrieves a description of the tables available in the given catalog.     * Only table descriptions matching the catalog, schema, table     * name and type criteria are returned.  They are ordered by     * TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.     * <P>     * Each table description has the following columns:     *  <OL>     *	<LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)     *	<LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)     *	<LI><B>TABLE_NAME</B> String => table name     *	<LI><B>TABLE_TYPE</B> String => table type.  Typical types are "TABLE",     *			"VIEW",	"SYSTEM TABLE", "GLOBAL TEMPORARY",      *			"LOCAL TEMPORARY", "ALIAS", "SYNONYM".     *	<LI><B>REMARKS</B> String => explanatory comment on the table     *  <LI><B>TYPE_CAT</B> String => the types catalog (may be <code>null</code>)     *  <LI><B>TYPE_SCHEM</B> String => the types schema (may be <code>null</code>)     *  <LI><B>TYPE_NAME</B> String => type name (may be <code>null</code>)     *  <LI><B>SELF_REFERENCING_COL_NAME</B> String => name of the designated      *                  "identifier" column of a typed table (may be <code>null</code>)     *	<LI><B>REF_GENERATION</B> String => specifies how values in      *                  SELF_REFERENCING_COL_NAME are created. Values are     *                  "SYSTEM", "USER", "DERIVED". (may be <code>null</code>)	     *  </OL>     *     * <P><B>Note:</B> Some databases may not return information for     * all tables.     *     * @param catalog a catalog name; must match the catalog name as it     *        is stored in the database; "" retrieves those without a catalog;     *        <code>null</code> means that the catalog name should not be used to narrow     *        the search     * @param schemaPattern a schema name pattern; must match the schema name     *        as it is stored in the database; "" retrieves those without a schema;     *        <code>null</code> means that the schema name should not be used to narrow     *        the search     * @param tableNamePattern a table name pattern; must match the     *        table name as it is stored in the database      * @param types a list of table types to include; <code>null</code> returns all types      * @return <code>ResultSet</code> - each row is a table description     * @exception SQLException if a database access error occurs     * @see #getSearchStringEscape      */    ResultSet getTables(String catalog, String schemaPattern,			String tableNamePattern, String types[]) throws SQLException;    /**     * Retrieves the schema names available in this database.  The results     * are ordered by schema name.     *     * <P>The schema column is:     *  <OL>     *	<LI><B>TABLE_SCHEM</B> String => schema name     *  <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>)     *  </OL>     *     * @return a <code>ResultSet</code> object in which each row is a      *         schema decription      * @exception SQLException if a database access error occurs     */    ResultSet getSchemas() throws SQLException;    /**     * Retrieves the catalog names available in this database.  The results     * are ordered by catalog name.     *     * <P>The catalog column is:     *  <OL>     *	<LI><B>TABLE_CAT</B> String => catalog name     *  </OL>     *     * @return a <code>ResultSet</code> object in which each row has a      *         single <code>String</code> column that is a catalog name      * @exception SQLException if a database access error occurs     */    ResultSet getCatalogs() throws SQLException;    /**     * Retrieves the table types available in this database.  The results     * are ordered by table type.     *     * <P>The table type is:     *  <OL>     *	<LI><B>TABLE_TYPE</B> String => table type.  Typical types are "TABLE",     *			"VIEW",	"SYSTEM TABLE", "GLOBAL TEMPORARY",      *			"LOCAL TEMPORARY", "ALIAS", "SYNONYM".     *  </OL>     *     * @return a <code>ResultSet</code> object in which each row has a      *         single <code>String</code> column that is a table type      * @exception SQLException if a database access error occurs     */    ResultSet getTableTypes() throws SQLException;    /**     * Retrieves a description of table columns available in      * the specified catalog.     *     * <P>Only column descriptions matching the catalog, schema, table     * and column name criteria are returned.  They are ordered by     * <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>, and      * <code>ORDINAL_POSITION</code>.     *     * <P>Each column description has the following columns:     *  <OL>     *	<LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)     *	<LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)     *	<LI><B>TABLE_NAME</B> String => table name     *	<LI><B>COLUMN_NAME</B> String => column name     *	<LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types     *	<LI><B>TYPE_NAME</B> String => Data source dependent type name,     *  for a UDT the type name is fully qualified     *	<LI><B>COLUMN_SIZE</B> int => column size.  For char or date     *	    types this is the maximum number of characters, for numeric or     *	    decimal types this is precision.     *	<LI><B>BUFFER_LENGTH</B> is not used.     *	<LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits     *	<LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)     *	<LI><B>NULLABLE</B> int => is NULL allowed.     *      <UL>     *      <LI> columnNoNulls - might not allow <code>NULL</code> values     *      <LI> columnNullable - definitely allows <code>NULL</code> values     *      <LI> columnNullableUnknown - nullability unknown     *      </UL>     *	<LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)     * 	<LI><B>COLUMN_DEF</B> String => default value (may be <code>null</code>)     *	<LI><B>SQL_DATA_TYPE</B> int => unused     *	<LI><B>SQL_DATETIME_SUB</B> int => unused     *	<LI><B>CHAR_OCTET_LENGTH</B> int => for char types the      *       maximum number of bytes in the column     *	<LI><B>ORDINAL_POSITION</B> int	=> index of column in table      *      (starting at 1)     *	<LI><B>IS_NULLABLE</B> String => "NO" means column definitely      *      does not allow NULL values; "YES" means the column might      *      allow NULL values.  An empty string means nobody knows.     *  <LI><B>SCOPE_CATLOG</B> String => catalog of table that is the scope     *      of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)     *  <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the scope     *      of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF)     *  <LI><B>SCOPE_TABLE</B> String => table name that this the scope     *      of a reference attribure (<code>null</code> if the DATA_TYPE isn't REF)     *  <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated     *      Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE      *      isn't DISTINCT or user-generated REF)     *  </OL>     *     * @param catalog a catalog name; must match the catalog name as it     *        is stored in the database; "" retrieves those without a catalog;     *        <code>null</code> means that the catalog name should not be used to narrow     *        the search     * @param schemaPattern a schema name pattern; must match the schema name     *        as it is stored in the database; "" retrieves those without a schema;     *        <code>null</code> means that the schema name should not be used to narrow     *        the search     * @param tableNamePattern a table name pattern; must match the     *        table name as it is stored in the database      * @param columnNamePattern a column name pattern; must match the column     *        name as it is stored in the database     * @return <code>ResultSet</code> - each row is a column description     * @exception SQLException if a database access error occurs     * @see #getSearchStringEscape      */    ResultSet getColumns(String catalog, String schemaPattern,			 String tableNamePattern, String columnNamePattern)	throws SQLException;    /**     * Indicates that the column might not allow <code>NULL</code> values.     * <P>     * A possible value for the column     * <code>NULLABLE</code>     * in the <code>ResultSet</code> returned by the method     * <code>getColumns</code>.     */    int columnNoNulls = 0;    /**     * Indicates that the column definitely allows <code>NULL</code> values.     * <P>     * A possible value for the column     * <code>NULLABLE</code>     * in the <code>ResultSet</code> returned by the method     * <code>getColumns</code>.     */    int columnNullable = 1;    /**     * Indicates that the nullability of columns is unknown.     * <P>     * A possible value for the column     * <code>NULLABLE</code>     * in the <code>ResultSet</code> returned by the method     * <code>getColumns</code>.     */    int columnNullableUnknown = 2;    /**     * Retrieves a description of the access rights for a table's columns.     *     * <P>Only privileges matching the column name criteria are     * returned.  They are ordered by COLUMN_NAME and PRIVILEGE.     *     * <P>Each privilige description has the following columns:     *  <OL>     *	<LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)     *	<LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)     *	<LI><B>TABLE_NAME</B> String => table name     *	<LI><B>COLUMN_NAME</B> String => column name     *	<LI><B>GRANTOR</B> => grantor of access (may be <code>null</code>)     *	<LI><B>GRANTEE</B> String => grantee of access     *	<LI><B>PRIVILEGE</B> String => name of access (SELECT,      *      INSERT, UPDATE, REFRENCES, ...)     *	<LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted      *      to grant to others; "NO" if not; <code>null</code> if unknown      *  </OL>     *     * @param catalog a catalog name; must match the catalog name as it     *        is stored in the database; "" retrieves those without a catalog;     *        <code>null</code> means that the catalog name should not be used to narrow     *        the search     * @param schema a schema name; must match the schema name as it is     *        stored in the database; "" retrieves those without a schema;     *        <code>null</code> means that the schema name should not be used to narrow     *        the search     * @param table a table name; must match the table name as it is     *     

⌨️ 快捷键说明

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