improved sql parser.

This commit is contained in:
wenshao
2017-08-01 17:15:04 +08:00
parent f505f76b5c
commit 512b8dbabd
17 changed files with 734 additions and 80 deletions
@@ -767,6 +767,18 @@ public final class JdbcUtils implements JdbcConstants {
}
}
public static List<String> showTables(Connection conn, String dbType) throws SQLException {
if (JdbcConstants.MYSQL.equals(dbType)) {
return MySqlUtils.showTables(conn);
}
if (JdbcConstants.ORACLE.equals(dbType)) {
return OracleUtils.showTables(conn);
}
throw new SQLException("show tables dbType not support for " + dbType);
}
public static String getCreateTableScript(Connection conn, String dbType) throws SQLException {
return getCreateTableScript(conn, dbType, true, true);
}