liquibase.database
Class FirebirdDatabase

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

public class FirebirdDatabase
extends AbstractDatabase

Firebird database implementation. SQL Syntax ref: http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_60_sqlref


Field Summary
 
Fields inherited from class liquibase.database.AbstractDatabase
currentDateTimeFunction, log
 
Constructor Summary
FirebirdDatabase()
           
 
Method Summary
 java.lang.String convertRequestedSchemaToSchema(java.lang.String requestedSchema)
           
 DatabaseSnapshot createDatabaseSnapshot(java.lang.String schema, java.util.Set<DiffStatusListener> statusListeners)
           
 SqlStatement createFindSequencesSQL(java.lang.String schema)
           
 java.lang.String getBlobType()
          Returns the actual database-specific data type to use a "BLOB" column.
 java.lang.String getBooleanType()
          Returns the actual database-specific data type to use a "boolean" column.
 java.lang.String getClobType()
          Returns the actual database-specific data type to use a "CLOB" column.
 java.lang.String getColumnType(java.lang.String columnType, java.lang.Boolean autoIncrement)
          Returns the database-specific datatype for the given column configuration.
 java.lang.String getCurrencyType()
          Returns the actual database-specific data type to use a "currency" column.
 java.lang.String getCurrentDateTimeFunction()
          Returns database-specific function for generating the current date/time.
 java.lang.String getDateTimeType()
          Returns the actual database-specific data type to use a "datetime" column.
 java.lang.String getDefaultDriver(java.lang.String url)
          If this database understands the given url, return the default driver class name.
 java.lang.String getFalseBooleanValue()
          The database-specific value to use for "false" "boolean" columns.
 java.lang.String getProductName()
          Returns the full database product name.
 java.lang.String getTrueBooleanValue()
          The database-specific value to use for "true" "boolean" columns.
 java.lang.String getTypeName()
          Returns an all-lower-case short name of the product.
 java.lang.String getUUIDType()
          Returns the actual database-specific data type to use a "UUID" column.
 SqlStatement getViewDefinitionSql(java.lang.String schemaName, java.lang.String viewName)
           
 boolean isCorrectDatabaseImplementation(java.sql.Connection conn)
          Is this AbstractDatabase subclass the correct one to use for the given connection.
 boolean isSystemTable(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName)
           
 boolean supportsAutoIncrement()
           
 boolean supportsDDLInTransaction()
          By default databases should support DDL within a transaction.
 boolean supportsInitiallyDeferrableColumns()
          Returns whether this database support initially deferrable columns.
 boolean supportsSchemas()
           
 boolean supportsSequences()
          Does the database type support sequence.
 boolean supportsTablespaces()
           
 
Methods inherited from class liquibase.database.AbstractDatabase
canCreateChangeLogTable, checkDatabaseChangeLogLockTable, checkDatabaseChangeLogTable, close, commit, convertDatabaseValueToJavaObject, convertJavaObjectToString, convertRequestedSchemaToCatalog, convertToCorrectJavaType, doesChangeLogLockTableExist, doesChangeLogTableExist, doesTagExist, dropDatabaseObjects, equals, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeIndexName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, generatePrimaryKeyName, getAutoCommitMode, getAutoIncrementClause, getBigIntType, getCharType, getColumnType, getConcatSql, getConnection, getConnectionURL, getConnectionUsername, getCreateChangeLogLockSQL, getCreateChangeLogSQL, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductName, getDatabaseProductVersion, getDatabaseType, getDateLiteral, getDateLiteral, getDateLiteral, getDateLiteral, getDateLiteral, getDateType, getDefaultCatalogName, getDefaultDatabaseSchemaName, getDefaultSchemaName, getDoubleType, getDriverName, getFloatType, getIntType, getJdbcTemplate, getLineComment, getObjectEscapeCharacter, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSelectChangeLogLockSQL, getSystemTablesAndViews, getTimeType, getTinyIntType, getVarcharType, getViewDefinition, hashCode, isAutoCommit, isColumnAutoIncrement, isDateOnly, isDateTime, isLiquibaseTable, isLocalDatabase, isSystemView, isTimeOnly, markChangeSetAsRan, markChangeSetAsReRan, parseDate, removeRanStatus, rollback, setAutoCommit, setConnection, setConnection, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultSchemaName, setJdbcTemplate, shouldQuoteValue, supportsRestrictForeignKeys, tag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirebirdDatabase

