src/main/java/org/embulk/output/sqlserver/SQLServerOutputConnector.java in embulk-output-sqlserver-0.8.2 vs src/main/java/org/embulk/output/sqlserver/SQLServerOutputConnector.java in embulk-output-sqlserver-0.8.3

- old
+ new

@@ -5,33 +5,39 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; -import org.embulk.output.jdbc.JdbcOutputConnector; +import org.embulk.output.jdbc.JdbcOutputConnection; +import org.embulk.output.jdbc.AbstractJdbcOutputConnector; +import org.embulk.output.jdbc.TransactionIsolation; import org.embulk.spi.Exec; import org.slf4j.Logger; +import com.google.common.base.Optional; + public class SQLServerOutputConnector - implements JdbcOutputConnector + extends AbstractJdbcOutputConnector { private final Logger logger = Exec.getLogger(getClass()); private final String url; private final Properties properties; private final String schemaName; - public SQLServerOutputConnector(String url, Properties properties, String schemaName) + public SQLServerOutputConnector(String url, Properties properties, String schemaName, + Optional<TransactionIsolation> transactionIsolation) { + super(transactionIsolation); this.url = url; this.properties = properties; this.schemaName = schemaName; } @Override - public SQLServerOutputConnection connect(boolean autoCommit) throws SQLException + protected JdbcOutputConnection connect() throws SQLException { Connection c = DriverManager.getConnection(url, properties); if (c == null) { // driver.connect returns null when url is "jdbc:mysql://...". throw new SQLException("Invalid url : " + url); @@ -53,10 +59,10 @@ logger.warn("Cannot specify default schema : " + e); } } try { - SQLServerOutputConnection con = new SQLServerOutputConnection(c, schemaName, autoCommit); + SQLServerOutputConnection con = new SQLServerOutputConnection(c, schemaName); c = null; return con; } finally { if (c != null) {