Interface Upsert

All Superinterfaces:
Segment, Visitable

public interface Upsert extends Segment, Visitable
An upsert (MERGE / INSERT … ON CONFLICT / INSERT … ON DUPLICATE KEY) statement.
Since:
4.1
Author:
Christoph Strobl
  • Method Details

    • builder

      static UpsertBuilder.UpsertInsert builder(Table table)
      Start building an Upsert for the given Table.
      Parameters:
      table - the target table; must not be null.
      Returns:
      the first builder step.
    • create

      static Upsert create(Table table, Consumer<UpsertBuilder> consumer)
      Create an Upsert for the given Table.
      Parameters:
      table - the target table; must not be null.
      consumer - the consumer to configure the upsert.
      Returns:
      the first builder step.
    • getTable

      Table getTable()
      Return the target table.
    • getAssignments

      List<Assignment> getAssignments()
      Return the column-value assignments for the INSERT part.
    • getConflictColumns

      List<Column> getConflictColumns()
      Return columns that identify a conflicting row.
    • getUpdateColumns

      List<Column> getUpdateColumns()
      Return columns to be assigned in the UPDATE part.