/** * <p>Renders the GROUP BY portion of the query in the database-specific SQL * dialect. Very few databases deviate from the standard in this matter, * thus the default implementation is usually sufficient.</p> * <p/> * <p>An example return value: <code>" GROUP BY name"</code></p> * <p/> * <p>There is usually no need to call this method directly. Under normal * operations it functions as a delegate for {@link #renderQuery(Query, TableNameConverter, boolean)}.</p> * * @param query The Query instance from which to determine the GROUP BY properties. * @return The database-specific SQL rendering of the GROUP BY portion of the query. */ protected String renderQueryGroupBy(Query query) { StringBuilder sql = new StringBuilder(); String groupClause = query.getGroupClause(); if (groupClause != null) { sql.append(" GROUP BY "); sql.append(processGroupByClause(groupClause)); } return sql.toString(); }
/** * <p>Renders the GROUP BY portion of the query in the database-specific SQL * dialect. Very few databases deviate from the standard in this matter, * thus the default implementation is usually sufficient.</p> * <p/> * <p>An example return value: <code>" GROUP BY name"</code></p> * <p/> * <p>There is usually no need to call this method directly. Under normal * operations it functions as a delegate for {@link #renderQuery(Query, TableNameConverter, boolean)}.</p> * * @param query The Query instance from which to determine the GROUP BY properties. * @return The database-specific SQL rendering of the GROUP BY portion of the query. */ protected String renderQueryGroupBy(Query query) { StringBuilder sql = new StringBuilder(); String groupClause = query.getGroupClause(); if (groupClause != null) { sql.append(" GROUP BY "); sql.append(processGroupByClause(groupClause)); } return sql.toString(); }