Пример #1
0
 public virtual void Visit(WGroupByClause node)
 {
     node.AcceptChildren(this);
 }
Пример #2
0
        private WGroupByClause ParseGroupbyClause(GroupByClause groupbyExpr)
        {
            if (groupbyExpr == null)
            {
                return null;
            }

            var wgc = new WGroupByClause
            {
                FirstTokenIndex = groupbyExpr.FirstTokenIndex,
                LastTokenIndex = groupbyExpr.LastTokenIndex,
                GroupingSpecifications = new List<WGroupingSpecification>(groupbyExpr.GroupingSpecifications.Count)
            };

            foreach (var gs in groupbyExpr.GroupingSpecifications)
            {
                //if (!(gs is ExpressionGroupingSpecification))
                //    continue;
                var egs = gs as ExpressionGroupingSpecification;
                if (egs == null) continue;
                var pspec = new WExpressionGroupingSpec
                {
                    Expression = ParseScalarExpression(egs.Expression),
                    FirstTokenIndex = egs.FirstTokenIndex,
                    LastTokenIndex = egs.LastTokenIndex,
                };

                wgc.GroupingSpecifications.Add(pspec);
            }

            return wgc;
        }
Пример #3
0
 public virtual void Visit(WGroupByClause node)
 {
     node.AcceptChildren(this);
 }