public class UniqueConstraintSnapshotGenerator extends JdbcSnapshotGenerator
PRIORITY_ADDITIONAL, PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NONE| Constructor and Description |
|---|
UniqueConstraintSnapshotGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTo(DatabaseObject foundObject,
DatabaseSnapshot snapshot) |
protected String |
getCacheKey(Map<String,?> row,
Database database)
Return the cache key for the given query row.
|
protected String |
getCacheKey(UniqueConstraint example,
Database database)
Return the cache key for the given UniqueConstraint.
|
int |
getPriority(Class<? extends DatabaseObject> objectType,
Database database)
Inquire if this SnapshotGenerator is capable of snapshotting objects of type
objectType (e.g.
|
protected boolean |
includeTableNameInCacheKey(Database database)
Should the given database include the table name in the key?
Databases that need to include the table names are ones where unique constraint names do not have to be unique
within the schema.
|
protected List<Map<String,?>> |
listColumns(UniqueConstraint example,
Database database,
DatabaseSnapshot snapshot) |
protected List<CachedRow> |
listConstraints(Table table,
DatabaseSnapshot snapshot,
Schema schema) |
protected DatabaseObject |
snapshotObject(DatabaseObject example,
DatabaseSnapshot snapshot) |
protected boolean |
supportsBulkQuery(Database database)
To support bulk query, the resultSet must include a CONSTRAINT_CONTAINER column for caching purposes
|
addStatusListener, addsTo, cleanNameFromDatabase, getDatabaseCatalogNames, replaces, shouldAddTo, snapshot, updateListenerspublic int getPriority(Class<? extends DatabaseObject> objectType, Database database)
SnapshotGeneratorgetPriority in interface SnapshotGeneratorgetPriority in class JdbcSnapshotGeneratorobjectType - The object type we are asked to snapshotdatabase - The DBMS for which the snapshotting should be doneprotected DatabaseObject snapshotObject(DatabaseObject example, DatabaseSnapshot snapshot) throws DatabaseException
snapshotObject in class JdbcSnapshotGeneratorDatabaseExceptionprotected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) throws DatabaseException
addTo in class JdbcSnapshotGeneratorDatabaseExceptionprotected List<CachedRow> listConstraints(Table table, DatabaseSnapshot snapshot, Schema schema) throws DatabaseException, SQLException
DatabaseExceptionSQLExceptionprotected List<Map<String,?>> listColumns(UniqueConstraint example, Database database, DatabaseSnapshot snapshot) throws DatabaseException
DatabaseExceptionprotected boolean includeTableNameInCacheKey(Database database)
listColumns(UniqueConstraint, Database, DatabaseSnapshot) must include
a TABLE_NAME column in the results for getCacheKey(Map, Database) to use.protected String getCacheKey(UniqueConstraint example, Database database)
getCacheKey(Map, Database).
Default implementation uses includeTableNameInCacheKey(Database) to determine if the table name should be included in the key or not.protected String getCacheKey(Map<String,?> row, Database database)
getCacheKey(UniqueConstraint, Database)
Default implementation uses includeTableNameInCacheKey(Database) to determine if the table name should be included in the key or not.protected boolean supportsBulkQuery(Database database)
Copyright © 2023 Liquibase.org. All rights reserved.