Package at.hugob.plugin.library.database
Class SQLiteDatabase<T extends org.bukkit.plugin.java.JavaPlugin>
java.lang.Object
at.hugob.plugin.library.database.AbstractDatabase<T>
at.hugob.plugin.library.database.SQLiteDatabase<T>
public abstract class SQLiteDatabase<T extends org.bukkit.plugin.java.JavaPlugin>
extends AbstractDatabase<T>
An implementation of the AbstractDatabase to handle SQLite Databases
-
Field Summary
Fields inherited from class at.hugob.plugin.library.database.AbstractDatabase
plugin, tablePrefix -
Constructor Summary
ConstructorsConstructorDescriptionSQLiteDatabase(T plugin, @NotNull String filePath, @NotNull String tablePrefix) Instantiates a new SQLite Database connection -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionGets a connection from the DataSource to execute SQL queries on With foreign keys turned on.Methods inherited from class at.hugob.plugin.library.database.AbstractDatabase
createTables
-
Constructor Details
-
SQLiteDatabase
public SQLiteDatabase(@NotNull T plugin, @NotNull @NotNull String filePath, @NotNull @NotNull String tablePrefix) Instantiates a new SQLite Database connection- Parameters:
plugin- the plugin that instantiates this database connectionfilePath- the path to the SQLite filetablePrefix- the prefix for tables that are created in the database
-
-
Method Details
-
getConnection
Gets a connection from the DataSource to execute SQL queries on With foreign keys turned on.- Overrides:
getConnectionin classAbstractDatabase<T extends org.bukkit.plugin.java.JavaPlugin>- Returns:
- the Database Connection
- Throws:
SQLException- gets thrown if a database access error occurs
-