Package liquibase.sqlgenerator.core
Class CreateIndexGeneratorFirebird
java.lang.Object
liquibase.sqlgenerator.core.AbstractSqlGenerator<CreateIndexStatement>
liquibase.sqlgenerator.core.CreateIndexGenerator
liquibase.sqlgenerator.core.CreateIndexGeneratorFirebird
- All Implemented Interfaces:
PrioritizedService
,SqlGenerator<CreateIndexStatement>
Firebird-specific CREATE INDEX SQL generator.
-
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 for Firebird databases.int
Informs the SqlGeneratorFactory that we are the preferred generator for CREATE INDEX statements in a Firebird database.boolean
supports
(CreateIndexStatement statement, Database database) Informs the SqlGeneratorFactory that we this class works on Firebird SQL databases only.validate
(CreateIndexStatement createIndexStatement, Database database, SqlGeneratorChain sqlGeneratorChain) Validate the data contained in the SqlStatement.Methods inherited from class liquibase.sqlgenerator.core.CreateIndexGenerator
getAffectedIndex, warn
Methods inherited from class liquibase.sqlgenerator.core.AbstractSqlGenerator
generateRollbackStatementsIsVolatile, generateStatementsIsVolatile, looksLikeFunctionCall
-
Constructor Details
-
CreateIndexGeneratorFirebird
public CreateIndexGeneratorFirebird()
-
-
Method Details
-
getPriority
public int getPriority()Informs the SqlGeneratorFactory that we are the preferred generator for CREATE INDEX statements in a Firebird database.- Specified by:
getPriority
in interfacePrioritizedService
- Specified by:
getPriority
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
getPriority
in classAbstractSqlGenerator<CreateIndexStatement>
- Returns:
- The PRIORITY_DATABASE priority
-
supports
Informs the SqlGeneratorFactory that we this class works on Firebird SQL databases only.- Specified by:
supports
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
supports
in classAbstractSqlGenerator<CreateIndexStatement>
- Parameters:
statement
- The SqlStatement object (ignored in this case)database
- The database object to be compared- Returns:
- true if database is a Firebird database, else in other cases.
-
generateSql
public Sql[] generateSql(CreateIndexStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) Generate a CREATE INDEX SQL statement for Firebird databases.- Specified by:
generateSql
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
generateSql
in classCreateIndexGenerator
- Parameters:
statement
- A CreateIndexStatement with the desired properties of the SQL to be generateddatabase
- A database object (must be of FirebirdDatabase type, or we will error out)sqlGeneratorChain
- The other generators in the current chain (ignored by this implementation)- Returns:
- An array with one entry containing the generated CREATE INDEX statement for Firebird.
-
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.- Specified by:
validate
in interfaceSqlGenerator<CreateIndexStatement>
- Overrides:
validate
in classCreateIndexGenerator
-