code: public static DatabaseType getDatabaseType(final String url) {
          switch (getDriverClassName(url)) {
              case "com.mysql.cj.jdbc.Driver":
              case "com.mysql.jdbc.Driver":
                  return DatabaseType.MySQL;
              case "org.postgresql.Driver":
                  return DatabaseType.PostgreSQL;
              case "oracle.jdbc.driver.OracleDriver":
                  return DatabaseType.Oracle;
              case "com.microsoft.sqlserver.jdbc.SQLServerDriver":
                  return DatabaseType.SQLServer;
              case "org.h2.Driver":
                  return DatabaseType.H2;
              default:
                  throw new ShardingException("Cannot resolve JDBC url `%s`", url);
          }
      }
docs: Get database type.
  
  @param url JDBC URL
  @return database type