Package liquibase.sqlgenerator.core
Class CreateIndexGenerator
java.lang.Object
liquibase.sqlgenerator.core.AbstractSqlGenerator<CreateIndexStatement>
liquibase.sqlgenerator.core.CreateIndexGenerator
- All Implemented Interfaces:
PrioritizedService
,SqlGenerator<CreateIndexStatement>
- Direct Known Subclasses:
CreateIndexGeneratorFirebird
,CreateIndexGeneratorPostgres
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR
Fields inherited from interface liquibase.sqlgenerator.SqlGenerator
EMPTY_SQL, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSql[]
generateSql
(CreateIndexStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) Generate a CREATE INDEX SQL statement.protected Index
getAffectedIndex
(CreateIndexStatement statement) validate
(CreateIndexStatement createIndexStatement, Database database, SqlGeneratorChain sqlGeneratorChain) Validate the data contained in the SqlStatement.warn
(CreateIndexStatement createIndexStatement, Database database, SqlGeneratorChain sqlGeneratorChain) Methods inherited from class liquibase.sqlgenerator.core.AbstractSqlGenerator
generateRollbackStatementsIsVolatile, generateStatementsIsVolatile, getPriority, looksLikeFunctionCall, supports
-
Constructor Details
-
CreateIndexGenerator
public CreateIndexGenerator()
-
-
Method Details
-
validate
public ValidationErrors validate(CreateIndexStatement createIndexStatement, 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. -
warn
public Warnings warn(CreateIndexStatement createIndexStatement, Database database, SqlGeneratorChain sqlGeneratorChain) - Specified by:
warn
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
warn
in classAbstractSqlGenerator<CreateIndexStatement>
-
generateSql
public Sql[] generateSql(CreateIndexStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) Generate a CREATE INDEX SQL statement. Here, we are walking on thin ice, because the SQL Foundation standard (ISO/IEC 9075-2) does not concern itself with indexes at all and leaves them as an implementation-specific detail at the discretion of each RDBMS vendor. However, there is some common ground to most RDBMS, and we try to make an educated guess on how a CREATE INDEX statement might look like if we have no specific handler for the DBMS.- Parameters:
statement
- A CreateIndexStatement with the desired properties of the SQL to be generateddatabase
- The DBMS for whose SQL dialect the statement is to be madesqlGeneratorChain
- The other SQL generators in the same chain (but this method is not interested in them)- Returns:
- An array of Sql objects containing the generated SQL statement(s).
-
getAffectedIndex
-