public interface InsertOptions
Options to be used with insert such as ON CONFLICT DO UPDATE | NOTHING.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe builder for InsertOptions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InsertOptionsUse ON CONFLICT DO NOTHING with automatic determination of the unique columns to conflict on.static final InsertOptionsUse ON CONFLICT UPDATE with automatic determination of the unique columns to conflict on. -
Method Summary
Modifier and TypeMethodDescriptionstatic InsertOptions.Builderbuilder()Return a builder for InsertOptions.@Nullable StringReturn the constraint name that is used for ON CONFLICT.@Nullable BooleanReturn if GetGeneratedKeys should be used to fetch the generated keys after insert.key()Return the key for these build options.@Nullable StringReturn the unique columns that is used for ON CONFLICT.@Nullable StringReturn 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
@Nullable String constraint()Return the constraint name that is used for ON CONFLICT. -
uniqueColumns
@Nullable String 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
@Nullable String updateSet()Return the ON CONFLICT UPDATE SET clause.When not set will use the non-unique columns.
-
getGetGeneratedKeys
@Nullable Boolean getGetGeneratedKeys()Return if GetGeneratedKeys should be used to fetch the generated keys after insert. -
key
String key()Return the key for these build options.
-