Class MariaDb

All Implemented Interfaces:
Backend

@Service(Backend.class) public class MariaDb extends MySql
Backend for MariaDB.
Author:
harald
  • Constructor Details

    • MariaDb

      public MariaDb()
      Creates the MariaDb backend.
  • Method Details

    • isMatchingUrl

      public boolean isMatchingUrl(String url)
      Description copied from interface: Backend
      Checks whether the backend belongs to the given jdbc url.
      If multiple backend implementations are provided for the same database type, only one backend should match the URL. The others must be selected via name.
      Specified by:
      isMatchingUrl in interface Backend
      Overrides:
      isMatchingUrl in class MySql
      Parameters:
      url - the jdbc url
      Returns:
      true if matches
    • getName

      public String getName()
      Description copied from interface: Backend
      Gets the name of the backend.
      Specified by:
      getName in interface Backend
      Overrides:
      getName in class MySql
      Returns:
      the name
    • getDriverClassName

      public String getDriverClassName()
      Description copied from interface: Backend
      Gets the JDBC driver class name.
      Specified by:
      getDriverClassName in interface Backend
      Overrides:
      getDriverClassName in class MySql
      Returns:
      the class name
    • isDropIfExistsSupported

      protected boolean isDropIfExistsSupported()
      Description copied from class: AbstractBackend
      Adds "IF EXISTS" to drop clauses, if supported by the backend.
      Makes migration a little more robust in case the same SQL scripts are applied to different databases than those used to generate the migration scripts for.
      Overrides:
      isDropIfExistsSupported in class AbstractBackend
      Returns:
      true if supported
    • isSequenceSupported

      public boolean isSequenceSupported()
      Description copied from interface: Backend
      True if backend provides locking-free sequences.
      Sequences must not take part in transactions, i.e. no read- or write-locks!
      Specified by:
      isSequenceSupported in interface Backend
      Overrides:
      isSequenceSupported in class AbstractSql92Backend
      Returns:
      true if database supports sequences
    • sqlNextFromSequence

      public String sqlNextFromSequence(String name)
      Description copied from interface: Backend
      Creates the SQL string to retrieve the next id from a sequence.
      Specified by:
      sqlNextFromSequence in interface Backend
      Overrides:
      sqlNextFromSequence in class AbstractSql92Backend
      Parameters:
      name - the name of the sequence
      Returns:
      the SQL code
    • sqlCreateSequence

      public String sqlCreateSequence(String name, Long start, Long increment)
      Description copied from interface: Backend
      Creates the SQL string to create a sequence.
      Specified by:
      sqlCreateSequence in interface Backend
      Overrides:
      sqlCreateSequence in class AbstractSql92Backend
      Parameters:
      name - the sequence name
      start - the optional start value, defaults to 1
      increment - the optional increment, defaults to 1
      Returns:
      the SQL code