Cache MakerRecipe, move stimulant to MakerInfoProvider
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package database;
|
||||
|
||||
import database.maker.MakerReagentRowMapper;
|
||||
import database.note.NoteRowMapper;
|
||||
import org.jdbi.v3.core.Handle;
|
||||
import org.jdbi.v3.core.Jdbi;
|
||||
|
||||
@@ -15,14 +13,7 @@ public class PgDatabaseConnection {
|
||||
|
||||
public PgDatabaseConnection(DataSource dataSource) {
|
||||
this.dataSource = dataSource;
|
||||
this.jdbi = Jdbi.create(dataSource);
|
||||
registerRowMappers();
|
||||
// TODO: configure jdbi elsewhere
|
||||
}
|
||||
|
||||
private void registerRowMappers() {
|
||||
jdbi.registerRowMapper(new NoteRowMapper())
|
||||
.registerRowMapper(new MakerReagentRowMapper());
|
||||
this.jdbi = JdbiConfig.createConfigured(dataSource);
|
||||
}
|
||||
|
||||
public Connection getConnection() throws SQLException {
|
||||
|
||||
Reference in New Issue
Block a user