if (connection == null) {
return JdbcDialectFactory.createDialectHelper(
this, dataSource);
}
try {
return new JdbcDialectImpl(connection);
} catch (SQLException e) {
throw Util.newError(
e,
"Error while creating a generic dialect for"
+ " JDBC connection" + connection);