Skip to content

Commit db3a1fd

Browse files
RisDNdavidmayr
andauthored
feat: added a public method to mysql loader to be able to close the connection (#188)
Co-authored-by: David Mayr <[email protected]>
1 parent 17eee4f commit db3a1fd

File tree

1 file changed

+6
-0
lines changed
  • loaders/mysql-loader/src/main/java/com/infernalsuite/asp/loaders/mysql

1 file changed

+6
-0
lines changed

loaders/mysql-loader/src/main/java/com/infernalsuite/asp/loaders/mysql/MysqlLoader.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ public MysqlLoader(HikariDataSource hikariDataSource) throws SQLException {
7575
init();
7676
}
7777

78+
public void close() {
79+
if (source != null && !source.isClosed()) {
80+
source.close();
81+
}
82+
}
83+
7884
@Override
7985
public void update() throws IOException, NewerStorageException {
8086
try (Connection con = source.getConnection()) {

0 commit comments

Comments
 (0)