Interface SyntheticTableGroupSupport
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Determines whether resolving a grouping or ordering expression requires a synthetic table root in the current SQL AST query specification.
Implementations must be immutable or thread-safe and should return a stable descriptor for all triggering expressions in one query specification. The standard SQM converter adds at most one root per query specification and rejects incompatible descriptors returned for that specification.
- Since:
- 8.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SyntheticTableGroupSupportA strategy which never requests a synthetic table root.static final SyntheticTableGroupSupportThe standard derived-table root used by databases which require afromclause for literal grouping and ordering expressions. -
Method Summary
Modifier and TypeMethodDescriptionstatic SyntheticTableGroupSupportforLiteralExpressions(String tableExpression, String identificationVariable) Create a strategy which requests the given table root whenever a resolved grouping or ordering expression is a SQL AST literal.resolveSyntheticTableGroup(Clause clause, Expression expression) Return the synthetic table root required for the resolved expression, ornullwhen the current query specification requires no synthetic root.
-
Field Details
-
NONE
A strategy which never requests a synthetic table root. -
SELECT_ONE_FOR_LITERALS
The standard derived-table root used by databases which require afromclause for literal grouping and ordering expressions.
-
-
Method Details
-
forLiteralExpressions
static SyntheticTableGroupSupport forLiteralExpressions(String tableExpression, @Nullable String identificationVariable) Create a strategy which requests the given table root whenever a resolved grouping or ordering expression is a SQL AST literal. -
resolveSyntheticTableGroup
@Nullable SyntheticTableGroupDescriptor resolveSyntheticTableGroup(Clause clause, @Nullable Expression expression) Return the synthetic table root required for the resolved expression, or
nullwhen the current query specification requires no synthetic root.The clause is the converter context in which the grouping or ordering expression was resolved. The expression may be
nullwhen a positional reference resolves to multiple selections; this does not require a root. Implementations may use the clause to distinguish normal grouping and ordering from ordering within a window.
-