Class DatabaseConfig

java.lang.Object
me.confuser.banmanager.common.configs.DatabaseConfig
Direct Known Subclasses:
GlobalDatabaseConfig, LocalDatabaseConfig

public abstract class DatabaseConfig extends Object
  • Method Details

    • getJDBCUrl

      public String getJDBCUrl()
    • getTable

      public me.confuser.banmanager.common.ormlite.table.DatabaseTableConfig<?> getTable(String table)
    • addTable

      public void addTable(String key, me.confuser.banmanager.common.ormlite.table.DatabaseTableConfig<?> config)
    • getTimestampNow

      public String getTimestampNow()
      Returns the SQL expression for the current unix timestamp in seconds. This expression can be embedded directly in INSERT/UPDATE statements. Works with MySQL, MariaDB, and H2 (in MySQL compatibility mode).
      Returns:
      SQL expression that evaluates to current unix timestamp
    • getTimestampQuery

      public String getTimestampQuery()
      Returns the SQL query to fetch the current unix timestamp. Works with MySQL, MariaDB, and H2 (in MySQL compatibility mode).
      Returns:
      SQL query that returns the current unix timestamp