/// <summary> /// Renders the begining of a GROUP BY statement. /// </summary> /// <param name="builder"></param> /// <param name="groupByTerms"></param> /// <remarks>If <paramref name="groupByTerms"/> has no items, nothing will be appended.</remarks> protected virtual void GroupBy(StringBuilder builder, GroupByTermCollection groupByTerms) { if (groupByTerms.Count > 0) { builder.Append(" group by "); } }
/// <summary> /// Renders GROUP BY terms /// </summary> /// <param name="builder"></param> /// <param name="groupByTerms"></param> protected virtual void GroupByTerms(StringBuilder builder, GroupByTermCollection groupByTerms) { foreach (GroupByTerm clause in groupByTerms) { if (clause != groupByTerms[0]) { builder.Append(", "); } GroupByTerm(builder, clause); } }