Examples of SQLVisitor


Examples of liquibase.sql.visitor.SqlVisitor

            }


            List<ParsedNode> potentialVisitors = child.getChildren();
            for (ParsedNode node : potentialVisitors) {
                SqlVisitor sqlVisitor = SqlVisitorFactory.getInstance().create(node.getName());
                if (sqlVisitor != null) {
                    sqlVisitor.setApplyToRollback(applyToRollback);
                    if (dbms.size() > 0) {
                        sqlVisitor.setApplicableDbms(dbms);
                    }
                    sqlVisitor.setContexts(context);
                    sqlVisitor.setLabels(labels);
                    sqlVisitor.load(node, resourceAccessor);

                    addSqlVisitor(sqlVisitor);
                }
            }
View Full Code Here

Examples of sql.visitors.jsql.SQLVisitor

   
    private static final String CONF_PATH = "../test/squall/local/";
    private NameCompGen createCG(String parserConfPath) {
        ParserMain pm = new ParserMain();
        Map map = pm.createConfig(parserConfPath);
        SQLVisitor pq = ParserUtil.parseQuery(map);
       
        NameCompGenFactory factory = new NameCompGenFactory(map, pq.getTan(), 20);
        return factory.create();
    }       
View Full Code Here

Examples of sql.visitors.jsql.SQLVisitor

    }

    if (statement instanceof Select) {
      final Select selectStatement = (Select) statement;
      final String queryName = SystemParameters.getString(map, "DIP_QUERY_NAME");
      final SQLVisitor parsedQuery = new SQLVisitor(queryName);

      // visit whole SELECT statement
      parsedQuery.visit(selectStatement);
      parsedQuery.doneVisiting();

      return parsedQuery;
    }
    throw new RuntimeException("Please provide SELECT statement!");
  }
View Full Code Here

Examples of sql.visitors.jsql.SQLVisitor

   * This is done on fake ComponentGenerator, so there is no computeSourcePar
   * parallelism on source components is input variable This method is
   * idempotent, no side effects, can be called multiple times.
   */
  public Map<String, Integer> computeSourcePar(int totalSourcePar) {
    final SQLVisitor pq = ParserUtil.parseQuery(_map);
    final List<Table> tableList = pq.getTableList();
    if (totalSourcePar < tableList.size())
      throw new RuntimeException(
          "There is not enought nodes such that all the sources get at least parallelism = 1");
    /*
     * We need a way to generate parallelism for all the DataSources This
View Full Code Here

Examples of sql.visitors.jsql.SQLVisitor

       
        //create object
        String parserConfPath = "../test/squall/unit_tests/confs/0_1G_tpch7_ncl";
        ParserMain pm = new ParserMain();
        Map map = pm.createConfig(parserConfPath);
        SQLVisitor parsedQuery = ParserUtil.parseQuery(map);
        ProjGlobalCollect instance = new ProjGlobalCollect(parsedQuery.getSelectItems(), parsedQuery.getWhereExpr());
        instance.process();
       
        //getting results
        List<Expression> listExpr = instance.getExprList();
        List<OrExpression> orListExpr = instance.getOrExprs();
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.