use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWhere in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangWhere whereClause) {
ExpressionNode expressionNode = whereClause.getExpression();
((BLangExpression) expressionNode).accept(this);
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWhere in project ballerina by ballerina-lang.
the class SiddhiQueryBuilder method visit.
@Override
public void visit(BLangStreamingInput streamingInput) {
streamingInputClause = new StringBuilder();
streamingInputClause.append(((BLangSimpleVarRef) streamingInput.getStreamReference()).getVariableName().value);
WhereNode beforeWhereNode = streamingInput.getBeforeStreamingCondition();
WhereNode afterWhereNode = streamingInput.getAfterStreamingCondition();
WindowClauseNode windowClauseNode = streamingInput.getWindowClause();
if (beforeWhereNode != null) {
((BLangWhere) beforeWhereNode).accept(this);
streamingInputClause.append(" ").append(whereClause);
}
if (windowClauseNode != null) {
((BLangWindow) windowClauseNode).accept(this);
streamingInputClause.append(" ").append(windowClause);
}
if (afterWhereNode != null) {
((BLangWhere) afterWhereNode).accept(this);
streamingInputClause.append(" ").append(whereClause);
}
if (streamingInput.getAlias() != null) {
streamingInputClause.append(" as ").append(streamingInput.getAlias()).append(" ");
}
BLangExpression streamReference = (BLangExpression) streamingInput.getStreamReference();
if (streamReference != null) {
streamReference.accept(this);
streamIds.add(varRef);
varRef = "";
addInRefs(streamReference);
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWhere in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangStreamingInput streamingInput) {
BLangExpression streamRef = (BLangExpression) streamingInput.getStreamReference();
typeChecker.checkExpr(streamRef, env);
WhereNode beforeWhereNode = streamingInput.getBeforeStreamingCondition();
if (beforeWhereNode != null) {
((BLangWhere) beforeWhereNode).accept(this);
}
WindowClauseNode windowClauseNode = streamingInput.getWindowClause();
if (windowClauseNode != null) {
((BLangWindow) windowClauseNode).accept(this);
}
WhereNode afterWhereNode = streamingInput.getAfterStreamingCondition();
if (afterWhereNode != null) {
((BLangWhere) afterWhereNode).accept(this);
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWhere in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
@Override
public void visit(BLangPatternStreamingEdgeInput patternStreamingEdgeInput) {
BLangVariableReference streamRef = (BLangVariableReference) patternStreamingEdgeInput.getStreamReference();
typeChecker.checkExpr(streamRef, env);
BLangWhere where = (BLangWhere) patternStreamingEdgeInput.getWhereClause();
if (where != null) {
where.accept(this);
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangWhere in project ballerina by ballerina-lang.
the class SiddhiQueryBuilder method visit.
@Override
public void visit(BLangWhere where) {
whereClause = new StringBuilder();
whereClause.append("[");
BLangBinaryExpr expr = (BLangBinaryExpr) where.getExpression();
expr.accept(this);
whereClause.append(binaryExpr);
whereClause.append("]");
}
Aggregations