Top Inners Fields Constructors Methods
liquibase.snapshot

public Class JdbcDatabaseSnapshot

extends DatabaseSnapshot
Class Inheritance
Imports
liquibase.CatalogAndSchema, .Scope, liquibase.database.AbstractJdbcDatabase, .Database, .DatabaseConnection, liquibase.database.core.*, liquibase.database.jvm.JdbcConnection, liquibase.exception.DatabaseException, liquibase.executor.jvm.ColumnMapRowMapper, .RowMapperNotNullConstraintsResultSetExtractor, liquibase.structure.DatabaseObject, liquibase.structure.core.Catalog, .Schema, .Table, .View, liquibase.util.JdbcUtil, .StringUtil, java.sql.*, java.util.*, java.util.concurrent.atomic.AtomicReference

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class

Field Summary

Modifier and TypeField and Description
private Map<String, CachedRow>
private JdbcDatabaseSnapshot.CachingDatabaseMetaData
private static final boolean
private Set<String>
private boolean
Inherited from liquibase.snapshot.DatabaseSnapshot:
ALL_CATALOGS_STRING_SCRATCH_KEY

Constructor Summary

AccessConstructor and Description
public
JdbcDatabaseSnapshot(DatabaseObject[] examples, Database database, SnapshotControl snapshotControl)

public

Method Summary

Modifier and TypeMethod and Description
private String
escapeForLike(String string, Database database)

private String
public JdbcDatabaseSnapshot.CachingDatabaseMetaData
Inherited from liquibase.snapshot.DatabaseSnapshot:
clonecreateGeneratorChaingetgetgetDatabasegetMetadatagetResultSetCachegetSchemaComparisonsgetScratchDatagetSerializableFieldNamespacegetSerializableFieldsgetSerializableFieldTypegetSerializableFieldValuegetSerializedObjectNamegetSerializedObjectNamespacegetSnapshotControlincludeinitisWrongCatalogisWrongSchemaloadloadObjectsmergeserializesetMetadatasetSchemaComparisonssetScratchData

Field Detail

cachedExpressionMapback to summary
private Map<String, CachedRow> cachedExpressionMap
cachingDatabaseMetaDataback to summary
private JdbcDatabaseSnapshot.CachingDatabaseMetaData cachingDatabaseMetaData
ignoreWarnAboutDbaRecycleBinback to summary
private static final boolean ignoreWarnAboutDbaRecycleBin
userDefinedTypesback to summary
private Set<String> userDefinedTypes
warnedAboutDbaRecycleBinback to summary
private boolean warnedAboutDbaRecycleBin

Constructor Detail

JdbcDatabaseSnapshotback to summary
public JdbcDatabaseSnapshot(DatabaseObject[] examples, Database database, SnapshotControl snapshotControl) throws DatabaseException, InvalidExampleException
JdbcDatabaseSnapshotback to summary
public JdbcDatabaseSnapshot(DatabaseObject[] examples, Database database) throws DatabaseException, InvalidExampleException

Method Detail

escapeForLikeback to summary
private String escapeForLike(String string, Database database)
getAllCatalogsStringScratchDataback to summary
private String getAllCatalogsStringScratchData()
getMetaDataFromCacheback to summary
public JdbcDatabaseSnapshot.CachingDatabaseMetaData getMetaDataFromCache() throws SQLException
liquibase.snapshot back to summary

public Class JdbcDatabaseSnapshot.CachingDatabaseMetaData

extends Object
Class Inheritance
  • java.lang.Object
  • liquibase.snapshot.JdbcDatabaseSnapshot.CachingDatabaseMetaData

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private class

Field Summary

Modifier and TypeField and Description
private final Database
private final DatabaseMetaData
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<CachedRow>
getColumns(final String catalogName, final String schemaName, final String tableName, final String columnName)

Return the columns for the given catalog, schema, table, and column.

public DatabaseMetaData
public List<CachedRow>
getForeignKeys(final String catalogName, final String schemaName, final String tableName, final String fkName)

public List<CachedRow>
getIndexInfo(final String catalogName, final String schemaName, final String tableName, final String indexName)

public List<CachedRow>
getNotNullConst(final String catalogName, final String schemaName, final String tableName)

Return the NotNullConstraints for the given catalog, schema, table, and column.

public List<CachedRow>
getPrimaryKeys(final String catalogName, final String schemaName, final String table)

public List<CachedRow>
getTables(final String catalogName, final String schemaName, final String table)

public List<CachedRow>
getUniqueConstraints(final String catalogName, final String schemaName, final String tableName)

public List<CachedRow>
getViews(final String catalogName, final String schemaName, String viewName)

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databaseback to summary
private final Database database
databaseMetaDataback to summary
private final DatabaseMetaData databaseMetaData
SQL_FILTER_MATCH_ALLback to summary
private static final String SQL_FILTER_MATCH_ALL

Constructor Detail

