Top Fields Constructors Methods
liquibase.database.core

public Class DerbyDatabase

extends AbstractJdbcDatabase
Class Inheritance
Imports
liquibase.CatalogAndSchema, .Scope, liquibase.database.AbstractJdbcDatabase, .DatabaseConnection, .OfflineConnection, liquibase.database.jvm.JdbcConnection, liquibase.exception.DatabaseException, liquibase.executor.ExecutorService, liquibase.statement.core.RawSqlStatement, liquibase.structure.DatabaseObject, java.sql.Driver, .DriverManager, .SQLException, java.util.Arrays, .Enumeration, .Locale

Field Summary

Modifier and TypeField and Description
protected int
protected int
private boolean
Inherited from liquibase.database.AbstractJdbcDatabase:
caseSensitivecurrentDateTimeFunctiondateFunctionsdefaultAutoIncrementBydefaultAutoIncrementStartWithdefaultCatalogNamedefaultSchemaNamequotingStrategysequenceCurrentValueFunctionsequenceNextValueFunctionunmodifiableDataTypesunquotedObjectsAreUppercased

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides liquibase.database.AbstractJdbcDatabase.close.

Implements liquibase.database.Database.close.

Closes this resource, relinquishing any underlying resources.

public String
correctObjectName(String objectName, Class<? extends DatabaseObject> objectType)

Overrides liquibase.database.AbstractJdbcDatabase.correctObjectName.

Implements liquibase.database.Database.correctObjectName.

Fix the object name to the format the database expects, handling changes in case, etc.

protected void
determineDriverVersion()

Determine Apache Derby driver major/minor version.

protected String
public String
getDateLiteral(String isoDate)

Overrides liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Implements liquibase.database.Database.getDateLiteral.

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

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 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 String
getShortName()

Implements liquibase.database.Database.getShortName.

Returns an all-lower-case short name of the product.

public boolean
public String
public boolean
isCorrectDatabaseImplementation(DatabaseConnection conn)

Implements liquibase.database.Database.isCorrectDatabaseImplementation.

Is this AbstractDatabase subclass the correct one to use for the given connection.

public boolean
public void
setShutdownEmbeddedDerby(boolean shutdown)

protected void
shutdownDerby(String url, String driverName)

public boolean
public boolean
public boolean
supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

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

Field Detail

driverVersionMajorback to summary
protected int driverVersionMajor
driverVersionMinorback to summary
protected int driverVersionMinor
shutdownEmbeddedDerbyback to summary
private boolean shutdownEmbeddedDerby

Constructor Detail

DerbyDatabaseback to summary
public DerbyDatabase()

Method Detail

closeback to summary
public void close() throws DatabaseException

Overrides liquibase.database.AbstractJdbcDatabase.close.

Implements liquibase.database.Database.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
correctObjectNameback to summary
public String correctObjectName(String objectName, Class<? extends DatabaseObject> objectType)

Overrides liquibase.database.AbstractJdbcDatabase.correctObjectName.

Implements liquibase.database.Database.correctObjectName.

Doc from liquibase.database.Database.correctObjectName.

Fix the object name to the format the database expects, handling changes in case, etc.

Annotations
@Override
determineDriverVersionback to summary
protected void determineDriverVersion()

Determine Apache Derby driver major/minor version.

getConnectionCatalogNameback to summary
protected String getConnectionCatalogName() throws DatabaseException

Overrides liquibase.database.AbstractJdbcDatabase.getConnectionCatalogName.

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

Overrides liquibase.database.AbstractJdbcDatabase.getDateLiteral.

Implements liquibase.database.Database.getDateLiteral.

Doc from liquibase.database.AbstractJdbcDatabase.getDateLiteral.

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

Note

many databases accept date literals in ISO8601 format with the 'T' replaced with a space. Only databases which do not accept these strings should need to override this method.

Implementation restriction: Currently, only the following subsets of ISO8601 are supported: yyyy-MM-dd hh:mm:ss yyyy-MM-ddThh:mm:ss

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
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
getShortNameback to summary
public String getShortName()

Implements liquibase.database.Database.getShortName.

Doc from liquibase.database.Database.getShortName.

Returns an all-lower-case short name of the product. Used for end-user selecting of database type such as the DBMS precondition.

Annotations
@Override
getShutdownEmbeddedDerbyback to summary
public boolean getShutdownEmbeddedDerby()
getViewDefinitionback to summary
public String getViewDefinition(CatalogAndSchema schema, String name) throws DatabaseException

Overrides liquibase.database.AbstractJdbcDatabase.getViewDefinition.

Implements liquibase.database.Database.getViewDefinition.

Annotations
@Override
isCorrectDatabaseImplementationback to summary
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException

Implements liquibase.database.Database.isCorrectDatabaseImplementation.

Doc from liquibase.database.Database.isCorrectDatabaseImplementation.

Is this AbstractDatabase subclass the correct one to use for the given connection.

Annotations
@Override
jdbcCallsCatalogsSchemasback to summary
public boolean jdbcCallsCatalogsSchemas()

Overrides liquibase.database.AbstractJdbcDatabase.jdbcCallsCatalogsSchemas.

Annotations
@Override
setShutdownEmbeddedDerbyback to summary
public void setShutdownEmbeddedDerby(boolean shutdown)
shutdownDerbyback to summary
protected void shutdownDerby(String url, String driverName) throws DatabaseException
supportsBooleanDataTypeback to summary
public boolean supportsBooleanDataType()
supportsCatalogInObjectNameback to summary
public boolean supportsCatalogInObjectName(Class<? extends DatabaseObject> type)

Overrides liquibase.database.AbstractJdbcDatabase.supportsCatalogInObjectName.

Implements liquibase.database.Database.supportsCatalogInObjectName.

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
supportsSequencesback to summary
public boolean supportsSequences()

Overrides liquibase.database.AbstractJdbcDatabase.supportsSequences.

Implements liquibase.database.Database.supportsSequences.

Doc from liquibase.database.AbstractJdbcDatabase.supportsSequences.

Does the database type support sequence.

Annotations
@Override
supportsTablespacesback to summary
public boolean supportsTablespaces()

Implements liquibase.database.Database.supportsTablespaces.

Annotations
@Override