Package org.h2.tools

Examples of org.h2.tools.SimpleResultSet.addColumn()


        } else if (isBuiltIn(sql, "@version_columns")) {
            String[] p = split(sql);
            return meta.getVersionColumns(p[1], p[2], p[3]);
        } else if (isBuiltIn(sql, "@memory")) {
            SimpleResultSet rs = new SimpleResultSet();
            rs.addColumn("Type", Types.VARCHAR, 0, 0);
            rs.addColumn("KB", Types.VARCHAR, 0, 0);
            rs.addRow("Used Memory", "" + Utils.getMemoryUsed());
            rs.addRow("Free Memory", "" + Utils.getMemoryFree());
            return rs;
        } else if (isBuiltIn(sql, "@info")) {
View Full Code Here


            String[] p = split(sql);
            return meta.getVersionColumns(p[1], p[2], p[3]);
        } else if (isBuiltIn(sql, "@memory")) {
            SimpleResultSet rs = new SimpleResultSet();
            rs.addColumn("Type", Types.VARCHAR, 0, 0);
            rs.addColumn("KB", Types.VARCHAR, 0, 0);
            rs.addRow("Used Memory", "" + Utils.getMemoryUsed());
            rs.addRow("Free Memory", "" + Utils.getMemoryFree());
            return rs;
        } else if (isBuiltIn(sql, "@info")) {
            SimpleResultSet rs = new SimpleResultSet();
View Full Code Here

            rs.addRow("Used Memory", "" + Utils.getMemoryUsed());
            rs.addRow("Free Memory", "" + Utils.getMemoryFree());
            return rs;
        } else if (isBuiltIn(sql, "@info")) {
            SimpleResultSet rs = new SimpleResultSet();
            rs.addColumn("KEY", Types.VARCHAR, 0, 0);
            rs.addColumn("VALUE", Types.VARCHAR, 0, 0);
            rs.addRow("conn.getCatalog", conn.getCatalog());
            rs.addRow("conn.getAutoCommit", "" + conn.getAutoCommit());
            rs.addRow("conn.getTransactionIsolation", "" + conn.getTransactionIsolation());
            rs.addRow("conn.getWarnings", "" + conn.getWarnings());
View Full Code Here

            rs.addRow("Free Memory", "" + Utils.getMemoryFree());
            return rs;
        } else if (isBuiltIn(sql, "@info")) {
            SimpleResultSet rs = new SimpleResultSet();
            rs.addColumn("KEY", Types.VARCHAR, 0, 0);
            rs.addColumn("VALUE", Types.VARCHAR, 0, 0);
            rs.addRow("conn.getCatalog", conn.getCatalog());
            rs.addRow("conn.getAutoCommit", "" + conn.getAutoCommit());
            rs.addRow("conn.getTransactionIsolation", "" + conn.getTransactionIsolation());
            rs.addRow("conn.getWarnings", "" + conn.getWarnings());
            String map;
View Full Code Here

            return meta.getSuperTypes(p[1], p[2], p[3]);
        } else if (isBuiltIn(sql, "@prof_stop")) {
            if (profiler != null) {
                profiler.stopCollecting();
                SimpleResultSet rs = new SimpleResultSet();
                rs.addColumn("Top Stack Trace(s)", Types.VARCHAR, 0, 0);
                rs.addRow(profiler.getTop(3));
                profiler = null;
                return rs;
            }
        }
View Full Code Here

        } else {
            buff.append("<table cellspacing=0 cellpadding=0>");
        }
        if (metadata) {
            SimpleResultSet r = new SimpleResultSet();
            r.addColumn("#", Types.INTEGER, 0, 0);
            r.addColumn("label", Types.VARCHAR, 0, 0);
            r.addColumn("catalog", Types.VARCHAR, 0, 0);
            r.addColumn("schema", Types.VARCHAR, 0, 0);
            r.addColumn("table", Types.VARCHAR, 0, 0);
            r.addColumn("column", Types.VARCHAR, 0, 0);
View Full Code Here

            buff.append("<table cellspacing=0 cellpadding=0>");
        }
        if (metadata) {
            SimpleResultSet r = new SimpleResultSet();
            r.addColumn("#", Types.INTEGER, 0, 0);
            r.addColumn("label", Types.VARCHAR, 0, 0);
            r.addColumn("catalog", Types.VARCHAR, 0, 0);
            r.addColumn("schema", Types.VARCHAR, 0, 0);
            r.addColumn("table", Types.VARCHAR, 0, 0);
            r.addColumn("column", Types.VARCHAR, 0, 0);
            r.addColumn("type", Types.INTEGER, 0, 0);
View Full Code Here

        }
        if (metadata) {
            SimpleResultSet r = new SimpleResultSet();
            r.addColumn("#", Types.INTEGER, 0, 0);
            r.addColumn("label", Types.VARCHAR, 0, 0);
            r.addColumn("catalog", Types.VARCHAR, 0, 0);
            r.addColumn("schema", Types.VARCHAR, 0, 0);
            r.addColumn("table", Types.VARCHAR, 0, 0);
            r.addColumn("column", Types.VARCHAR, 0, 0);
            r.addColumn("type", Types.INTEGER, 0, 0);
            r.addColumn("typeName", Types.VARCHAR, 0, 0);
View Full Code Here

        }
        case Value.RESULT_SET: {
            SimpleResultSet rs = new SimpleResultSet();
            int columns = readInt();
            for (int i = 0; i < columns; i++) {
                rs.addColumn(readString(), readInt(), readInt(), readInt());
            }
            while (true) {
                if (!readBoolean()) {
                    break;
                }
View Full Code Here

     * @return the empty result set
     */
    protected static SimpleResultSet createResultSet(boolean data) {
        SimpleResultSet result = new SimpleResultSet();
        if (data) {
            result.addColumn(FullText.FIELD_SCHEMA, Types.VARCHAR, 0, 0);
            result.addColumn(FullText.FIELD_TABLE, Types.VARCHAR, 0, 0);
            result.addColumn(FullText.FIELD_COLUMNS, Types.ARRAY, 0, 0);
            result.addColumn(FullText.FIELD_KEYS, Types.ARRAY, 0, 0);
        } else {
            result.addColumn(FullText.FIELD_QUERY, Types.VARCHAR, 0, 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.