java.lang.Object
org.springframework.data.relational.core.query.Update

public class Update extends Object
Class to easily construct SQL update assignments.
Since:
2.0
Author:
Mark Paluch, Oliver Drotbohm
  • Method Details

    • from

      public static Update from(Map<SqlIdentifier,Object> assignments)
      Static factory method to create an Update from assignments.
      Parameters:
      assignments - must not be null.
      Returns:
    • update

      public static Update update(String column, @Nullable Object value)
      Static factory method to create an Update using the provided column.
      Parameters:
      column - must not be null.
      value - can be null.
      Returns:
    • set

      public Update set(String column, @Nullable Object value)
      Update a column by assigning a value.
      Parameters:
      column - must not be null.
      value - can be null.
      Returns:
    • set

      public Update set(SqlIdentifier column, @Nullable Object value)
      Update a column by assigning a value.
      Parameters:
      column - must not be null.
      value - can be null.
      Returns:
      Since:
      1.1
    • getAssignments

      public Map<SqlIdentifier,Object> getAssignments()
      Returns all assignments.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object