Add NoteDao, used by NoteActionHandler to delete note when read

This commit is contained in:
P0nk
2022-12-26 15:55:28 +01:00
parent 188eb74a70
commit 605f2e212e
6 changed files with 147 additions and 26 deletions

View File

@@ -3,6 +3,7 @@ package tools;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import config.YamlConfig;
import database.NoteRowMapper;
import org.jdbi.v3.core.Handle;
import org.jdbi.v3.core.Jdbi;
import org.slf4j.Logger;
@@ -99,7 +100,7 @@ public class DatabaseConnection {
}
private static void initializeJdbi(DataSource dataSource) {
// TODO: configure row mappers
jdbi = Jdbi.create(dataSource);
jdbi = Jdbi.create(dataSource)
.registerRowMapper(new NoteRowMapper());
}
}