needsPreparedStatement = true;
}
}
if (needsPreparedStatement) {
UpdateExecutablePreparedStatement statement = new UpdateExecutablePreparedStatement(database, catalogName, schemaName, tableName, columns, getChangeSet(), this.getResourceAccessor());
statement.setWhereClause(where);
for (ColumnConfig whereParam : whereParams) {
if (whereParam.getName() != null) {
statement.addWhereColumnName(whereParam.getName());
}
statement.addWhereParameter(whereParam.getValueObject());
}
return new SqlStatement[] {
statement
};
}
UpdateStatement statement = new UpdateStatement(getCatalogName(), getSchemaName(), getTableName());
for (ColumnConfig column : getColumns()) {
statement.addNewColumnValue(column.getName(), column.getValueObject());
}
statement.setWhereClause(where);
for (ColumnConfig whereParam : whereParams) {
if (whereParam.getName() != null) {
statement.addWhereColumnName(whereParam.getName());
}
statement.addWhereParameter(whereParam.getValueObject());
}
return new SqlStatement[]{
statement
};