use of io.siddhi.query.api.execution.query.StoreQuery in project siddhi by wso2.
the class QueryStoreTestCase method test2.
@Test
public void test2() {
OnDemandQuery query = SiddhiCompiler.parseOnDemandQuery("" + "from StockTable " + "select symbol, price " + "group by symbol " + "having (7 > price) ;");
AssertJUnit.assertNotNull(query);
StoreQuery api = StoreQuery.query().from(InputStore.store("StockTable")).select(Selector.selector().select("symbol", Expression.variable("symbol")).select(Expression.variable("price")).groupBy(Expression.variable("symbol")).having(Expression.compare(Expression.value(7), Compare.Operator.GREATER_THAN, Expression.variable("price"))));
AssertJUnit.assertEquals(api, query);
}
Aggregations