Gathers all columns referenced by the given expression
Inheritance: DbExpressionVisitor
Exemplo n.º 1
0
        public static HashSet <ColumnExpression> Gather(Expression expression)
        {
            var visitor = new ReferencedColumnGatherer();

            visitor.Visit(expression);
            return(visitor.columns);
        }
Exemplo n.º 2
0
        protected override Expression VisitSelect(SelectExpression select)
        {
            var saveColumns = this.columns;

            this.columns = ReferencedColumnGatherer.Gather(select).ToLookup(c => c.Alias, TableAlias.Comparer);
            var saveLastJoin = this.lastJoin;

            this.lastJoin = null;
            var result = base.VisitSelect(select);

            this.columns  = saveColumns;
            this.lastJoin = saveLastJoin;
            return(result);
        }
Exemplo n.º 3
0
 public static HashSet<ColumnExpression> Gather(Expression expression)
 {
     var visitor = new ReferencedColumnGatherer();
     visitor.Visit(expression);
     return visitor.columns;
 }