liquibase.sqlgenerator.core
Class ModifyDataTypeGenerator
java.lang.Object
liquibase.sqlgenerator.core.AbstractSqlGenerator<ModifyDataTypeStatement>
liquibase.sqlgenerator.core.ModifyDataTypeGenerator
- All Implemented Interfaces:
- PrioritizedService, SqlGenerator<ModifyDataTypeStatement>
public class ModifyDataTypeGenerator
- extends AbstractSqlGenerator<ModifyDataTypeStatement>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModifyDataTypeGenerator
public ModifyDataTypeGenerator()
supports
public boolean supports(ModifyDataTypeStatement statement,
Database database)
- Description copied from interface:
SqlGenerator
- Does this generator support the given statement/database combination? Do not validate the statement with this method, only return if it can suppot it.
- Specified by:
supports
in interface SqlGenerator<ModifyDataTypeStatement>
- Overrides:
supports
in class AbstractSqlGenerator<ModifyDataTypeStatement>
warn
public Warnings warn(ModifyDataTypeStatement modifyDataTypeStatement,
Database database,
SqlGeneratorChain sqlGeneratorChain)
- Specified by:
warn
in interface SqlGenerator<ModifyDataTypeStatement>
- Overrides:
warn
in class AbstractSqlGenerator<ModifyDataTypeStatement>
validate
public ValidationErrors validate(ModifyDataTypeStatement statement,
Database database,
SqlGeneratorChain sqlGeneratorChain)
- Description copied from interface:
SqlGenerator
- Validate the data contained in the SqlStatement. If there are no errors, return an empty ValidationErrors object, not a null value.
Liquibase will inspect the ValidationErrors result before attempting to call generateSql.
generateSql
public Sql[] generateSql(ModifyDataTypeStatement statement,
Database database,
SqlGeneratorChain sqlGeneratorChain)
- Description copied from interface:
SqlGenerator
- Generate the actual Sql for the given statement and database.
getAffectedTable
protected Relation getAffectedTable(ModifyDataTypeStatement statement)
getModifyString
protected String getModifyString(Database database)
- Returns:
- either "MODIFY" or "ALTER COLUMN" depending on the current db
getPreDataTypeString
protected String getPreDataTypeString(Database database)
- Returns:
- the string that comes before the column type
definition (like 'set data type' for derby or an open parentheses for Oracle)
Copyright © 2016 Liquibase.org. All rights reserved.