use of org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression in project ballerina by ballerina-lang.
the class TypeChecker method visit.
@Override
public void visit(BLangSelectExpression selectExpression) {
BLangExpression expr = (BLangExpression) selectExpression.getExpression();
expr.accept(this);
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangSelectClause selectClause) {
GroupByNode groupByNode = selectClause.getGroupBy();
if (groupByNode != null) {
((BLangGroupBy) groupByNode).accept(this);
}
HavingNode havingNode = selectClause.getHaving();
if (havingNode != null) {
((BLangHaving) havingNode).accept(this);
}
List<? extends SelectExpressionNode> selectExpressionsList = selectClause.getSelectExpressions();
if (selectExpressionsList != null) {
for (SelectExpressionNode selectExpressionNode : selectExpressionsList) {
((BLangSelectExpression) selectExpressionNode).accept(this);
}
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression in project ballerina by ballerina-lang.
the class SemanticAnalyzer method visit.
public void visit(BLangSelectExpression selectExpression) {
ExpressionNode expressionNode = selectExpression.getExpression();
((BLangExpression) expressionNode).accept(this);
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression in project ballerina by ballerina-lang.
the class SiddhiQueryBuilder method createSiddhiSelectExpressionClause.
private void createSiddhiSelectExpressionClause(BLangSelectClause select) {
List<? extends SelectExpressionNode> selectExprList = select.getSelectExpressions();
selectExprClause = new StringBuilder();
selectExprClause.append("select ");
if (selectExprList != null && !selectExprList.isEmpty()) {
Iterator<? extends SelectExpressionNode> iterator = selectExprList.iterator();
BLangSelectExpression selectExpression = (BLangSelectExpression) iterator.next();
selectExpression.accept(this);
selectExprClause.append(selectExpr);
while (iterator.hasNext()) {
selectExpression = (BLangSelectExpression) iterator.next();
selectExprClause.append(", ");
selectExpression.accept(this);
selectExprClause.append(selectExpr);
}
} else if (select.isSelectAll()) {
selectExprClause.append("* ");
}
}
use of org.wso2.ballerinalang.compiler.tree.clauses.BLangSelectExpression in project ballerina by ballerina-lang.
the class SiddhiQueryBuilder method visit.
@Override
public void visit(BLangSelectExpression selectExpression) {
BLangExpression expr = (BLangExpression) selectExpression.getExpression();
selectExpr = new StringBuilder();
addVarRefToClauseBuilder(expr, selectExpr);
String identifier = selectExpression.getIdentifier();
if (identifier != null) {
selectExpr.append(" as ").append(identifier);
}
}
Aggregations