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
-
Field Summary
Fields inherited from interface liquibase.snapshot.SnapshotGenerator
PRIORITY_ADDITIONAL, PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NONE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTo
(DatabaseObject foundObject, DatabaseSnapshot snapshot) protected Column
readColumn
(CachedRow columnMetadataResultSet, Relation table, Database database) protected DataType
readDataType
(CachedRow columnMetadataResultSet, Column column, Database database) Processes metadata of a column, e.g. name, type and default value.protected Object
readDefaultValue
(CachedRow columnMetadataResultSet, Column columnInfo, Database database) protected void
setAutoIncrementDetails
(Column column, Database database, DatabaseSnapshot snapshot) protected DatabaseObject
snapshotObject
(DatabaseObject example, DatabaseSnapshot snapshot) Methods inherited from class liquibase.snapshot.jvm.JdbcSnapshotGenerator
addStatusListener, addsTo, cleanNameFromDatabase, getDatabaseCatalogNames, getPriority, replaces, shouldAddTo, snapshot, updateListeners
-
Field Details
-
COLUMN_DEF_COL
- See Also:
-
-
Constructor Details
-
ColumnSnapshotGenerator
public ColumnSnapshotGenerator()
-
-
Method Details
-
snapshotObject
protected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot) throws DatabaseException - Specified by:
snapshotObject
in classJdbcSnapshotGenerator
- Throws:
DatabaseException
-
addTo
protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException - Specified by:
addTo
in classJdbcSnapshotGenerator
- Throws:
DatabaseException
-
setAutoIncrementDetails
-
readColumn
protected Column readColumn(CachedRow columnMetadataResultSet, Relation table, Database database) throws SQLException, DatabaseException - Throws:
SQLException
DatabaseException
-
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)
-
readDefaultValue
-