Class TupleCountSupport
java.lang.Object
org.hibernate.dialect.function.spi.TupleCountSupport
Immutable description of a Dialect's aggregate tuple-count syntax.
Providers supply a stable profile through
Dialect.getTupleCountSupport(). Ordinary tuple counts
and distinct tuple counts are independent syntax choices. Select
TupleCountSupport.Syntax.UNSUPPORTED to request Hibernate's existing emulation,
TupleCountSupport.Syntax.ARGUMENT_LIST for forms such as count(a, b), or
TupleCountSupport.Syntax.PARENTHESIZED_TUPLE for forms such as count((a, b)).
Do not infer the distinct form from the ordinary form. A database may, for
example, accept count((a, b)) while requiring
count(distinct a, b) for the distinct form.
- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuild an immutable tuple-count-support profile.static enumA complete native syntax choice for one tuple-count form. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TupleCountSupportNeither ordinary nor distinct tuple counts have native syntax.static final TupleCountSupportThe base-Dialect profile: emulate ordinary tuple counts and render distinct tuples as an argument list. -
Method Summary
Modifier and TypeMethodDescriptionstatic TupleCountSupport.Builderbuilder()Create a builder initialized fromSTANDARD.static TupleCountSupport.Builderbuilder(TupleCountSupport base) Create a builder initialized with both syntax choices from the given profile.The syntax for distinct multi-expression counts.The syntax for ordinary multi-expression counts.
-
Field Details
-
NONE
Neither ordinary nor distinct tuple counts have native syntax. -
STANDARD
The base-Dialect profile: emulate ordinary tuple counts and render distinct tuples as an argument list.
-
-
Method Details
-
builder
Create a builder initialized fromSTANDARD. -
builder
Create a builder initialized with both syntax choices from the given profile.- Parameters:
base- the non-null profile to copy
-
getNonDistinctSyntax
The syntax for ordinary multi-expression counts. -
getDistinctSyntax
The syntax for distinct multi-expression counts.
-