Module io.ebean.api
Package io.ebean

Interface InsertOptions.Builder

Enclosing interface:
InsertOptions

public static interface InsertOptions.Builder
The builder for InsertOptions.
  • 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

      InsertOptions.Builder constraint(String constraint)
      Specify an explicit conflict constraint name.

      When this is used then unique columns will not be used.

    • uniqueColumns

      InsertOptions.Builder uniqueColumns(String 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

      InsertOptions.Builder updateSet(String updateSet)
      Specify the ON CONFLICT DO UPDATE SET clause.

      When not specified ebean will include all the non-unique columns.

    • getGeneratedKeys

      InsertOptions.Builder getGeneratedKeys(boolean getGeneratedKeys)
      Specify if GetGeneratedKeys should be used to return generated keys.
    • build

      InsertOptions build()
      Build and return the insert options.