public FirebirdDatabase()
Method Detail

isCorrectDatabaseImplementation

public boolean isCorrectDatabaseImplementation(java.sql.Connection conn)
                                        throws JDBCException
Description copied from interface: Database
Is this AbstractDatabase subclass the correct one to use for the given connection.

Throws:
JDBCException

getDefaultDriver

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


getProductName

public java.lang.String getProductName()
Description copied from interface: Database
Returns the full database product name. May be different than what the JDBC connection reports (getDatabaseProductName())


getTypeName

public java.lang.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.


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

getBooleanType

public java.lang.String getBooleanType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "boolean" column.


getCurrencyType

public java.lang.String getCurrencyType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "currency" column.


getUUIDType

public java.lang.String getUUIDType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "UUID" column.


getClobType

public java.lang.String getClobType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "CLOB" column.


getBlobType

public java.lang.String getBlobType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "BLOB" column.


getDateTimeType

public java.lang.String getDateTimeType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "datetime" column.


supportsInitiallyDeferrableColumns

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


getCurrentDateTimeFunction

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


supportsTablespaces

public boolean supportsTablespaces()

createFindSequencesSQL

public SqlStatement createFindSequencesSQL(java.lang.String schema)
                                    throws JDBCException
Specified by:
createFindSequencesSQL in interface Database
Overrides:
createFindSequencesSQL in class AbstractDatabase
Throws:
JDBCException

getViewDefinitionSql

public SqlStatement getViewDefinitionSql(java.lang.String schemaName,
                                         java.lang.String viewName)
                                  throws JDBCException
Overrides:
getViewDefinitionSql in class AbstractDatabase
Throws:
JDBCException

supportsDDLInTransaction

public boolean supportsDDLInTransaction()
Description copied from class: AbstractDatabase
By default databases should support DDL within a transaction.

Specified by:
supportsDDLInTransaction in interface Database
Overrides:
supportsDDLInTransaction in class AbstractDatabase
Returns:
True if the database supports DDL within a transaction, otherwise false.

getTrueBooleanValue

public java.lang.String getTrueBooleanValue()
Description copied from class: AbstractDatabase
The database-specific value to use for "true" "boolean" columns.

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

getFalseBooleanValue

public java.lang.String getFalseBooleanValue()
Description copied from class: AbstractDatabase
The database-specific value to use for "false" "boolean" columns.

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

isSystemTable

public boolean isSystemTable(java.lang.String catalogName,
                             java.lang.String schemaName,
                             java.lang.String tableName)
Specified by:
isSystemTable in interface Database
Overrides:
isSystemTable in class AbstractDatabase

supportsAutoIncrement

public boolean supportsAutoIncrement()
Specified by:
supportsAutoIncrement in interface Database
Overrides:
supportsAutoIncrement in class AbstractDatabase

supportsSchemas

public boolean supportsSchemas()
Specified by:
supportsSchemas in interface Database
Overrides:
supportsSchemas in class AbstractDatabase

convertRequestedSchemaToSchema

public java.lang.String convertRequestedSchemaToSchema(java.lang.String requestedSchema)
                                                throws JDBCException
Specified by:
convertRequestedSchemaToSchema in interface Database
Overrides:
convertRequestedSchemaToSchema in class AbstractDatabase
Throws:
JDBCException

getColumnType

public java.lang.String getColumnType(java.lang.String columnType,
                                      java.lang.Boolean autoIncrement)
Description copied from class: AbstractDatabase
Returns the database-specific datatype for the given column configuration. This method will convert some generic column types (e.g. boolean, currency) to the correct type for the current database.

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

createDatabaseSnapshot

public DatabaseSnapshot createDatabaseSnapshot(java.lang.String schema,
                                               java.util.Set<DiffStatusListener> statusListeners)
                                        throws JDBCException
Specified by:
createDatabaseSnapshot in interface Database
Specified by:
createDatabaseSnapshot in class AbstractDatabase
Throws:
JDBCException