public boolean refersToParent() { if (projections != null && projections.stream().anyMatch(x -> x.refersToParent())) { return true; } if (this.target != null && this.target.refersToParent()) { return true; } if (this.whileClause != null && this.whileClause.refersToParent()) { return true; } return false; }
@Override public boolean refersToParent() { //no FROM, if a subquery refers to parent it does not make sense, so that reference will be just ignored if (projection != null && projection.refersToParent()) { return true; } if(target!=null && target.refersToParent()){ return true; } if (whereClause != null && whereClause.refersToParent()) { return true; } if (groupBy != null && groupBy.refersToParent()) { return true; } if (orderBy != null && orderBy.refersToParent()) { return true; } if (letClause != null && letClause.refersToParent()) { return true; } return false; }