Class HikariBased

java.lang.Object
me.deecaad.core.database.Database
me.deecaad.core.database.HikariBased
Direct Known Subclasses:
MySQL, SQLite

public class HikariBased extends Database
  • Field Details

    • dataSource

      protected com.zaxxer.hikari.HikariDataSource dataSource
  • Constructor Details

  • Method Details

    • getConnection

      public Connection getConnection() throws SQLException
      Description copied from class: Database
      Allows getting connections to the database. When using MySQL this fetches one connection from the pool. When using SQLite this creates new connection in most cases.
      Specified by:
      getConnection in class Database
      Returns:
      one connection to the database
      Throws:
      SQLException
    • close

      public void close() throws SQLException
      Description copied from class: Database
      Has to be called on when server disables or plugin is reloaded
      Specified by:
      close in class Database
      Throws:
      SQLException
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in class Database
      Returns:
      whether this database is closed