/** * <p>Renders the HAVING 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>" HAVING COUNT(name) > 2"</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 HAVING properties. * @return The database-specific SQL rendering of the HAVING portion of the query. */ protected String renderQueryHaving(Query query) { StringBuilder sql = new StringBuilder(); String havingClause = query.getHavingClause(); if (havingClause != null) { sql.append(" HAVING "); sql.append(processHavingClause(havingClause)); } return sql.toString(); }
/** * <p>Renders the HAVING 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>" HAVING COUNT(name) > 2"</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 HAVING properties. * @return The database-specific SQL rendering of the HAVING portion of the query. */ protected String renderQueryHaving(Query query) { StringBuilder sql = new StringBuilder(); String havingClause = query.getHavingClause(); if (havingClause != null) { sql.append(" HAVING "); sql.append(processHavingClause(havingClause)); } return sql.toString(); }