Class Database
java.lang.Object
net.flectone.pulse.data.database.Database
Database for FlectonePulse.
Handles database connection, configuration, and migrations.
- Since:
- 0.0.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDatabase types supported by FlectonePulse. -
Constructor Summary
ConstructorsConstructorDescriptionDatabase(FileFacade fileFacade, VersionComparator versionComparator, Path projectPath, SystemVariableResolver systemVariableResolver, PlatformServerAdapter platformServerAdapter, FLogger fLogger, ReflectionResolver reflectionResolver, com.google.inject.Provider<VersionDAO> versionDAOProvider, BackupCreator backupCreator) -
Method Summary
-
Constructor Details
-
Database
@Inject public Database(FileFacade fileFacade, VersionComparator versionComparator, Path projectPath, SystemVariableResolver systemVariableResolver, PlatformServerAdapter platformServerAdapter, FLogger fLogger, ReflectionResolver reflectionResolver, com.google.inject.Provider<VersionDAO> versionDAOProvider, BackupCreator backupCreator)
-
-
Method Details
-
config
Gets the database configuration.- Returns:
- the database configuration
-
connect
Connects to the database and initializes it.- Throws:
IOException- if connection fails
-
getJdbi
Gets the JDBI instance.- Returns:
- the JDBI instance
- Throws:
IllegalStateException- if JDBI is not initialized
-
init
public void init()Initializes the database connection. -
disconnect
public void disconnect()Disconnects from the database. -
isClosed
public boolean isClosed()
-