liquibase.database.core
Class DerbyDatabase

java.lang.Object
  extended by liquibase.database.AbstractDatabase
      extended by liquibase.database.core.DerbyDatabase
All Implemented Interfaces:
Database, DatabaseObject, PrioritizedService

public class DerbyDatabase
extends AbstractDatabase


Field Summary
protected  int driverVersionMajor
           
protected  int driverVersionMinor
           
 
Fields inherited from class liquibase.database.AbstractDatabase
currentDateTimeFunction, databaseFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
DerbyDatabase()
           
 
Method Summary
 void close()
           
protected  void determineDriverVersion()
          Determine Apache Derby driver major/minor version.
 String getCurrentDateTimeFunction()
          Returns database-specific function for generating the current date/time.
 String getDateLiteral(String isoDate)
          Return a date literal with the same value as a string formatted using ISO 8601.
protected  String getDefaultDatabaseSchemaName()
           
 String getDefaultDriver(String url)
          If this database understands the given url, return the default driver class name.
 int getPriority()
           
 String getTypeName()
          Returns an all-lower-case short name of the product.
 String getViewDefinition(String schemaName, String name)
           
 boolean isCorrectDatabaseImplementation(DatabaseConnection conn)
          Is this AbstractDatabase subclass the correct one to use for the given connection.
 boolean supportsInitiallyDeferrableColumns()
          Returns whether this database support initially deferrable columns.
 boolean supportsSequences()
          Does the database type support sequence.
 boolean supportsTablespaces()
           
 
Methods inherited from class liquibase.database.AbstractDatabase
canCreateChangeLogTable, checkDatabaseChangeLogLockTable, checkDatabaseChangeLogTable, commit, convertRequestedSchemaToCatalog, convertRequestedSchemaToSchema, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDatabaseObject, escapeIndexName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeStatements, generateAutoIncrementBy, generateAutoIncrementStartWith, generatePrimaryKeyName, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getContainingObjects, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseFunctions, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultCatalogName, getDefaultSchemaName, getLineComment, getLiquibaseSchemaName, getNextChangeSetSequenceValue, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSystemTablesAndViews, getTable, getTimeLiteral, hasDatabaseChangeLogLockTable, hasDatabaseChangeLogTable, hashCode, isAutoCommit, isDateOnly, isDateTime, isLiquibaseTable, isLocalDatabase, isReservedWord, isSystemTable, isSystemView, isTimeOnly, markChangeSetExecStatus, parseDate, removeRanStatus, requiresPassword, requiresUsername, reset, rollback, saveRollbackStatement, saveStatements, setAutoCommit, setCanCacheLiquibaseTableInfo, setConnection, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultSchemaName, shouldQuoteValue, supportsAutoIncrement, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsRestrictForeignKeys, supportsSchemas, tag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

driverVersionMajor

protected int driverVersionMajor

driverVersionMinor

protected int driverVersionMinor
Constructor Detail

DerbyDatabase

public DerbyDatabase()
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

getDefaultDriver

public String getDefaultDriver(String url)
Description copied from interface: Database
If this database understands the given url, return the default driver class name. Otherwise return null.


getPriority

public int getPriority()

getTypeName

public String getTypeName()
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.


getDefaultDatabaseSchemaName

protected String getDefaultDatabaseSchemaName()
                                       throws DatabaseException
Overrides:
getDefaultDatabaseSchemaName in class AbstractDatabase
Throws:
DatabaseException

supportsSequences

public boolean supportsSequences()
Description copied from class: AbstractDatabase
Does the database type support sequence.

Specified by:
supportsSequences in interface Database
Overrides:
supportsSequences in class AbstractDatabase

supportsInitiallyDeferrableColumns

public boolean supportsInitiallyDeferrableColumns()
Description copied from interface: Database
Returns whether this database support initially deferrable columns.


getCurrentDateTimeFunction

public String getCurrentDateTimeFunction()
Description copied from interface: Database
Returns database-specific function for generating the current date/time.


getDateLiteral

public String getDateLiteral(String isoDate)
Description copied from class: AbstractDatabase
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

Specified by:
getDateLiteral in interface Database
Overrides:
getDateLiteral in class AbstractDatabase

supportsTablespaces

public boolean supportsTablespaces()

getViewDefinition

public String getViewDefinition(String schemaName,
                                String name)
                         throws DatabaseException
Specified by:
getViewDefinition in interface Database
Overrides:
getViewDefinition in class AbstractDatabase
Throws:
DatabaseException

close

public void close()
           throws DatabaseException
Specified by:
close in interface Database
Overrides:
close in class AbstractDatabase
Throws:
DatabaseException

determineDriverVersion

protected void determineDriverVersion()
Determine Apache Derby driver major/minor version.



Copyright © 2012 Liquibase.org. All Rights Reserved.