Beispiel #1
0
 internal IAliasedExpression Update(Union item, TableAlias alias, IAliasedExpression[] aliasedExpression)
 {
     if (item.SelectStatements != aliasedExpression || item.Alias != alias)
         return new Union(alias, aliasedExpression);
     return item;
 }
Beispiel #2
0
 public override IAliasedExpression Visit(Union item)
 {
     bool isFirst = true;
     if (item.Alias != null)
         writer.Write('(');
     foreach (var select in item.SelectStatements)
     {
         if (isFirst)
             isFirst = false;
         else
             writer.WriteLine("UNION ALL ");
         Visit(select);
     }
     if (item.Alias != null)
     {
         writer.Write(')');
         Visit(item.Alias);
     }
     return item;
 }