java.lang.Object
com.northconcepts.datapipeline.jdbc.sql.SqlPart
com.northconcepts.datapipeline.jdbc.sql.conflict.OnConflict

public class OnConflict extends SqlPart
Builds the UPDATE SET column=?, ... action that follows ON CONFLICT (...) DO in an upsert statement.
  • Constructor Details

    • OnConflict

      public OnConflict()
  • Method Details

    • set

      public OnConflict set(String columnName, Object value)
      Adds a column=? assignment with the given parameter value.
    • set

      public OnConflict set(String columnName)
      Adds a column=? assignment with a null parameter value.
    • collectSqlFragment

      public void collectSqlFragment(CodeWriter writer)
      Description copied from class: SqlPart
      Writes this part's SQL to the writer; used by SqlPart.getSqlFragment() and by enclosing parts.
      Specified by:
      collectSqlFragment in class SqlPart
    • collectParameterValues

      public void collectParameterValues(List<Object> values)
      Description copied from class: SqlPart
      Appends the values for this part's ? parameters to the list in order; adds nothing by default.
      Overrides:
      collectParameterValues in class SqlPart