liquibase.database
Class SybaseASADatabase

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

public class SybaseASADatabase
extends AbstractDatabase

Author:
otaranenko

Field Summary
 
Fields inherited from class liquibase.database.AbstractDatabase
currentDateTimeFunction, log
 
Constructor Summary
SybaseASADatabase()
           
 
Method Summary
 java.lang.String convertRequestedSchemaToCatalog(java.lang.String requestedSchema)
           
 java.lang.String convertRequestedSchemaToSchema(java.lang.String requestedSchema)
           
 DatabaseSnapshot createDatabaseSnapshot(java.lang.String schema, java.util.Set<DiffStatusListener> statusListeners)
           
 java.lang.String escapeColumnName(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
          Escapes a single column name in a database-dependent manner so reserved words can be used as a column name (i.e.
 java.lang.String escapeIndexName(java.lang.String schema, java.lang.String indexName)
           
 java.lang.String getAutoIncrementClause()
          Returns database-specific auto-increment DDL clause.
 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 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 getDefaultCatalogName()
           
protected  java.lang.String getDefaultDatabaseSchemaName()
           
 java.lang.String getDefaultDriver(java.lang.String url)
          If this database understands the given url, return the default driver class name.
 java.lang.String getDefaultSchemaName()
           
 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.util.Set<java.lang.String> getSystemTablesAndViews()
          Returns system (undroppable) tables and views.
 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.
 java.lang.String getViewDefinition(java.lang.String schemaName, java.lang.String viewName)
           
 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.
 void setAutoCommit(boolean b)
           
 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, close, commit, convertDatabaseValueToJavaObject, convertJavaObjectToString, convertToCorrectJavaType, createFindSequencesSQL, doesChangeLogLockTableExist, doesChangeLogTableExist, doesTagExist, dropDatabaseObjects, equals, escapeColumnNameList, escapeConstraintName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, generatePrimaryKeyName, getAutoCommitMode, getBigIntType, getCharType, getColumnType, getColumnType, getConcatSql, getConnection, getConnectionURL, getConnectionUsername, getCreateChangeLogLockSQL, getCreateChangeLogSQL, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductName, getDatabaseProductVersion, getDatabaseType, getDateLiteral, getDateLiteral, getDateLiteral, getDateLiteral, getDateLiteral, getDateType, getDoubleType, getDriverName, getFloatType, getIntType, getJdbcTemplate, getLineComment, getObjectEscapeCharacter, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSelectChangeLogLockSQL, getTimeType, getTinyIntType, getVarcharType, hashCode, isAutoCommit, isColumnAutoIncrement, isDateOnly, isDateTime, isLiquibaseTable, isLocalDatabase, isSystemTable, isSystemView, isTimeOnly, markChangeSetAsRan, markChangeSetAsReRan, parseDate, removeRanStatus, rollback, setConnection, setConnection, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultSchemaName, setJdbcTemplate, shouldQuoteValue, supportsAutoIncrement, supportsDDLInTransaction, supportsRestrictForeignKeys, supportsSchemas, tag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SybaseASADatabase

public SybaseASADatabase()
Method Detail

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

escapeIndexName

public java.lang.String escapeIndexName(java.lang.String schema,
                                        java.lang.String indexName)
Specified by:
escapeIndexName in interface Database
Overrides:
escapeIndexName in class AbstractDatabase

getBlobType

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


getBooleanType

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


getClobType

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


getCurrencyType

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


getCurrentDateTimeFunction

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


getDateTimeType

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


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.


getUUIDType

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


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

getDefaultCatalogName

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

getDefaultDatabaseSchemaName

protected java.lang.String getDefaultDatabaseSchemaName()
                                                 throws JDBCException
Overrides:
getDefaultDatabaseSchemaName in class AbstractDatabase
Throws:
JDBCException

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

getDefaultSchemaName

public java.lang.String getDefaultSchemaName()
Specified by:
getDefaultSchemaName in interface Database
Overrides:
getDefaultSchemaName in class AbstractDatabase

escapeColumnName

public java.lang.String escapeColumnName(java.lang.String schemaName,
                                         java.lang.String tableName,
                                         java.lang.String columnName)
Description copied from interface: Database
Escapes a single column name in a database-dependent manner so reserved words can be used as a column name (i.e. "return").

Specified by:
escapeColumnName in interface Database
Overrides:
escapeColumnName in class AbstractDatabase
columnName - column name
Returns:
escaped column name

getViewDefinition

public java.lang.String getViewDefinition(java.lang.String schemaName,
                                          java.lang.String viewName)
                                   throws JDBCException
Specified by:
getViewDefinition in interface Database
Overrides:
getViewDefinition in class AbstractDatabase
Throws:
JDBCException

supportsInitiallyDeferrableColumns

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


supportsTablespaces

public boolean supportsTablespaces()

convertRequestedSchemaToCatalog

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

getSystemTablesAndViews

public java.util.Set<java.lang.String> getSystemTablesAndViews()
Description copied from class: AbstractDatabase
Returns system (undroppable) tables and views.

Overrides:
getSystemTablesAndViews in class AbstractDatabase

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

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

getAutoIncrementClause

public java.lang.String getAutoIncrementClause()
Description copied from class: AbstractDatabase
Returns database-specific auto-increment DDL clause.

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

getViewDefinitionSql

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

setAutoCommit

public void setAutoCommit(boolean b)
                   throws JDBCException
Specified by:
setAutoCommit in interface Database
Overrides:
setAutoCommit in class AbstractDatabase
Throws:
JDBCException