Package liquibase.snapshot.jvm
Class SchemaSnapshotGenerator
- java.lang.Object
-
- liquibase.snapshot.jvm.JdbcSnapshotGenerator
-
- liquibase.snapshot.jvm.SchemaSnapshotGenerator
-
- All Implemented Interfaces:
SnapshotGenerator
- Direct Known Subclasses:
SchemaSnapshotGeneratorSnowflake
public class SchemaSnapshotGenerator extends JdbcSnapshotGenerator
-
-
Field Summary
-
Fields inherited from interface liquibase.snapshot.SnapshotGenerator
PRIORITY_ADDITIONAL, PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NONE
-
-
Constructor Summary
Constructors Constructor Description SchemaSnapshotGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTo(DatabaseObject foundObject, DatabaseSnapshot snapshot)protected String[]getDatabaseSchemaNames(Database database)Fetches an array of Strings with the schema names in the database.protected DatabaseObjectsnapshotObject(DatabaseObject example, DatabaseSnapshot snapshot)protected CatalogAndSchematoCatalogAndSchema(String tableSchema, Database database)-
Methods inherited from class liquibase.snapshot.jvm.JdbcSnapshotGenerator
addStatusListener, addsTo, cleanNameFromDatabase, getDatabaseCatalogNames, getPriority, replaces, shouldAddTo, snapshot, updateListeners
-
-
-
-
Method Detail
-
snapshotObject
protected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException
- Specified by:
snapshotObjectin classJdbcSnapshotGenerator- Throws:
DatabaseExceptionInvalidExampleException
-
toCatalogAndSchema
protected CatalogAndSchema toCatalogAndSchema(String tableSchema, Database database)
-
addTo
protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException, InvalidExampleException
- Specified by:
addToin classJdbcSnapshotGenerator- Throws:
DatabaseExceptionInvalidExampleException
-
getDatabaseSchemaNames
protected String[] getDatabaseSchemaNames(Database database) throws SQLException, DatabaseException
Fetches an array of Strings with the schema names in the database.- Parameters:
database- The database from which to get the schema names- Returns:
- An array of schema name Strings (May be an empty array)
- Throws:
SQLException- propagated java.sql.SQLExceptionDatabaseException- if a different problem occurs during the DBMS-specific code
-
-