Package liquibase.snapshot.jvm
Class ColumnAutoIncrementService
- java.lang.Object
-
- liquibase.snapshot.jvm.ColumnAutoIncrementService
-
public class ColumnAutoIncrementService extends Object
Service class that centralizes database specific auto increment parameters information.
-
-
Constructor Summary
Constructors Constructor Description ColumnAutoIncrementService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Column
enableColumnAutoIncrementIfAvailable(Column column, Database database, CachedRow columnMetadataResultSet, String rawCatalogName, String rawSchemaName, String rawTableName, String rawColumnName)
Verify if a column has auto increment capabilities and set the autoIncrement field with a placeholder object (starts with 1, increment 1)Map<String,Column.AutoIncrementInformation>
obtainSequencesInformation(Database database, Schema schema, DatabaseSnapshot snapshot)
If the database support autoincrement columns details (as starts with and increment by), this method returns the detailed information about them.
-
-
-
Method Detail
-
obtainSequencesInformation
public Map<String,Column.AutoIncrementInformation> obtainSequencesInformation(Database database, Schema schema, DatabaseSnapshot snapshot)
If the database support autoincrement columns details (as starts with and increment by), this method returns the detailed information about them. If a new database needs to be supported just add the query to method getQueryForDatabase .- Parameters:
database
- the database connectionsnapshot
- snapshot data used to store cache information.- Returns:
- Map with the sequence name and auto increment details
-
enableColumnAutoIncrementIfAvailable
public Column enableColumnAutoIncrementIfAvailable(Column column, Database database, CachedRow columnMetadataResultSet, String rawCatalogName, String rawSchemaName, String rawTableName, String rawColumnName) throws SQLException
Verify if a column has auto increment capabilities and set the autoIncrement field with a placeholder object (starts with 1, increment 1)- Throws:
SQLException
-
-