Package org.hibernate.query.sqm.function
Package defining support for HQL, including JPQL as a subset of HQL.
Concerns handled by subpackages include:
- query language transformation via ANTLR, and
- query execution via an instance of
Query
.
Translation of HQL to SQL involves the following steps:
- First, the ANTLR-generated
tokenizer
andparser
work in series to parse the text of the query and produce an AST. - Next,
SemanticQueryBuilder
translates the AST into an instance of the SQM (Semantic Query Model) defined inorg.hibernate.query.sqm
. - Next,
StandardSqmTranslator
transforms the SQM tree and produces a SQL AST, an instance of the syntax tree defined byorg.hibernate.sql.ast.tree
. - Finally, a SQL dialect-specific implementation of
SqlAstTranslator
produces an executable SQL statement.
- See Also:
HqlTranslator
,SqmQueryImplementor
,NamedSqmQueryMemento
-
Interface Summary Interface Description FunctionRenderingSupport Support forSqmFunctionDescriptor
s that ultimately want to perform SQL rendering themselves.SqmFunctionDescriptor A factory for SQM nodes representing invocations of a certain named function. -
Class Summary Class Description AbstractSqmFunctionDescriptor AbstractSqmSelfRenderingFunctionDescriptor JdbcEscapeFunctionDescriptor Acts as a wrapper to anotherSqmFunctionDescriptor
, rendering the standard JDBC escape sequence{fn f(x, y)}
around the invocation syntax generated by its delegate.MultipatternSqmFunctionDescriptor Support for overloaded functions defined in terms of a list of patterns, one for each possible function arity.NamedSqmFunctionDescriptor Provides a standard implementation that supports the majority of the HQL functions that are translated to SQL.PatternBasedSqmFunctionDescriptor Support for HQL functions that have different representations in different SQL dialects, where the difference can be handled via a pattern template.SelfRenderingAggregateFunctionSqlAstExpression Representation of an aggregate function call in the SQL AST for impls that know how to render themselves.SelfRenderingFunctionSqlAstExpression Representation of a function call in the SQL AST for impls that know how to render themselves.SelfRenderingOrderedSetAggregateFunctionSqlAstExpression Representation of an aggregate function call in the SQL AST for impls that know how to render themselves.SelfRenderingSqmAggregateFunction<T> SelfRenderingSqmFunction<T> SelfRenderingSqmOrderedSetAggregateFunction<T> SelfRenderingSqmWindowFunction<T> SelfRenderingWindowFunctionSqlAstExpression Representation of a window function call in the SQL AST for impls that know how to render themselves.SqmFunctionRegistry Defines a registry forSqmFunctionDescriptor
instances. -
Enum Summary Enum Description FunctionKind The kind of function e.g.