Search in sources :

Example 1 with Store

use of org.ballerinalang.siddhi.query.api.execution.query.input.store.Store in project ballerina by ballerina-lang.

the class SiddhiQLBaseVisitorImpl method visitStore_input.

@Override
public Object visitStore_input(SiddhiQLParser.Store_inputContext ctx) {
    String sourceId = (String) visit(ctx.source_id());
    String alias = null;
    if (ctx.alias() != null) {
        alias = (String) visit(ctx.source_id());
    }
    Store store = InputStore.store(alias, sourceId);
    Expression expression = null;
    if (ctx.expression() != null) {
        expression = (Expression) visit(ctx.expression());
    }
    populateQueryContext(store, ctx);
    if (ctx.per() != null) {
        return store.on(expression, (Within) visit(ctx.within_time_range()), (Expression) visit(ctx.per()));
    } else if (expression != null) {
        return store.on(expression);
    } else {
        return store;
    }
}
Also used : Expression(org.ballerinalang.siddhi.query.api.expression.Expression) Store(org.ballerinalang.siddhi.query.api.execution.query.input.store.Store) InputStore(org.ballerinalang.siddhi.query.api.execution.query.input.store.InputStore)

Aggregations

InputStore (org.ballerinalang.siddhi.query.api.execution.query.input.store.InputStore)1 Store (org.ballerinalang.siddhi.query.api.execution.query.input.store.Store)1 Expression (org.ballerinalang.siddhi.query.api.expression.Expression)1