use of org.apache.jackrabbit.oak.query.ast.JoinType in project jackrabbit-oak by apache.
the class SQL2Parser method parseSource.
private SourceImpl parseSource() throws ParseException {
SelectorImpl selector = parseSelector();
selectors.put(selector.getSelectorName(), selector);
SourceImpl source = selector;
while (true) {
JoinType joinType;
if (readIf("RIGHT")) {
read("OUTER");
joinType = JoinType.RIGHT_OUTER;
} else if (readIf("LEFT")) {
read("OUTER");
joinType = JoinType.LEFT_OUTER;
} else if (readIf("INNER")) {
joinType = JoinType.INNER;
} else {
break;
}
read("JOIN");
selector = parseSelector();
selectors.put(selector.getSelectorName(), selector);
read("ON");
JoinConditionImpl on = parseJoinCondition();
source = factory.join(source, selector, joinType, on);
}
return source;
}
Aggregations