All Known Implementing Classes:
MySQLCore, SQLiteCore

public interface DBCore
Author:
phaed
  • Field Details

  • Method Details

    • getConnection

      Connection getConnection()
      Returns:
      connection
    • checkConnection

      default boolean checkConnection()
      Returns:
      whether connection can be established
    • close

      void close()
      Close connection
    • select

      @Nullable default @Nullable ResultSet select(String query)
      Execute a select statement
      Parameters:
      query - the query
      Returns:
      the result set or null if the query failed
    • execute

      default boolean execute(String query)
      Execute a statement
      Parameters:
      query - the query
      Returns:
      true if the statement was executed
    • existsTable

      default boolean existsTable(String table)
      Check whether a table exists
      Parameters:
      table - the table
      Returns:
      true if the table exists
    • existsColumn

      default boolean existsColumn(String table, String column)
      Check whether a column exists
      Parameters:
      table - the table
      column - the column
      Returns:
      true if the column exists
    • executeUpdate

      default void executeUpdate(String query)