Package org.hibernate.sql.ast.spi
Interface SqlExpressionResolver
-
- All Known Implementing Classes:
BaseSqmToSqlAstConverter.DelegatingSqmAliasedNodeCollector
,BaseSqmToSqlAstConverter.SqmAliasedNodePositionTracker
,DomainResultCreationStateImpl
,SqlAstProcessingStateImpl
,SqlAstQueryPartProcessingStateImpl
public interface SqlExpressionResolver
Resolution of a SqlSelection reference for a given SqlSelectable. Some SqlSelectable are required to be qualified (e.g. a Column) - this is indicated by the QualifiableSqlSelectable sub-type. The NonQualifiableSqlSelectable sub-type indicates a SqlSelectable that does not require qualification (e.g. a literal).The point of this contract is to allow "unique-ing" of SqlSelectable references in a query to a single SqlSelection reference - effectively a caching of SqlSelection instances keyed by the SqlSelectable (+ qualifier when applicable) that it refers to. Note also that the returns can be a specialized Expression represented by
SqlSelectionExpression
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SqlExpressionResolver.ColumnReferenceKey
-
Method Summary
-
-
-
Method Detail
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(String tableExpression, String columnExpression, JdbcMapping jdbcMapping)
Helper for generating an expression key for a column reference.
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(TableReference tableReference, String columnExpression, JdbcMapping jdbcMapping)
Helper for generating an expression key for a column reference.
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(TableReference tableReference, SelectablePath selectablePath, JdbcMapping jdbcMapping)
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(String qualifier, SelectablePath selectablePath, JdbcMapping jdbcMapping)
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(String columnExpression)
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(String tableExpression, SelectableMapping selectable)
Convenience form for creating a key from table expression and SelectableMapping
-
createColumnReferenceKey
static SqlExpressionResolver.ColumnReferenceKey createColumnReferenceKey(TableReference tableReference, SelectableMapping selectable)
Convenience form for creating a key from TableReference and SelectableMapping
-
resolveSqlExpression
default Expression resolveSqlExpression(TableReference tableReference, SelectableMapping selectableMapping)
-
resolveSqlExpression
Expression resolveSqlExpression(SqlExpressionResolver.ColumnReferenceKey key, Function<SqlAstProcessingState,Expression> creator)
Given a qualifier + a qualifiableSqlExpressible
, resolve the (Sql)Expression reference.
-
resolveSqlSelection
SqlSelection resolveSqlSelection(Expression expression, JavaType<?> javaType, FetchParent fetchParent, TypeConfiguration typeConfiguration)
Resolve the SqlSelection for the given expression
-
-