src/main/java/org/embulk/output/PostgreSQLOutputPlugin.java in embulk-output-postgresql-0.6.1 vs src/main/java/org/embulk/output/PostgreSQLOutputPlugin.java in embulk-output-postgresql-0.6.2

- old
+ new

@@ -1,19 +1,15 @@ package org.embulk.output; import java.io.IOException; import java.sql.SQLException; import java.sql.Types; -import java.util.List; import java.util.Properties; import org.embulk.config.Config; import org.embulk.config.ConfigDefault; -import org.embulk.output.jdbc.AbstractJdbcOutputPlugin; -import org.embulk.output.jdbc.BatchInsert; -import org.embulk.output.jdbc.JdbcColumn; -import org.embulk.output.jdbc.JdbcSchema; +import org.embulk.output.jdbc.*; import org.embulk.output.jdbc.setter.ColumnSetterFactory; import org.embulk.output.postgresql.PostgreSQLCopyBatchInsert; import org.embulk.output.postgresql.PostgreSQLOutputConnector; import org.embulk.output.postgresql.setter.PostgreSQLColumnSetterFactory; import org.embulk.spi.Column; @@ -110,12 +106,12 @@ return new PostgreSQLOutputConnector(url, props, t.getSchema()); } @Override - protected BatchInsert newBatchInsert(PluginTask task, Optional<List<String>> mergeKeys) throws IOException, SQLException + protected BatchInsert newBatchInsert(PluginTask task, Optional<MergeConfig> mergeConfig) throws IOException, SQLException { - if (mergeKeys.isPresent()) { + if (mergeConfig.isPresent()) { throw new UnsupportedOperationException("PostgreSQL output plugin doesn't support 'merge_direct' mode. Use 'merge' mode instead."); } return new PostgreSQLCopyBatchInsert(getConnector(task, true)); }