Examples of accept()


Examples of com.alibaba.druid.sql.ast.statement.SQLDropViewStatement.accept()

        print(statementList);

        Assert.assertEquals(1, statementList.size());

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
        System.out.println("fields : " + visitor.getColumns());
        System.out.println("coditions : " + visitor.getConditions());
        System.out.println("orderBy : " + visitor.getOrderByColumns());
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLExprTableSource.accept()

        x.getIndexName().accept(this);

        SQLExprTableSource table = x.getTableName();
        if (table != null) {
            print(" ON ");
            table.accept(this);
        }
        return false;
    }

    @Override
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLInsertStatement.accept()

    }

    public String explainToInsertSQL(String sql) {
        SQLInsertStatement query = explainToInsertSQLObject(sql);

        query.accept(this.createMappingVisitor());

        return toSQL(query);
    }

    public List<Object> exportParameters(SQLObject sqlObject) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelect.accept()

    }

    public boolean visit(SQLSelectStatement stmt) {
        SQLSelect select = stmt.getSelect();

        select.accept(this);

        return false;
    }

    public boolean visit(SQLSelectSubqueryQuery x) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock.accept()

    }

    public String explainToSelectSQL(String sql) {
        SQLSelectQueryBlock query = explainToSelectSQLObject(sql);

        query.accept(this.createMappingVisitor());

        return toSQL(query);
    }

    public SQLDeleteStatement explainToDeleteSQLObject(String sql) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement.accept()

        SQLStatement sqlStmt = stmtList.get(0);
        if (sqlStmt instanceof SQLSelectStatement) {
            SQLSelectStatement selectStmt = (SQLSelectStatement) sqlStmt;

            SQLEvalVisitor evalVisitor = SQLEvalVisitorUtils.createEvalVisitor(dbType);
            selectStmt.accept(evalVisitor);

            SQLSelectQueryBlock selectQueryBlock = (SQLSelectQueryBlock) selectStmt.getSelect().getQuery();

            SQLExprTableSource tableSource = (SQLExprTableSource) selectQueryBlock.getFrom();
            String tableName = ((SQLIdentifierExpr) tableSource.getExpr()).getName();
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLTableSource.accept()

            Map<String, String> aliasMap = getAliasMap();
            aliasMap.put(ident, ident);
            aliasMap.put(tableSource.getAlias(), ident);
        } else {
            tableSource.accept(this);
        }

        accept(x.getItems());
        accept(x.getWhere());
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLUpdateStatement.accept()

    }

    public String explainToUpdateSQL(String sql) {
        SQLUpdateStatement query = explainToUpdateSQLObject(sql);

        query.accept(this.createMappingVisitor());

        return toSQL(query);
    }

    public SQLInsertStatement explainToInsertSQLObject(String sql) {
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement.accept()

        print(statementList);

        Assert.assertEquals(1, statementList.size());

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);
       
        Assert.assertEquals("utf8", stmt.getTableOptions().get("CHARSET").toString());

        System.out.println("Tables : " + visitor.getTables());
        System.out.println("fields : " + visitor.getColumns());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.clause.OracleParameter.accept()

            for (int i = 0, size = x.getParameters().size(); i < size; ++i) {
                if (i != 0) {
                    println();
                }
                OracleParameter param = x.getParameters().get(i);
                param.accept(this);
                print(";");
            }

            decrementIndent();
            println();
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.