Package tosa.loader.parser.tree

Examples of tosa.loader.parser.tree.SelectStatement.firstToken()


  @Test public void bootstrapSelectTest() {
    QueryParser parser = new QueryParser(Token.tokenize("SELECT * FROM foo WHERE foo.bar = 10"), makeSampleDBData());
    SelectStatement select = parser.parseTopLevelSelect();
    assertNotNull(select);
    assertNotNull(select.firstToken().toString());
    String sql = select.toSQL();
    System.out.println(sql);
    assertNotNull(sql);
  }

View Full Code Here


    QueryParser parser = new QueryParser(Token.tokenize("SELECT * \n" +
                                                 "FROM foo \n" +
                                                 "WHERE foo.bar = :val"), makeSampleDBData());
    SelectStatement select = parser.parseTopLevelSelect();
    assertNotNull(select);
    assertNotNull(select.firstToken().toString());
    String sql = select.toSQL();
    System.out.println(sql);
    assertNotNull(sql);
    List<VariableExpression> vars = select.findDescendents(VariableExpression.class);
    VariableExpression var = vars.get(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.