Package liquibase.sqlgenerator.core
Class AddAutoIncrementGeneratorSQLite
- java.lang.Object
-
- liquibase.sqlgenerator.core.AbstractSqlGenerator<AddAutoIncrementStatement>
-
- liquibase.sqlgenerator.core.AddAutoIncrementGenerator
-
- liquibase.sqlgenerator.core.AddAutoIncrementGeneratorSQLite
-
- All Implemented Interfaces:
PrioritizedService
,SqlGenerator<AddAutoIncrementStatement>
public class AddAutoIncrementGeneratorSQLite extends AddAutoIncrementGenerator
This class provides a workaround for adding auto increment for SQLite since SQLite does not support it
-
-
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
Constructors Constructor Description AddAutoIncrementGeneratorSQLite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sql[]
generateSql(AddAutoIncrementStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
Generate the actual Sql for the given statement and database.boolean
generateStatementsIsVolatile(Database database)
Does this change require access to the database metadata? If true, the change cannot be used in an updateSql-style command.int
getPriority()
Of all the SqlGenerators that "support" a given SqlStatement/Database, SqlGeneratorFactory will return the one with the highest priority.boolean
supports(AddAutoIncrementStatement statement, Database database)
Does this generator support the given statement/database combination? Do not validate the statement with this method, only return if it can support it.ValidationErrors
validate(AddAutoIncrementStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
Validate the data contained in the SqlStatement.-
Methods inherited from class liquibase.sqlgenerator.core.AddAutoIncrementGenerator
getAffectedColumn
-
Methods inherited from class liquibase.sqlgenerator.core.AbstractSqlGenerator
generateRollbackStatementsIsVolatile, looksLikeFunctionCall, warn
-
-
-
-
Method Detail
-
validate
public ValidationErrors validate(AddAutoIncrementStatement 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.- Specified by:
validate
in interfaceSqlGenerator<AddAutoIncrementStatement>
- Overrides:
validate
in classAddAutoIncrementGenerator
-
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<AddAutoIncrementStatement>
- Overrides:
getPriority
in classAddAutoIncrementGenerator
-
supports
public boolean supports(AddAutoIncrementStatement 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 support it.- Specified by:
supports
in interfaceSqlGenerator<AddAutoIncrementStatement>
- Overrides:
supports
in classAddAutoIncrementGenerator
-
generateStatementsIsVolatile
public boolean generateStatementsIsVolatile(Database database)
Description copied from interface:SqlGenerator
Does this change require access to the database metadata? If true, the change cannot be used in an updateSql-style command.- Specified by:
generateStatementsIsVolatile
in interfaceSqlGenerator<AddAutoIncrementStatement>
- Overrides:
generateStatementsIsVolatile
in classAbstractSqlGenerator<AddAutoIncrementStatement>
-
generateSql
public Sql[] generateSql(AddAutoIncrementStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain)
Description copied from interface:SqlGenerator
Generate the actual Sql for the given statement and database.- Specified by:
generateSql
in interfaceSqlGenerator<AddAutoIncrementStatement>
- Overrides:
generateSql
in classAddAutoIncrementGenerator
-
-