コード例 #1
0
        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);
        }
コード例 #2
0
 protected virtual void VisitTableRelation(BoundTableRelation node)
 {
 }
コード例 #3
0
 protected virtual BoundRelation RewriteTableRelation(BoundTableRelation node)
 {
     return(node);
 }
コード例 #4
0
        private static void GetDeclaredTableInstances(List <TableInstanceSymbol> receiver, BoundTableRelation node)
        {
            var symbol = node.TableInstance;

            receiver.Add(symbol);
        }