Package liquibase.database.core
Class DB2Database
- java.lang.Object
-
- liquibase.database.AbstractJdbcDatabase
-
- liquibase.database.core.AbstractDb2Database
-
- liquibase.database.core.DB2Database
-
- All Implemented Interfaces:
AutoCloseable
,Database
,PrioritizedService
public class DB2Database extends AbstractDb2Database
-
-
Field Summary
-
Fields inherited from class liquibase.database.AbstractJdbcDatabase
caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercased
-
Fields inherited from interface liquibase.database.Database
COMPLETE_SQL_SCOPE_KEY
-
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DB2Database()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDefaultDatabaseProductName()
String
getShortName()
Returns an all-lower-case short name of the product.boolean
isCorrectDatabaseImplementation(DatabaseConnection conn)
Is this AbstractDatabase subclass the correct one to use for the given connection.boolean
supportsBooleanDataType()
Checks if the database supports boolean data type columns.boolean
supportsCreateIfNotExists(Class<? extends DatabaseObject> type)
Does the database support the "if not exits" syntax?boolean
supportsDatabaseChangeLogHistory()
Does the particular database implementation support the database changelog history feature and associated table?-
Methods inherited from class liquibase.database.core.AbstractDb2Database
generatePrimaryKeyName, getDateLiteral, getDefaultCatalogName, getDefaultDriver, getDefaultPort, getJdbcCatalogName, getJdbcSchemaName, getMaxFractionalDigitsForTimestamp, getPriority, getSchemaAndCatalogCase, getSchemaFromJdbcInfo, getViewDefinition, isSystemObject, jdbcCallsCatalogsSchemas, mustQuoteObjectName, parseDate, supportsCatalogs, supportsInitiallyDeferrableColumns, supportsSchemas, supportsTablespaces
-
Methods inherited from class liquibase.database.AbstractJdbcDatabase
addReservedWords, canCreateChangeLogTable, close, commit, correctObjectName, correctSchema, correctSchema, createsIndexesForForeignKeys, dataTypeIsNotModifiable, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDataTypeName, escapeIndexName, escapeObjectName, escapeObjectName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeRollbackStatements, executeStatements, filterRollbackVisitors, generateAutoIncrementBy, generateAutoIncrementStartWith, generateDatabaseFunctionValue, get, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getConnectionCatalogName, getConnectionSchemaName, getConnectionSchemaNameCallStatement, getContainingObjects, getCurrentDateTimeFunction, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDataTypeMaxParameters, getDateFunctions, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultFractionalDigitsForTimestamp, getDefaultScaleForNativeDataType, getDefaultSchema, getDefaultSchemaName, getFetchSize, getJdbcCatalogName, getJdbcSchemaName, getLineComment, getLiquibaseCatalogName, getLiquibaseSchemaName, getLiquibaseTablespaceName, getName, getObjectQuotingStrategy, getOutputDefaultCatalog, getOutputDefaultSchema, getQuotingEndCharacter, getQuotingEndReplacement, getQuotingStartCharacter, getRanChangeSet, getRanChangeSetList, getRanDate, getRawDatabaseChangeLogLockTableName, getRawDatabaseChangeLogTableName, getRunStatus, getSystemSchema, getSystemTables, getSystemViews, getTimeLiteral, hashCode, isAutoCommit, isCaseSensitive, isCatalogOrSchemaType, isCurrentTimeFunction, isDateOnly, isDateTime, isDefaultCatalog, isDefaultSchema, isFunction, isLiquibaseObject, isReservedWord, isSafeToRunUpdate, isSystemView, isTimeOnly, isTimestamp, markChangeSetExecStatus, quoteObject, removeRanStatus, requiresExplicitNullForColumns, requiresPassword, requiresUsername, resetInternalState, rollback, saveRollbackStatement, saveStatements, set, setAutoCommit, setCanCacheLiquibaseTableInfo, setCaseSensitive, setConnection, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultCatalogName, setDefaultSchemaName, setLiquibaseCatalogName, setLiquibaseSchemaName, setLiquibaseTablespaceName, setObjectQuotingStrategy, setOutputDefaultCatalog, setOutputDefaultSchema, startsWithNumeric, supportsAutoIncrement, supportsBatchUpdates, supportsCatalogInObjectName, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsNotNullConstraintNames, supportsPrimaryKeyNames, supportsRestrictForeignKeys, supportsSequences, tag, toString, unescapeDataTypeName, unescapeDataTypeString, validate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface liquibase.database.Database
addCompleteSqlToScope, afterUpdate, dropDatabaseObjects, failOnDefferable, getDisplayName, temporarilySetObjectQuotingStrategy
-
-
-
-
Method Detail
-
isCorrectDatabaseImplementation
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException
Description copied from interface:Database
Is this AbstractDatabase subclass the correct one to use for the given connection.- Throws:
DatabaseException
-
getShortName
public String getShortName()
Description copied from interface:Database
Returns an all-lower-case short name of the product. Used for end-user selecting of database type such as the DBMS precondition.
-
supportsBooleanDataType
public boolean supportsBooleanDataType()
Checks if the database supports boolean data type columns. This is true for versions >= 11.1.1.1.- Returns:
- true if boolean data type columns are supported, false otherwise
-
getDefaultDatabaseProductName
protected String getDefaultDatabaseProductName()
- Overrides:
getDefaultDatabaseProductName
in classAbstractDb2Database
-
supportsCreateIfNotExists
public boolean supportsCreateIfNotExists(Class<? extends DatabaseObject> type)
Description copied from interface:Database
Does the database support the "if not exits" syntax?- Parameters:
type
- the DatabaseObject type to be checked.- Returns:
- true if the "if not exists" syntax is supported, false otherwise.
-
supportsDatabaseChangeLogHistory
public boolean supportsDatabaseChangeLogHistory()
Description copied from interface:Database
Does the particular database implementation support the database changelog history feature and associated table?- Returns:
- true if supported, false otherwise
-
-