Package org.hibernate.dialect
Class OracleSqlAstTranslator<T extends JdbcOperation>
- java.lang.Object
-
- org.hibernate.sql.ast.spi.AbstractSqlAstTranslator<T>
-
- org.hibernate.dialect.SqlAstTranslatorWithUpsert<T>
-
- org.hibernate.dialect.OracleSqlAstTranslator<T>
-
- All Implemented Interfaces:
Appendable
,SqlAppender
,SqlAstTranslator<T>
,SqlAstWalker
public class OracleSqlAstTranslator<T extends JdbcOperation> extends SqlAstTranslatorWithUpsert<T>
A SQL AST translator for Oracle.
-
-
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 OracleSqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSqlAstTranslator.LockStrategy
determineLockingStrategy(QuerySpec querySpec, AbstractSqlAstTranslator.ForUpdateClause forUpdateClause, Boolean followOnLocking)
protected boolean
needsRecursiveKeywordInWithClause()
Whether the SQL with clause requires the "recursive" keyword for recursive CTEs.protected void
renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)
protected void
renderDmlTargetTableExpression(NamedTableReference tableReference)
protected void
renderMergeSource(OptionalTableUpdate optionalTableUpdate)
protected void
renderMergeSourceAlias()
protected void
renderMergeTargetAlias()
protected void
renderMergeUpdateClause(List<Assignment> assignments, Predicate wherePredicate)
protected void
renderPartitionItem(Expression expression)
protected void
renderRowNumber(SelectClause selectClause, QueryPart queryPart)
protected void
renderSelectTupleComparison(List<SqlSelection> lhsExpressions, SqlTuple tuple, ComparisonOperator operator)
protected boolean
shouldEmulateFetchClause(QueryPart queryPart)
protected boolean
shouldEmulateLateralWithIntersect(QueryPart queryPart)
protected boolean
supportsDuplicateSelectItemsInQueryGroup()
protected boolean
supportsNestedSubqueryCorrelation()
protected boolean
supportsRecursiveCycleClause()
Whether the SQL cycle clause is supported, which can be used for recursive CTEs.protected boolean
supportsRecursiveSearchClause()
Whether the SQL search clause is supported, which can be used for recursive CTEs.protected boolean
supportsRowValueConstructorSyntax()
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.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
supportsSimpleQueryGrouping()
protected boolean
supportsWithClauseInSubquery()
Whether the SQL with clause is supported within a subquery.void
visitBinaryArithmeticExpression(BinaryArithmeticExpression arithmeticExpression)
protected void
visitConflictClause(ConflictClause conflictClause)
void
visitFunctionTableReference(FunctionTableReference tableReference)
protected void
visitInsertStatementOnly(InsertSelectStatement statement)
void
visitOffsetFetchClause(QueryPart queryPart)
void
visitOver(Over<?> over)
void
visitQueryGroup(QueryGroup queryGroup)
void
visitQueryPartTableReference(QueryPartTableReference tableReference)
void
visitQuerySpec(QuerySpec querySpec)
protected void
visitSetAssignment(Assignment assignment)
void
visitSqlSelection(SqlSelection sqlSelection)
protected void
visitUpdateStatementOnly(UpdateStatement statement)
protected void
visitValuesList(List<Values> valuesList)
void
visitValuesTableReference(ValuesTableReference tableReference)
-
Methods inherited from class org.hibernate.dialect.SqlAstTranslatorWithUpsert
createMergeOperation, renderMergeInsert, renderMergeInto, renderMergeOn, renderMergeUpdate, renderMergeUsing, renderUpsertStatement, wrapMergeSourceExpression
-
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, 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, getParameterRenderingMode, getQueryPartForRowNumbering, getQueryPartStack, getRowsToSkip, getSelectItemReference, getSessionFactory, getSkipLocked, getSortSpecificationsRowNumbering, getSql, getSqlAppender, getSqlBuffer, getSqlTypeName, getSqlTypeName, getStatement, getStatementStack, getStringType, getUniqueConstraintNameThatMayFail, getWrapperOptions, hasAggregateFunctions, hasLimit, hasLimit, hasNestedTableGroupsToRender, hasNonTrivialFromClause, hasOffset, inlineCteTableGroup, inOverOrWithinGroupClause, interpretExpression, isCorrelated, isInRecursiveQueryPart, isInSubquery, isIntegerDivisionEmulationRequired, isLiteral, isParameter, isRowNumberingCurrentQueryPart, isRowsOnlyFetchClauseType, isStruct, needsCteInlining, needsLocking, needsMaxRows, 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, renderFromClauseAfterUpdateSet, renderFromClauseExcludingDmlTargetReference, renderFromClauseJoiningDmlTargetReference, renderFromClauseSpaces, renderInsertIntoNoColumns, renderIntoIntoAndTable, renderLimitOffsetClause, renderLimitOffsetClause, renderLiteral, renderMaterializationHint, renderNamedTableReference, renderNull, renderOffset, renderOffsetExpression, renderOffsetFetchClause, renderOffsetFetchClause, renderOrderBy, renderParameterAsParameter, renderParameterAsParameter, renderPrimaryTableReference, renderQueryGroup, renderRecursiveCteVirtualSelections, renderRootTableGroup, renderRowNumberingSelectItems, renderRowsToClause, renderRowsToClause, renderSearchClause, renderSelectExpression, renderSelectExpressionWithCastedOrInlinedPlainParameters, renderSelectSimpleComparison, renderSetClause, renderSkipFirstClause, renderSkipFirstClause, renderSortExpression, renderStandardCycleClause, renderStandardSearchClause, renderStringContainsExactlyPredicate, renderTableGroup, renderTableGroupJoin, renderTableReferenceIdentificationVariable, renderTableReferenceJoins, renderTableReferenceJoins, renderTopClause, renderTopClause, renderTopStartAtClause, renderTopStartAtClause, renderTupleComparisonStandard, renderUpdateClause, renderVirtualSelections, renderWrappedParameter, resolveAliasedExpression, resolveAliasedExpression, resolveExpressionToAlias, setLimitParameter, setOffsetParameter, shouldInlineCte, simpleColumnWriteFragmentRendering, supportsArrayConstructor, supportsDistinctFromPredicate, supportsFilterClause, supportsIntersect, supportsJoinInMutationStatementSubquery, supportsJoinsInDelete, supportsNestedWithClause, supportsNullPrecedence, supportsQuantifiedPredicates, supportsRecursiveClauseArrayAndRowEmulation, supportsRecursiveCycleUsingClause, supportsRowConstructor, supportsRowValueConstructorDistinctFromSyntax, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsRowValueConstructorSyntaxInSet, supportsWithClause, translate, translateDelete, translateInsert, translateSelect, translateUpdate, useOffsetFetchClause, visitAggregateColumnWriteExpression, visitAnsiCaseSearchedExpression, visitAnsiCaseSimpleExpression, visitAny, visitArithmeticOperand, 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, visitOverClause, visitOverClause, visitOverflow, visitParameter, visitParameterAsParameter, visitPartitionByClause, visitPartitionExpressions, visitPartitionExpressions, visitQueryLiteral, visitRecursivePath, visitRelationalPredicate, visitReturningColumns, visitReturningColumns, visitSelectClause, visitSelectStatement, visitSelfRenderingExpression, visitSelfRenderingPredicate, visitSetAssignmentEmulateJoin, visitSortSpecification, visitSortSpecification, visitSqlFragmentPredicate, visitSqlSelectExpression, 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
-
OracleSqlAstTranslator
public OracleSqlAstTranslator(SessionFactoryImplementor sessionFactory, Statement statement)
-
-
Method Detail
-
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>
-
renderMergeUpdateClause
protected void renderMergeUpdateClause(List<Assignment> assignments, Predicate wherePredicate)
- Overrides:
renderMergeUpdateClause
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>
-
needsRecursiveKeywordInWithClause
protected boolean needsRecursiveKeywordInWithClause()
Description copied from class:AbstractSqlAstTranslator
Whether the SQL with clause requires the "recursive" keyword for recursive CTEs.- Overrides:
needsRecursiveKeywordInWithClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
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>
-
supportsRecursiveSearchClause
protected boolean supportsRecursiveSearchClause()
Description copied from class:AbstractSqlAstTranslator
Whether the SQL search clause is supported, which can be used for recursive CTEs.- Overrides:
supportsRecursiveSearchClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsRecursiveCycleClause
protected boolean supportsRecursiveCycleClause()
Description copied from class:AbstractSqlAstTranslator
Whether the SQL cycle clause is supported, which can be used for recursive CTEs.- Overrides:
supportsRecursiveCycleClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitSqlSelection
public void visitSqlSelection(SqlSelection sqlSelection)
- Specified by:
visitSqlSelection
in interfaceSqlAstWalker
- Overrides:
visitSqlSelection
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
determineLockingStrategy
protected AbstractSqlAstTranslator.LockStrategy determineLockingStrategy(QuerySpec querySpec, AbstractSqlAstTranslator.ForUpdateClause forUpdateClause, Boolean followOnLocking)
- Overrides:
determineLockingStrategy
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
shouldEmulateLateralWithIntersect
protected boolean shouldEmulateLateralWithIntersect(QueryPart queryPart)
- Overrides:
shouldEmulateLateralWithIntersect
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsNestedSubqueryCorrelation
protected boolean supportsNestedSubqueryCorrelation()
- Overrides:
supportsNestedSubqueryCorrelation
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
shouldEmulateFetchClause
protected boolean shouldEmulateFetchClause(QueryPart queryPart)
-
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>
-
visitQueryPartTableReference
public void visitQueryPartTableReference(QueryPartTableReference tableReference)
- Specified by:
visitQueryPartTableReference
in interfaceSqlAstWalker
- Overrides:
visitQueryPartTableReference
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitFunctionTableReference
public void visitFunctionTableReference(FunctionTableReference tableReference)
- Specified by:
visitFunctionTableReference
in interfaceSqlAstWalker
- Overrides:
visitFunctionTableReference
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>
-
supportsSimpleQueryGrouping
protected boolean supportsSimpleQueryGrouping()
- Overrides:
supportsSimpleQueryGrouping
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitOffsetFetchClause
public void visitOffsetFetchClause(QueryPart queryPart)
- Specified by:
visitOffsetFetchClause
in interfaceSqlAstWalker
- Overrides:
visitOffsetFetchClause
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderRowNumber
protected void renderRowNumber(SelectClause selectClause, QueryPart queryPart)
- Overrides:
renderRowNumber
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitOver
public void visitOver(Over<?> over)
- Specified by:
visitOver
in interfaceSqlAstWalker
- Overrides:
visitOver
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderComparison
protected void renderComparison(Expression lhs, ComparisonOperator operator, Expression rhs)
- Overrides:
renderComparison
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderSelectTupleComparison
protected void renderSelectTupleComparison(List<SqlSelection> lhsExpressions, SqlTuple tuple, ComparisonOperator operator)
- Overrides:
renderSelectTupleComparison
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderPartitionItem
protected void renderPartitionItem(Expression expression)
- Overrides:
renderPartitionItem
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
visitBinaryArithmeticExpression
public void visitBinaryArithmeticExpression(BinaryArithmeticExpression arithmeticExpression)
- Specified by:
visitBinaryArithmeticExpression
in interfaceSqlAstWalker
- Overrides:
visitBinaryArithmeticExpression
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsDuplicateSelectItemsInQueryGroup
protected boolean supportsDuplicateSelectItemsInQueryGroup()
- Overrides:
supportsDuplicateSelectItemsInQueryGroup
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
supportsRowValueConstructorSyntax
protected boolean supportsRowValueConstructorSyntax()
Description copied from class:AbstractSqlAstTranslator
Is this dialect known to support what ANSI-SQL terms "row value constructor" syntax; sometimes called tuple syntax.Basically, does it support syntax like
... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...
- Overrides:
supportsRowValueConstructorSyntax
in classAbstractSqlAstTranslator<T extends JdbcOperation>
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax; false otherwise.
-
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.
-
visitSetAssignment
protected void visitSetAssignment(Assignment assignment)
- Overrides:
visitSetAssignment
in classAbstractSqlAstTranslator<T extends JdbcOperation>
-
renderMergeTargetAlias
protected void renderMergeTargetAlias()
- Overrides:
renderMergeTargetAlias
in classSqlAstTranslatorWithUpsert<T extends JdbcOperation>
-
renderMergeSourceAlias
protected void renderMergeSourceAlias()
- Overrides:
renderMergeSourceAlias
in classSqlAstTranslatorWithUpsert<T extends JdbcOperation>
-
renderMergeSource
protected void renderMergeSource(OptionalTableUpdate optionalTableUpdate)
- Overrides:
renderMergeSource
in classSqlAstTranslatorWithUpsert<T extends JdbcOperation>
-
-