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

📄 axiondatabasemetadata.java

📁 开源的axion的数据库代码
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsStoredProcedures() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSubqueriesInComparisons() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSubqueriesInExists() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSubqueriesInIns() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSubqueriesInQuantifieds() throws SQLException {        return false;    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsAlterTableWithDropColumn() throws SQLException {        return false;    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsAlterTableWithAddColumn() throws SQLException {        return false;    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSchemasInDataManipulation() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSchemasInProcedureCalls() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsSchemasInIndexDefinitions() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsCatalogsInDataManipulation() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsCatalogsInProcedureCalls() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsCatalogsInTableDefinitions() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsCatalogsInIndexDefinitions() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {        return false;    }        /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsGroupBy() throws SQLException {        return false;    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsGroupByUnrelated() throws SQLException {        return false;    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsGroupByBeyondSelect() throws SQLException {        return false;    }    /** Returns <code>true</code>. */    public boolean supportsOuterJoins() throws SQLException {        return true;    }    /** Returns <code>true</code>. */    public boolean supportsFullOuterJoins() throws SQLException {        return true;    }    /** Returns <code>true</code>. */    public boolean supportsLimitedOuterJoins() throws SQLException {        return true;    }    /** Returns <code>true</code>, since Axion allows arbitrary columns in an ORDER BY. */    public boolean supportsOrderByUnrelated() throws SQLException {        return true;    }    /** Returns <code>true</code>, since Axion supports transactions. */    public boolean supportsTransactions() throws SQLException {        return true;    }    /**     * Returns <code>true</code> iff <i>level</i> is     * {@link Connection#TRANSACTION_SERIALIZABLE} since      * Axion supports TRANSACTION_SERIALIZABLE transactions     * only.      */    public boolean supportsTransactionIsolationLevel(int level) throws SQLException {        switch(level) {            case Connection.TRANSACTION_SERIALIZABLE:                return true;            case Connection.TRANSACTION_NONE:            case Connection.TRANSACTION_READ_COMMITTED:            case Connection.TRANSACTION_READ_UNCOMMITTED:            case Connection.TRANSACTION_REPEATABLE_READ:                return false;            default:                return false;        }    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsConvert() throws SQLException {        return false; // though this would be easy to add    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsConvert(int fromType, int toType) throws SQLException {        return false;    }    /** Returns <code>false</code> as this feature is currently not supported. */    public boolean supportsUnionAll() throws SQLException {        return false;    }    /** Returns <code>true</code> as Axion supports table aliasing. */    public boolean supportsTableCorrelationNames() throws SQLException {        return true;    }    /** Returns <code>true</code> as Axion supports table aliasing. */    public boolean supportsDifferentTableCorrelationNames() throws SQLException {        return true;    }    /** Returns <code>true</code>. */    public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {        return true;    }    /**      * Returns <code>true</code> as Axion supports the      * <a href="http://msdn.microsoft.com/library/en-us/odbc/htm/odbcsql_minimum_grammar.asp">"ODBC Minimum SQL Grammar"</a>.     * Namely:     * <pre>     * CREATE TABLE base-table-name (column-identifier data-type [,column-identifier data-type]*)     * DELETE FROM table-name [WHERE search-condition]     * DROP TABLE base-table-name      * INSERT INTO table-name [( column-identifier [, column-identifier]...)]     *        VALUES (insert-value[, insert-value]... )     * SELECT [ALL | DISTINCT] select-list     *        FROM table-reference-list     *        [WHERE search-condition]     *        [order-by-clause]     * UPDATE table-name SET column-identifier = {expression | NULL }      *        [, column-identifier = {expression | NULL}]*     *        [WHERE search-condition]     * </pre>     */    public boolean supportsMinimumSQLGrammar() throws SQLException {        return true;    }    /** Returns <code>true</code>. */    public boolean nullPlusNonNullIsNull() throws SQLException {        return true;    }    /**      * Supported,      * although the only supported patterns are <code>"%"</code>      * (matching all) or a total match      * (no <code>'%'</code> or <code>'.'</code> wildcards).     */    public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException {        if(_log.isDebugEnabled()) {            _log.debug("getColumns(" + catalog + "," + schemaPattern + "," + tableNamePattern + "," + columnNamePattern + ")");        }        Statement stmt = _connection.createStatement();        String where = "";        {            StringBuffer buf = new StringBuffer();            if(null != catalog) {                buf.append("TABLE_CAT = '").append(catalog).append("'");            }            if(null != schemaPattern && !("%".equals(schemaPattern))) {                if(buf.length() != 0) { buf.append(" AND "); }                buf.append("TABLE_SCHEM = '").append(schemaPattern).append("'"); // XXX FIX ME XXX should be LIKE            }            if(null != tableNamePattern && !("%".equals(tableNamePattern))) {                if(buf.length() != 0) { buf.append(" AND "); }                buf.append("TABLE_NAME = '").append(tableNamePattern).append("'"); // XXX FIX ME XXX should be LIKE            }            if(null != columnNamePattern && !("%".equals(columnNamePattern))) {                if(buf.length() != 0) { buf.append(" AND "); }                buf.append("COLUMN_NAME = '").append(columnNamePattern).append("'"); // XXX FIX ME XXX should be LIKE            }            if(buf.length() > 0) {                where = "WHERE " + buf.toString();            }        }        ResultSet rset = stmt.executeQuery("select TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE from AXION_COLUMNS " + where + " order by TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION");        return rset;    }    /**      * Supported,      * although the only supported patterns are <code>"%"</code>      * (matching all) or a total match      * (no <code>'%'</code> or <code>'.'</code> wildcards).     */    public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException {        if(_log.isDebugEnabled()) {            _log.debug("getTables(" + catalog + "," + schemaPattern + "," + tableNamePattern + "," + types + ")");        }        Statement stmt = _connection.createStatement();        String where = "";        StringBuffer buf = new StringBuffer();        if(null != catalog) {            buf.append("TABLE_CAT = '").append(catalog).append("'");        }        if(null != schemaPattern && !("%".equals(schemaPattern))) {            if(buf.length() != 0) { buf.append(" AND "); }            buf.append("TABLE_SCHEM = '").append(schemaPattern).append("'"); // XXX FIX ME XXX should be LIKE        }        if(null != tableNamePattern && !("%".equals(tableNamePattern))) {            if(buf.length() != 0) { buf.append(" AND "); }            buf.append("TABLE_NAME = '").append(tableNamePattern).append("'"); // XXX FIX ME XXX should be LIKE        }        if(null != types) {            if(buf.length() != 0) { buf.append(" AND "); }            buf.append("(");            for(int i=0;i<types.length;i++) {                if(i != 0) {                    buf.append(" OR ");                }                buf.append("TABLE_TYPE = '").append(types[i]).append("'");             }            buf.append(")");        }        if(buf.length() != 0) {            where = "WHERE " + buf.toString();        }        ResultSet rset = stmt.executeQuery("select TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS from AXION_TABLES " + where + " order by TABLE_TYPE, TABLE_SCHEM, TABLE_NAME");        return rset;    }    /** Supported. */    public ResultSet getSchemas() throws SQLException {        if(_log.isDebugEnabled()) {            _log.debug("getSchemas()");        }        Statement stmt = _connection.createStatement();        ResultSet rset = stmt.executeQuery("select TABLE_SCHEM from AXION_SCHEMATA ORDER BY TABLE_SCHEM");        return rset;    }    /** Supported. */    public ResultSet getCatalogs() throws SQLException {        if(_log.isDebugEnabled()) {            _log.debug("getCatalogs()");        }        Statement stmt = _connection.createStatement();        ResultSet rset = stmt.executeQuery("select TABLE_CAT from AXION_CATALOGS ORDER BY TABLE_CAT");        return rset;    }    /** Supported. */    public ResultSet getTableTypes() throws SQLException {        if(_log.isDebugEnabled()) {            _log.debug("getTableTypes()");        }        Statement stmt = _connection.createStatement();        ResultSet rset = stmt.executeQuery("select TABLE_TYPE from AXION_TABLE_TYPES order by TABLE_TYPE");        return rset;    }    /** Supported. */    public ResultSet getTypeInfo() throws SQLException {        if(_log.isDebugEnabled()) {            _log.debug("getTypeInfo()");        }        Statement stmt = _connection.createStatement();        ResultSet rset = stmt.executeQuery("select TYPE_NAME, DATA_TYPE, PRECISION, LITERAL_PREFIX, LITERAL_SUFFIX, CREATE_PARAMS, NULLABLE, CASE_SENSITIVE, SEARCHABLE, UNSIGNED_ATTRIBUTE, FIXED_PREC_SCALE, AUTO_INCREMENT, LOCAL_TYPE_NAME, MINIMUM_SCALE, MAXIMUM_SCALE, SQL_DATA_TYPE, SQL_DATETIME_SUB, NUM_PREC_RADIX from AXION_TYPES order by DATA_TYPE");        return rset;    }    /** Returns <code>false</code> as this feature is currently unsupported. */    public boolean supportsMultipleResultSets() throws SQLException {        return false;    }        /** Returns <code>true</code>, Axion supports multiple transactions. */    public boolean supportsMultipleTransactions() throws SQLException {        return true;    }    /** Returns <code>true</code>, Axion supports NOT NULL constraints. */    public boolean supportsNonNullableColumns() throws SQLException {        return true;    }    /**      * Returns <code>true</code>.      */    public boolean supportsDataManipulationTransactionsOnly() throws SQLException {        return true;    }        /**      * Returns <code>false</code>. Closing a transaction     * will close any open ResultSets.      */    public boolean supportsOpenCursorsAcrossCommit() throws SQLException {        return false;    }    /**      * Returns <code>false</code>. Closing a transaction     * will close any open ResultSets.      */    public boolean supportsOpenCursorsAcrossRollback() throws SQLException {        return false;    }    /**      * Returns <code>true</code>. Statements remain valid      * accross a transaction boundary.     */    public boolean supportsOpenStatementsAcrossCommit() throws SQLException {        return true;    }    /**      * Returns <code>true</code>. Statements remain valid      * accross a transaction boundary.     */    public boolean supportsOpenStatementsAcrossRollback() throws SQLException {        return true;    }    /**      * Returns <code>false</code>, since Axion currently     * doesn't treat Data Definition Language (DDL) statements      * like CREATE or DROP transactionally.      */    public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {        return false;    }    /**      * Returns <code>false</code>, since Axion currently     * doesn't treat Data Definition Language (DDL) statements      * like CREATE or DROP transactionally.      */    public boolean dataDefinitionCausesTransactionCommit() throws SQLException {

⌨️ 快捷键说明

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