public override void EnterOrderByExpression(MySqlParser.OrderByExpressionContext context) { if (_isOtherListener == 1 && Rules.Count > 0 && _isFirst) { Rules.Remove(Rules[Rules.Count - 1]); _isFirst = false; } }
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); }
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++; }
public override void ExitOrderByExpression(MySqlParser.OrderByExpressionContext context) { _isOtherListener--; }