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

📄 databasemetadata.java

📁 用java访问MySQL数据库的JDBC驱动程序。
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
    
    /**
     * Is there limited support for outer joins?  (This will be true
     * if supportFullOuterJoins is true.)
     *
     * @return true if so
     */
    
    public boolean supportsLimitedOuterJoins() throws java.sql.SQLException 
    {
        return true;
    }
    
    /**
     * What's the database vendor's preferred term for "schema"?
     *
     * @return the vendor term
     */
    
    public String getSchemaTerm() throws java.sql.SQLException 
    {
        return "";
    }

    /**
     * What's the database vendor's preferred term for "procedure"?
     *
     * @return the vendor term
     */

    public String getProcedureTerm() throws java.sql.SQLException 
    {
        return "";
    }

    /**
     * What's the database vendor's preferred term for "catalog"?
     *
     * @return the vendor term
     */

    public String getCatalogTerm() throws java.sql.SQLException 
    {
        return "database";
    }

    /**
     * Does a catalog appear at the start of a qualified table name?
     * (Otherwise it appears at the end)
     *
     * @return true if it appears at the start
     */
    
    public boolean isCatalogAtStart() throws java.sql.SQLException 
    {
        return true;
    }

    /**
     * What's the separator between catalog and table name?
     *
     * @return the separator string
     */

    public String getCatalogSeparator() throws java.sql.SQLException 
    {
        return ".";
    }

    /**
     * Can a schema name be used in a data manipulation statement?
     *
     * @return true if so
     */
    
    public boolean supportsSchemasInDataManipulation() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can a schema name be used in a procedure call statement?
     *
     * @return true if so
     */
    
    public boolean supportsSchemasInProcedureCalls() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can a schema name be used in a table definition statement?
     *
     * @return true if so
     */
    
    public boolean supportsSchemasInTableDefinitions() throws java.sql.SQLException 
    {
        return false;
    }

    /**
     * Can a schema name be used in an index definition statement?
     *
     * @return true if so
     */

    public boolean supportsSchemasInIndexDefinitions() throws java.sql.SQLException 
    {
        return false;
    }

    /**
     * Can a schema name be used in a privilege definition statement?
     *
     * @return true if so
     */
    
    public boolean supportsSchemasInPrivilegeDefinitions() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can a catalog name be used in a data manipulation statement?
     *
     * @return true if so
     */
    
    public boolean supportsCatalogsInDataManipulation() throws java.sql.SQLException 
    {
        // Servers before 3.22 could not do this
        if (_Conn.getServerMajorVersion() >= 3) { // newer than version 3?
            if (_Conn.getServerMajorVersion() == 3) {
                if (_Conn.getServerMinorVersion() >= 22) { // minor 22?
                    return true;
                }
                else {
                    return false; // Old version 3
                }
            }
            else {
                return true; // newer than version 3.22
            }
        }
        else {
            return false; // older than version 3
        }
    }
    
    /**
     * Can a catalog name be used in a procedure call statement?
     *
     * @return true if so
     */
    
    public boolean supportsCatalogsInProcedureCalls() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can a catalog name be used in a table definition statement?
     *
     * @return true if so
     */
    
    public boolean supportsCatalogsInTableDefinitions() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can a catalog name be used in a index definition statement?
     *
     * @return true if so
     */
    
    public boolean supportsCatalogsInIndexDefinitions() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can a catalog name be used in a privilege definition statement?
     *
     * @return true if so
     */
    
    public boolean supportsCatalogsInPrivilegeDefinitions() throws java.sql.SQLException 
    {
        return false;
    }
    
    
    /**
     * Is positioned DELETE supported?
     *
     * @return true if so
     */
    
    public boolean supportsPositionedDelete() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Is positioned UPDATE supported?
     *
     * @return true if so
     */
    
    public boolean supportsPositionedUpdate() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Is SELECT for UPDATE supported?
     *
     * @return true if so
     */
    
    public boolean supportsSelectForUpdate() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Are stored procedure calls using the stored procedure escape
     * syntax supported?
     *
     * @return true if so
     */
  
    public boolean supportsStoredProcedures() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Are subqueries in comparison expressions supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */
    
    public boolean supportsSubqueriesInComparisons() throws java.sql.SQLException 
    {
        return true; // not sure
    }
    
    /**
     * Are subqueries in exists expressions supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */
    
    public boolean supportsSubqueriesInExists() throws java.sql.SQLException 
    {
        return false;  // no sub-queries yet
    }
    
    /**
     * Are subqueries in "in" statements supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */

    public boolean supportsSubqueriesInIns() throws java.sql.SQLException 
    {
        return false; // no sub-queries yet
    }
    
    /**
     * Are subqueries in quantified expressions supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */
    
    public boolean supportsSubqueriesInQuantifieds() throws java.sql.SQLException 
    {
        return false; // no sub-queries yet
    }
    
    /**
     * Are correlated subqueries supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */
    
    public boolean supportsCorrelatedSubqueries() throws java.sql.SQLException 
    {
        return false; // no sub-queries yet
    }
    
    /**
     * Is SQL UNION supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */
    
    public boolean supportsUnion() throws java.sql.SQLException 
    {
        return false; // not sure
    }

    /**
     * Is SQL UNION ALL supported?
     *
     * A JDBC compliant driver always returns true.
     *
     * @return true if so
     */
    
    public boolean supportsUnionAll() throws java.sql.SQLException 
    {
        return false; // not sure
    }
    
    /**
     * Can cursors remain open across commits?
     *
     * @return true if so
     * @see Connection#disableAutoClose
     */
    
    public boolean supportsOpenCursorsAcrossCommit() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can cursors remain open across rollbacks?
     *
     * @return true if so
     * @see Connection#disableAutoClose
     */
    
    public boolean supportsOpenCursorsAcrossRollback() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can statements remain open across commits?
     *
     * @return true if so
     * @see Connection#disableAutoClose
     */
    public boolean supportsOpenStatementsAcrossCommit() throws java.sql.SQLException 
    {
        return false;
    }
    
    /**
     * Can statements remain open across rollbacks?
     *
     * @return true if so
     * @see Connection#disableAutoClose
     */
    
    public boolean supportsOpenStatementsAcrossRollback() throws java.sql.SQLException 
    {
        return false;
    }
    
    //----------------------------------------------------------------------
    // The following group of methods exposes various limitations
    // based on the target database with the current driver.
    // Unless otherwise specified, a result of zero means there is no
    // limit, or the limit is not known.
  
    /**
     * How many hex characters can you have in an inline binary literal?
     *
     * @return max literal length
     */

    public int getMaxBinaryLiteralLength() throws java.sql.SQLException 
    {
        return 16777208;
    }

    /**
     * What's the max length for a character literal?
     *
     * @return max literal length
     */
    
    public int getMaxCharLiteralLength() throws java.sql.SQLException 
    {
        return 16777208;
    }
    
    /**
     * What's the limit on column name length?
     *
     * @return max literal length
     */
    
    public int getMaxColumnNameLength() throws java.sql.SQLException 
    {
        return 32;
    }

    /**
     * What's the maximum number of columns in a "GROUP BY" clause?
     *
     * @return max number of columns
     */
    
    public int getMaxColumnsInGroupBy() throws java.sql.SQLException 
    {
        return 16;
    }
    
    /**
     * What's the maximum number of columns allowed in an index?
     *
     * @return max columns
     */
    
    public int getMaxColumnsInIndex() throws java.sql.SQLException 
    {
        return 16;
    }

    /**
     * What's the maximum number of columns in an "ORDER BY" clause?
     *
     * @return max columns
     */
    
    public int getMaxColumnsInOrderBy() throws java.sql.SQLException 
    {
        return 16;
    }
    
    /**
     * What's the maximum number of columns in a "SELECT" list?
     *
     * @return max columns
     */
    
    public int getMaxColumnsInSelect() throws java.sql.SQLException 
    {
        return 256;
    }
    
    /**
     * What's maximum number of columns in a table?
     *

⌨️ 快捷键说明

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