Search in sources :

Example 6 with BLangJoinStreamingInput

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput in project ballerina by ballerina-lang.

the class TypeChecker method visit.

@Override
public void visit(BLangTableQuery tableQuery) {
    BLangStreamingInput streamingInput = (BLangStreamingInput) tableQuery.getStreamingInput();
    streamingInput.accept(this);
    BLangJoinStreamingInput joinStreamingInput = (BLangJoinStreamingInput) tableQuery.getJoinStreamingInput();
    if (joinStreamingInput != null) {
        joinStreamingInput.accept(this);
    }
}
Also used : BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)

Example 7 with BLangJoinStreamingInput

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput in project ballerina by ballerina-lang.

the class SemanticAnalyzer method visit.

public void visit(BLangStreamingQueryStatement streamingQueryStatement) {
    StreamingInput streamingInput = streamingQueryStatement.getStreamingInput();
    if (streamingInput != null) {
        ((BLangStreamingInput) streamingInput).accept(this);
        JoinStreamingInput joinStreamingInput = streamingQueryStatement.getJoiningInput();
        if (joinStreamingInput != null) {
            ((BLangJoinStreamingInput) joinStreamingInput).accept(this);
        }
    }
    SelectClauseNode selectClauseNode = streamingQueryStatement.getSelectClause();
    if (selectClauseNode != null) {
        ((BLangSelectClause) selectClauseNode).accept(this);
    }
    OrderByNode orderByNode = streamingQueryStatement.getOrderbyClause();
    if (orderByNode != null) {
        ((BLangOrderBy) orderByNode).accept(this);
    }
    StreamActionNode streamActionNode = streamingQueryStatement.getStreamingAction();
    if (streamActionNode != null) {
        ((BLangStreamAction) streamActionNode).accept(this);
    }
    BLangPatternClause patternClause = (BLangPatternClause) streamingQueryStatement.getPatternClause();
    if (patternClause != null) {
        patternClause.accept(this);
    }
}
Also used : JoinStreamingInput(org.ballerinalang.model.tree.clauses.JoinStreamingInput) BLangPatternStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) StreamingInput(org.ballerinalang.model.tree.clauses.StreamingInput) BLangSelectClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectClause) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) StreamActionNode(org.ballerinalang.model.tree.clauses.StreamActionNode) JoinStreamingInput(org.ballerinalang.model.tree.clauses.JoinStreamingInput) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput) OrderByNode(org.ballerinalang.model.tree.clauses.OrderByNode) BLangStreamAction(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamAction) SelectClauseNode(org.ballerinalang.model.tree.clauses.SelectClauseNode) BLangPatternClause(org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternClause) BLangOrderBy(org.wso2.ballerinalang.compiler.tree.clauses.BLangOrderBy) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)

Example 8 with BLangJoinStreamingInput

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput in project ballerina by ballerina-lang.

the class BLangPackageBuilder method endJoinStreamingInputNode.

public void endJoinStreamingInputNode(DiagnosticPos pos, Set<Whitespace> ws, boolean isUnidirectionalBeforeJoin, boolean isUnidirectionalAfterJoin, String joinType) {
    JoinStreamingInput joinStreamingInput = this.joinStreamingInputsStack.peek();
    ((BLangJoinStreamingInput) joinStreamingInput).pos = pos;
    joinStreamingInput.addWS(ws);
    joinStreamingInput.setStreamingInput(this.streamingInputStack.pop());
    joinStreamingInput.setOnExpression(this.exprNodeStack.pop());
    joinStreamingInput.setUnidirectionalBeforeJoin(isUnidirectionalBeforeJoin);
    joinStreamingInput.setUnidirectionalAfterJoin(isUnidirectionalAfterJoin);
    joinStreamingInput.setJoinType(joinType);
}
Also used : JoinStreamingInput(org.ballerinalang.model.tree.clauses.JoinStreamingInput) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput)

Example 9 with BLangJoinStreamingInput

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput in project ballerina by ballerina-lang.

the class BLangPackageBuilder method startJoinStreamingInputNode.

public void startJoinStreamingInputNode(DiagnosticPos pos, Set<Whitespace> ws) {
    JoinStreamingInput joinStreamingInput = TreeBuilder.createJoinStreamingInputNode();
    ((BLangJoinStreamingInput) joinStreamingInput).pos = pos;
    joinStreamingInput.addWS(ws);
    this.joinStreamingInputsStack.push(joinStreamingInput);
}
Also used : JoinStreamingInput(org.ballerinalang.model.tree.clauses.JoinStreamingInput) BLangJoinStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput)

Example 10 with BLangJoinStreamingInput

use of org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput in project ballerina by ballerina-lang.

the class SqlQueryBuilder method visit.

@Override
public void visit(BLangJoinStreamingInput joinStreamingInput) {
    BLangBinaryExpr expr = (BLangBinaryExpr) joinStreamingInput.getOnExpression();
    BLangStreamingInput streamingInput = (BLangStreamingInput) joinStreamingInput.getStreamingInput();
    joinStreamingInputClause = new StringBuilder();
    streamingInput.accept(this);
    joinStreamingInputClause.append("join ").append(streamingInputClause).append(" on ");
    addParametrizedSQL(expr, joinStreamingInputClause, joinOnExprParams);
}
Also used : BLangBinaryExpr(org.wso2.ballerinalang.compiler.tree.expressions.BLangBinaryExpr) BLangStreamingInput(org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)

Aggregations

BLangStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamingInput)8 BLangJoinStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangJoinStreamingInput)7 JoinStreamingInput (org.ballerinalang.model.tree.clauses.JoinStreamingInput)5 StreamingInput (org.ballerinalang.model.tree.clauses.StreamingInput)3 BLangOrderBy (org.wso2.ballerinalang.compiler.tree.clauses.BLangOrderBy)3 BLangPatternStreamingInput (org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternStreamingInput)3 BLangSelectClause (org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectClause)3 OrderByNode (org.ballerinalang.model.tree.clauses.OrderByNode)2 SelectClauseNode (org.ballerinalang.model.tree.clauses.SelectClauseNode)2 BLangPatternClause (org.wso2.ballerinalang.compiler.tree.clauses.BLangPatternClause)2 BLangStreamAction (org.wso2.ballerinalang.compiler.tree.clauses.BLangStreamAction)2 BLangBinaryExpr (org.wso2.ballerinalang.compiler.tree.expressions.BLangBinaryExpr)2 OutputRateLimitNode (org.ballerinalang.model.tree.clauses.OutputRateLimitNode)1 PatternClause (org.ballerinalang.model.tree.clauses.PatternClause)1 SelectExpressionNode (org.ballerinalang.model.tree.clauses.SelectExpressionNode)1 StreamActionNode (org.ballerinalang.model.tree.clauses.StreamActionNode)1 ExpressionNode (org.ballerinalang.model.tree.expressions.ExpressionNode)1 BLangOutputRateLimit (org.wso2.ballerinalang.compiler.tree.clauses.BLangOutputRateLimit)1 BLangExpression (org.wso2.ballerinalang.compiler.tree.expressions.BLangExpression)1