-
Notifications
You must be signed in to change notification settings - Fork 74
Output a version of MySQL Connector/J. #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
d0ebcd1
0f893f6
fda881a
4669b1e
822642a
aa1d22b
c073d40
b3d85bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import java.sql.ResultSetMetaData; | ||
import java.sql.SQLException; | ||
import java.sql.Statement; | ||
import java.util.Locale; | ||
import java.util.Set; | ||
|
||
import org.embulk.config.ConfigException; | ||
|
@@ -386,4 +387,13 @@ private Set<String> getColumnNames(String tableName) throws SQLException | |
return columnNamesBuilder.build(); | ||
} | ||
} | ||
|
||
public void showDriverVersion(){ | ||
try { | ||
DatabaseMetaData meta = connection.getMetaData(); | ||
logger.info(String.format(Locale.ENGLISH,"Using JDBC Driver %s",meta.getDriverVersion())); | ||
} catch( SQLException e ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't need to catch SQLException because Connection#getMetaData#getDriverVersion doesn't throw an exception normally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Throw the exception instead of |
||
logger.warn(String.format(Locale.ENGLISH,"Can't get JDBC Driver version. Reason: %s",e.toString())); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment above (
// TODO incremental_columns ...
) should be above the following line (schema = setupTask(con, task);
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move comment to propper place.