protected internal virtual Expression VisitSqlTableValuedFunction(SqlTableValuedFunctionExpression sqlFunction) { ReadOnlyCollection <Expression> args = Visit(sqlFunction.Arguments); if (args != sqlFunction.Arguments) { return(new SqlTableValuedFunctionExpression(sqlFunction.SqlFunction, sqlFunction.ViewTable, sqlFunction.SingleColumnType, sqlFunction.Alias, args)); } return(sqlFunction); }
protected internal override Expression VisitSqlTableValuedFunction(SqlTableValuedFunctionExpression sqlFunction) { ReadOnlyCollection <Expression> args = Visit(sqlFunction.Arguments, a => MakeSqlValue(Visit(a))); if (args != sqlFunction.Arguments) { return(new SqlTableValuedFunctionExpression(sqlFunction.SqlFunction, sqlFunction.Table, sqlFunction.Alias, args)); } return(sqlFunction); }
protected internal override Expression VisitSqlTableValuedFunction(SqlTableValuedFunctionExpression sqlFunction) { ReadOnlyCollection <Expression> args = Visit(sqlFunction.Arguments); Alias newAlias = aliasMap.TryGetC(sqlFunction.Alias) ?? sqlFunction.Alias; if (args != sqlFunction.Arguments || sqlFunction.Alias != newAlias) { return(new SqlTableValuedFunctionExpression(sqlFunction.SqlFunction, sqlFunction.ViewTable, sqlFunction.SingleColumnType, newAlias, args)); } return(sqlFunction); }
protected internal override Expression VisitSqlTableValuedFunction(SqlTableValuedFunctionExpression sqlFunction) { var columns = CurrentScope.Keys.Where(ce => ce.Alias == sqlFunction.Alias).ToList(); CurrentScope.SetRange(columns, columns.Cast <Expression>()); ReadOnlyCollection <Expression> args = Visit(sqlFunction.Arguments); if (args != sqlFunction.Arguments) { return(new SqlTableValuedFunctionExpression(sqlFunction.SqlFunction, sqlFunction.Table, sqlFunction.Alias, args)); } return(sqlFunction); }
protected internal override Expression VisitSqlTableValuedFunction(SqlTableValuedFunctionExpression sqlFunction) { sb.Append(sqlFunction.SqlFunction); sb.Append("("); for (int i = 0, n = sqlFunction.Arguments.Count; i < n; i++) { Expression exp = sqlFunction.Arguments[i]; if (i > 0) { sb.Append(", "); } this.Visit(exp); } sb.Append(")"); return(sqlFunction); }
private bool CompareTableValuedSqlFunction(SqlTableValuedFunctionExpression a, SqlTableValuedFunctionExpression b) { return(a.ViewTable == b.ViewTable && CompareAlias(a.Alias, b.Alias) && CompareList(a.Arguments, b.Arguments, Compare)); }
protected internal override Expression VisitSqlTableValuedFunction(SqlTableValuedFunctionExpression sqlFunction) { this.aliases.Add(sqlFunction.Alias); return(base.VisitSqlTableValuedFunction(sqlFunction)); }