use of com.teradata.jaqy.JDBCWrapperDriver in project jaqy by Teradata.
the class DriverCommand method listDrivers.
private void listDrivers(JaqyInterpreter interpreter) throws SQLException {
PropertyTable pt = new PropertyTable(new String[] { "Driver", "Version", "Compliant" });
for (Driver driver : DriverManagerUtils.getDrivers()) {
String name;
if (driver instanceof JDBCWrapperDriver) {
name = ((JDBCWrapperDriver) driver).getInternalDriver().getClass().getCanonicalName();
} else {
name = driver.getClass().getCanonicalName();
}
String version = "";
if (driver.getMajorVersion() < 10)
version = " ";
version += driver.getMajorVersion() + "." + driver.getMinorVersion();
String jdbcCompliant = driver.jdbcCompliant() ? "T" : "F";
pt.addRow(new String[] { name, version, jdbcCompliant });
}
interpreter.print(pt);
}
Aggregations