Package liquibase.sqlgenerator.core
Class CreateIndexGeneratorPostgres
java.lang.Object
liquibase.sqlgenerator.core.AbstractSqlGenerator<CreateIndexStatement>
liquibase.sqlgenerator.core.CreateIndexGenerator
liquibase.sqlgenerator.core.CreateIndexGeneratorPostgres
- All Implemented Interfaces:
PrioritizedService
,SqlGenerator<CreateIndexStatement>
-
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.int
Of all the SqlGenerators that "support" a given SqlStatement/Database, SqlGeneratorFactory will return the one with the highest priority.boolean
supports
(CreateIndexStatement statement, Database database) Does this generator support the given statement/database combination?Methods inherited from class liquibase.sqlgenerator.core.CreateIndexGenerator
getAffectedIndex, validate, warn
Methods inherited from class liquibase.sqlgenerator.core.AbstractSqlGenerator
generateRollbackStatementsIsVolatile, generateStatementsIsVolatile, looksLikeFunctionCall
-
Constructor Details
-
CreateIndexGeneratorPostgres
public CreateIndexGeneratorPostgres()
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:SqlGenerator
Of all the SqlGenerators that "support" a given SqlStatement/Database, SqlGeneratorFactory will return the one with the highest priority.- Specified by:
getPriority
in interfacePrioritizedService
- Specified by:
getPriority
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
getPriority
in classAbstractSqlGenerator<CreateIndexStatement>
-
supports
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 support it.- Specified by:
supports
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
supports
in classAbstractSqlGenerator<CreateIndexStatement>
-
generateSql
public Sql[] generateSql(CreateIndexStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) Description copied from class:CreateIndexGenerator
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.- Specified by:
generateSql
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
generateSql
in classCreateIndexGenerator
- 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).
-