Package org.hibernate.dialect
Class SqlAstTranslatorWithUpsert<T extends JdbcOperation>
- java.lang.Object
-
- org.hibernate.sql.ast.spi.AbstractSqlAstTranslator<T>
-
- org.hibernate.dialect.SqlAstTranslatorWithUpsert<T>
-
- All Implemented Interfaces:
Appendable
,SqlAppender
,SqlAstTranslator<T>
,SqlAstWalker
- Direct Known Subclasses:
OracleSqlAstTranslator
public class SqlAstTranslatorWithUpsert<T extends JdbcOperation> extends AbstractSqlAstTranslator<T>
Base SqlAstTranslator for translators which support an insert-or-update (UPSERT) command
-
-
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 Modifier Constructor Description protected
SqlAstTranslatorWithUpsert(SessionFactoryImplementor sessionFactory, Statement statement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MutationOperation
createMergeOperation(OptionalTableUpdate optionalTableUpdate)
Create the MutationOperation for performing the DELETE or UPSERTprotected void
renderMergeInsert(OptionalTableUpdate optionalTableUpdate)
protected void
renderMergeInto(OptionalTableUpdate optionalTableUpdate)
protected void
renderMergeOn(OptionalTableUpdate optionalTableUpdate)
protected void
renderMergeSource(OptionalTableUpdate optionalTableUpdate)
protected void
renderMergeSourceAlias()
protected void
renderMergeTargetAlias()
protected void
renderMergeUpdate(OptionalTableUpdate optionalTableUpdate)
protected void
renderMergeUsing(OptionalTableUpdate optionalTableUpdate)
protected void
renderUpsertStatement(OptionalTableUpdate optionalTableUpdate)
protected boolean
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, 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, 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, needsRecursiveKeywordInWithClause, needsRowsToSkip, prepareLimitOffsetParameters, processNestedTableGroupJoins, processTableGroupJoin, processTableGroupJoins, registerAffectedTable, registerAffectedTable, render, renderAsLiteral, renderBackslashEscapedLikePattern, renderCaseInsensitiveLikeEmulation, renderCasted, renderCombinedLimitClause, renderCombinedLimitClause, renderCommaSeparated, renderCommaSeparatedSelectExpression, renderCommaSeparatedSelectExpression, renderComparison, renderComparisonDistinctOperator, renderComparisonEmulateCase, renderComparisonEmulateDecode, renderComparisonEmulateDecode, renderComparisonEmulateIntersect, renderComparisonStandard, renderCteColumns, renderCycleClause, renderDeleteClause, renderDerivedTableReference, renderDmlTargetTableExpression, renderDmlTargetTableGroup, renderExpressionAsClauseItem, renderExpressionAsLiteral, renderExpressionsAsSubquery, renderFetch, renderFetchExpression, renderFetchPlusOffsetExpression, renderFetchPlusOffsetExpressionAsLiteral, renderFetchPlusOffsetExpressionAsSingleParameter, renderFirstClause, renderFirstClause, renderFirstSkipClause, renderFirstSkipClause, renderForUpdateClause, renderFromClauseAfterUpdateSet, renderFromClauseExcludingDmlTargetReference, renderFromClauseJoiningDmlTargetReference, renderFromClauseSpaces, renderInsertIntoNoColumns, renderIntoIntoAndTable, renderLimitOffsetClause, renderLimitOffsetClause, renderLiteral, renderMaterializationHint, renderMergeUpdateClause, renderNamedTableReference, renderNull, renderOffset, renderOffsetExpression, renderOffsetFetchClause, renderOffsetFetchClause, renderOrderBy, renderParameterAsParameter, renderParameterAsParameter, renderPartitionItem, 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, renderUpdateClause, 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, supportsRowValueConstructorGtLtSyntax, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInInSubQuery, supportsRowValueConstructorSyntaxInQuantifiedPredicates, supportsRowValueConstructorSyntaxInSet, supportsSimpleQueryGrouping, supportsWithClause, supportsWithClauseInSubquery, translate, translateDelete, translateInsert, translateSelect, translateUpdate, useOffsetFetchClause, visitAggregateColumnWriteExpression, visitAnsiCaseSearchedExpression, visitAnsiCaseSimpleExpression, visitAny, visitArithmeticOperand, visitAssignment, visitBetweenPredicate, visitBinaryArithmeticExpression, visitBooleanExpressionPredicate, visitCaseSearchedExpression, visitCaseSearchedExpression, visitCaseSimpleExpression, visitCaseSimpleExpression, visitCastTarget, visitCollation, visitColumnReference, visitColumnWriteFragment, visitConflictClause, visitConversion, visitCteContainer, visitCteDefinition, visitCteObject, visitCustomTableDelete, visitCustomTableInsert, visitCustomTableUpdate, visitDecodeCaseSearchedExpression, visitDeleteStatement, visitDeleteStatementOnly, visitDistinct, visitDuration, visitDurationUnit, visitEmbeddableTypeLiteral, visitEntityTypeLiteral, visitEvery, visitExistsPredicate, visitExtractUnit, visitFilterFragmentPredicate, visitFilterPredicate, visitFormat, visitForUpdateClause, visitFromClause, visitFunctionTableReference, visitGroupByClause, visitGroupedPredicate, visitHavingClause, visitInArrayPredicate, visitInListPredicate, visitInsertSource, visitInsertStatement, visitInsertStatementEmulateMerge, visitInsertStatementOnly, visitInSubQueryPredicate, visitJdbcLiteral, visitJunction, visitLikePredicate, visitModifiedSubQueryExpression, visitNamedTableReference, visitNegatedPredicate, visitNestedColumnReference, visitNullnessPredicate, visitOffsetFetchClause, visitOnDuplicateKeyConflictClause, visitOptionalTableUpdate, visitOrderBy, visitOver, visitOverClause, visitOverClause, visitOverflow, visitParameter, visitParameterAsParameter, visitPartitionByClause, visitPartitionExpressions, visitPartitionExpressions, visitQueryGroup, visitQueryLiteral, visitQueryPartTableReference, visitQuerySpec, 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, visitUpdateStatementOnly, visitValuesList, visitValuesListEmulateSelectUnion, visitValuesListStandard, visitValuesTableReference, visitWhereClause, withParameterRenderingMode, withRowNumbering
-
-
-
-
Constructor Detail
-
SqlAstTranslatorWithUpsert
protected SqlAstTranslatorWithUpsert(SessionFactoryImplementor sessionFactory, Statement statement)
-
-
Method Detail
-
createMergeOperation
public MutationOperation createMergeOperation(OptionalTableUpdate optionalTableUpdate)
Create the MutationOperation for performing the DELETE or UPSERT
-
renderUpsertStatement
protected void renderUpsertStatement(OptionalTableUpdate optionalTableUpdate)
-
renderMergeInto
protected void renderMergeInto(OptionalTableUpdate optionalTableUpdate)
-
renderMergeTargetAlias
protected void renderMergeTargetAlias()
-
renderMergeUsing
protected void renderMergeUsing(OptionalTableUpdate optionalTableUpdate)
-
wrapMergeSourceExpression
protected boolean wrapMergeSourceExpression()
-
renderMergeSource
protected void renderMergeSource(OptionalTableUpdate optionalTableUpdate)
-
renderMergeSourceAlias
protected void renderMergeSourceAlias()
-
renderMergeOn
protected void renderMergeOn(OptionalTableUpdate optionalTableUpdate)
-
renderMergeInsert
protected void renderMergeInsert(OptionalTableUpdate optionalTableUpdate)
-
renderMergeUpdate
protected void renderMergeUpdate(OptionalTableUpdate optionalTableUpdate)
-
-