T
- type of SQLValue
public interface GroupingSQLValue<T> extends SQLValue<T>
SQLValue
which is legal to use for group-by clauses.
This allows the class to generate an alternative
SQL fragment. This allows complex transformations
that do not change the grouping result to be optimised. Not all SQLValue
s can be used
to implement a group-by so this interface needs to be implemented explicitly though there is a default
implementation that works for most simple cases.
If the SQL representation of the SQLValue
is a literal constant it
is required to implement this to suppress the group-by clause as literal constants
are illegal in group-by clauses but won't actually change the grouping.SQLGroupMapper
![]() |
![]() |
Modifier and Type | Method and Description |
---|---|
default int |
addGroup(java.lang.StringBuilder sb,
boolean qualify)
Add the group-by clause to a query.
|
default boolean |
checkContentsCanGroup()
return false if this instance is not able to perform grouping.
|
default java.util.List<PatternArgument> |
getGroupParameters(java.util.List<PatternArgument> list)
Get the parameters for a group-by clause.
|
default boolean |
groupingIsomorphic()
Is there always a one-to-one mapping between groups and values
|
add, getParameters, getRequiredFilter, makeObject
default int addGroup(java.lang.StringBuilder sb, boolean qualify)
sb
- qualify
- CannotGroupException
default java.util.List<PatternArgument> getGroupParameters(java.util.List<PatternArgument> list)
list
- default boolean checkContentsCanGroup()
default boolean groupingIsomorphic()