Class DatabaseUtils

java.lang.Object
liquibase.database.core.DatabaseUtils

public class DatabaseUtils extends Object
  • Constructor Details

    • DatabaseUtils

      public DatabaseUtils()
  • Method Details

    • initializeDatabase

      public static void initializeDatabase(String defaultCatalogName, String defaultSchemaName, Database database) throws DatabaseException
      Executes RawSqlStatements particular to each database engine to set the default schema for the given Database
      Parameters:
      defaultCatalogName - Catalog name and schema name are similar concepts. Used if defaultCatalogName is null.
      defaultSchemaName - Catalog name and schema name are similar concepts. Catalog is used with Oracle, DB2 and MySQL, and takes precedence over the schema name.
      database - Which Database object is affected by the initialization.
      Throws:
      DatabaseException
    • buildCatalogAndSchemaString

      public static String buildCatalogAndSchemaString(String catalog, String schema)
      Build a string containing the catalog and schema, separated by a period, if they are not empty.
      Returns:
      the built string, or an empty string if both catalog and schema are empty