Cache MakerRecipe, move stimulant to MakerInfoProvider
This commit is contained in:
19
src/main/java/database/JdbiConfig.java
Normal file
19
src/main/java/database/JdbiConfig.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package database;
|
||||
|
||||
import database.maker.MakerReagentRowMapper;
|
||||
import database.maker.MakerRecipeRowMapper;
|
||||
import database.note.NoteRowMapper;
|
||||
import org.jdbi.v3.core.Jdbi;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
public final class JdbiConfig {
|
||||
private JdbiConfig() {}
|
||||
|
||||
public static Jdbi createConfigured(DataSource dataSource) {
|
||||
return Jdbi.create(dataSource)
|
||||
.registerRowMapper(new NoteRowMapper())
|
||||
.registerRowMapper(new MakerReagentRowMapper())
|
||||
.registerRowMapper(new MakerRecipeRowMapper());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user