org.hibernate.engine.jdbc.dialect.spi.DatabaseMetaDataDialectResolutionInfoAdapter Java Examples

The following examples show how to use org.hibernate.engine.jdbc.dialect.spi.DatabaseMetaDataDialectResolutionInfoAdapter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ScoreDialectResolver.java    From score with Apache License 2.0 5 votes vote down vote up
protected Dialect resolveDialectInternal(DatabaseMetaData metaData) throws SQLException {
     String databaseName = metaData.getDatabaseProductName();
     int databaseMajorVersion = metaData.getDatabaseMajorVersion();

     logger.info("Database name is: " + databaseName + " databaseMajorVersion is: " + databaseMajorVersion);
     
     if ( "MySQL".equals( databaseName ) ) {
return new ScoreMySQLDialect();
     }
     DatabaseMetaDataDialectResolutionInfoAdapter databaseMetaDataDialectResolutionInfoAdapter=new DatabaseMetaDataDialectResolutionInfoAdapter(metaData);
     return resolveDialect(databaseMetaDataDialectResolutionInfoAdapter);
 }
 
Example #2
Source File: DefaultSequenceHandlerRepository.java    From pnc with Apache License 2.0 4 votes vote down vote up
public DatabaseMetaDataDialectResolutionInfoAdapter getResolutionInfo(Connection connection) throws SQLException {
    return new DatabaseMetaDataDialectResolutionInfoAdapter(connection.getMetaData());
}