Package liquibase.database.core
Class DatabaseUtils
java.lang.Object
liquibase.database.core.DatabaseUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
buildCatalogAndSchemaString
(String catalog, String schema) Build a string containing the catalog and schema, separated by a period, if they are not empty.static void
initializeDatabase
(String defaultCatalogName, String defaultSchemaName, Database database) Executes RawParameterizedSqlStatement particular to each database engine to set the default schema for the given Database
-
Constructor Details
-
DatabaseUtils
public DatabaseUtils()
-
-
Method Details
-
initializeDatabase
public static void initializeDatabase(String defaultCatalogName, String defaultSchemaName, Database database) throws DatabaseException Executes RawParameterizedSqlStatement 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
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
-