sql.setTargetDatabase(database.getPlatform().toLowerCase()); // "postgresql" InputStream schemaFileInputStream = getClass().getClassLoader() .getResourceAsStream(schemaFile);
sql.setTargetDatabase(database.getPlatform().toLowerCase()); // "postgresql" InputStream schemaFileInputStream = getClass().getClassLoader() .getResourceAsStream(schemaFile);
.getName()); SchemaType torqueType = SchemaType.getEnum(torqueTypeName); Platform torquePlatform = PlatformFactory.getPlatformFor(state.getDb().getPlatform() .toLowerCase()); Domain torqueDomain = torquePlatform.getDomainForSchemaType(torqueType);
.getName()); SchemaType torqueType = SchemaType.getEnum(torqueTypeName); Platform torquePlatform = PlatformFactory.getPlatformFor(state.getDb().getPlatform() .toLowerCase()); Domain torqueDomain = torquePlatform.getDomainForSchemaType(torqueType);
public void testConfigure() throws Exception { Database db = new Database(); db.configure(props); assertTrue(db.getDataSource() != null); assertTrue(db.getDataSource() instanceof PGPoolingDataSource); assertEquals("PostgreSQL", db.getPlatform()); assertEquals("dbserver.mydomain.org", ((PGPoolingDataSource) db.getDataSource()).getServerName()); assertEquals("test", ((PGPoolingDataSource) db.getDataSource()).getDatabaseName()); assertEquals(10, ((PGPoolingDataSource) db.getDataSource()).getMaxConnections()); }