Class MergeValue
java.lang.Object
com.northconcepts.datapipeline.jdbc.sql.SqlPart
com.northconcepts.datapipeline.jdbc.sql.merge.MergeValue
A column in the INSERT or UPDATE SET clause of a
Merge, with its parameter value.-
Constructor Summary
ConstructorsConstructorDescriptionMergeValue(String columnName, boolean insert) Creates a column with a null parameter value.MergeValue(String columnName, Object value, boolean insert) Creates a column rendered as its bare name ifinsertis true (INSERT clause) or ascolumn=?otherwise. -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectParameterValues(List<Object> values) Appends the values for this part's?parameters to the list in order; adds nothing by default.voidcollectSqlFragment(CodeWriter writer) Writes this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.getValue()booleanisInsert()Indicates if the column is rendered as its bare name (INSERT clause) rather thancolumn=?(UPDATE SET clause).Methods inherited from class com.northconcepts.datapipeline.jdbc.sql.SqlPart
getParameterValues, getSqlFragment, isPretty, printSqlParts, setPretty, toString
-
Constructor Details
-
MergeValue
Creates a column rendered as its bare name ifinsertis true (INSERT clause) or ascolumn=?otherwise. -
MergeValue
Creates a column with a null parameter value.
-
-
Method Details
-
getColumnName
-
getValue
-
isInsert
public boolean isInsert()Indicates if the column is rendered as its bare name (INSERT clause) rather thancolumn=?(UPDATE SET clause). -
collectSqlFragment
Description copied from class:SqlPartWrites this part's SQL to the writer; used bySqlPart.getSqlFragment()and by enclosing parts.- Specified by:
collectSqlFragmentin classSqlPart
-
collectParameterValues
Description copied from class:SqlPartAppends the values for this part's?parameters to the list in order; adds nothing by default.- Overrides:
collectParameterValuesin classSqlPart
-