Package org.teiid.query.sql.symbol

Examples of org.teiid.query.sql.symbol.AllSymbol


    helpTest(query, "SELECT * FROM m.g WHERE e1 = 5 GROUP BY e1 ORDER BY e1");         //$NON-NLS-1$
  }

  public void testQuery6() {
    Select select = new Select();
    select.addSymbol(new AllSymbol());
    From from = new From();
    from.addGroup(new GroupSymbol("m.g")); //$NON-NLS-1$
    CompareCriteria cc = new CompareCriteria(new ElementSymbol("e1"), CompareCriteria.EQ, new Constant(new Integer(5))); //$NON-NLS-1$
    GroupBy groupBy = new GroupBy();
    groupBy.addSymbol(new ElementSymbol("e1")); //$NON-NLS-1$
View Full Code Here


    helpTest(query, "SELECT * FROM m.g WHERE e1 = 5 GROUP BY e1 HAVING e1 > 0");         //$NON-NLS-1$
  }

  public void testQuery7() {
    Select select = new Select();
    select.addSymbol(new AllSymbol());
    From from = new From();
    from.addGroup(new GroupSymbol("m.g")); //$NON-NLS-1$
    CompareCriteria cc = new CompareCriteria(new ElementSymbol("e1"), CompareCriteria.EQ, new Constant(new Integer(5))); //$NON-NLS-1$
    GroupBy groupBy = new GroupBy();
    groupBy.addSymbol(new ElementSymbol("e1")); //$NON-NLS-1$
View Full Code Here

      AliasSymbol as = new AliasSymbol("select", new ElementSymbol("y")); //$NON-NLS-1$ //$NON-NLS-2$
      helpTest(as, "y AS \"select\""); //$NON-NLS-1$
  }

  public void testAllSymbol() {
    helpTest(new AllSymbol(), "*");     //$NON-NLS-1$
  }
View Full Code Here

        helpTest(sq, expected);       
    }

    public void testLimit() {
        Query query = new Query();
        Select select = new Select(Arrays.asList(new Object[] {new AllSymbol()}));
        From from = new From(Arrays.asList(new UnaryFromClause(new GroupSymbol("a")))); //$NON-NLS-1$
        query.setSelect(select);
        query.setFrom(from);
        query.setLimit(new Limit(null, new Constant(new Integer(100))));
        helpTest(query, "SELECT * FROM a LIMIT 100"); //$NON-NLS-1$
View Full Code Here

        helpTest(query, "SELECT * FROM a LIMIT 100"); //$NON-NLS-1$
    }
   
    public void testLimitWithOffset() {
        Query query = new Query();
        Select select = new Select(Arrays.asList(new Object[] {new AllSymbol()}));
        From from = new From(Arrays.asList(new UnaryFromClause(new GroupSymbol("a")))); //$NON-NLS-1$
        query.setSelect(select);
        query.setFrom(from);
        query.setLimit(new Limit(new Constant(new Integer(50)), new Constant(new Integer(100))));
        helpTest(query, "SELECT * FROM a LIMIT 50, 100"); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.symbol.AllSymbol

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.