public CaseWhenPair VisitChildren(ExpressionTreeVisitor visitor) { var newWhen = visitor.VisitExpression(_when); var newThen = visitor.VisitExpression(_then); return(Update(newWhen, newThen)); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newField = (LuceneQueryFieldExpression)visitor.VisitExpression(field); var newLower = visitor.VisitExpression(lower); var newUpper = visitor.VisitExpression(upper); return((newField == field && newLower == lower && newUpper == upper) ? this : new LuceneRangeQueryExpression(newField, newLower, lowerQueryType, newUpper, upperQueryType, occur)); }
private void GenerateSqlForPrefixOperator(string sqlOperatorString, Expression left, Expression right) { _commandBuilder.Append(sqlOperatorString); _commandBuilder.Append(" ("); _expressionVisitor.VisitExpression(left); _commandBuilder.Append(", "); _expressionVisitor.VisitExpression(right); _commandBuilder.Append(")"); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newMatchExpression = visitor.VisitExpression(Match); var newPatternExpression = visitor.VisitExpression(Pattern); return(newMatchExpression != Match || newPatternExpression != Pattern ? new LikeExpression(newMatchExpression, newPatternExpression) : this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newField = (LuceneQueryFieldExpression)visitor.VisitExpression(QueryField); var newPattern = visitor.VisitExpression(QueryPattern); return((newPattern == QueryPattern && newField == QueryField) ? this : new LuceneQueryPredicateExpression(newField, newPattern, Occur) { AllowSpecialCharacters = AllowSpecialCharacters }); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newLeftExpression = visitor.VisitExpression(_left); var newRightExpression = visitor.VisitExpression(_right); var newEscapeExpression = visitor.VisitExpression(_escapeExpression); if (newLeftExpression != _left || newRightExpression != _right || newEscapeExpression != _escapeExpression) { return(new SqlLikeExpression(newLeftExpression, newRightExpression, newEscapeExpression)); } return(this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newLeftExpression = visitor.VisitExpression(_leftExpression); var newRightExpression = visitor.VisitExpression(_rightExpression); if (newLeftExpression != _leftExpression || newRightExpression != _rightExpression) { return(new SqlInExpression(newLeftExpression, newRightExpression)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newCases = visitor.VisitList(_cases, p => p.VisitChildren(visitor)); var newElseCase = _elseCase != null?visitor.VisitExpression(_elseCase) : null; return(Update(newCases, newElseCase)); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newExpression = visitor.VisitExpression(Expression); return(newExpression != Expression ? new NhStarExpression(newExpression) : this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newPredicate = visitor.VisitExpression(_predicate); return(_predicate != newPredicate ? new DiscriminatorPredicateExpression(newPredicate, QuerySource) : this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newExpression = visitor.VisitExpression(_operand); return(newExpression != _operand ? new IsNotNullExpression(newExpression) : this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); var newKeyExpression = visitor.VisitExpression(KeyExpression); var newElementExpression = visitor.VisitExpression(ElementExpression); var originalAggregationExpressions = AggregationExpressions; var newAggregationExpressions = visitor.VisitAndConvert(originalAggregationExpressions, "VisitChildren"); if (newKeyExpression != KeyExpression || newElementExpression != ElementExpression || newAggregationExpressions != originalAggregationExpressions) { var newSqlGroupingSelectExpression = new SqlGroupingSelectExpression(newKeyExpression, newElementExpression, newAggregationExpressions); return(newSqlGroupingSelectExpression); } return(this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newExpression = visitor.VisitExpression(BinaryExpression); if (ReferenceEquals(BinaryExpression, newExpression)) { return(this); } return(new BoostBinaryExpression((BinaryExpression)newExpression, Boost)); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newExpression = visitor.VisitExpression(_expression); if (newExpression != _expression) { return(new SqlConvertedBooleanExpression(newExpression)); } return(this); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newPattern = visitor.VisitExpression(pattern); if (Equals(pattern, newPattern)) { return(this); } return(new AllowSpecialCharactersExpression(newPattern)); }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var result = visitor.VisitExpression(_expression); if (result != _expression) { return(new TestExtensionExpression(result)); } return(this); }
public override void VisitWhereClause(Remotion.Linq.Clauses.WhereClause whereClause, QueryModel queryModel, int index) { bool alreadyHasQuery = false; var query = new StringBuilder(); queries.Add(query); ExpressionTreeVisitor visitor = new ExpressionTreeVisitor(query); visitor.VisitExpression(whereClause.Predicate); base.VisitWhereClause(whereClause, queryModel, index); }
protected internal override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newExpression = visitor.VisitExpression(_comparison); if (newExpression != _comparison) { return(new VBStringComparisonExpression(newExpression, _textCompare)); } else { return(this); } }
protected internal override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newEvaluatedExpression = visitor.VisitExpression(_evaluatedExpression); if (newEvaluatedExpression != _evaluatedExpression) { return(new PartialEvaluationExceptionExpression(_exception, newEvaluatedExpression)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newChild = visitor.VisitExpression(Child); if (newChild != Child) { return(new CustomCompositeExpression(Type, newChild)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newSource = visitor.VisitExpression(_source); if (newSource != _source) { return(new SqlConvertExpression(Type, newSource)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newExpression = visitor.VisitExpression(_expression); if (newExpression != _expression) { return(new SqlExistsExpression(newExpression)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newPrimaryKeyExpression = visitor.VisitExpression(_identityExpression); if (newPrimaryKeyExpression != _identityExpression) { return(new SqlEntityConstantExpression(Type, _value, newPrimaryKeyExpression)); } else { return(this); } }
protected internal override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); var newExpression = visitor.VisitExpression(_comparison); if (newExpression != _comparison) { return(new VBStringComparisonExpression(newExpression, _textCompare)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); var newExpression = visitor.VisitExpression(_expression); if (newExpression != _expression) { return(new SqlLengthExpression(newExpression)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { CheckNotNull("visitor", visitor); var newExpression = visitor.VisitExpression(_expression); if (newExpression != _expression) { return(new NamedExpression(_name, newExpression)); } else { return(this); } }
protected internal override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); var newEvaluatedExpression = visitor.VisitExpression(_evaluatedExpression); if (newEvaluatedExpression != _evaluatedExpression) { return(new PartialEvaluationExceptionExpression(_exception, newEvaluatedExpression)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); var newExpression = visitor.VisitExpression(_expression); if (newExpression != _expression) { return(new AggregationExpression(Type, newExpression, _aggregationModifier)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); var newOrderings = Orderings.Select( o => { var newExpression = visitor.VisitExpression(o.Expression); return(newExpression != o.Expression ? new Ordering(newExpression, o.OrderingDirection) : o); }).ToArray(); if (!newOrderings.SequenceEqual(Orderings)) { return(new SqlRowNumberExpression(newOrderings)); } else { return(this); } }
protected override Expression VisitChildren(ExpressionTreeVisitor visitor) { var newInnerExpression = visitor.VisitExpression(_expression); return(newInnerExpression != _expression ? new AliasExpression(Alias, newInnerExpression) : this); }
protected internal override Expression VisitChildren(ExpressionTreeVisitor visitor) { ArgumentUtility.CheckNotNull("visitor", visitor); return(visitor.VisitExpression(this)); }