예제 #1
0
        public override void ExitSubQueryExpr(MiniSqlParserParser.SubQueryExprContext context)
        {
            var comments = this.GetComments(context);
            var query    = (IQuery)_stack.Pop();
            var node     = new SubQueryExp(query, comments);

            _stack.Push(node);
        }
 public sealed override void VisitBefore(SubQueryExp expr)
 {
     if (!expr.IsUsedInResultColumn())
     {
         ++_queryExprNestLevel;
     }
     else
     {
         _subQueryStack.Push(SubQueryType.InResults);
     }
 }
 public sealed override void VisitAfter(SubQueryExp expr)
 {
     if (!expr.IsUsedInResultColumn())
     {
         --_queryExprNestLevel;
     }
     else
     {
         // SELECT句サブクエリの目印をつける
         _stack.Peek().IsSubQueryInResults = true;
         _subQueryStack.Pop();
     }
 }
        public override void VisitAfter(SubQueryExp expr)
        {
            var operand = (IQuery)_stack.Pop();

            if (object.ReferenceEquals(expr.Query, operand))
            {
                _stack.Push(expr);
                return;
            }

            var node = new SubQueryExp(operand, expr.Comments.Clone());

            _stack.Push(node);
        }
예제 #5
0
 public override void VisitAfter(SubQueryExp expr)
 {
     if (expr.IsUsedInResultColumn())
     {
         // SELECT句サブクエリの場合
         if (this.IsNotInMainResultsSource())
         {
             return;
         }
         _scopeStack.Pop();
     }
     else
     {
         --_queryExprNestLevel;
     }
 }
예제 #6
0
 public override void VisitBefore(SubQueryExp expr)
 {
     if (expr.IsUsedInResultColumn())
     {
         // SELECT句サブクエリの場合
         if (this.IsNotInMainResultsSource())
         {
             return;
         }
         _scopeStack.Push(new Scope(FromOrResult.ResultQuery, false));
     }
     else
     {
         ++_queryExprNestLevel;
     }
 }
예제 #7
0
 virtual public void VisitAfter(SubQueryExp expr)
 {
 }
예제 #8
0
 virtual public void VisitBefore(SubQueryExp expr)
 {
 }
예제 #9
0
 public void VisitAfter(SubQueryExp expr)
 {
     _visitor.VisitAfter(expr);
 }
예제 #10
0
 public void VisitBefore(SubQueryExp expr)
 {
     _visitor.VisitBefore(expr);
 }
 public override void VisitAfter(SubQueryExp expr)
 {
     --_inSubQueryExp;
 }
 public override void VisitBefore(SubQueryExp expr)
 {
     ++_inSubQueryExp;
 }