internal override SqlExpression VisitUserColumn(SqlUserColumn suc)
 {
     if (this.ingoreExternalRefs && !this.nodeMap.ContainsKey(suc))
     {
         return(suc);
     }
     return(new SqlUserColumn(suc.ClrType, suc.SqlType, suc.Query, suc.Name, suc.IsRequired, suc.SourceExpression));
 }
Example #2
0
            internal override SqlExpression VisitUserColumn(SqlUserColumn suc)
            {
                SqlExpression result = base.VisitUserColumn(suc);

                if (result == suc)   // must be external
                {
                    return(ExtractParameter(result));
                }
                return(result);
            }
Example #3
0
            internal override SqlUserQuery VisitUserQuery(SqlUserQuery suq)
            {
                var list = new List <SqlExpression>(suq.Arguments.Count);

                foreach (var argument in suq.Arguments)
                {
                    list.Add(VisitExpression(argument));
                }
                SqlExpression projection   = VisitExpression(suq.Projection);
                var           sqlUserQuery = new SqlUserQuery(suq.QueryText, projection, list, suq.SourceExpression);

                nodeMap[suq] = sqlUserQuery;
                foreach (var column in suq.Columns)
                {
                    var sqlUserColumn = new SqlUserColumn(column.ClrType, column.SqlType, column.Query, column.Name, column.IsRequired, column.SourceExpression);
                    nodeMap[column] = sqlUserColumn;
                    sqlUserQuery.Columns.Add(sqlUserColumn);
                }
                return(sqlUserQuery);
            }
            internal override SqlUserQuery VisitUserQuery(SqlUserQuery suq)
            {
                List <SqlExpression> args = new List <SqlExpression>(suq.Arguments.Count);

                foreach (SqlExpression expr in suq.Arguments)
                {
                    args.Add(this.VisitExpression(expr));
                }
                SqlExpression projection = this.VisitExpression(suq.Projection);
                SqlUserQuery  n          = new SqlUserQuery(suq.QueryText, projection, args, suq.SourceExpression);

                this.nodeMap[suq] = n;

                foreach (SqlUserColumn suc in suq.Columns)
                {
                    SqlUserColumn dupSuc = new SqlUserColumn(suc.ClrType, suc.SqlType, suc.Query, suc.Name, suc.IsRequired, suc.SourceExpression);
                    this.nodeMap[suc] = dupSuc;
                    n.Columns.Add(dupSuc);
                }

                return(n);
            }
Example #5
0
 internal virtual SqlExpression VisitUserColumn(SqlUserColumn suc)
 {
     return(suc);
 }