protected override Expression VisitExtensionExpression(ExtensionExpression expression) { if (expression is LuceneQueryExpression) { return(VisitLuceneQueryExpression((LuceneQueryExpression)expression)); } if (expression is LuceneQueryAnyFieldExpression) { return(VisitLuceneQueryAnyFieldExpression((LuceneQueryAnyFieldExpression)expression)); } if (expression is LuceneQueryFieldExpression) { return(VisitLuceneQueryFieldExpression((LuceneQueryFieldExpression)expression)); } if (expression is LuceneRangeQueryExpression) { return(VisitLuceneRangeQueryExpression((LuceneRangeQueryExpression)expression)); } if (expression is LuceneQueryPredicateExpression) { return(VisitLuceneQueryPredicateExpression((LuceneQueryPredicateExpression)expression)); } if (expression is BoostBinaryExpression) { return(VisitBoostBinaryExpression((BoostBinaryExpression)expression)); } return(base.VisitExtensionExpression(expression)); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) #endif { if (expression is SelectIdentifierVariableNameExpression) { var siv = expression as SelectIdentifierVariableNameExpression; var v = _values[siv.Name].ToString(); if (!String.IsNullOrEmpty(siv.IdentifierPrefix) && v.StartsWith(siv.IdentifierPrefix)) { v = v.Substring(siv.IdentifierPrefix.Length); } if (siv.Type.IsInstanceOfType(v)) { return(Expression.Constant(v, siv.Type)); } var converted = _converter(v, siv.Type); return(Expression.Constant(converted, siv.Type)); } if (expression is SelectVariableNameExpression) { var svn = expression as SelectVariableNameExpression; var v = _values[svn.Name]; if (svn.Type.IsInstanceOfType(v)) { return(Expression.Constant(v, svn.Type)); } var converted = _converter(v.ToString(), svn.Type); return(Expression.Constant(converted, svn.Type)); } return(expression); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { var notNullableExpression = expression as NotNullableExpression; return(notNullableExpression != null ? expression : base.VisitExtensionExpression(expression)); }
protected internal override Expression VisitExtensionExpression(ExtensionExpression expression) { if (expression.CanReduce) { return(VisitExpression(expression.ReduceAndCheck())); } else { return(VisitUnhandledItem <ExtensionExpression, Expression> (expression, "VisitExtensionExpression", BaseVisitExtensionExpression)); } }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { var discriminatorExpression = expression as DiscriminatorPredicateExpression; if (discriminatorExpression != null && discriminatorExpression.QuerySource == _querySource) { return(new DiscriminatorPredicateExpression(_discriminatorPredicate, _querySource)); } return(expression); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { // Nominated expressions need to prevent joins on non-Identifier member expressions // (for the test expression of conditional expressions only) // Otherwise an extra join is created and the GroupBy and Select clauses will not match var old = _preventJoinsInConditionalTest; _preventJoinsInConditionalTest = (NhExpressionType)expression.NodeType == NhExpressionType.Nominator; var expr = base.VisitExtensionExpression(expression); _preventJoinsInConditionalTest = old; return(expr); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { if (expression is AllowSpecialCharactersExpression) { return(VisitAllowSpecialCharactersExpression((AllowSpecialCharactersExpression)expression)); } if (expression is LuceneQueryPredicateExpression) { return(VisitQueryPredicateExpression((LuceneQueryPredicateExpression)expression)); } return(base.VisitExtensionExpression(expression)); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { var aliasExpression = expression as AliasExpression; if (aliasExpression != null) { return(VisitExpression(aliasExpression.Expression)); } var notNullableExpression = expression as NotNullableExpression; if (notNullableExpression != null) { return(expression); } var columnExpression = expression as ColumnExpression ?? expression.TryGetColumnExpression(); if (columnExpression != null && columnExpression.Property.IsNullable) { AddToResult(new IsNullExpression(expression)); return(expression); } var isNullExpression = expression as IsNullExpression; if (isNullExpression != null) { return(expression); } var inExpression = expression as InExpression; if (inExpression != null) { return(expression); } return(expression); }
protected internal override Expression VisitExtensionExpression(ExtensionExpression expression)
protected internal virtual Expression VisitExtensionExpression(ExtensionExpression expression) { ArgumentUtility.CheckNotNull("expression", expression); return(expression.VisitChildren(this)); }
protected internal override Expression VisitExtensionExpression(ExtensionExpression expression) { ArgumentUtility.CheckNotNull("expression", expression); return(Expression.Parameter(expression.Type, expression.ToString())); }
private Expression VisitChildrenWithGivenSemantics(ExtensionExpression expression, SqlExpressionContext childContext) { var visitor = new SqlContextExpressionVisitor(childContext, _stage, _context); return(visitor.VisitExtensionExpression(expression)); }
protected internal virtual Expression VisitExtensionExpression(ExtensionExpression expression) { return(expression.VisitChildren(this)); }
protected internal override Expression VisitExtensionExpression(ExtensionExpression expression) { return(Expression.Parameter(expression.Type, expression.ToString())); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { return(expression is NotNullableExpression ? expression : base.VisitExtensionExpression(expression)); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { return(base.VisitExtensionExpression(expression)); }
public static Expression CallVisitChildren(ExtensionExpression target, ExpressionVisitor visitor) #endif { return((Expression)PrivateInvoke.InvokeNonPublicMethod(target, "VisitChildren", visitor)); }
protected Expression BaseVisitExtensionExpression(ExtensionExpression expression) { return(base.VisitExtensionExpression(expression)); }
protected override Expression VisitExtensionExpression(ExtensionExpression expression) { var selectVariableNameExpression = expression as SelectVariableNameExpression; return(selectVariableNameExpression != null?VisitSelectVariableNameExpression(selectVariableNameExpression) : base.VisitExtensionExpression(expression)); }