internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach(SqlColumn col in fc.Columns) { this.VisitColumn(col); } return fc; }
private static Type GetClrType(SqlNode node) { SqlTableValuedFunctionCall tvf = node as SqlTableValuedFunctionCall; if (tvf != null) { return(tvf.RowType.Type); } SqlExpression exp = node as SqlExpression; if (exp != null) { if (TypeSystem.IsSequenceType(exp.ClrType)) { return(TypeSystem.GetElementType(exp.ClrType)); } return(exp.ClrType); } SqlSelect sel = node as SqlSelect; if (sel != null) { return(sel.Selection.ClrType); } SqlTable tab = node as SqlTable; if (tab != null) { return(tab.RowType.Type); } SqlUnion su = node as SqlUnion; if (su != null) { return(su.GetClrType()); } throw Error.UnexpectedNode(node.NodeType); }
internal virtual SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { for (int i = 0, n = fc.Arguments.Count; i < n; i++) { fc.Arguments[i] = this.VisitExpression(fc.Arguments[i]); } return fc; }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach (SqlColumn c in fc.Columns) { c.Alias = this.alias; } return base.VisitTableValuedFunctionCall(fc); }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { // both scalar and table valued functions are formatted the same return VisitFunctionCall(fc); }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { SqlExpression[] args = new SqlExpression[fc.Arguments.Count]; for(int i = 0, n = fc.Arguments.Count; i < n; i++) { args[i] = this.VisitExpression(fc.Arguments[i]); } SqlTableValuedFunctionCall nfc = new SqlTableValuedFunctionCall(fc.RowType, fc.ClrType, fc.SqlType, fc.Name, args, fc.SourceExpression); this.nodeMap[fc] = nfc; foreach(SqlColumn c in fc.Columns) { nfc.Columns.Add((SqlColumn)this.Visit(c)); } return nfc; }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach(SqlColumn c in fc.Columns) { if(c == this.match) { if(this.found != null) throw Error.ColumnIsDefinedInMultiplePlaces(GetColumnName(this.match)); this.found = c; break; } } return fc; }