Inheritance: WSqlFragment
 public virtual void Visit(WOrderByClause node)
 {
     node.AcceptChildren(this);
 }
示例#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;
        }
示例#3
0
 public virtual void Visit(WOrderByClause node)
 {
     node.AcceptChildren(this);
 }