Exemple #1
0
 public override string ToString()
 {
     return("DELETE {0}\r\nFROM {1}\r\n{2}".FormatWith(
                Table.Name,
                Source.ToString(),
                Where?.Let(w => "WHERE " + w.ToString())));
 }
Exemple #2
0
 public override string ToString()
 {
     return("INSERT INTO {0}({1})\r\nSELECT {2}\r\nFROM {3}".FormatWith(
                Table.Name,
                Assigments.ToString(a => a.Column, ",\r\n"),
                Assigments.ToString(a => a.Expression.ToString(), ",\r\n"),
                Source.ToString()));
 }
Exemple #3
0
 public override string ToString()
 {
     return("UPDATE {0}\r\nSET {1}\r\nFROM {2}\r\n{3}".FormatWith(
                Table.Name,
                Assigments.ToString("\r\n"),
                Source.ToString(),
                Where?.Let(w => "WHERE " + w.ToString())));
 }
Exemple #4
0
 public override string ToString()
 {
     return("{0}\r\n{1}\r\n{2}\r\n as {3}".FormatWith(Left.ToString().Indent(4), Operator, Right.ToString().Indent(4), Alias));
 }
 void VisitSetPart(SourceWithAliasExpression source)
 {
     if (source is SelectExpression)
     {
         this.Indent(Indentation.Inner);
         VisitSelect((SelectExpression)source);
         this.Indent(Indentation.Outer);
     }
     else if (source is SetOperatorExpression)
     {
         VisitSetOperator((SetOperatorExpression)source);
     }
     else
     {
         throw new InvalidOperationException("{0} not expected in SetOperatorExpression".FormatWith(source.ToString()));
     }
 }