Connection connection = dataSource.getConnection();
String jdbcUrl = connection.getMetaData().getURL();
if (StringUtils.contains(jdbcUrl, ":h2:")) {
return new H2Connection(connection, null);
} else if (StringUtils.contains(jdbcUrl, ":mysql:")) {
return new MySqlConnection(connection, null);
} else if (StringUtils.contains(jdbcUrl, ":oracle:")) {
return new OracleConnection(connection, null);
} else {
return new DatabaseConnection(connection);
}