Top Fields Constructors Methods
liquibase.database.core

public abstract Class AbstractDb2Database

extends AbstractJdbcDatabase
Class Inheritance
Known Direct Subclasses
liquibase.database.core.DB2Database, liquibase.database.core.Db2zDatabase
Imports
liquibase.CatalogAndSchema, .Scope, liquibase.database.AbstractJdbcDatabase, .OfflineConnection, liquibase.database.jvm.JdbcConnection, liquibase.exception.DatabaseException, .DateParseException, liquibase.executor.ExecutorService, liquibase.statement.core.GetViewDefinitionStatement, liquibase.structure.DatabaseObject, liquibase.structure.core.Catalog, .Index, .Schema, liquibase.util.JdbcUtil, .StringUtil, java.sql.ResultSet, .Statement, java.text.ParseException, .SimpleDateFormat, java.util.Locale

Field Summary

Modifier and TypeField and Description
private static final int
Inherited from liquibase.database.AbstractJdbcDatabase:
caseSensitivecurrentDateTimeFunctiondateFunctionsdefaultAutoIncrementBydefaultAutoIncrementStartWithdefaultCatalogNamedefaultSchemaNamequotingStrategysequenceCurrentValueFunctionsequenceNextValueFunctionunmodifiableDataTypesunquotedObjectsAreUppercased

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
getDateLiteral(String isoDate)

Overrides liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Implements liquibase.database.Database.getDateLiteral.

Return an DB2 date literal with the same value as a string formatted using ISO 8601.

public String
protected String
public String
getDefaultDriver(String url)

Implements liquibase.database.Database.getDefaultDriver.

If this database understands the given url, return the default driver class name.

public Integer
public String
public String
public int
getMaxFractionalDigitsForTimestamp()

Overrides liquibase.database.AbstractJdbcDatabase.getMaxFractionalDigitsForTimestamp.

Implements liquibase.database.Database.getMaxFractionalDigitsForTimestamp.

Most relational databases support 9 fractional digits, and subclasses must overwrite this method if they support less than that.

public int
public CatalogAndSchema.CatalogAndSchemaCase
public CatalogAndSchema
public String
public boolean
public boolean
protected boolean
public Date
public boolean
public boolean
supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

