protected override void VisitTableRelation(BoundTableRelation node) { var hasRecursiveReference = node.TableInstance.Table == _symbol; var hasRecursiveReferenceInSubquery = _subqueryCounter > 0 && hasRecursiveReference; var hasMultipleRecursiveReferences = _hasSeenRecursiveReference && hasRecursiveReference; if (hasRecursiveReference) { _hasSeenRecursiveReference = true; } if (hasRecursiveReferenceInSubquery) { _diagnostics.ReportCteContainsRecursiveReferenceInSubquery(_syntax.Name); } if (hasMultipleRecursiveReferences) { _diagnostics.ReportCteContainsMultipleRecursiveReferences(_syntax.Name); } base.VisitTableRelation(node); }
protected virtual void VisitTableRelation(BoundTableRelation node) { }
protected virtual BoundRelation RewriteTableRelation(BoundTableRelation node) { return(node); }
private static void GetDeclaredTableInstances(List <TableInstanceSymbol> receiver, BoundTableRelation node) { var symbol = node.TableInstance; receiver.Add(symbol); }