java.lang.Object
com.northconcepts.datapipeline.jdbc.sql.SqlPart
com.northconcepts.datapipeline.jdbc.sql.merge.MergeValue

public class MergeValue extends SqlPart
A column in the INSERT or UPDATE SET clause of a Merge, with its parameter value.
  • Constructor Details

    • MergeValue

      public MergeValue(String columnName, Object value, boolean insert)
      Creates a column rendered as its bare name if insert is true (INSERT clause) or as column=? otherwise.
    • MergeValue

      public MergeValue(String columnName, boolean insert)
      Creates a column with a null parameter value.
  • Method Details

    • getColumnName

      public String getColumnName()
    • getValue

      public Object getValue()
    • isInsert

      public boolean isInsert()
      Indicates if the column is rendered as its bare name (INSERT clause) rather than column=? (UPDATE SET clause).
    • 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