src/main/java/org/embulk/output/jdbc/JdbcOutputConnection.java in embulk-output-jdbc-0.7.9 vs src/main/java/org/embulk/output/jdbc/JdbcOutputConnection.java in embulk-output-jdbc-0.7.10
- old
+ new
@@ -7,21 +7,22 @@
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
+import java.util.Locale;
import org.slf4j.Logger;
import com.google.common.base.Optional;
import org.embulk.spi.Exec;
public class JdbcOutputConnection
implements AutoCloseable
{
- private final Logger logger = Exec.getLogger(JdbcOutputConnection.class);
+ protected final Logger logger = Exec.getLogger(JdbcOutputConnection.class);
protected final Connection connection;
protected final String schemaName;
protected final DatabaseMetaData databaseMetaData;
protected String identifierQuoteString;
@@ -591,6 +592,11 @@
return cause;
}
return ex;
}
}
+ public void showDriverVersion() throws SQLException {
+ DatabaseMetaData meta = connection.getMetaData();
+ logger.info(String.format(Locale.ENGLISH,"Using JDBC Driver %s",meta.getDriverVersion()));
+ }
+
}