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
FieldsFields inherited from class liquibase.database.AbstractJdbcDatabase
caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercasedFields inherited from interface liquibase.database.Database
COMPLETE_SQL_SCOPE_KEY, IGNORE_MISSING_REFERENCES_KEYFields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionescapeIndexName(String catalogName, String schemaName, String indexName) protected booleangenerateAutoIncrementBy(BigInteger incrementBy) protected booleangenerateAutoIncrementStartWith(BigInteger startWith) generateDefaultConstraintName(String tableName, String columnName) protected StringgetConcatSql(String... values) Returns SQL to concat the passed values.protected SqlStatementUsed to obtain the connection schema name through a statement Override this method to change the statement.intintprotected StringgetDefaultDriver(String url) If this database understands the given url, return the default driver class name.intprotected Stringprotected StringReturns an all-lower-case short name of the product.Returns system (undroppable) views.getViewDefinition(CatalogAndSchema schema, String viewName) booleanIs this AbstractDatabase subclass the correct one to use for the given connection.booleanisSystemObject(DatabaseObject example) protected booleanmustQuoteObjectName(String objectName, Class<? extends DatabaseObject> objectType) quoteObject(String objectName, Class<? extends DatabaseObject> objectType) booleanDoes the database require explicit NULL for nullable columns?booleansupports(Class<? extends DatabaseObject> object) Whether this database supports the specified object type.booleanSybase does not support DDL and meta data in transactions properly, as such we turn off the commit and turn on auto commit.booleanbooleanReturns whether this database support initially deferrable columns.booleanbooleanDoes the database type support sequence.booleanMethods 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, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface liquibase.database.Database
addCompleteSqlToScope, afterUpdate, checkDatabaseConnection, dropDatabaseObjects, escapeForLike, 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:DatabaseReturns 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:
getDefaultDatabaseProductNamein 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:
supportsDDLInTransactionin interfaceDatabase- Overrides:
supportsDDLInTransactionin classAbstractJdbcDatabase- Returns:
- True if the database supports DDL within a transaction, otherwise false.
-
getSystemViews
Description copied from class:AbstractJdbcDatabaseReturns system (undroppable) views.- Overrides:
getSystemViewsin classAbstractJdbcDatabase
-
supportsInitiallyDeferrableColumns
public boolean supportsInitiallyDeferrableColumns()Description copied from interface:DatabaseReturns whether this database support initially deferrable columns. -
supports
Description copied from interface:DatabaseWhether 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:AbstractJdbcDatabaseDoes the database type support sequence.- Specified by:
supportsSequencesin interfaceDatabase- Overrides:
supportsSequencesin classAbstractJdbcDatabase
-
isCorrectDatabaseImplementation
Description copied from interface:DatabaseIs this AbstractDatabase subclass the correct one to use for the given connection.- Throws:
DatabaseException
-
getDefaultDriver
Description copied from interface:DatabaseIf this database understands the given url, return the default driver class name. Otherwise return null. -
getAutoIncrementClause
- Overrides:
getAutoIncrementClausein classAbstractJdbcDatabase
-
generateAutoIncrementStartWith
- Overrides:
generateAutoIncrementStartWithin classAbstractJdbcDatabase
-
generateAutoIncrementBy
- Overrides:
generateAutoIncrementByin classAbstractJdbcDatabase
-
getConcatSql
Description copied from interface:DatabaseReturns SQL to concat the passed values.- Specified by:
getConcatSqlin interfaceDatabase- Overrides:
getConcatSqlin classAbstractJdbcDatabase
-
supportsTablespaces
public boolean supportsTablespaces() -
isSystemObject
- Specified by:
isSystemObjectin interfaceDatabase- Overrides:
isSystemObjectin classAbstractJdbcDatabase
-
generateDefaultConstraintName
-
getConnectionSchemaNameCallStatement
Description copied from class:AbstractJdbcDatabaseUsed 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:
getConnectionSchemaNameCallStatementin classAbstractJdbcDatabase- See Also:
-
supportsRestrictForeignKeys
public boolean supportsRestrictForeignKeys()- Specified by:
supportsRestrictForeignKeysin interfaceDatabase- Overrides:
supportsRestrictForeignKeysin classAbstractJdbcDatabase
-
supportsDropTableCascadeConstraints
public boolean supportsDropTableCascadeConstraints()- Specified by:
supportsDropTableCascadeConstraintsin interfaceDatabase- Overrides:
supportsDropTableCascadeConstraintsin classAbstractJdbcDatabase
-
getViewDefinition
- Specified by:
getViewDefinitionin interfaceDatabase- Overrides:
getViewDefinitionin classAbstractJdbcDatabase- Throws:
DatabaseException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersionin interfaceDatabase- Overrides:
getDatabaseMajorVersionin classAbstractJdbcDatabase- Returns:
- the major version if supported, otherwise -1
- Throws:
DatabaseException- See Also:
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersionin interfaceDatabase- Overrides:
getDatabaseMinorVersionin classAbstractJdbcDatabase- Returns:
- the minor version if supported, otherwise -1
- Throws:
DatabaseException- See Also:
-
escapeIndexName
- Specified by:
escapeIndexNamein interfaceDatabase- Overrides:
escapeIndexNamein classAbstractJdbcDatabase
-
quoteObject
- Overrides:
quoteObjectin classAbstractJdbcDatabase
-
mustQuoteObjectName
protected boolean mustQuoteObjectName(String objectName, Class<? extends DatabaseObject> objectType) - Overrides:
mustQuoteObjectNamein classAbstractJdbcDatabase
-
getQuotingStartCharacter
- Overrides:
getQuotingStartCharacterin classAbstractJdbcDatabase
-
getQuotingEndCharacter
- Overrides:
getQuotingEndCharacterin classAbstractJdbcDatabase
-
requiresExplicitNullForColumns
public boolean requiresExplicitNullForColumns()Description copied from interface:DatabaseDoes the database require explicit NULL for nullable columns?- Specified by:
requiresExplicitNullForColumnsin interfaceDatabase- Overrides:
requiresExplicitNullForColumnsin classAbstractJdbcDatabase- Returns:
- true if the database behaves incorrectly if NULL is not explicitly specified, false if it behaves like any good RDBMS should.
-