CachingDatabaseMetaDataback to summary
public CachingDatabaseMetaData(Database database, DatabaseMetaData metaData)

Method Detail

getColumnsback to summary
public List<CachedRow> getColumns(final String catalogName, final String schemaName, final String tableName, final String columnName) throws SQLException, DatabaseException

Return the columns for the given catalog, schema, table, and column.

getDatabaseMetaDataback to summary
public DatabaseMetaData getDatabaseMetaData()
getForeignKeysback to summary
public List<CachedRow> getForeignKeys(final String catalogName, final String schemaName, final String tableName, final String fkName) throws DatabaseException
getIndexInfoback to summary
public List<CachedRow> getIndexInfo(final String catalogName, final String schemaName, final String tableName, final String indexName) throws DatabaseException, SQLException
getNotNullConstback to summary
public List<CachedRow> getNotNullConst(final String catalogName, final String schemaName, final String tableName) throws DatabaseException

Return the NotNullConstraints for the given catalog, schema, table, and column.

getPrimaryKeysback to summary
public List<CachedRow> getPrimaryKeys(final String catalogName, final String schemaName, final String table) throws DatabaseException
getTablesback to summary
public List<CachedRow> getTables(final String catalogName, final String schemaName, final String table) throws DatabaseException
getUniqueConstraintsback to summary
public List<CachedRow> getUniqueConstraints(final String catalogName, final String schemaName, final String tableName) throws DatabaseException
getViewsback to summary
public List<CachedRow> getViews(final String catalogName, final String schemaName, String viewName) throws DatabaseException
warnAboutDbaRecycleBinback to summary
protected void warnAboutDbaRecycleBin()
liquibase.snapshot back to summary

private Class JdbcDatabaseSnapshot.CachingDatabaseMetaData.ForeignKeysResultSetCache

extends UnionResultSetExtractor
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final String
pack-priv final String
pack-priv final String

Constructor Summary

AccessConstructor and Description
private
ForeignKeysResultSetCache(Database database, String catalogName, String schemaName, String tableName, String fkName)

Field Detail

catalogNameback to summary
pack-priv final String catalogName
fkNameback to summary
pack-priv final String fkName
schemaNameback to summary
pack-priv final String schemaName
tableNameback to summary
pack-priv final String tableName

Constructor Detail

ForeignKeysResultSetCacheback to summary
private ForeignKeysResultSetCache(Database database, String catalogName, String schemaName, String tableName, String fkName)

Method Detail

bulkContainsSchemaback to summary
public boolean bulkContainsSchema(String schemaKey)

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.bulkContainsSchema.

Annotations
@Override
bulkFetchback to summary
public List<CachedRow> bulkFetch() throws SQLException, DatabaseException

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.bulkFetch.

Annotations
@Override
fastFetchback to summary
public List<CachedRow> fastFetch() throws SQLException, DatabaseException

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.fastFetch.

Annotations
@Override
getDB2ForAs400Sqlback to summary
private String getDB2ForAs400Sql(String jdbcSchemaName, String tableName)
getMSSQLSqlback to summary
protected String getMSSQLSql(String jdbcSchemaName, String tableName)
getOracleSqlback to summary
protected String getOracleSql(String jdbcSchemaName)
getSchemaKeyback to summary
public String getSchemaKey(CachedRow row)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.getSchemaKey.

Annotations
@Override
queryDb2Zosback to summary
protected List<CachedRow> queryDb2Zos(CatalogAndSchema catalogAndSchema, String tableName) throws DatabaseException, SQLException
querytDB2Luwback to summary
private List<CachedRow> querytDB2Luw(String jdbcSchemaName, String tableName) throws DatabaseException, SQLException
rowKeyParametersback to summary
public ResultSetCache.RowData rowKeyParameters(CachedRow row)

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.rowKeyParameters.

Annotations
@Override
shouldBulkSelectback to summary
protected boolean shouldBulkSelect(String schemaKey, ResultSetCache resultSetCache)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.shouldBulkSelect.

Annotations
@Override
wantedKeyParametersback to summary
public ResultSetCache.RowData wantedKeyParameters()

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.wantedKeyParameters.

Annotations
@Override
liquibase.snapshot back to summary

private Class JdbcDatabaseSnapshot.CachingDatabaseMetaData.GetColumnResultSetCache

extends SingleResultSetExtractor
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final String
pack-priv final String
pack-priv final String

Constructor Summary

AccessConstructor and Description
private
GetColumnResultSetCache(Database database, String catalogName, String schemaName, String tableName, String columnName)

Method Summary

Modifier and TypeMethod and Description
public boolean
public List<CachedRow>
private void
protected List<CachedRow>
extract(ResultSet resultSet, boolean informixIndexTrimHint)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.extract.

public List<CachedRow>
public String
protected List<CachedRow>
mssqlQuery(boolean bulk)

protected List<CachedRow>
oracleQuery(boolean bulk)

