public class SqlGroupProjection extends QueryProjection
Native SQL expression the results are grouped by, created by the group by clause of a sqlGroupProjection
in a criteria query. It is not selected: the columns of the sqlGroupProjection are SqlProjections.
In the SQL, {alias} stands for the table alias of the queried entity.
| Constructor and description |
|---|
SqlGroupProjection(java.lang.String sql) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public java.lang.String |
getSql()Returns the SQL expression the results are grouped by. |
|
public static java.util.List<SqlGroupProjection> |
of(java.lang.String groupBy, SqlSyntax syntax)Splits the group by clause of a sqlGroupProjection, a single expression or a comma separated list of
them, into one projection per expression: at the commas outside parentheses, string literals, quoted
identifiers and comments, read in the syntax of the database. |
Returns the SQL expression the results are grouped by.
Splits the group by clause of a sqlGroupProjection, a single expression or a comma separated list of
them, into one projection per expression: at the commas outside parentheses, string literals, quoted
identifiers and comments, read in the syntax of the database.
groupBy - the group by clausesyntax - the syntax of the database's native SQL