Interface Grouper.Factory<R,T>
public static interface Grouper.Factory<R,T>
Is used to generate a new
Grouper
instance for every query against the target
table.
To help query optimization, inverse mapping functions should be provided. They're
defined as public static methods for each target column which can be mapped to a source
column. The naming pattern must be <target_name>_to_<source_name>
, and the
method must be a pure function. The parameter type must exactly match the target column
type, and the return type must exactly match the source column type. If the function
doesn't transform the column value, then it should be annotated with @Untransformed
.
-
Method Summary
Modifier and TypeMethodDescriptiondefault QueryPlan
plan
(QueryPlan.Grouper plan) Override this method to customize the grouper's query plan.default String
Returns a comma-separated list of source columns which are needed by theGrouper
instances.
-
Method Details
-
newGrouper
- Throws:
IOException
-
sourceProjection
Returns a comma-separated list of source columns which are needed by theGrouper
instances. Null is returned by default, which indicates that all columns are needed. The implementation of this method must return a static constant. -
plan
Override this method to customize the grouper's query plan.- Parameters:
plan
- original plan- Returns:
- original or replacement plan
-