Package org.yaac.server.egql.evaluator

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


  public void test1() throws RecognitionException {
    String inputStr = "insert into kind_a values ( prop_1 = 'a' )";
   
    InsertStatement actual = TestUtil.parser(inputStr).insert_statement().stmt;
   
    InsertStatement expected = new InsertStatement().withKind("kind_a").withItem(new InsertItem("prop_1", new StringEvaluator("'a'"), true));
   
    Assert.assertEquals(expected, actual);
  }
View Full Code Here


    String inputStr = "insert into kind_a values (prop_1 = 'a', prop_2 = 10)";
   
    InsertStatement actual = TestUtil.parser(inputStr).insert_statement().stmt;
   
    InsertStatement expected = new InsertStatement().withKind("kind_a").withItem(
        new InsertItem("prop_1", new StringEvaluator("'a'"), true)
        ).withItem(new InsertItem("prop_2", new DecimalEvaluator("10"), true));
   
    Assert.assertEquals(expected, actual);
  }
View Full Code Here

    String inputStr = "insert into kind_a values (prop_1 = 'a', prop_2 = 10 (indexed=false))";
   
    InsertStatement actual = TestUtil.parser(inputStr).insert_statement().stmt;
   
    InsertStatement expected = new InsertStatement().withKind("kind_a").withItem(
        new InsertItem("prop_1", new StringEvaluator("'a'"), true)
        ).withItem(new InsertItem("prop_2", new DecimalEvaluator("10"), false));
   
    Assert.assertEquals(expected, actual);
  }
View Full Code Here

    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

Related Classes of org.yaac.server.egql.evaluator.StringEvaluator

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.