use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType in project solarnetwork-node by SolarNetwork.
the class TestEmbeddedDatabaseFactoryBean method getObject.
@Override
public TestEmbeddedDatabase getObject() throws Exception {
if (db != null) {
return db;
}
loadEnvironmentProperties();
EmbeddedDatabaseType dbType = dbType();
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder().generateUniqueName(true).setType(dbType);
this.db = new SimpleTestEmbeddedDatabase(builder.build(), dbType);
if (dbType == EmbeddedDatabaseType.DERBY) {
TestDbUtils.setupDerbyFunctions(new JdbcTemplate(db));
}
return this.db;
}
Aggregations