Examples of FunctionEvaluator


Examples of com.googlecode.gql4j.GqlQuery.FunctionEvaluator

    assertEquals(NullEvaluator.get(), parser("Null").value().r);
    assertEquals(new StringEvaluator("'abc'"), parser("'abc'").value().r);
    assertEquals(new BooleanEvaluator("true"), parser("true").value().r);
    assertEquals(new ParamEvaluator("abc"), parser(":abc").value().r);
    assertEquals(
        new FunctionEvaluator("key",
            ImmutableList.<Evaluator>of(new StringEvaluator("'abc'"))),
        parser("key('abc')").value().r);
   
    assertEquals(new DecimalEvaluator("1"), parser("1").value().r);
  }
View Full Code Here

Examples of com.googlecode.gql4j.GqlQuery.FunctionEvaluator

  }
 
  @Test
  public void testCondition_2() throws RecognitionException {
    Condition expected = new Condition("d", FilterOperator.EQUAL,
        new FunctionEvaluator("datetime", new StringEvaluator("'2000-2-2 3:4:5'")));   

    Condition actual = parser("d = datetime('2000-2-2 3:4:5') ").condition().r;
   
    assertEquals(expected, actual);
  }
View Full Code Here

Examples of com.googlecode.gql4j.GqlQuery.FunctionEvaluator

  @Test
  public void testParseWhere_6() {
    ParseResult actual = GqlQuery.parse("SELECT * from a WHERE ANCESTOR IS KEY('Person', 'Amy')");
    ParseResult expected = new ParseResult().setSelect(new Select(false)).setFrom(new From("a")).setWhere(
        new Where().withAncestor(
            new FunctionEvaluator("key", new StringEvaluator("'Person'"), new StringEvaluator("'Amy'"))));
    assertEquals(expected, actual);
  }
View Full Code Here

Examples of org.yaac.server.egql.evaluator.FunctionEvaluator

    String inputStr = "insert values (__key__=key('kind_a', 'b') )";
   
    InsertStatement actual = TestUtil.parser(inputStr).insert_statement().stmt;
   
    InsertStatement expected = new InsertStatement().withItem(new InsertItem("__key__",
        new FunctionEvaluator("key").add(new StringEvaluator("'kind_a'")).add(new StringEvaluator("'b'")),
        true));
   
    Assert.assertEquals(expected, actual);
  }
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.