Class CteSupport
java.lang.Object
org.hibernate.dialect.sql.ast.spi.CteSupport
Immutable description of a Dialect's common-table-expression (CTE) capabilities.
Placement levels are hierarchical. Recursive and mutation refinements are validated against their prerequisites when a profile is built.
Providers supply a profile by overriding
Dialect.getCteSupport(). The
profile is immutable and thread-safe, has no initialization or shutdown
lifecycle, and may be cached and reused by Hibernate. A Dialect may return
the same instance or equivalent instances, but its capabilities must remain
stable for the lifetime of the Dialect. Invalid combinations fail during
construction with an IllegalArgumentException.
- Since:
- 8.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for immutableCteSupportprofiles.static enumMutation-specific CTE capabilities.static enumThe strongest location in which a WITH clause may occur.static enumNative recursive-CTE syntax capabilities. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CteSupportA profile for a database with no WITH-clause support.static final CteSupportThe base Dialect profile: nested WITH clauses, without recursive or mutation features. -
Method Summary
Modifier and TypeMethodDescriptionstatic CteSupport.Builderbuilder()Create a builder initialized with the base Dialect profile.static CteSupport.Builderbuilder(CteSupport base) Create a builder initialized as a copy of the given profile.The immutable set of mutation features.The strongest supported WITH-clause placement.The immutable set of recursive features.booleanWhether recursive CTE syntax requires arecursivekeyword.booleansupports(CteSupport.MutationFeature feature) Whether the given mutation feature is supported.booleansupports(CteSupport.RecursiveFeature feature) Whether the given recursive feature is supported.booleanWhether CTE column names may be declared in the CTE header.booleanWhether a WITH clause may be nested inside another CTE.booleanWhether SEARCH/CYCLE emulation may use array and row constructors.booleanWhether a WITH clause is supported in any placement.booleanWhether a WITH clause may be used in a subquery.
-
Field Details
-
NONE
A profile for a database with no WITH-clause support. -
STANDARD
The base Dialect profile: nested WITH clauses, without recursive or mutation features.
-
-
Method Details
-
builder
Create a builder initialized with the base Dialect profile. -
builder
Create a builder initialized as a copy of the given profile. -
getPlacement
The strongest supported WITH-clause placement. -
getRecursiveFeatures
The immutable set of recursive features. -
supports
Whether the given recursive feature is supported. -
getMutationFeatures
The immutable set of mutation features. -
supports
Whether the given mutation feature is supported. -
supportsWithClause
public boolean supportsWithClause()Whether a WITH clause is supported in any placement. -
supportsWithClauseInSubquery
public boolean supportsWithClauseInSubquery()Whether a WITH clause may be used in a subquery. -
supportsNestedWithClause
public boolean supportsNestedWithClause()Whether a WITH clause may be nested inside another CTE. -
supportsCteHeaderColumnList
public boolean supportsCteHeaderColumnList()Whether CTE column names may be declared in the CTE header. -
requiresRecursiveKeyword
public boolean requiresRecursiveKeyword()Whether recursive CTE syntax requires arecursivekeyword. -
supportsRecursiveClauseArrayAndRowEmulation
public boolean supportsRecursiveClauseArrayAndRowEmulation()Whether SEARCH/CYCLE emulation may use array and row constructors.
-