* org.modeshape.jcr.query.model.TypeSystem)
*/
@Override
protected Query parseQuery( TokenStream tokens,
TypeSystem typeSystem ) {
Query query = super.parseQuery(tokens, typeSystem);
// See if we have to rewrite the JCR-SQL-style join ...
if (query.source() instanceof JoinableSources) {
JoinableSources joinableSources = (JoinableSources)query.source();
// Rewrite the joins ...
Source newSource = rewrite(joinableSources);
query = new Query(newSource, query.constraint(), query.orderings(), query.columns(), query.getLimits(),
query.isDistinct());
}
return query;
}