Package liquibase.snapshot.jvm
Class ColumnSnapshotGenerator
- java.lang.Object
-
- liquibase.snapshot.jvm.JdbcSnapshotGenerator
-
- liquibase.snapshot.jvm.ColumnSnapshotGenerator
-
- All Implemented Interfaces:
SnapshotGenerator
- Direct Known Subclasses:
ColumnSnapshotGeneratorH2,ColumnSnapshotGeneratorInformix,ColumnSnapshotGeneratorOracle
public class ColumnSnapshotGenerator extends JdbcSnapshotGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCOLUMN_DEF_COL-
Fields inherited from interface liquibase.snapshot.SnapshotGenerator
PRIORITY_ADDITIONAL, PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NONE
-
-
Constructor Summary
Constructors Constructor Description ColumnSnapshotGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTo(DatabaseObject foundObject, DatabaseSnapshot snapshot)protected ColumnreadColumn(CachedRow columnMetadataResultSet, Relation table, Database database)protected DataTypereadDataType(CachedRow columnMetadataResultSet, Column column, Database database)Processes metadata of a column, e.g.protected ObjectreadDefaultValue(CachedRow columnMetadataResultSet, Column columnInfo, Database database)protected voidsetAutoIncrementDetails(Column column, Database database, DatabaseSnapshot snapshot)protected DatabaseObjectsnapshotObject(DatabaseObject example, DatabaseSnapshot snapshot)-
Methods inherited from class liquibase.snapshot.jvm.JdbcSnapshotGenerator
addStatusListener, addsTo, cleanNameFromDatabase, getDatabaseCatalogNames, getPriority, replaces, shouldAddTo, snapshot, updateListeners
-
-
-
-
Field Detail
-
COLUMN_DEF_COL
protected static final String COLUMN_DEF_COL
- See Also:
- Constant Field Values
-
-
Method Detail
-
snapshotObject
protected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot) throws DatabaseException
- Specified by:
snapshotObjectin classJdbcSnapshotGenerator- Throws:
DatabaseException
-
addTo
protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException
- Specified by:
addToin classJdbcSnapshotGenerator- Throws:
DatabaseException
-
setAutoIncrementDetails
protected void setAutoIncrementDetails(Column column, Database database, DatabaseSnapshot snapshot)
-
readColumn
protected Column readColumn(CachedRow columnMetadataResultSet, Relation table, Database database) throws SQLException, DatabaseException
- Throws:
SQLExceptionDatabaseException
-
readDataType
protected DataType readDataType(CachedRow columnMetadataResultSet, Column column, Database database) throws DatabaseException
Processes metadata of a column, e.g. name, type and default value. We start with the result of the JDBCDatabaseMetaData.getColumns() method. Depending on Database, additional columns might be present.- Parameters:
columnMetadataResultSet- the result from the JDBC getColumns() call for the columncolumn- logical definition of the column (object form)database- the database from which the column originates- Returns:
- a DataType object with detailed information about the type
- Throws:
DatabaseException- If an error occurs during processing (mostly caused by Exceptions in JDBC calls)
-
-