예제 #1
0
 public override void EnterOrderByExpression(MySqlParser.OrderByExpressionContext context)
 {
     if (_isOtherListener == 1 && Rules.Count > 0 && _isFirst)
     {
         Rules.Remove(Rules[Rules.Count - 1]);
         _isFirst = false;
     }
 }
예제 #2
0
        public override void EnterOrderByExpression([NotNull] MySqlParser.OrderByExpressionContext context)
        {
            OrderByStructure tmpOrder = new OrderByStructure();

            tmpOrder.ColumnName = context.expression().GetText();
            if (context.order != null)
            {
                if (context.order.Text == "DESC")
                {
                    tmpOrder.IsDESC = true;
                }
            }
            OrderByList.Add(tmpOrder);
        }
예제 #3
0
        public override void EnterOrderByExpression(MySqlParser.OrderByExpressionContext context)
        {
            if (_isOtherListener == 1)
            {
                if (context.ChildCount > 1)
                {
                    Rules.Remove(Rules[Rules.Count - 1]);
                }

                OrderByExpression OrderByExpression =
                    new OrderByExpression(context.SourceInterval, context, context.GetText());

                Rules.Add(OrderByExpression);
            }
            _isOtherListener++;
        }
예제 #4
0
 public override void ExitOrderByExpression(MySqlParser.OrderByExpressionContext context)
 {
     _isOtherListener--;
 }