Package com.github.eikecochu.sqlbuilder
Class GroupBy
- java.lang.Object
-
- com.github.eikecochu.sqlbuilder.QueryPartImpl<GroupBy>
-
- com.github.eikecochu.sqlbuilder.GroupBy
-
- All Implemented Interfaces:
BeforeHaving<GroupBy>,BeforeOrderBy<GroupBy>,BeforeUnion<GroupBy>,QueryBuilder<GroupBy>,QueryPart,QueryPartLinked<GroupBy>,QueryPartSQL<GroupBy>
public class GroupBy extends QueryPartImpl<GroupBy> implements QueryBuilder<GroupBy>, BeforeOrderBy<GroupBy>, BeforeHaving<GroupBy>, BeforeUnion<GroupBy>
The GROUP BY expression. Allows the grouping of selected data under some columns to apply aggregate functions on it.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGroupBy(BeforeGroupBy<?> parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupBycolumn(java.lang.String column)Group by column nameGroupBycolumns(java.lang.String... columns)Group by column namesjava.lang.Stringstring(QueryOptions options)Transforms this statement into an SQL string-
Methods inherited from class com.github.eikecochu.sqlbuilder.QueryPartImpl
parent, sql
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeHaving
having, having, havingSQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeOrderBy
orderBy, orderBy, orderBy, orderBySQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.BeforeUnion
union, union, unionAll, unionSQL
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryBuilder
query, query
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryPartLinked
ext, parent, parent
-
Methods inherited from interface com.github.eikecochu.sqlbuilder.QueryPartSQL
sql
-
-
-
-
Constructor Detail
-
GroupBy
protected GroupBy(BeforeGroupBy<?> parent)
-
-
Method Detail
-
column
public GroupBy column(java.lang.String column)
Group by column name- Parameters:
column- The column name to group by- Returns:
- This GROUP BY statement
-
columns
public GroupBy columns(java.lang.String... columns)
Group by column names- Parameters:
columns- The column names to group by- Returns:
- This GROUP BY statement
-
string
public java.lang.String string(QueryOptions options)
Description copied from interface:QueryPartTransforms this statement into an SQL string
-
-