- Enclosing interface:
InsertOptions
public static interface InsertOptions.Builder
The builder for InsertOptions.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build and return the insert options.constraint
(String constraint) Specify an explicit conflict constraint name.getGeneratedKeys
(boolean getGeneratedKeys) Specify if GetGeneratedKeys should be used to return generated keys.Use a ON CONFLICT DO NOTHING automatically determining the unique columns.Use a ON CONFLICT UPDATE automatically determining the unique columns.uniqueColumns
(String uniqueColumns) Specify the unique columns for the conflict target.Specify the ON CONFLICT DO UPDATE SET clause.
-
Method Details
-
onConflictUpdate
InsertOptions.Builder onConflictUpdate()Use a ON CONFLICT UPDATE automatically determining the unique columns. -
onConflictNothing
InsertOptions.Builder onConflictNothing()Use a ON CONFLICT DO NOTHING automatically determining the unique columns. -
constraint
Specify an explicit conflict constraint name.When this is used then unique columns will not be used.
-
uniqueColumns
Specify the unique columns for the conflict target.When not specified and constraint is also not specified then it will automatically determine the unique columns based on mapping like
@Column(unique=true)
and@Index(unique=true)
. -
updateSet
Specify the ON CONFLICT DO UPDATE SET clause.When not specified ebean will include all the non-unique columns.
-
getGeneratedKeys
Specify if GetGeneratedKeys should be used to return generated keys. -
build
InsertOptions build()Build and return the insert options.
-