internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach (SqlColumn column in fc.Columns) { column.Alias = this.alias; } return(base.VisitTableValuedFunctionCall(fc)); }
internal virtual SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { int num = 0; int count = fc.Arguments.Count; while (num < count) { fc.Arguments[num] = this.VisitExpression(fc.Arguments[num]); num++; } return(fc); }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { SqlExpression[] args = new SqlExpression[fc.Arguments.Count]; int index = 0; int count = fc.Arguments.Count; while (index < count) { args[index] = this.VisitExpression(fc.Arguments[index]); index++; } SqlTableValuedFunctionCall call = new SqlTableValuedFunctionCall(fc.RowType, fc.ClrType, fc.SqlType, fc.Name, args, fc.SourceExpression); this.nodeMap[fc] = call; foreach (SqlColumn column in fc.Columns) { call.Columns.Add((SqlColumn)this.Visit(column)); } return(call); }
private static Type GetClrType(SqlNode node) { SqlTableValuedFunctionCall call = node as SqlTableValuedFunctionCall; if (call != null) { return(call.RowType.Type); } SqlExpression expression = node as SqlExpression; if (expression != null) { if (TypeSystem.IsSequenceType(expression.ClrType)) { return(TypeSystem.GetElementType(expression.ClrType)); } return(expression.ClrType); } SqlSelect select = node as SqlSelect; if (select != null) { return(select.Selection.ClrType); } SqlTable table = node as SqlTable; if (table != null) { return(table.RowType.Type); } SqlUnion union = node as SqlUnion; if (union == null) { throw Error.UnexpectedNode(node.NodeType); } return(union.GetClrType()); }