public ResultSetCache.RowData
protected boolean
protected boolean
public ResultSetCache.RowData
Inherited from liquibase.snapshot.ResultSetCache.SingleResultSetExtractor:
bulkFetchfastFetch

Field Detail

catalogNameback to summary
pack-priv final String catalogName
columnNameback to summary
pack-priv final String columnName
schemaNameback to summary
pack-priv final String schemaName
tableNameback to summary
pack-priv final String tableName

Constructor Detail

GetColumnResultSetCacheback to summary
private GetColumnResultSetCache(Database database, String catalogName, String schemaName, String tableName, String columnName)

Method Detail

bulkContainsSchemaback to summary
public boolean bulkContainsSchema(String schemaKey)

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.bulkContainsSchema.

Annotations
@Override
bulkFetchQueryback to summary
public List<CachedRow> bulkFetchQuery() throws SQLException, DatabaseException

Implements abstract liquibase.snapshot.ResultSetCache.SingleResultSetExtractor.bulkFetchQuery.

Annotations
@Override
determineActualDataTypesback to summary
private void determineActualDataTypes(List<CachedRow> returnList, String tableName) throws SQLException
extractback to summary
protected List<CachedRow> extract(ResultSet resultSet, boolean informixIndexTrimHint) throws SQLException

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.extract.

Annotations
@Override
fastFetchQueryback to summary
public List<CachedRow> fastFetchQuery() throws SQLException, DatabaseException

Implements abstract liquibase.snapshot.ResultSetCache.SingleResultSetExtractor.fastFetchQuery.

Annotations
@Override
getSchemaKeyback to summary
public String getSchemaKey(CachedRow row)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.getSchemaKey.

Annotations
@Override
mssqlQueryback to summary
protected List<CachedRow> mssqlQuery(boolean bulk) throws DatabaseException, SQLException
oracleQueryback to summary
protected List<CachedRow> oracleQuery(boolean bulk) throws DatabaseException, SQLException
rowKeyParametersback to summary
public ResultSetCache.RowData rowKeyParameters(CachedRow row)

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.rowKeyParameters.

Annotations
@Override
shouldBulkSelectback to summary
protected boolean shouldBulkSelect(String schemaKey, ResultSetCache resultSetCache)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.shouldBulkSelect.

Annotations
@Override
shouldReturnEmptyColumnsback to summary
protected boolean shouldReturnEmptyColumns(SQLException e)
wantedKeyParametersback to summary
public ResultSetCache.RowData wantedKeyParameters()

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.wantedKeyParameters.

Annotations
@Override
liquibase.snapshot back to summary

private Class JdbcDatabaseSnapshot.CachingDatabaseMetaData.GetNotNullConstraintsResultSetCache

extends SingleResultSetExtractor
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final String
pack-priv final String

Constructor Summary

AccessConstructor and Description
private
GetNotNullConstraintsResultSetCache(Database database, String catalogName, String schemaName, String tableName)

Field Detail

catalogNameback to summary
pack-priv final String catalogName
schemaNameback to summary
pack-priv final String schemaName
tableNameback to summary
pack-priv final String tableName

Constructor Detail

GetNotNullConstraintsResultSetCacheback to summary
private GetNotNullConstraintsResultSetCache(Database database, String catalogName, String schemaName, String tableName)

Method Detail

bulkContainsSchemaback to summary
public boolean bulkContainsSchema(String schemaKey)

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.bulkContainsSchema.

Annotations
@Override
bulkFetchQueryback to summary
public List<CachedRow> bulkFetchQuery() throws SQLException, DatabaseException

Implements abstract liquibase.snapshot.ResultSetCache.SingleResultSetExtractor.bulkFetchQuery.

Annotations
@Override
extractback to summary
protected List<CachedRow> extract(ResultSet resultSet, boolean informixIndexTrimHint) throws SQLException

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.extract.

Annotations
@Override
fastFetchQueryback to summary
public List<CachedRow> fastFetchQuery() throws SQLException, DatabaseException

Implements abstract liquibase.snapshot.ResultSetCache.SingleResultSetExtractor.fastFetchQuery.

Annotations
@Override
getSchemaKeyback to summary
public String getSchemaKey(CachedRow row)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.getSchemaKey.

Annotations
@Override
oracleQueryback to summary
private List<CachedRow> oracleQuery(boolean bulk) throws DatabaseException, SQLException
rowKeyParametersback to summary
public ResultSetCache.RowData rowKeyParameters(CachedRow row)

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.rowKeyParameters.

Annotations
@Override
shouldBulkSelectback to summary
protected boolean shouldBulkSelect(String schemaKey, ResultSetCache resultSetCache)

Overrides liquibase.snapshot.ResultSetCache.ResultSetExtractor.shouldBulkSelect.

Annotations
@Override
wantedKeyParametersback to summary
public ResultSetCache.RowData wantedKeyParameters()

Implements abstract liquibase.snapshot.ResultSetCache.ResultSetExtractor.wantedKeyParameters.

Annotations
@Override