Inheritance: WSqlFragment
 public virtual void Visit(WOrderByClause node)
 {
     node.AcceptChildren(this);
 }
Beispiel #2
0
        private WOrderByClause ParseOrderbyClause(OrderByClause orderbyExpr)
        {
            var wobc = new WOrderByClause
            {
                FirstTokenIndex = orderbyExpr.FirstTokenIndex,
                LastTokenIndex = orderbyExpr.LastTokenIndex,
                OrderByElements = new List<WExpressionWithSortOrder>(orderbyExpr.OrderByElements.Count)
            };

            foreach (var pexp in from e in orderbyExpr.OrderByElements
                                 let pscalar = ParseScalarExpression(e.Expression)
                                 where pscalar != null
                                 select new WExpressionWithSortOrder
                                 {
                                     ScalarExpr = pscalar,
                                     SortOrder = e.SortOrder,
                                     FirstTokenIndex = e.FirstTokenIndex,
                                     LastTokenIndex = e.LastTokenIndex
                                 })
            {
                wobc.OrderByElements.Add(pexp);
            }

            return wobc;
        }
 public virtual void Visit(WOrderByClause node)
 {
     node.AcceptChildren(this);
 }