public abstract class AbstractJdbcDatabase extends Object implements Database
Modifier and Type | Field and Description |
---|---|
protected Boolean |
caseSensitive |
protected String |
currentDateTimeFunction |
protected List<DatabaseFunction> |
dateFunctions |
protected BigInteger |
defaultAutoIncrementBy |
protected BigInteger |
defaultAutoIncrementStartWith |
protected String |
defaultCatalogName |
protected String |
defaultSchemaName |
protected ObjectQuotingStrategy |
quotingStrategy |
protected String |
sequenceCurrentValueFunction |
protected String |
sequenceNextValueFunction
The sequence name will be substituted into the string e.g.
|
protected List<String> |
unmodifiableDataTypes |
protected Boolean |
unquotedObjectsAreUppercased |
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
Constructor and Description |
---|
AbstractJdbcDatabase() |
Modifier and Type | Method and Description |
---|---|
void |
addReservedWords(Collection<String> words) |
protected boolean |
canCreateChangeLogTable() |
void |
close() |
void |
commit() |
String |
correctObjectName(String objectName,
Class<? extends DatabaseObject> objectType)
Fix the object name to the format the database expects, handling changes in case, etc.
|
CatalogAndSchema |
correctSchema(CatalogAndSchema schema)
Deprecated.
|
CatalogAndSchema |
correctSchema(String catalog,
String schema)
Deprecated.
|
boolean |
createsIndexesForForeignKeys() |
boolean |
dataTypeIsNotModifiable(String typeName)
Types like int4 in postgres cannot have a modifier.
|
boolean |
disableForeignKeyChecks() |
boolean |
doesTagExist(String tag) |
void |
dropDatabaseObjects(CatalogAndSchema schemaToDrop)
Drops all objects in a specified schema.
|
void |
enableForeignKeyChecks() |
boolean |
equals(Object o) |
String |
escapeColumnName(String catalogName,
String schemaName,
String tableName,
String columnName)
Escapes a single column name in a database-dependent manner so reserved words can be used as a column
name (i.e.
|
String |
escapeColumnName(String catalogName,
String schemaName,
String tableName,
String columnName,
boolean quoteNamesThatMayBeFunctions)
Similar to
Database.escapeColumnName(String, String, String, String) but allows control over whether function-like names should be left unquoted. |
String |
escapeColumnNameList(String columnNames)
Escapes a list of column names in a database-dependent manner so reserved words can be used as a column
name (i.e.
|
String |
escapeConstraintName(String constraintName) |
String |
escapeDataTypeName(String dataTypeName) |
String |
escapeIndexName(String catalogName,
String schemaName,
String indexName) |
String |
escapeObjectName(String objectName,
Class<? extends DatabaseObject> objectType) |
String |
escapeObjectName(String catalogName,
String schemaName,
String objectName,
Class<? extends DatabaseObject> objectType) |
String |
escapeSequenceName(String catalogName,
String schemaName,
String sequenceName) |
String |
escapeStringForDatabase(String string) |
String |
escapeTableName(String catalogName,
String schemaName,
String tableName) |
String |
escapeViewName(String catalogName,
String schemaName,
String viewName) |
void |
execute(SqlStatement[] statements,
List<SqlVisitor> sqlVisitors) |
void |
executeRollbackStatements(Change change,
List<SqlVisitor> sqlVisitors) |
void |
executeRollbackStatements(SqlStatement[] statements,
List<SqlVisitor> sqlVisitors) |
void |
executeStatements(Change change,
DatabaseChangeLog changeLog,
List<SqlVisitor> sqlVisitors) |
protected List<SqlVisitor> |
filterRollbackVisitors(List<SqlVisitor> visitors)
Takes a list of SqlVisitors and returns a new list with only the SqlVisitors set to apply to rollbacks
|
protected boolean |
generateAutoIncrementBy(BigInteger incrementBy) |
protected boolean |
generateAutoIncrementStartWith(BigInteger startWith) |
String |
generateDatabaseFunctionValue(DatabaseFunction databaseFunction)
Some function names are placeholders that need to be replaced with the specific database value.
|
String |
generatePrimaryKeyName(String tableName) |
Object |
get(String key) |
boolean |
getAutoCommitMode()
Auto-commit mode to run in
|
protected String |
getAutoIncrementByClause() |
protected String |
getAutoIncrementClause() |
String |
getAutoIncrementClause(BigInteger startWith,
BigInteger incrementBy,
String generationType,
Boolean defaultOnNull)
Returns database-specific auto-increment DDL clause.
|
protected String |
getAutoIncrementClause(String generationType,
Boolean defaultOnNull)
Default implementation.
|
protected String |
getAutoIncrementClosing() |
protected String |
getAutoIncrementOpening() |
protected String |
getAutoIncrementStartWithClause() |
String |
getConcatSql(String... values)
Returns SQL to concat the passed values.
|
DatabaseConnection |
getConnection() |
protected String |
getConnectionCatalogName() |
protected String |
getConnectionSchemaName()
Overwrite this method to get the default schema name for the connection.
|
protected SqlStatement |
getConnectionSchemaNameCallStatement()
Used to obtain the connection schema name through a statement
Override this method to change the statement.
|
DatabaseObject[] |
getContainingObjects() |
String |
getCurrentDateTimeFunction()
Returns database-specific function for generating the current date/time.
|
String |
getDatabaseChangeLogLockTableName() |
String |
getDatabaseChangeLogTableName() |
int |
getDatabaseMajorVersion() |
int |
getDatabaseMinorVersion() |
String |
getDatabaseProductName()
Returns the name of the database product according to the underlying database.
|
String |
getDatabaseProductVersion() |
int |
getDataTypeMaxParameters(String dataTypeName) |
List<DatabaseFunction> |
getDateFunctions()
Returns list of database native date functions
|
String |
getDateLiteral(Date date) |
String |
getDateLiteral(Date date) |
String |
getDateLiteral(String isoDate)
Return a date literal with the same value as a string formatted using ISO 8601.
|
String |
getDateTimeLiteral(Timestamp date) |
String |
getDefaultCatalogName() |
protected abstract String |
getDefaultDatabaseProductName() |
int |
getDefaultFractionalDigitsForTimestamp()
SQL Standard (Foundation) says: "...if
|
Integer |
getDefaultScaleForNativeDataType(String nativeDataType)
Returns the default precision for a given native data type, e.g.
|
CatalogAndSchema |
getDefaultSchema() |
String |
getDefaultSchemaName() |
Integer |
getFetchSize() |
String |
getJdbcCatalogName(CatalogAndSchema schema) |
String |
getJdbcCatalogName(Schema schema) |
String |
getJdbcSchemaName(CatalogAndSchema schema) |
String |
getJdbcSchemaName(Schema schema) |
String |
getLineComment()
Returns database-specific line comment string.
|
String |
getLiquibaseCatalogName() |
String |
getLiquibaseSchemaName() |
String |
getLiquibaseTablespaceName() |
int |
getMaxFractionalDigitsForTimestamp()
Most relational databases support 9 fractional digits, and subclasses must overwrite this method if they
support less than that.
|
String |
getName() |
ObjectQuotingStrategy |
getObjectQuotingStrategy() |
boolean |
getOutputDefaultCatalog() |
boolean |
getOutputDefaultSchema()
Should the schema be included in identifiers even if it is the default schema?
|
protected String |
getQuotingEndCharacter() |
protected String |
getQuotingEndReplacement() |
protected String |
getQuotingStartCharacter() |
RanChangeSet |
getRanChangeSet(ChangeSet changeSet) |
List<RanChangeSet> |
getRanChangeSetList()
Returns the ChangeSets that have been run against the current database.
|
Date |
getRanDate(ChangeSet changeSet) |
ChangeSet.RunStatus |
getRunStatus(ChangeSet changeSet)
Returns the run status for the given ChangeSet
|
CatalogAndSchema.CatalogAndSchemaCase |
getSchemaAndCatalogCase()
This logic is used when db support catalogs
|
CatalogAndSchema |
getSchemaFromJdbcInfo(String rawCatalogName,
String rawSchemaName) |
String |
getSystemSchema() |
protected Set<String> |
getSystemTables()
Returns system (undroppable) views.
|
protected Set<String> |
getSystemViews()
Returns system (undroppable) views.
|
String |
getTimeLiteral(Time date) |
String |
getViewDefinition(CatalogAndSchema schema,
String viewName) |
int |
hashCode() |
boolean |
isAutoCommit() |
boolean |
isCaseSensitive() |
protected boolean |
isDateOnly(String isoDate)
Returns true if the String conforms to an ISO 8601 date, e.g.
|
protected boolean |
isDateTime(String isoDate)
Returns true if the String conforms to an ISO 8601 date plus a time (hours, minutes, whole seconds
and optionally fraction of a second) in UTC, e.g.
|
boolean |
isDefaultCatalog(String catalog)
If the database supports catalogs, test if a given catalog name equals to the default catalog of the current
logged in user.
|
boolean |
isDefaultSchema(String catalog,
String schema)
If the database supports schemas, test if a given combination of catalog and schema name equals to the default
catalog and schema of the current logged in user.
|
boolean |
isFunction(String string) |
boolean |
isLiquibaseObject(DatabaseObject object) |
boolean |
isReservedWord(String string) |
boolean |
isSafeToRunUpdate()
Default implementation, just look for "local" IPs.
|
boolean |
isSystemObject(DatabaseObject example) |
boolean |
isSystemView(CatalogAndSchema schema,
String viewName) |
protected boolean |
isTimeOnly(String isoDate)
Returns true if the String conforms to an ISO 8601 time (hours, minutes and whole seconds) in UTC,
e.g.
|
protected boolean |
isTimestamp(String isoDate)
Returns true if the String conforms to an ISO 8601 date
plus a timestamp (hours, minutes, seconds and at least one decimal fraction) in UTC,
e.g.
|
boolean |
jdbcCallsCatalogsSchemas() |
void |
markChangeSetExecStatus(ChangeSet changeSet,
ChangeSet.ExecType execType)
After the change set has been ran against the database this method will update the change log table
with the information.
|
protected boolean |
mustQuoteObjectName(String objectName,
Class<? extends DatabaseObject> objectType) |
Date |
parseDate(String dateAsString) |
String |
quoteObject(String objectName,
Class<? extends DatabaseObject> objectType) |
void |
removeRanStatus(ChangeSet changeSet) |
boolean |
requiresExplicitNullForColumns()
Does the database require explicit NULL for nullable columns?
|
boolean |
requiresPassword() |
boolean |
requiresUsername() |
void |
resetInternalState() |
void |
rollback() |
void |
saveRollbackStatement(Change change,
List<SqlVisitor> sqlVisitors,
Writer writer) |
void |
saveStatements(Change change,
List<SqlVisitor> sqlVisitors,
Writer writer) |
AbstractJdbcDatabase |
set(String key,
Object value) |
void |
setAutoCommit(boolean b) |
void |
setCanCacheLiquibaseTableInfo(boolean canCacheLiquibaseTableInfo) |
void |
setCaseSensitive(Boolean caseSensitive) |
void |
setConnection(DatabaseConnection conn) |
void |
setCurrentDateTimeFunction(String function) |
void |
setDatabaseChangeLogLockTableName(String tableName)
Set the table name of the change log lock to the given table name
|
void |
setDatabaseChangeLogTableName(String tableName)
Set the table name of the change log to the given table name
|
void |
setDefaultCatalogName(String defaultCatalogName) |
void |
setDefaultSchemaName(String schemaName) |
void |
setLiquibaseCatalogName(String catalogName) |
void |
setLiquibaseSchemaName(String schemaName) |
void |
setLiquibaseTablespaceName(String tablespace) |
void |
setObjectQuotingStrategy(ObjectQuotingStrategy quotingStrategy) |
void |
setOutputDefaultCatalog(boolean outputDefaultCatalog) |
void |
setOutputDefaultSchema(boolean outputDefaultSchema)
Whether the default schema should be included in generated SQL
|
protected boolean |
startsWithNumeric(String objectName) |
boolean |
supportsAutoIncrement() |
boolean |
supportsBatchUpdates()
Does the database support batched DML (INSERT/UPDATE/DELETE/MERGE/...) statements sent in a single call to
the database?
|
boolean |
supportsCatalogInObjectName(Class<? extends DatabaseObject> type) |
boolean |
supportsCatalogs() |
boolean |
supportsDDLInTransaction()
Determines if the database supports DDL within a transaction or not.
|
boolean |
supportsDropTableCascadeConstraints() |
boolean |
supportsForeignKeyDisable() |
boolean |
supportsNotNullConstraintNames()
Does this database treat NOT NULL as an own kind of CONSTRAINT (in addition of simply being a column property)?
This will affect the CONSTRAINT clause SQL generators.
|
boolean |
supportsPrimaryKeyNames() |
boolean |
supportsRestrictForeignKeys() |
boolean |
supportsSchemas() |
boolean |
supportsSequences()
Does the database type support sequence.
|
void |
tag(String tagString)
Tags the database changelog with the given string.
|
String |
toString() |
String |
unescapeDataTypeName(String dataTypeName) |
String |
unescapeDataTypeString(String dataTypeString) |
ValidationErrors |
validate() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDefaultDriver, getDefaultPort, getShortName, isCorrectDatabaseImplementation, supportsInitiallyDeferrableColumns, supportsTablespaces
getPriority
protected String defaultCatalogName
protected String defaultSchemaName
protected String currentDateTimeFunction
protected String sequenceNextValueFunction
protected String sequenceCurrentValueFunction
protected List<DatabaseFunction> dateFunctions
protected BigInteger defaultAutoIncrementStartWith
protected BigInteger defaultAutoIncrementBy
protected Boolean unquotedObjectsAreUppercased
protected ObjectQuotingStrategy quotingStrategy
protected Boolean caseSensitive
public String getName()
public boolean requiresPassword()
requiresPassword
in interface Database
public boolean requiresUsername()
requiresUsername
in interface Database
public DatabaseObject[] getContainingObjects()
public DatabaseConnection getConnection()
getConnection
in interface Database
public void setConnection(DatabaseConnection conn)
setConnection
in interface Database
public boolean getAutoCommitMode()
Database
getAutoCommitMode
in interface Database
public final void addReservedWords(Collection<String> words)
addReservedWords
in interface Database
public boolean supportsDDLInTransaction()
supportsDDLInTransaction
in interface Database
public String getDatabaseProductName()
Database
getDatabaseProductName
in interface Database
protected abstract String getDefaultDatabaseProductName()
public String getDatabaseProductVersion() throws DatabaseException
getDatabaseProductVersion
in interface Database
DatabaseException
public int getDatabaseMajorVersion() throws DatabaseException
getDatabaseMajorVersion
in interface Database
DatabaseException
public int getDatabaseMinorVersion() throws DatabaseException
getDatabaseMinorVersion
in interface Database
DatabaseException
public String getDefaultCatalogName()
getDefaultCatalogName
in interface Database
public void setDefaultCatalogName(String defaultCatalogName)
setDefaultCatalogName
in interface Database
protected String getConnectionCatalogName() throws DatabaseException
DatabaseException
@Deprecated public CatalogAndSchema correctSchema(String catalog, String schema)
@Deprecated public CatalogAndSchema correctSchema(CatalogAndSchema schema)
Database
correctSchema
in interface Database
public String correctObjectName(String objectName, Class<? extends DatabaseObject> objectType)
Database
correctObjectName
in interface Database
public CatalogAndSchema getDefaultSchema()
getDefaultSchema
in interface Database
public String getDefaultSchemaName()
getDefaultSchemaName
in interface Database
public Integer getDefaultScaleForNativeDataType(String nativeDataType)
Database
getDefaultScaleForNativeDataType
in interface Database
nativeDataType
- the name of the native data type (case-insensitive).public void setDefaultSchemaName(String schemaName)
setDefaultSchemaName
in interface Database
protected String getConnectionSchemaName()
getConnectionSchemaNameCallStatement()
protected SqlStatement getConnectionSchemaNameCallStatement()
getConnectionSchemaName()
public Integer getFetchSize()
getFetchSize
in interface Database
public boolean supportsSequences()
supportsSequences
in interface Database
public boolean supportsAutoIncrement()
supportsAutoIncrement
in interface Database
public String getDateLiteral(String isoDate)
getDateLiteral
in interface Database
public String getDateTimeLiteral(Timestamp date)
getDateTimeLiteral
in interface Database
public String getDateLiteral(Date date)
getDateLiteral
in interface Database
public String getTimeLiteral(Time date)
getTimeLiteral
in interface Database
public String getDateLiteral(Date date)
getDateLiteral
in interface Database
public Date parseDate(String dateAsString) throws DateParseException
parseDate
in interface Database
DateParseException
protected boolean isDateOnly(String isoDate)
isoDate
- value to check.protected boolean isDateTime(String isoDate)
isoDate
- value to check.protected boolean isTimestamp(String isoDate)
isoDate
- value to checkprotected boolean isTimeOnly(String isoDate)
isoDate
- value to checkpublic String getLineComment()
getLineComment
in interface Database
public String getAutoIncrementClause(BigInteger startWith, BigInteger incrementBy, String generationType, Boolean defaultOnNull)
Database
getAutoIncrementClause
in interface Database
protected String getAutoIncrementClause()
protected String getAutoIncrementClause(String generationType, Boolean defaultOnNull)
protected boolean generateAutoIncrementStartWith(BigInteger startWith)
protected boolean generateAutoIncrementBy(BigInteger incrementBy)
protected String getAutoIncrementOpening()
protected String getAutoIncrementClosing()
protected String getAutoIncrementStartWithClause()
protected String getAutoIncrementByClause()
public String getConcatSql(String... values)
Database
getConcatSql
in interface Database
public String getDatabaseChangeLogTableName()
getDatabaseChangeLogTableName
in interface Database
public void setDatabaseChangeLogTableName(String tableName)
Database
setDatabaseChangeLogTableName
in interface Database
public String getDatabaseChangeLogLockTableName()
getDatabaseChangeLogLockTableName
in interface Database
public void setDatabaseChangeLogLockTableName(String tableName)
Database
setDatabaseChangeLogLockTableName
in interface Database
public String getLiquibaseTablespaceName()
getLiquibaseTablespaceName
in interface Database
public void setLiquibaseTablespaceName(String tablespace)
setLiquibaseTablespaceName
in interface Database
protected boolean canCreateChangeLogTable() throws DatabaseException
DatabaseException
public void setCanCacheLiquibaseTableInfo(boolean canCacheLiquibaseTableInfo)
setCanCacheLiquibaseTableInfo
in interface Database
public String getLiquibaseCatalogName()
getLiquibaseCatalogName
in interface Database
public void setLiquibaseCatalogName(String catalogName)
setLiquibaseCatalogName
in interface Database
public String getLiquibaseSchemaName()
getLiquibaseSchemaName
in interface Database
public void setLiquibaseSchemaName(String schemaName)
setLiquibaseSchemaName
in interface Database
public boolean isCaseSensitive()
isCaseSensitive
in interface Database
public void setCaseSensitive(Boolean caseSensitive)
public boolean isReservedWord(String string)
isReservedWord
in interface Database
protected boolean startsWithNumeric(String objectName)
public void dropDatabaseObjects(CatalogAndSchema schemaToDrop) throws LiquibaseException
Database
dropDatabaseObjects
in interface Database
schemaToDrop
- schema (catalog+)schema to dropLiquibaseException
- if any problem occurspublic boolean supportsDropTableCascadeConstraints()
supportsDropTableCascadeConstraints
in interface Database
public boolean isSystemObject(DatabaseObject example)
isSystemObject
in interface Database
public boolean isSystemView(CatalogAndSchema schema, String viewName)
public boolean isLiquibaseObject(DatabaseObject object)
isLiquibaseObject
in interface Database
public void tag(String tagString) throws DatabaseException
Database
tag
in interface Database
DatabaseException
public boolean doesTagExist(String tag) throws DatabaseException
doesTagExist
in interface Database
DatabaseException
public String getViewDefinition(CatalogAndSchema schema, String viewName) throws DatabaseException
getViewDefinition
in interface Database
DatabaseException
public String escapeTableName(String catalogName, String schemaName, String tableName)
escapeTableName
in interface Database
public String escapeObjectName(String catalogName, String schemaName, String objectName, Class<? extends DatabaseObject> objectType)
escapeObjectName
in interface Database
public String escapeObjectName(String objectName, Class<? extends DatabaseObject> objectType)
escapeObjectName
in interface Database
protected boolean mustQuoteObjectName(String objectName, Class<? extends DatabaseObject> objectType)
protected String getQuotingStartCharacter()
protected String getQuotingEndCharacter()
protected String getQuotingEndReplacement()
public String quoteObject(String objectName, Class<? extends DatabaseObject> objectType)
public String escapeIndexName(String catalogName, String schemaName, String indexName)
escapeIndexName
in interface Database
public String escapeSequenceName(String catalogName, String schemaName, String sequenceName)
escapeSequenceName
in interface Database
public String escapeConstraintName(String constraintName)
escapeConstraintName
in interface Database
public String escapeColumnName(String catalogName, String schemaName, String tableName, String columnName)
Database
escapeColumnName
in interface Database
columnName
- column namepublic String escapeColumnName(String catalogName, String schemaName, String tableName, String columnName, boolean quoteNamesThatMayBeFunctions)
Database
Database.escapeColumnName(String, String, String, String)
but allows control over whether function-like names should be left unquoted.escapeColumnName
in interface Database
public String escapeColumnNameList(String columnNames)
Database
escapeColumnNameList
in interface Database
columnNames
- list of column namespublic boolean supportsSchemas()
supportsSchemas
in interface Database
public boolean supportsCatalogs()
supportsCatalogs
in interface Database
public boolean jdbcCallsCatalogsSchemas()
public boolean supportsCatalogInObjectName(Class<? extends DatabaseObject> type)
supportsCatalogInObjectName
in interface Database
public String generatePrimaryKeyName(String tableName)
generatePrimaryKeyName
in interface Database
public String escapeViewName(String catalogName, String schemaName, String viewName)
escapeViewName
in interface Database
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
Database
getRunStatus
in interface Database
DatabaseException
DatabaseHistoryException
public RanChangeSet getRanChangeSet(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
getRanChangeSet
in interface Database
DatabaseException
DatabaseHistoryException
public List<RanChangeSet> getRanChangeSetList() throws DatabaseException
Database
getRanChangeSetList
in interface Database
DatabaseException
public Date getRanDate(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
getRanDate
in interface Database
DatabaseException
DatabaseHistoryException
public void markChangeSetExecStatus(ChangeSet changeSet, ChangeSet.ExecType execType) throws DatabaseException
Database
markChangeSetExecStatus
in interface Database
DatabaseException
public void removeRanStatus(ChangeSet changeSet) throws DatabaseException
removeRanStatus
in interface Database
DatabaseException
public String escapeStringForDatabase(String string)
escapeStringForDatabase
in interface Database
public void commit() throws DatabaseException
commit
in interface Database
DatabaseException
public void rollback() throws DatabaseException
rollback
in interface Database
DatabaseException
public void close() throws DatabaseException
close
in interface Database
DatabaseException
public boolean supportsRestrictForeignKeys()
supportsRestrictForeignKeys
in interface Database
public boolean isAutoCommit() throws DatabaseException
isAutoCommit
in interface Database
DatabaseException
public void setAutoCommit(boolean b) throws DatabaseException
setAutoCommit
in interface Database
DatabaseException
public boolean isSafeToRunUpdate() throws DatabaseException
isSafeToRunUpdate
in interface Database
DatabaseException
public void executeStatements(Change change, DatabaseChangeLog changeLog, List<SqlVisitor> sqlVisitors) throws LiquibaseException
executeStatements
in interface Database
LiquibaseException
public void execute(SqlStatement[] statements, List<SqlVisitor> sqlVisitors) throws LiquibaseException
execute
in interface Database
LiquibaseException
public void saveStatements(Change change, List<SqlVisitor> sqlVisitors, Writer writer) throws IOException
saveStatements
in interface Database
IOException
public void executeRollbackStatements(SqlStatement[] statements, List<SqlVisitor> sqlVisitors) throws LiquibaseException
executeRollbackStatements
in interface Database
LiquibaseException
public void executeRollbackStatements(Change change, List<SqlVisitor> sqlVisitors) throws LiquibaseException
executeRollbackStatements
in interface Database
LiquibaseException
public void saveRollbackStatement(Change change, List<SqlVisitor> sqlVisitors, Writer writer) throws IOException, LiquibaseException
saveRollbackStatement
in interface Database
IOException
LiquibaseException
protected List<SqlVisitor> filterRollbackVisitors(List<SqlVisitor> visitors)
public List<DatabaseFunction> getDateFunctions()
Database
getDateFunctions
in interface Database
public boolean isFunction(String string)
isFunction
in interface Database
public void resetInternalState()
resetInternalState
in interface Database
public boolean supportsForeignKeyDisable()
supportsForeignKeyDisable
in interface Database
public boolean disableForeignKeyChecks() throws DatabaseException
disableForeignKeyChecks
in interface Database
DatabaseException
public void enableForeignKeyChecks() throws DatabaseException
enableForeignKeyChecks
in interface Database
DatabaseException
public boolean createsIndexesForForeignKeys()
createsIndexesForForeignKeys
in interface Database
public int getDataTypeMaxParameters(String dataTypeName)
getDataTypeMaxParameters
in interface Database
public CatalogAndSchema getSchemaFromJdbcInfo(String rawCatalogName, String rawSchemaName)
public String getJdbcCatalogName(CatalogAndSchema schema)
public String getJdbcSchemaName(CatalogAndSchema schema)
public boolean dataTypeIsNotModifiable(String typeName)
Database
dataTypeIsNotModifiable
in interface Database
typeName
- type namepublic ObjectQuotingStrategy getObjectQuotingStrategy()
getObjectQuotingStrategy
in interface Database
public void setObjectQuotingStrategy(ObjectQuotingStrategy quotingStrategy)
setObjectQuotingStrategy
in interface Database
public String generateDatabaseFunctionValue(DatabaseFunction databaseFunction)
Database
generateDatabaseFunctionValue
in interface Database
databaseFunction
- database function to check.public String getCurrentDateTimeFunction()
Database
getCurrentDateTimeFunction
in interface Database
public void setCurrentDateTimeFunction(String function)
setCurrentDateTimeFunction
in interface Database
public boolean isDefaultSchema(String catalog, String schema)
Database
isDefaultSchema
in interface Database
catalog
- catalog name to be testedschema
- schema name to be testedpublic boolean isDefaultCatalog(String catalog)
Database
isDefaultCatalog
in interface Database
catalog
- catalog name to be testedpublic boolean getOutputDefaultSchema()
Database
getOutputDefaultSchema
in interface Database
public void setOutputDefaultSchema(boolean outputDefaultSchema)
Database
setOutputDefaultSchema
in interface Database
public boolean getOutputDefaultCatalog()
getOutputDefaultCatalog
in interface Database
public void setOutputDefaultCatalog(boolean outputDefaultCatalog)
setOutputDefaultCatalog
in interface Database
public boolean supportsPrimaryKeyNames()
supportsPrimaryKeyNames
in interface Database
public String getSystemSchema()
getSystemSchema
in interface Database
public String escapeDataTypeName(String dataTypeName)
escapeDataTypeName
in interface Database
public String unescapeDataTypeName(String dataTypeName)
unescapeDataTypeName
in interface Database
public String unescapeDataTypeString(String dataTypeString)
unescapeDataTypeString
in interface Database
public AbstractJdbcDatabase set(String key, Object value)
public ValidationErrors validate()
public int getMaxFractionalDigitsForTimestamp()
getMaxFractionalDigitsForTimestamp
in interface Database
public int getDefaultFractionalDigitsForTimestamp()
getDefaultFractionalDigitsForTimestamp
in interface Database
public boolean supportsBatchUpdates() throws DatabaseException
Database
supportsBatchUpdates
in interface Database
DatabaseException
public boolean supportsNotNullConstraintNames()
Database
supportsNotNullConstraintNames
in interface Database
public boolean requiresExplicitNullForColumns()
Database
requiresExplicitNullForColumns
in interface Database
public CatalogAndSchema.CatalogAndSchemaCase getSchemaAndCatalogCase()
getSchemaAndCatalogCase
in interface Database
Copyright © 2019 Liquibase.org. All rights reserved.