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
  • 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 connection
      filePath - the path to the SQLite file
      tablePrefix - the prefix for tables that are created in the database
  • Method Details

    • getConnection

      protected Connection getConnection() throws SQLException
      Gets a connection from the DataSource to execute SQL queries on With foreign keys turned on.
      Overrides:
      getConnection in class AbstractDatabase<T extends org.bukkit.plugin.java.JavaPlugin>
      Returns:
      the Database Connection
      Throws:
      SQLException - gets thrown if a database access error occurs