Package com.googlecode.gql4j.GqlQuery

Examples of com.googlecode.gql4j.GqlQuery.OrderBy


 
  @Test
  public void testOrderBy_1() {
    ParseResult actual = GqlQuery.parse("SELECT * from a order by a desc");
    ParseResult expected = new ParseResult().setSelect(new Select(false)).setFrom(new From("a")).setOrderBy(
        new OrderBy().withItem(new OrderByItem("a").setDirection(false)));
    assertEquals(expected, actual);
  }
View Full Code Here


 
  @Test
  public void testOrderBy_2() {
    ParseResult actual = GqlQuery.parse("SELECT * from a order by a desc, b, c asc");
    ParseResult expected = new ParseResult().setSelect(new Select(false)).setFrom(new From("a")).setOrderBy(
        new OrderBy().withItem(new OrderByItem("a").setDirection(false))
        .withItem(new OrderByItem("b").setDirection(true))
        .withItem(new OrderByItem("c").setDirection(true)));
    assertEquals(expected, actual);
  }
View Full Code Here

TOP

Related Classes of com.googlecode.gql4j.GqlQuery.OrderBy

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.