Package org.hibernate.dialect
Class HANASqlAstTranslator<T extends JdbcOperation>
- java.lang.Object
-
- org.hibernate.sql.ast.spi.AbstractSqlAstTranslator<T>
-
- org.hibernate.dialect.HANASqlAstTranslator<T>
-
- All Implemented Interfaces:
Appendable
,SqlAppender
,SqlAstTranslator<T>
,SqlAstWalker
public class HANASqlAstTranslator<T extends JdbcOperation> extends AbstractSqlAstTranslator<T>
A SQL AST translator for HANA.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.sql.ast.spi.AbstractSqlAstTranslator
AbstractSqlAstTranslator.ForUpdateClause, AbstractSqlAstTranslator.LockStrategy, AbstractSqlAstTranslator.SubQueryRelationalRestrictionEmulationRenderer<X extends Expression>
-
-
Field Summary
-
Fields inherited from interface org.hibernate.sql.ast.spi.SqlAppender
CLOSE_PARENTHESIS, COMMA_SEPARATOR, COMMA_SEPARATOR_CHAR, NO_SEPARATOR, NULL_KEYWORD, OPEN_PARENTHESIS, PARAM_MARKER, WHITESPACE
-
-
Constructor Summary
Constructors Constructor Description HANASqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SqlAstNodeRenderingMode
getParameterRenderingMode()
protected String
getSkipLocked()
protected boolean
isCorrelated(CteStatement cteStatement)
protected void
renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)
protected void
renderDmlTargetTableExpression(NamedTableReference tableReference)
protected void
renderFromClauseAfterUpdateSet(UpdateStatement statement)
protected void
renderInsertIntoNoColumns(TableInsertStandard tableInsert)
Handle rendering an insert with no columnsprotected void
renderPartitionItem(Expression expression)
protected void
renderUpdateClause(UpdateStatement updateStatement)
protected boolean
shouldEmulateFetchClause(QueryPart queryPart)
protected boolean
supportsRowValueConstructorGtLtSyntax()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with<
,>
,≤
and≥
operators.protected boolean
supportsRowValueConstructorSyntaxInQuantifiedPredicates()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.protected boolean
supportsWithClauseInSubquery()
Whether the SQL with clause is supported within a subquery.protected void
visitArithmeticOperand(Expression expression)
void
visitBinaryArithmeticExpression(BinaryArithmeticExpression arithmeticExpression)
protected void
visitConflictClause(ConflictClause conflictClause)
void
visitFunctionTableReference(FunctionTableReference tableReference)
protected void
visitInsertStatementOnly(InsertSelectStatement statement)
void
visitOffsetFetchClause(QueryPart queryPart)
void
visitQueryGroup(QueryGroup queryGroup)
void
visitQueryPartTableReference(QueryPartTableReference tableReference)
void
visitQuerySpec(QuerySpec querySpec)
protected void
visitUpdateStatementOnly(UpdateStatement statement)
protected void
visitValuesList(List<Values> valuesList)
void
visitValuesTableReference(ValuesTableReference tableReference)
-
Methods inherited from class org.hibernate.sql.ast.spi.AbstractSqlAstTranslator
addAdditionalWherePredicate, addAppliedParameterBinding, append, append, append, appendBackslashEscapedLikeLiteral, appendSql, appendSql, appendSql, appendSql, appendSql, applyParameter, areAllResultsParameters, areAllResultsParameters, assertRowsOnlyFetchClauseType, castFunction, castNumberToString, cleanup, createRowMatchingPredicate, determineColumnReferenceQualifier, determineCyclePathColumnName, determineLateralEmulationPredicate, determineLockingStrategy, determineWhereClauseRestrictionWithJoinEmulation, determineWhereClauseRestrictionWithJoinEmulation, emulateCycleClauseWithRowAndArray, emulateFetchOffsetWithWindowFunctions, emulateFetchOffsetWithWindowFunctions, emulateFetchOffsetWithWindowFunctionsVisitQueryPart, emulateQuantifiedTupleSubQueryPredicate, emulateQueryPartTableReferenceColumnAliasing, emulateSearchClauseOrderWithRowAndArray, emulateSelectTupleComparison, emulateSortSpecificationNullPrecedence, emulateSubQueryRelationalRestrictionPredicate, emulateTupleComparison, emulateValuesTableReferenceColumnAliasing, getAffectedTableNames, getAppliedParameterBindings, getArrayContainsFunction, getBooleanType, getCastTypeName, getCastTypeName, getClauseStack, getCteStatement, getCurrentClauseStack, getCurrentCteStatement, getCurrentDmlStatement, getCurrentQueryPart, getDialect, getDual, getEffectiveLockMode, getEffectiveLockMode, getEffectiveLockTimeout, getFetchClauseTypeForRowNumbering, getForShare, getForUpdate, getForUpdateWithClause, getFromDual, getFromDualForSelectOnly, getIntegerType, getJdbcLockStrategy, getJdbcParameterBindings, getJdbcServices, getLeftHandExpression, getLimit, getLimitParameter, getLockOptions, getMaxRows, getNoWait, getOffsetParameter, getParameterBinders, getParameterBindValue, getQueryPartForRowNumbering, getQueryPartStack, getRowsToSkip, getSelectItemReference, getSessionFactory, getSortSpecificationsRowNumbering, getSql, getSqlAppender, getSqlBuffer, getSqlTypeName, getSqlTypeName, getStatement, getStatementStack, getStringType, getUniqueConstraintNameThatMayFail, getWrapperOptions, hasAggregateFunctions, hasLimit, hasLimit, hasNestedTableGroupsToRender, hasNonTrivialFromClause, hasOffset, inlineCteTableGroup, inOverOrWithinGroupClause, interpretExpression, isInRecursiveQueryPart, isInSubquery, isIntegerDivisionEmulationRequired, isLiteral, isParameter, isRowNumberingCurrentQueryPart, isRowsOnlyFetchClauseType, isStruct, needsCteInlining, needsLocking, needsMaxRows, needsRecursiveKeywordInWithClause, needsRowsToSkip, prepareLimitOffsetParameters, processNestedTableGroupJoins, processTableGroupJoin, processTableGroupJoins, registerAffectedTable, registerAffectedTable, render, renderAsLiteral, renderBackslashEscapedLikePattern, renderCaseInsensitiveLikeEmulation, renderCasted, renderCombinedLimitClause, renderCombinedLimitClause, renderCommaSeparated, renderCommaSeparatedSelectExpression, renderCommaSeparatedSelectExpression, renderComparisonDistinctOperator, renderComparisonEmulateCase, renderComparisonEmulateDecode, renderComparisonEmulateDecode, renderComparisonEmulateIntersect, renderComparisonStandard, renderCteColumns, renderCycleClause, renderDeleteClause, renderDerivedTableReference, renderDmlTargetTableGroup, renderExpressionAsClauseItem, renderExpressionAsLiteral, renderExpressionsAsSubquery, renderFetch, renderFetchExpression, renderFetchPlusOffsetExpression, renderFetchPlusOffsetExpressionAsLiteral, renderFetchPlusOffsetExpressionAsSingleParameter, renderFirstClause, renderFirstClause, renderFirstSkipClause, renderFirstSkipClause, renderForUpdateClause, renderFromClauseExcludingDmlTargetReference, renderFromClauseJoiningDmlTargetReference, renderFromClauseSpaces, renderIntoIntoAndTable, renderLimitOffsetClause, renderLimitOffsetClause, renderLiteral, renderMaterializationHint, renderMergeUpdateClause, renderNamedTableReference, renderNull, renderOffset, renderOffsetExpression, renderOffsetFetchClause, renderOffsetFetchClause, renderOrderBy, renderParameterAsParameter, renderParameterAsParameter, renderPrimaryTableReference, renderQueryGroup, renderRecursiveCteVirtualSelections, renderRootTableGroup, renderRowNumber, renderRowNumberingSelectItems, renderRowsToClause, renderRowsToClause, renderSearchClause, renderSelectExpression, renderSelectExpressionWithCastedOrInlinedPlainParameters, renderSelectSimpleComparison, renderSelectTupleComparison, renderSetClause, renderSkipFirstClause, renderSkipFirstClause, renderSortExpression, renderStandardCycleClause, renderStandardSearchClause, renderStringContainsExactlyPredicate, renderTableGroup, renderTableGroupJoin, renderTableReferenceIdentificationVariable, renderTableReferenceJoins, renderTableReferenceJoins, renderTopClause, renderTopClause, renderTopStartAtClause, renderTopStartAtClause, renderTupleComparisonStandard, renderVirtualSelections, renderWrappedParameter, resolveAliasedExpression, resolveAliasedExpression, resolveExpressionToAlias, setLimitParameter, setOffsetParameter, shouldEmulateLateralWithIntersect, shouldInlineCte, simpleColumnWriteFragmentRendering, supportsArrayConstructor, supportsDistinctFromPredicate, supportsDuplicateSelectItemsInQueryGroup, supportsFilterClause, supportsIntersect, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsNestedSubqueryCorrelation, supportsNestedWithClause, supportsNullPrecedence, supportsQuantifiedPredicates, supportsRecursiveClauseArrayAndRowEmulation, supportsRecursiveCycleClause, supportsRecursiveCycleUsingClause, supportsRecursiveSearchClause, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsRowValueConstructorSyntaxInSet, supportsSimpleQueryGrouping, supportsWithClause, translate, translateDelete, translateInsert, translateSelect, translateUpdate, useOffsetFetchClause, visitAggregateColumnWriteExpression, visitAnsiCaseSearchedExpression, visitAnsiCaseSimpleExpression, visitAny, visitAssignment, visitBetweenPredicate, visitBooleanExpressionPredicate, visitCaseSearchedExpression, visitCaseSearchedExpression, visitCaseSimpleExpression, visitCaseSimpleExpression, visitCastTarget, visitCollation, visitColumnReference, visitColumnWriteFragment, visitConversion, visitCteContainer, visitCteDefinition, visitCteObject, visitCustomTableDelete, visitCustomTableInsert, visitCustomTableUpdate, visitDecodeCaseSearchedExpression, visitDeleteStatement, visitDeleteStatementOnly, visitDistinct, visitDuration, visitDurationUnit, visitEmbeddableTypeLiteral, visitEntityTypeLiteral, visitEvery, visitExistsPredicate, visitExtractUnit, visitFilterFragmentPredicate, visitFilterPredicate, visitFormat, visitForUpdateClause, visitFromClause, visitGroupByClause, visitGroupedPredicate, visitHavingClause, visitInArrayPredicate, visitInListPredicate, visitInsertSource, visitInsertStatement, visitInsertStatementEmulateMerge, visitInSubQueryPredicate, visitJdbcLiteral, visitJunction, visitLikePredicate, visitModifiedSubQueryExpression, visitNamedTableReference, visitNegatedPredicate, visitNestedColumnReference, visitNullnessPredicate, visitOnDuplicateKeyConflictClause, visitOptionalTableUpdate, visitOrderBy, visitOver, visitOverClause, visitOverClause, visitOverflow, visitParameter, visitParameterAsParameter, visitPartitionByClause, visitPartitionExpressions, visitPartitionExpressions, visitQueryLiteral, visitRecursivePath, visitRelationalPredicate, visitReturningColumns, visitReturningColumns, visitSelectClause, visitSelectStatement, visitSelfRenderingExpression, visitSelfRenderingPredicate, visitSetAssignment, visitSetAssignmentEmulateJoin, visitSortSpecification, visitSortSpecification, visitSqlFragmentPredicate, visitSqlSelectExpression, visitSqlSelection, visitSqlSelectionExpression, visitSqlSelections, visitStandardConflictClause, visitStandardTableDelete, visitStandardTableInsert, visitStandardTableUpdate, visitStar, visitSummarization, visitTableGroup, visitTableGroupJoin, visitTableReferenceJoin, visitThruthnessPredicate, visitTrimSpecification, visitTuple, visitUnaryOperationExpression, visitUnparsedNumericLiteral, visitUpdateStatement, visitUpdateStatementEmulateInlineView, visitUpdateStatementEmulateMerge, visitUpdateStatementEmulateTupleSet, visitValuesListEmulateSelectUnion, visitValuesListStandard, visitWhereClause, withParameterRenderingMode, withRowNumbering
-
-
-
-
Constructor Detail
-
HANASqlAstTranslator
public HANASqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)
-
-
Method Detail
-
visitBinaryArithmeticExpression
public void visitBinaryArithmeticExpression(BinaryArithmeticExpression arithmeticExpression)
- Specified by:
visitBinaryArithmeticExpression
in interfaceSqlAstWalker
- Overrides:
visitBinaryArithmeticExpression
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitArithmeticOperand
protected void visitArithmeticOperand(Expression expression)
- Overrides:
visitArithmeticOperand
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitInsertStatementOnly
protected void visitInsertStatementOnly(InsertSelectStatement statement)
- Overrides:
visitInsertStatementOnly
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitUpdateStatementOnly
protected void visitUpdateStatementOnly(UpdateStatement statement)
- Overrides:
visitUpdateStatementOnly
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderUpdateClause
protected void renderUpdateClause(UpdateStatement updateStatement)
- Overrides:
renderUpdateClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderFromClauseAfterUpdateSet
protected void renderFromClauseAfterUpdateSet(UpdateStatement statement)
- Overrides:
renderFromClauseAfterUpdateSet
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderDmlTargetTableExpression
protected void renderDmlTargetTableExpression(NamedTableReference tableReference)
- Overrides:
renderDmlTargetTableExpression
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitConflictClause
protected void visitConflictClause(ConflictClause conflictClause)
- Overrides:
visitConflictClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
shouldEmulateFetchClause
protected boolean shouldEmulateFetchClause(QueryPart queryPart)
-
supportsWithClauseInSubquery
protected boolean supportsWithClauseInSubquery()
Description copied from class:AbstractSqlAstTranslator
Whether the SQL with clause is supported within a subquery.- Overrides:
supportsWithClauseInSubquery
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
isCorrelated
protected boolean isCorrelated(CteStatement cteStatement)
- Overrides:
isCorrelated
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitQueryGroup
public void visitQueryGroup(QueryGroup queryGroup)
- Specified by:
visitQueryGroup
in interfaceSqlAstWalker
- Overrides:
visitQueryGroup
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitQuerySpec
public void visitQuerySpec(QuerySpec querySpec)
- Specified by:
visitQuerySpec
in interfaceSqlAstWalker
- Overrides:
visitQuerySpec
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitQueryPartTableReference
public void visitQueryPartTableReference(QueryPartTableReference tableReference)
- Specified by:
visitQueryPartTableReference
in interfaceSqlAstWalker
- Overrides:
visitQueryPartTableReference
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
getParameterRenderingMode
protected SqlAstNodeRenderingMode getParameterRenderingMode()
- Overrides:
getParameterRenderingMode
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitFunctionTableReference
public void visitFunctionTableReference(FunctionTableReference tableReference)
- Specified by:
visitFunctionTableReference
in interfaceSqlAstWalker
- Overrides:
visitFunctionTableReference
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitOffsetFetchClause
public void visitOffsetFetchClause(QueryPart queryPart)
- Specified by:
visitOffsetFetchClause
in interfaceSqlAstWalker
- Overrides:
visitOffsetFetchClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderComparison
protected void renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)
- Overrides:
renderComparison
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderPartitionItem
protected void renderPartitionItem(Expression expression)
- Overrides:
renderPartitionItem
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsRowValueConstructorSyntaxInQuantifiedPredicates
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates()
Description copied from class:AbstractSqlAstTranslator
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with quantified predicates.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ALL (select ...) ...
- Overrides:
supportsRowValueConstructorSyntaxInQuantifiedPredicates
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax with quantified predicates; false otherwise.
-
supportsRowValueConstructorGtLtSyntax
protected boolean supportsRowValueConstructorGtLtSyntax()
Description copied from class:AbstractSqlAstTranslator
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax with<
,>
,≤
and≥
operators.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) < ('Steve', 'Ebersole') ...
- Overrides:
supportsRowValueConstructorGtLtSyntax
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax with relational comparison operators; false otherwise.
-
renderInsertIntoNoColumns
protected void renderInsertIntoNoColumns(TableInsertStandard tableInsert)
Description copied from class:AbstractSqlAstTranslator
Handle rendering an insert with no columns- Overrides:
renderInsertIntoNoColumns
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitValuesList
protected void visitValuesList(List<Values> valuesList)
- Overrides:
visitValuesList
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitValuesTableReference
public void visitValuesTableReference(ValuesTableReference tableReference)
- Specified by:
visitValuesTableReference
in interfaceSqlAstWalker
- Overrides:
visitValuesTableReference
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
getSkipLocked
protected String getSkipLocked()
- Overrides:
getSkipLocked
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
-