use of org.ballerinalang.model.tree.clauses.JoinStreamingInput in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangJoinStreamingInput joinStreamingInput) {
StreamingInput streamingInput = joinStreamingInput.getStreamingInput();
if (streamingInput != null) {
((BLangStreamingInput) streamingInput).accept(this);
}
ExpressionNode expressionNode = joinStreamingInput.getOnExpression();
if (expressionNode != null) {
((BLangExpression) expressionNode).accept(this);
}
}
use of org.ballerinalang.model.tree.clauses.JoinStreamingInput in project ballerina by ballerina-lang.
the class Desugar method getJoinTableVarRef.
private BLangSimpleVarRef getJoinTableVarRef(BLangTableQueryExpression tableQueryExpression) {
JoinStreamingInput joinStreamingInput = tableQueryExpression.getTableQuery().getJoinStreamingInput();
BLangSimpleVarRef joinTable = null;
if (joinStreamingInput != null) {
joinTable = (BLangSimpleVarRef) joinStreamingInput.getStreamingInput().getStreamReference();
joinTable = rewrite(joinTable, env);
}
return joinTable;
}
use of org.ballerinalang.model.tree.clauses.JoinStreamingInput in project ballerina by ballerina-lang.
the class SiddhiQueryBuilder method visit.
@Override
public void visit(BLangStreamingQueryStatement streamingQueryStatement) {
siddhiQuery.append("from ");
StreamingInput streamingInput = streamingQueryStatement.getStreamingInput();
if (streamingInput != null) {
((BLangStreamingInput) streamingInput).accept(this);
siddhiQuery.append(" ").append(streamingInputClause);
}
PatternClause patternClause = streamingQueryStatement.getPatternClause();
if (patternClause != null) {
patternStreamingClause = new StringBuilder();
((BLangPatternClause) patternClause).accept(this);
siddhiQuery.append(" ").append(patternStreamingClause);
}
JoinStreamingInput joinStreamingInput = streamingQueryStatement.getJoiningInput();
if (joinStreamingInput != null) {
((BLangJoinStreamingInput) joinStreamingInput).accept(this);
siddhiQuery.append(" ").append(joinStreamingInputClause);
}
SelectClauseNode selectClauseNode = streamingQueryStatement.getSelectClause();
if (selectClauseNode != null) {
((BLangSelectClause) selectClauseNode).accept(this);
siddhiQuery.append(" ").append(selectExprClause);
}
OrderByNode orderByNode = streamingQueryStatement.getOrderbyClause();
if (orderByNode != null) {
((BLangOrderBy) orderByNode).accept(this);
siddhiQuery.append(" ").append(orderByClause);
}
OutputRateLimitNode outputRateLimitNode = streamingQueryStatement.getOutputRateLimitNode();
if (outputRateLimitNode != null) {
((BLangOutputRateLimit) outputRateLimitNode).accept(this);
siddhiQuery.append(" ").append(outputRateLimitClause);
}
BLangStreamAction streamActionNode = (BLangStreamAction) streamingQueryStatement.getStreamingAction();
if (streamActionNode != null) {
streamActionNode.accept(this);
siddhiQuery.append(" ").append(streamActionClause);
siddhiQuery.append(" ; ");
}
}
use of org.ballerinalang.model.tree.clauses.JoinStreamingInput 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);
}
}
use of org.ballerinalang.model.tree.clauses.JoinStreamingInput 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);
}
Aggregations