protected override Expression VisitSelect(SelectExpression select)
        {
            if (select.DefaultFieldNames != null) {
                this.defaultFieldNames = select.DefaultFieldNames;
            }

            if (select.From != null) {
                this.VisitSource(select.From);
            }

            if (select.Where != null) {
                this.Visit(select.Where);
            }

            return select;
        }
Esempio n. 2
0
 internal ProjectionExpression(SelectExpression source, Expression projector)
     : base((ExpressionType)LuceneExpressionType.Projection, source.Type)
 {
     this._source = source;
     this._projector = projector;
 }
        protected virtual Expression VisitSelect(SelectExpression select)
        {
            Expression from = this.VisitSource(select.From);
              Expression where = this.Visit(select.Where);
              ReadOnlyCollection<FieldDeclaration> fields = this.VisitFieldDeclarations(select.Fields);

              if (from != select.From || where != select.Where || fields != select.Fields)
              {
            return new SelectExpression(select.Type, select.Alias, fields, select.DefaultFieldNames, from, where);
              }

              return select;
        }