public interface InsertOptions
Options to be used with insert such as ON CONFLICT DO UPDATE | NOTHING.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The builder for InsertOptions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InsertOptions
Use ON CONFLICT DO NOTHING with automatic determination of the unique columns to conflict on.static final InsertOptions
Use ON CONFLICT UPDATE with automatic determination of the unique columns to conflict on. -
Method Summary
Modifier and TypeMethodDescriptionstatic InsertOptions.Builder
builder()
Return a builder for InsertOptions.Return the constraint name that is used for ON CONFLICT.Return if GetGeneratedKeys should be used to fetch the generated keys after insert.key()
Return the key for these build options.Return the unique columns that is used for ON CONFLICT.Return the ON CONFLICT UPDATE SET clause.
-
Field Details
-
ON_CONFLICT_UPDATE
Use ON CONFLICT UPDATE with automatic determination of the unique columns to conflict on.Uses mapping to determine the unique columns -
@Column(unique=true)
and@Index(unique=true)
. -
ON_CONFLICT_NOTHING
Use ON CONFLICT DO NOTHING with automatic determination of the unique columns to conflict on.Uses mapping to determine the unique columns -
@Column(unique=true)
and@Index(unique=true)
.
-
-
Method Details
-
builder
Return a builder for InsertOptions. -
constraint
Return the constraint name that is used for ON CONFLICT. -
uniqueColumns
Return the unique columns that is used for ON CONFLICT.When not explicitly set will use mapping like
@Column(unique=true)
to determine the non-unique columns. -
updateSet
Return the ON CONFLICT UPDATE SET clause.When not set will use the non-unique columns.
-
getGetGeneratedKeys
Return if GetGeneratedKeys should be used to fetch the generated keys after insert. -
key
String key()Return the key for these build options.
-