Package com.alibaba.druid.sql.visitor

Examples of com.alibaba.druid.sql.visitor.SchemaStatVisitor$OrderByStatVisitor


        if (JdbcUtils.H2.equals(dbType)) {
            return new MySqlSchemaStatVisitor();
        }

        return new SchemaStatVisitor();
    }
View Full Code Here


        if (JdbcUtils.JTDS.equals(dbType)) {
            return new SQLServerSchemaStatVisitor();
        }

        return new SchemaStatVisitor();
    }
View Full Code Here

        if (JdbcUtils.DB2.equals(dbType)) {
            return new DB2SchemaStatVisitor();
        }

        return new SchemaStatVisitor();
    }
View Full Code Here

        List<SQLStatement> statementList = SQLUtils.parseStatements(sqlStat.getSql(), sqlStat.getDbType());
        if (!statementList.isEmpty()) {
            content.append("<h2>Parse View:</h2>");

            SQLStatement statemen = statementList.get(0);
            SchemaStatVisitor visitor = SQLUtils.createSchemaStatVisitor(statementList, sqlStat.getDbType());
            statemen.accept(visitor);
            content.append("<table cellpadding='5' cellspacing='1' width='99%'>");
            content.append("<tr>");
            content.append("<td class='td_lable' width='130'>Tables</td>");
            content.append("<td>" + visitor.getTables() + "</td>");
            content.append("</tr>");

            content.append("<tr>");
            content.append("<td class='td_lable'>Fields</td>");
            content.append("<td>" + visitor.getColumns() + "</td>");
            content.append("</tr>");
            content.append("<tr>");
            content.append("<td class='td_lable'>Coditions</td>");
            content.append("<td>" + visitor.getConditions() + "</td>");
            content.append("</tr>");

            content.append("<tr>");
            content.append("<td class='td_lable'>Relationships</td>");
            content.append("<td>" + visitor.getRelationships() + "</td>");
            content.append("</tr>");

            content.append("<tr>");
            content.append("<td class='td_lable'>OrderByColumns</td>");
            content.append("<td>" + visitor.getOrderByColumns() + "</td>");
            content.append("</tr>");

            content.append("</table>");

            content.append("<br />");
View Full Code Here

        if (JdbcUtils.H2.equals(dbType)) {
            return new MySqlSchemaStatVisitor();
        }

        return new SchemaStatVisitor();
    }
View Full Code Here

        map.put("formattedSql", SQLUtils.format(sql, dbType));
        List<SQLStatement> statementList = SQLUtils.parseStatements(sql, dbType);

        if (!statementList.isEmpty()) {
            SQLStatement statemen = statementList.get(0);
            SchemaStatVisitor visitor = SQLUtils.createSchemaStatVisitor(statementList, dbType);
            statemen.accept(visitor);
            map.put("parsedTable", visitor.getTables().toString());
            map.put("parsedFields", visitor.getColumns().toString());
            map.put("parsedConditions", visitor.getConditions().toString());
            map.put("parsedRelationships", visitor.getRelationships().toString());
            map.put("parsedOrderbycolumns", visitor.getOrderByColumns().toString());
        }

        DateFormat format = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss:SSS");
        Date maxTimespanOccurTime = (Date) map.get("MaxTimespanOccurTime");
        if (maxTimespanOccurTime != null) {
View Full Code Here

        if (JdbcUtils.DB2.equals(dbType)) {
            return new DB2SchemaStatVisitor();
        }

        return new SchemaStatVisitor();
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.visitor.SchemaStatVisitor$OrderByStatVisitor

Copyright © 2018 www.massapicom. 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.