Class DbManager
java.lang.Object
com.storytimeproductions.stweaks.util.DbManager
Manages connection and setup for the SQLite database used to store player playtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
Establishes a connection to the SQLite database and creates the playtime table if it doesn't exist.void
Closes the database connection if it is open.Gets the current database connection.
-
Constructor Details
-
DbManager
public DbManager()
-
-
Method Details
-
connect
public void connect()Establishes a connection to the SQLite database and creates the playtime table if it doesn't exist. -
getConnection
Gets the current database connection.- Returns:
- The active Connection object.
-
disconnect
public void disconnect()Closes the database connection if it is open.
-