Record Class InsertConflictRenderingPlan.OnDuplicateKey
java.lang.Object
java.lang.Record
org.hibernate.dialect.sql.ast.spi.InsertConflictRenderingPlan.OnDuplicateKey
- All Implemented Interfaces:
InsertConflictRenderingPlan
- Enclosing interface:
InsertConflictRenderingPlan
public static record InsertConflictRenderingPlan.OnDuplicateKey(DoNothingSyntax doNothingSyntax, ValuesRowReferenceStyle valuesRowReferenceStyle)
extends Record
implements InsertConflictRenderingPlan
Render an on duplicate key update clause.
For InsertConflictAction.DO_UPDATE, the usual shape is:
insert into book (isbn, title) values (?, ?)
on duplicate key update title = values(title)
valuesRowReferenceStyle controls whether proposed values are expressed
using values(title), an explicit excluded row alias, or the database's
implicit excluded.title pseudo-row.
Because this syntax has no native do-nothing form on some databases,
doNothingSyntax selects either a harmless self-assignment such as
isbn=isbn, or a nothing keyword after on duplicate key update.
Constraint names are not supported by this plan.
- Since:
- 8.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface InsertConflictRenderingPlan
InsertConflictRenderingPlan.ConstraintViolation, InsertConflictRenderingPlan.Merge, InsertConflictRenderingPlan.None, InsertConflictRenderingPlan.OnDuplicateKey, InsertConflictRenderingPlan.Standard -
Constructor Summary
ConstructorsConstructorDescriptionOnDuplicateKey(DoNothingSyntax doNothingSyntax, ValuesRowReferenceStyle valuesRowReferenceStyle) Creates an instance of aOnDuplicateKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedoNothingSyntaxrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Returns the value of thevaluesRowReferenceStylerecord component.
-
Constructor Details
-
OnDuplicateKey
public OnDuplicateKey(DoNothingSyntax doNothingSyntax, ValuesRowReferenceStyle valuesRowReferenceStyle) Creates an instance of aOnDuplicateKeyrecord class.- Parameters:
doNothingSyntax- the value for thedoNothingSyntaxrecord componentvaluesRowReferenceStyle- the value for thevaluesRowReferenceStylerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
doNothingSyntax
Returns the value of thedoNothingSyntaxrecord component.- Returns:
- the value of the
doNothingSyntaxrecord component
-
valuesRowReferenceStyle
Returns the value of thevaluesRowReferenceStylerecord component.- Returns:
- the value of the
valuesRowReferenceStylerecord component
-