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) { foreach (SqlColumn col in fc.Columns) { this.VisitColumn(col); } return(fc); }
internal override SqlAlias VisitAlias(SqlAlias a) { SqlTable tab = a.Node as SqlTable; SqlTableValuedFunctionCall tvf = a.Node as SqlTableValuedFunctionCall; if (this.addPrimaryKeys && (tab != null || tvf != null)) { List <SqlOrderExpression> list = new List <SqlOrderExpression>(); bool isTable = tab != null; MetaType rowType = isTable ? tab.RowType : tvf.RowType; foreach (MetaDataMember mm in rowType.IdentityMembers) { string name = mm.MappedName; SqlColumn col; Expression sourceExpression; List <SqlColumn> columns; if (isTable) { col = tab.Find(name); sourceExpression = tab.SourceExpression; columns = tab.Columns; } else { col = tvf.Find(name); sourceExpression = tvf.SourceExpression; columns = tvf.Columns; } if (col == null) { col = new SqlColumn(mm.MemberAccessor.Type, typeProvider.From(mm.MemberAccessor.Type), name, mm, null, sourceExpression); col.Alias = a; columns.Add(col); } list.Add(new SqlOrderExpression(SqlOrderType.Ascending, new SqlColumnRef(col))); } this.PrependOrderExpressions(list); return(a); } else { return(base.VisitAlias(a)); } }
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); }
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) { // both scalar and table valued functions are formatted the same return VisitFunctionCall(fc); }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach(SqlColumn col in fc.Columns) { this.VisitColumn(col); } return fc; }
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) { 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; }
protected override SqlExpression VisitTableValuedFunction( SqlTableValuedFunctionCall expr) { return expr; }
protected virtual SqlExpression VisitTableValuedFunction( SqlTableValuedFunctionCall expr) { return(expr); }
protected override SqlExpression VisitTableValuedFunction( SqlTableValuedFunctionCall expr) { return(expr); }
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; }
internal override SqlExpression VisitTableValuedFunctionCall(SqlTableValuedFunctionCall fc) { foreach (SqlColumn c in fc.Columns) { c.Alias = this.alias; } return base.VisitTableValuedFunctionCall(fc); }
protected virtual SqlExpression VisitTableValuedFunction( SqlTableValuedFunctionCall expr) { return expr; }