public boolean
public boolean
Inherited from liquibase.database.AbstractJdbcDatabase:
addReservedWordscanCreateChangeLogTableclosecommitcorrectObjectNamecorrectSchemacorrectSchemacreatesIndexesForForeignKeysdataTypeIsNotModifiabledisableForeignKeyChecksdoesTagExistdropDatabaseObjectsenableForeignKeyChecksequalsescapeColumnNameescapeColumnNameescapeColumnNameListescapeConstraintNameescapeDataTypeNameescapeIndexNameescapeObjectNameescapeObjectNameescapeSequenceNameescapeStringForDatabaseescapeTableNameescapeViewNameexecuteexecuteRollbackStatementsexecuteRollbackStatementsexecuteStatementsfilterRollbackVisitorsgenerateAutoIncrementBygenerateAutoIncrementStartWithgenerateDatabaseFunctionValuegetgetAutoCommitModegetAutoIncrementByClausegetAutoIncrementClausegetAutoIncrementClausegetAutoIncrementClausegetAutoIncrementClosinggetAutoIncrementOpeninggetAutoIncrementStartWithClausegetConcatSqlgetConnectiongetConnectionCatalogNamegetConnectionSchemaNamegetConnectionSchemaNameCallStatementgetContainingObjectsgetCurrentDateTimeFunctiongetDatabaseChangeLogLockTableNamegetDatabaseChangeLogTableNamegetDatabaseMajorVersiongetDatabaseMinorVersiongetDatabaseProductNamegetDatabaseProductVersiongetDataTypeMaxParametersgetDateFunctionsgetDateLiteralgetDateLiteralgetDateTimeLiteralgetDefaultFractionalDigitsForTimestampgetDefaultScaleForNativeDataTypegetDefaultSchemagetDefaultSchemaNamegetFetchSizegetJdbcCatalogNamegetJdbcSchemaNamegetLineCommentgetLiquibaseCatalogNamegetLiquibaseSchemaNamegetLiquibaseTablespaceNamegetNamegetObjectQuotingStrategygetOutputDefaultCataloggetOutputDefaultSchemagetQuotingEndCharactergetQuotingEndReplacementgetQuotingStartCharactergetRanChangeSetgetRanChangeSetListgetRanDategetRawDatabaseChangeLogLockTableNamegetRawDatabaseChangeLogTableNamegetRunStatusgetSystemSchemagetSystemTablesgetSystemViewsgetTimeLiteralhashCodeisAutoCommitisCaseSensitiveisCatalogOrSchemaTypeisCurrentTimeFunctionisDateOnlyisDateTimeisDefaultCatalogisDefaultSchemaisFunctionisLiquibaseObjectisReservedWordisSafeToRunUpdateisSystemViewisTimeOnlyisTimestampmarkChangeSetExecStatusquoteObjectremoveRanStatusrequiresExplicitNullForColumnsrequiresPasswordrequiresUsernameresetInternalStaterollbacksaveRollbackStatementsaveStatementssetsetAutoCommitsetCanCacheLiquibaseTableInfosetCaseSensitivesetConnectionsetCurrentDateTimeFunctionsetDatabaseChangeLogLockTableNamesetDatabaseChangeLogTableNamesetDefaultCatalogNamesetDefaultSchemaNamesetLiquibaseCatalogNamesetLiquibaseSchemaNamesetLiquibaseTablespaceNamesetObjectQuotingStrategysetOutputDefaultCatalogsetOutputDefaultSchemastartsWithNumericsupportsAutoIncrementsupportsBatchUpdatessupportsCatalogInObjectNamesupportsDDLInTransactionsupportsDropTableCascadeConstraintssupportsForeignKeyDisablesupportsNotNullConstraintNamessupportsPrimaryKeyNamessupportsRestrictForeignKeyssupportsSequencestagtoStringunescapeDataTypeNameunescapeDataTypeStringvalidate

Field Detail

MAX_DB2_TIMESTAMP_FRACTIONAL_DIGITSback to summary
private static final int MAX_DB2_TIMESTAMP_FRACTIONAL_DIGITS

Constructor Detail

AbstractDb2Databaseback to summary
public AbstractDb2Database()

Method Detail

generatePrimaryKeyNameback to summary
public String generatePrimaryKeyName(String tableName)

Overrides liquibase.database.AbstractJdbcDatabase.generatePrimaryKeyName.

Implements liquibase.database.Database.generatePrimaryKeyName.

Annotations
@Override
getDateLiteralback to summary
public String getDateLiteral(String isoDate)

Overrides liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Implements liquibase.database.Database.getDateLiteral.

Return an DB2 date literal with the same value as a string formatted using ISO 8601.

Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS')

Implementation restriction: Currently, only the following subsets of ISO8601 are supported: YYYY-MM-DD hh:mm:ss YYYY-MM-DDThh:mm:ss

Annotations
@Override
getDefaultCatalogNameback to summary
public String getDefaultCatalogName()

Overrides liquibase.database.AbstractJdbcDatabase.getDefaultCatalogName.

Implements liquibase.database.Database.getDefaultCatalogName.

Annotations
@Override
getDefaultDatabaseProductNameback to summary
protected String getDefaultDatabaseProductName()

Implements abstract liquibase.database.AbstractJdbcDatabase.getDefaultDatabaseProductName.

Annotations
@Override
getDefaultDriverback to summary
public String getDefaultDriver(String url)

Implements liquibase.database.Database.getDefaultDriver.

Doc from liquibase.database.Database.getDefaultDriver.

If this database understands the given url, return the default driver class name. Otherwise return null.

Annotations
@Override
getDefaultPortback to summary
public Integer getDefaultPort()

Implements liquibase.database.Database.getDefaultPort.

