Class Insert
java.lang.Object
com.northconcepts.datapipeline.jdbc.sql.SqlPart
com.northconcepts.datapipeline.jdbc.sql.insert.Insert
Builds an
INSERT INTO table (columns) VALUES (?, ...), ... statement with one or more rows; the column list
comes from the first row.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds columns with null parameter values to the current (last) row.Adds a column and its parameter value to the current (last) row.addRows(int rowCount, boolean copyLastRowValues) AppendsrowCountrows, each pre-filled with the previous row's columns and values ifcopyLastRowValuesis true.voidcollectParameterValues(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.getRows()getTable()nextRow()Begins a new, empty row for subsequentaddcalls.nextRow(boolean copyLastRowValues) Begins a new row for subsequentaddcalls, pre-filled with the previous row's columns and values ifcopyLastRowValuesis true.setPretty(boolean pretty) Indicates ifSqlPart.getSqlFragment()adds line breaks and indentation instead of using one line (default is false).Methods inherited from class com.northconcepts.datapipeline.jdbc.sql.SqlPart
getParameterValues, getSqlFragment, isPretty, printSqlParts, toString
-
Constructor Details
-
Insert
-
-
Method Details
-
setPretty
Description copied from class:SqlPartIndicates ifSqlPart.getSqlFragment()adds line breaks and indentation instead of using one line (default is false). -
getTable
-
addRows
AppendsrowCountrows, each pre-filled with the previous row's columns and values ifcopyLastRowValuesis true. -
nextRow
Begins a new row for subsequentaddcalls, pre-filled with the previous row's columns and values ifcopyLastRowValuesis true. -
nextRow
Begins a new, empty row for subsequentaddcalls. -
add
Adds a column and its parameter value to the current (last) row. -
add
Adds columns with null parameter values to the current (last) row. -
getRows
-
getLastRow
-
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
-