Class H2Database

java.lang.Object
migratedb.v1.core.internal.database.base.BaseDatabase<H2Connection>
migratedb.v1.core.internal.database.h2.H2Database
All Implemented Interfaces:
Closeable, AutoCloseable, Database<H2Connection>

public class H2Database extends BaseDatabase<H2Connection>
  • Constructor Details

  • Method Details

    • doGetConnection

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

      protected Version determineVersion()
      Overrides:
      determineVersion in class BaseDatabase<H2Connection>
      Returns:
      The major and minor version of the database.
    • 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)
    • getSelectStatement

      public String getSelectStatement(Table<?,?> table)
      Specified by:
      getSelectStatement in interface Database<H2Connection>
      Overrides:
      getSelectStatement in class BaseDatabase<H2Connection>
    • doGetCurrentUser

      protected String doGetCurrentUser() throws SQLException
      Overrides:
      doGetCurrentUser in class BaseDatabase<H2Connection>
      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.