Annotations
@Override
getJdbcCatalogNameback to summary
public String getJdbcCatalogName(CatalogAndSchema schema)

Overrides liquibase.database.AbstractJdbcDatabase.getJdbcCatalogName.

Annotations
@Override
getJdbcSchemaNameback to summary
public String getJdbcSchemaName(CatalogAndSchema schema)

Overrides liquibase.database.AbstractJdbcDatabase.getJdbcSchemaName.

Annotations
@Override
getMaxFractionalDigitsForTimestampback to summary
public int getMaxFractionalDigitsForTimestamp()

Overrides liquibase.database.AbstractJdbcDatabase.getMaxFractionalDigitsForTimestamp.

Implements liquibase.database.Database.getMaxFractionalDigitsForTimestamp.

Doc from liquibase.database.AbstractJdbcDatabase.getMaxFractionalDigitsForTimestamp.

Most relational databases support 9 fractional digits, and subclasses must overwrite this method if they support less than that.

Returns:int

the maximum number of supported fractional digits in TIMESTAMP columns

Annotations
@Override
getPriorityback to summary
public int getPriority()

Implements liquibase.servicelocator.PrioritizedService.getPriority.

Annotations
@Override
getSchemaAndCatalogCaseback to summary
public CatalogAndSchema.CatalogAndSchemaCase getSchemaAndCatalogCase()

Overrides liquibase.database.AbstractJdbcDatabase.getSchemaAndCatalogCase.

Implements liquibase.database.Database.getSchemaAndCatalogCase.

DB2 database are not case sensitive. However schemas and catalogs are case sensitive

Returns:CatalogAndSchema.CatalogAndSchemaCase

Doc from liquibase.database.AbstractJdbcDatabase.getSchemaAndCatalogCase.

UPPER_CASE by default

Annotations
@Override
getSchemaFromJdbcInfoback to summary
public CatalogAndSchema getSchemaFromJdbcInfo(String rawCatalogName, String rawSchemaName)

Overrides liquibase.database.AbstractJdbcDatabase.getSchemaFromJdbcInfo.

Annotations
@Override
getViewDefinitionback to summary
public String getViewDefinition(CatalogAndSchema schema, String viewName) throws DatabaseException

Overrides liquibase.database.AbstractJdbcDatabase.getViewDefinition.

Implements liquibase.database.Database.getViewDefinition.

Annotations
@Override
isSystemObjectback to summary
public boolean isSystemObject(DatabaseObject example)

Overrides liquibase.database.AbstractJdbcDatabase.isSystemObject.

Implements liquibase.database.Database.isSystemObject.

Annotations
@Override
jdbcCallsCatalogsSchemasback to summary
public boolean jdbcCallsCatalogsSchemas()

Overrides liquibase.database.AbstractJdbcDatabase.jdbcCallsCatalogsSchemas.

Annotations
@Override
mustQuoteObjectNameback to summary
protected boolean mustQuoteObjectName(String objectName, Class<? extends DatabaseObject> objectType)

Overrides liquibase.database.AbstractJdbcDatabase.mustQuoteObjectName.

Annotations
@Override
parseDateback to summary
public Date parseDate(String dateAsString) throws DateParseException

Overrides liquibase.database.AbstractJdbcDatabase.parseDate.

Implements liquibase.database.Database.parseDate.

Annotations
@Override
supportsCatalogsback to summary
public boolean supportsCatalogs()

Overrides liquibase.database.AbstractJdbcDatabase.supportsCatalogs.

Implements liquibase.database.Database.supportsCatalogs.

Annotations
@Override
supportsInitiallyDeferrableColumnsback to summary
public boolean supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Doc from liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

Annotations
@Override
supportsSchemasback to summary
public boolean supportsSchemas()

Overrides liquibase.database.AbstractJdbcDatabase.supportsSchemas.

Implements liquibase.database.Database.supportsSchemas.

Annotations
@Override
supportsTablespacesback to summary
public boolean supportsTablespaces()

Implements liquibase.database.Database.supportsTablespaces.

Annotations
@Override