Package liquibase.database.core
Class SybaseDatabase
java.lang.Object
liquibase.database.AbstractJdbcDatabase
liquibase.database.core.SybaseDatabase
- All Implemented Interfaces:
AutoCloseable
,Database
,PrioritizedService
Encapsulates Sybase ASE database support.
-
Field Summary
Fields inherited from class liquibase.database.AbstractJdbcDatabase
caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercased
Fields inherited from interface liquibase.database.Database
COMPLETE_SQL_SCOPE_KEY
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionescapeIndexName
(String catalogName, String schemaName, String indexName) protected boolean
generateAutoIncrementBy
(BigInteger incrementBy) protected boolean
generateAutoIncrementStartWith
(BigInteger startWith) generateDefaultConstraintName
(String tableName, String columnName) protected String
getConcatSql
(String... values) Returns SQL to concat the passed values.protected SqlStatement
Used to obtain the connection schema name through a statement Override this method to change the statement.int
int
protected String
getDefaultDriver
(String url) If this database understands the given url, return the default driver class name.int
protected String
protected String
Returns an all-lower-case short name of the product.Returns system (undroppable) views.getViewDefinition
(CatalogAndSchema schema, String viewName) boolean
Is this AbstractDatabase subclass the correct one to use for the given connection.boolean
isSystemObject
(DatabaseObject example) protected boolean
mustQuoteObjectName
(String objectName, Class<? extends DatabaseObject> objectType) quoteObject
(String objectName, Class<? extends DatabaseObject> objectType) boolean
Does the database require explicit NULL for nullable columns?boolean
supports
(Class<? extends DatabaseObject> object) Whether this database supports the specified object type.boolean
Sybase does not support DDL and meta data in transactions properly, as such we turn off the commit and turn on auto commit.boolean
boolean
Returns whether this database support initially deferrable columns.boolean
boolean
Does the database type support sequence.boolean
Methods inherited from class liquibase.database.AbstractJdbcDatabase
addReservedWords, canCreateChangeLogTable, close, commit, correctObjectName, correctSchema, correctSchema, createsIndexesForForeignKeys, dataTypeIsNotModifiable, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDataTypeName, escapeObjectName, escapeObjectName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeRollbackStatements, executeStatements, filterRollbackVisitors, generateDatabaseFunctionValue, generatePrimaryKeyName, get, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConnection, getConnectionCatalogName, getConnectionSchemaName, getContainingObjects, getCurrentDateTimeFunction, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseProductName, getDatabaseProductVersion, getDataTypeMaxParameters, getDateFunctions, getDateLiteral, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultCatalogName, getDefaultFractionalDigitsForTimestamp, getDefaultScaleForNativeDataType, getDefaultSchema, getDefaultSchemaName, getFetchSize, getJdbcCatalogName, getJdbcCatalogName, getJdbcSchemaName, getJdbcSchemaName, getLineComment, getLiquibaseCatalogName, getLiquibaseSchemaName, getLiquibaseTablespaceName, getMaxFractionalDigitsForTimestamp, getName, getObjectQuotingStrategy, getOutputDefaultCatalog, getOutputDefaultSchema, getQuotingEndReplacement, getRanChangeSet, getRanChangeSetList, getRanDate, getRawDatabaseChangeLogLockTableName, getRawDatabaseChangeLogTableName, getRunStatus, getSchemaAndCatalogCase, getSchemaFromJdbcInfo, getSystemSchema, getSystemTables, getTimeLiteral, hashCode, isAutoCommit, isCaseSensitive, isCatalogOrSchemaType, isCurrentTimeFunction, isDateOnly, isDateTime, isDefaultCatalog, isDefaultSchema, isFunction, isLiquibaseObject, isReservedWord, isSafeToRunUpdate, isSystemView, isTimeOnly, isTimestamp, jdbcCallsCatalogsSchemas, markChangeSetExecStatus, parseDate, removeRanStatus, requiresPassword, requiresUsername, resetInternalState, rollback, saveRollbackStatement, saveStatements, set, setAutoCommit, setCanCacheLiquibaseTableInfo, setCaseSensitive, setConnection, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultCatalogName, setDefaultSchemaName, setLiquibaseCatalogName, setLiquibaseSchemaName, setLiquibaseTablespaceName, setObjectQuotingStrategy, setOutputDefaultCatalog, setOutputDefaultSchema, setPreviousAutoCommit, startsWithNumeric, supportsAutoIncrement, supportsBatchUpdates, supportsCatalogInObjectName, supportsCatalogs, supportsForeignKeyDisable, supportsNotNullConstraintNames, supportsPrimaryKeyNames, supportsSchemas, tag, toString, unescapeDataTypeName, unescapeDataTypeString, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface liquibase.database.Database
addCompleteSqlToScope, afterUpdate, checkDatabaseConnection, dropDatabaseObjects, failOnDefferable, generateConnectCommandSuccessMessage, getDisplayName, supportsCreateIfNotExists, supportsDatabaseChangeLogHistory, temporarilySetObjectQuotingStrategy
-
Field Details
-
PRODUCT_NAME
- See Also:
-
systemTablesAndViews
-
-
Constructor Details
-
SybaseDatabase
public SybaseDatabase()
-
-
Method Details
-
getShortName
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. -
getPriority
public int getPriority() -
getDefaultPort
-
getDefaultDatabaseProductName
- Specified by:
getDefaultDatabaseProductName
in classAbstractJdbcDatabase
-
supportsDDLInTransaction
public boolean supportsDDLInTransaction()Sybase does not support DDL and meta data in transactions properly, as such we turn off the commit and turn on auto commit.- Specified by:
supportsDDLInTransaction
in interfaceDatabase
- Overrides:
supportsDDLInTransaction
in classAbstractJdbcDatabase
- Returns:
- True if the database supports DDL within a transaction, otherwise false.
-
getSystemViews
Description copied from class:AbstractJdbcDatabase
Returns system (undroppable) views.- Overrides:
getSystemViews
in classAbstractJdbcDatabase
-
supportsInitiallyDeferrableColumns
public boolean supportsInitiallyDeferrableColumns()Description copied from interface:Database
Returns whether this database support initially deferrable columns. -
supports
Description copied from interface:Database
Whether this database supports the specified object type. It is invoking the deprecated methods to ensure that extensions are not broken, but once those are removed it will return only true- Parameters:
object
- the object type to check- Returns:
- true if the database supports the object type, false otherwise
-
supportsSequences
public boolean supportsSequences()Description copied from class:AbstractJdbcDatabase
Does the database type support sequence.- Specified by:
supportsSequences
in interfaceDatabase
- Overrides:
supportsSequences
in classAbstractJdbcDatabase
-
isCorrectDatabaseImplementation
Description copied from interface:Database
Is this AbstractDatabase subclass the correct one to use for the given connection.- Throws:
DatabaseException
-
getDefaultDriver
Description copied from interface:Database
If this database understands the given url, return the default driver class name. Otherwise return null. -
getAutoIncrementClause
- Overrides:
getAutoIncrementClause
in classAbstractJdbcDatabase
-
generateAutoIncrementStartWith
- Overrides:
generateAutoIncrementStartWith
in classAbstractJdbcDatabase
-
generateAutoIncrementBy
- Overrides:
generateAutoIncrementBy
in classAbstractJdbcDatabase
-
getConcatSql
Description copied from interface:Database
Returns SQL to concat the passed values.- Specified by:
getConcatSql
in interfaceDatabase
- Overrides:
getConcatSql
in classAbstractJdbcDatabase
-
supportsTablespaces
public boolean supportsTablespaces() -
isSystemObject
- Specified by:
isSystemObject
in interfaceDatabase
- Overrides:
isSystemObject
in classAbstractJdbcDatabase
-
generateDefaultConstraintName
-
getConnectionSchemaNameCallStatement
Description copied from class:AbstractJdbcDatabase
Used to obtain the connection schema name through a statement Override this method to change the statement. Only override this if getConnectionSchemaName is left unchanged or is using this method.- Overrides:
getConnectionSchemaNameCallStatement
in classAbstractJdbcDatabase
- See Also:
-
supportsRestrictForeignKeys
public boolean supportsRestrictForeignKeys()- Specified by:
supportsRestrictForeignKeys
in interfaceDatabase
- Overrides:
supportsRestrictForeignKeys
in classAbstractJdbcDatabase
-
supportsDropTableCascadeConstraints
public boolean supportsDropTableCascadeConstraints()- Specified by:
supportsDropTableCascadeConstraints
in interfaceDatabase
- Overrides:
supportsDropTableCascadeConstraints
in classAbstractJdbcDatabase
-
getViewDefinition
- Specified by:
getViewDefinition
in interfaceDatabase
- Overrides:
getViewDefinition
in classAbstractJdbcDatabase
- Throws:
DatabaseException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersion
in interfaceDatabase
- Overrides:
getDatabaseMajorVersion
in classAbstractJdbcDatabase
- Returns:
- the major version if supported, otherwise -1
- Throws:
DatabaseException
- See Also:
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersion
in interfaceDatabase
- Overrides:
getDatabaseMinorVersion
in classAbstractJdbcDatabase
- Returns:
- the minor version if supported, otherwise -1
- Throws:
DatabaseException
- See Also:
-
escapeIndexName
- Specified by:
escapeIndexName
in interfaceDatabase
- Overrides:
escapeIndexName
in classAbstractJdbcDatabase
-
quoteObject
- Overrides:
quoteObject
in classAbstractJdbcDatabase
-
mustQuoteObjectName
protected boolean mustQuoteObjectName(String objectName, Class<? extends DatabaseObject> objectType) - Overrides:
mustQuoteObjectName
in classAbstractJdbcDatabase
-
getQuotingStartCharacter
- Overrides:
getQuotingStartCharacter
in classAbstractJdbcDatabase
-
getQuotingEndCharacter
- Overrides:
getQuotingEndCharacter
in classAbstractJdbcDatabase
-
requiresExplicitNullForColumns
public boolean requiresExplicitNullForColumns()Description copied from interface:Database
Does the database require explicit NULL for nullable columns?- Specified by:
requiresExplicitNullForColumns
in interfaceDatabase
- Overrides:
requiresExplicitNullForColumns
in classAbstractJdbcDatabase
- Returns:
- true if the database behaves incorrectly if NULL is not explicitly specified, false if it behaves like any good RDBMS should.
-