Class DerbyDatabase

java.lang.Object
migratedb.v1.core.internal.database.base.BaseDatabase<DerbyConnection>
migratedb.v1.core.internal.database.derby.DerbyDatabase
All Implemented Interfaces:
Closeable, AutoCloseable, Database<DerbyConnection>

public class DerbyDatabase extends BaseDatabase<DerbyConnection>
Derby database.
  • Constructor Details

    • DerbyDatabase

      public DerbyDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
      Creates a new instance.
      Parameters:
      configuration - The MigrateDB configuration.
  • Method Details

    • doGetConnection

      protected DerbyConnection doGetConnection(Connection connection)
      Description copied from class: BaseDatabase
      Retrieves a MigrateDB Connection for this JDBC connection.
      Specified by:
      doGetConnection in class BaseDatabase<DerbyConnection>
    • ensureSupported

      public final void ensureSupported()
      Description copied from interface: Database
      Ensure MigrateDB supports this version of this database.
    • getRawCreateScript

      public String getRawCreateScript(Table<?,?> table, boolean baseline)
    • doGetCurrentUser

      protected String doGetCurrentUser() throws SQLException
      Overrides:
      doGetCurrentUser in class BaseDatabase<DerbyConnection>
      Throws:
      SQLException
    • supportsDdlTransactions

      public boolean supportsDdlTransactions()
    • supportsChangingCurrentSchema

      public boolean supportsChangingCurrentSchema()
    • getBooleanTrue

      public String getBooleanTrue()
      Returns:
      The representation of the value true in a boolean column.
    • getBooleanFalse

      public String getBooleanFalse()
      Returns:
      The representation of the value false in a boolean column.
    • catalogIsSchema

      public boolean catalogIsSchema()
      Returns:
      true if this database uses a catalog to represent a schema, or false if a schema is simply a schema.
    • useSingleConnection

      public boolean useSingleConnection()
      Specified by:
      useSingleConnection in interface Database<DerbyConnection>
      Overrides:
      useSingleConnection in class BaseDatabase<DerbyConnection>
      Returns:
      Whether to use a single connection for both schema history table management and applying migrations.