use of org.ballerinalang.model.tree.clauses.OutputRateLimitNode 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.OutputRateLimitNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method startOutputRateLimitNode.
public void startOutputRateLimitNode(DiagnosticPos pos, Set<Whitespace> ws) {
OutputRateLimitNode outputRateLimit = TreeBuilder.createOutputRateLimitNode();
((BLangOutputRateLimit) outputRateLimit).pos = pos;
outputRateLimit.addWS(ws);
this.outputRateLimitStack.push(outputRateLimit);
}
use of org.ballerinalang.model.tree.clauses.OutputRateLimitNode in project ballerina by ballerina-lang.
the class BLangPackageBuilder method endOutputRateLimitNode.
public void endOutputRateLimitNode(DiagnosticPos pos, Set<Whitespace> ws, boolean isSnapshotOutputRateLimit, boolean isEventBasedOutputRateLimit, boolean isFirst, boolean isLast, boolean isAll, String timeScale, String rateLimitValue) {
OutputRateLimitNode outputRateLimit = this.outputRateLimitStack.peek();
((BLangOutputRateLimit) outputRateLimit).pos = pos;
outputRateLimit.addWS(ws);
outputRateLimit.setSnapshot(isSnapshotOutputRateLimit);
outputRateLimit.setEventBasedRateLimit(isEventBasedOutputRateLimit);
outputRateLimit.setOutputRateType(isFirst, isLast, isAll);
outputRateLimit.setTimeScale(timeScale);
outputRateLimit.setRateLimitValue(rateLimitValue);
}
Aggregations