public void Accept(GroupByClause groupByClause) { if (GroupByClause != null) { GroupByClause += groupByClause; } else { GroupByClause = groupByClause; } }
public override void AppendTo(StringBuilder sb, ISqlDialect dialect) { if (ResultColumns == null) { throw new ArgumentNullException("ResultColumns"); } sb.Append("SELECT "); sb.Append(ResultColumns.ToString()); if (Source != null) { sb.Append(" FROM "); Source.AppendTo(sb, dialect); } foreach (var joinCommand in JoinClauses) { sb.Append(" "); joinCommand.AppendTo(sb); } if (WhereClause != null) { sb.Append(" "); WhereClause.AppendTo(sb); } if (GroupByClause != null) { sb.Append(" "); GroupByClause.AppendTo(sb); } if (OrderByClause != null) { sb.Append(" "); OrderByClause.AppendTo(sb); } if (LimitClause != null) { sb.Append(" "); LimitClause.AppendTo(sb); } }