Updated from origin/main

This commit is contained in:
Riley Schneider
2025-12-03 20:42:23 +01:00
parent 0db43fe51a
commit 8150fdbf13
5 changed files with 9 additions and 15 deletions

View File

@@ -6,4 +6,5 @@ import java.sql.SQLException;
public interface Database {
public void connect() throws SQLException, IOException;
public void close() throws SQLException;
}

View File

@@ -26,7 +26,7 @@ public class SimpleDatabaseManager<E> implements DatabaseManager<E> {
@Override
public void saveObject(E object) {
g
}
@Override
@@ -38,4 +38,11 @@ public class SimpleDatabaseManager<E> implements DatabaseManager<E> {
public void connect() throws SQLException, IOException {
connection = DriverManager.getConnection("jdbc:mysql://sql7.freesqldatabase.com/sql7810540?user=sql7810540&password=mXdJCFtDZz");
}
@Override
public void close() throws SQLException {
if (connection != null) {
connection.close();
}
}
}