Top Inners Fields Constructors Methods
liquibase.snapshot

public Class ResultSetCache

extends Object
Class Inheritance
Known Direct Subclasses
liquibase.snapshot.ResultSetCacheSnowflake
Imports
liquibase.CatalogAndSchema, liquibase.database.Database, liquibase.database.core.InformixDatabase, liquibase.database.jvm.JdbcConnection, liquibase.exception.DatabaseException, .UnexpectedLiquibaseException, liquibase.executor.jvm.ColumnMapRowMapper, .RowMapperResultSetExtractor, liquibase.util.JdbcUtil, .StringUtil, java.sql.PreparedStatement, .ResultSet, .SQLException, java.util.*, java.util.concurrent.ConcurrentHashMap

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static class
public abstract static class
public abstract static class

Field Summary

Modifier and TypeField and Description
private boolean
private final Map<String, Map<String, List<CachedRow>>>
private final Map<String, Boolean>
private final Map<String, Object>
private final Map<String, Integer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<CachedRow>
public <T> T
getInfo(String key, Class<T> type)

private int
public void
putInfo(String key, Object value)

public void
setBulkTracking(boolean
- boolean flag to control bulk operation
bulkTracking
)

Method to control bulk fetching.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bulkTrackingback to summary
private boolean bulkTracking
cacheBySchemaback to summary
private final Map<String, Map<String, List<CachedRow>>> cacheBySchema
didBulkQueryback to summary
private final Map<String, Boolean> didBulkQuery
infoback to summary
private final Map<String, Object> info
timesSingleQueriedback to summary
private final Map<String, Integer> timesSingleQueried

Constructor Detail

ResultSetCacheback to summary
public ResultSetCache()

Method Detail

getback to summary
public List<CachedRow> get(ResultSetCache.ResultSetExtractor resultSetExtractor) throws DatabaseException
getInfoback to summary
public <T> T getInfo(String key, Class<T> type)
getTimesSingleQueriedback to summary
private int getTimesSingleQueried(String schemaKey)
putInfoback to summary
public void putInfo(String key, Object value)
setBulkTrackingback to summary
public void setBulkTracking(boolean bulkTracking)

Method to control bulk fetching. By default it is true. Mostly this flag is used when the database supports multi catalog/schema

Parameters
bulkTracking:boolean

- boolean flag to control bulk operation

liquibase.snapshot back to summary

public abstract Class ResultSetCache.ResultSetExtractor

extends Object
Class Inheritance
Known Direct Subclasses
liquibase.snapshot.ResultSetCache.SingleResultSetExtractor, liquibase.snapshot.ResultSetCache.UnionResultSetExtractor

Field Summary

Modifier and TypeField and Description
private final Database

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract boolean
public abstract List<CachedRow>
public boolean
equals(Object expectedValue, Object foundValue)

public boolean
equals(Object expectedValue, Object foundValue, boolean equalIfEitherNull)

protected List<CachedRow>
protected List<CachedRow>
executeAndExtract(Database database, String sql, Object... parameters)

protected List<CachedRow>
executeAndExtract(Database database, boolean informixTrimHint, String sql, Object... parameters)

protected List<CachedRow>
extract(ResultSet resultSet)

protected List<CachedRow>
extract(ResultSet resultSet, final boolean informixIndexTrimHint)

public abstract List<CachedRow>
public String
public abstract ResultSetCache.RowData
protected boolean
shouldBulkSelect(String schemaKey, ResultSetCache resultSetCache)

public abstract ResultSetCache.RowData
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databaseback to summary
private final Database database

Constructor Detail

ResultSetExtractorback to summary
public ResultSetExtractor(Database database)

Method Detail

bulkContainsSchemaback to summary
public abstract boolean bulkContainsSchema(String schemaKey)
bulkFetchback to summary
public abstract List<CachedRow> bulkFetch() throws SQLException, DatabaseException
equalsback to summary
public boolean equals(Object expectedValue, Object foundValue)
equalsback to summary
public boolean equals(Object expectedValue, Object foundValue, boolean equalIfEitherNull)
executeAndExtractback to summary
protected List<CachedRow> executeAndExtract(String sql, Database database) throws DatabaseException, SQLException
executeAndExtractback to summary
protected List<CachedRow> executeAndExtract(Database database, String sql, Object... parameters) throws DatabaseException, SQLException
executeAndExtractback to summary
protected List<CachedRow> executeAndExtract(Database database, boolean informixTrimHint, String sql, Object... parameters) throws DatabaseException, SQLException
extractback to summary
protected List<CachedRow> extract(ResultSet resultSet) throws SQLException
extractback to summary
protected List<CachedRow> extract(ResultSet resultSet, final boolean informixIndexTrimHint) throws SQLException
fastFetchback to summary
public abstract List<CachedRow> fastFetch() throws SQLException, DatabaseException
getSchemaKeyback to summary
public String getSchemaKey(CachedRow row)
rowKeyParametersback to summary
public abstract ResultSetCache.RowData rowKeyParameters(CachedRow row)
shouldBulkSelectback to summary
protected boolean shouldBulkSelect(String schemaKey, ResultSetCache resultSetCache)
wantedKeyParametersback to summary
public abstract ResultSetCache.RowData wantedKeyParameters()
liquibase.snapshot back to summary

public Class ResultSetCache.RowData

extends Object
Class Inheritance
Known Direct Subclasses
liquibase.snapshot.ResultSetCacheSnowflake.RowData

Field Summary

Modifier and TypeField and Description
private final String
private final Database
private String[]
private final String[]
private final String

Constructor Summary

AccessConstructor and Description
protected
RowData(String catalog, String schema, Database database, String... parameters)

Method Summary

Modifier and TypeMethod and Description
public String
createKey(Database database, String... params)

public String
public String
public String[]
protected String[]
permutations(String[] params)

private String[]
permute(String[] params, int fromIndex)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

catalogback to summary
private final String catalog
databaseback to summary
private final Database database
keyPermutationsback to summary
private String[] keyPermutations
parametersback to summary
private final String[] parameters
schemaback to summary
private final String schema

Constructor Detail

RowDataback to summary
protected RowData(String catalog, String schema, Database database, String... parameters)

Method Detail

createKeyback to summary
public String createKey(Database database, String... params)
createParamsKeyback to summary
public String createParamsKey(Database database)
createSchemaKeyback to summary
public String createSchemaKey(Database database)
getKeyPermutationsback to summary
public String[] getKeyPermutations()
permutationsback to summary
protected String[] permutations(String[] params)
permuteback to summary
private String[] permute(String[] params, int fromIndex)
liquibase.snapshot back to summary

public abstract Class ResultSetCache.SingleResultSetExtractor

extends ResultSetExtractor
Class Inheritance
Known Direct Subclasses
liquibase.snapshot.ResultSetCacheSnowflake.SingleResultSetExtractor, liquibase.snapshot.JdbcDatabaseSnapshot.CachingDatabaseMetaData.GetColumnResultSetCache, liquibase.snapshot.JdbcDatabaseSnapshot.CachingDatabaseMetaData.GetNotNullConstraintsResultSetCache

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<CachedRow>
public abstract List<CachedRow>
public List<CachedRow>
public abstract List<CachedRow>
Inherited from liquibase.snapshot.ResultSetCache.ResultSetExtractor:
bulkContainsSchemaequalsequalsexecuteAndExtractexecuteAndExtractexecuteAndExtractextractextractgetSchemaKeyrowKeyParametersshouldBulkSelectwantedKeyParameters

Constructor Detail

SingleResultSetExtractorback to summary
public SingleResultSetExtractor(Database database)

Method Detail

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

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

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

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

Annotations
@Override
fastFetchQueryback to summary
public abstract List<CachedRow> fastFetchQuery() throws SQLException, DatabaseException
liquibase.snapshot back to summary

public abstract Class ResultSetCache.UnionResultSetExtractor

extends ResultSetExtractor
Class Inheritance
Known Direct Subclasses
liquibase.snapshot.JdbcDatabaseSnapshot.CachingDatabaseMetaData.ForeignKeysResultSetCache

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Inherited from liquibase.snapshot.ResultSetCache.ResultSetExtractor:
bulkContainsSchemabulkFetchequalsequalsexecuteAndExtractexecuteAndExtractexecuteAndExtractextractextractfastFetchgetSchemaKeyrowKeyParametersshouldBulkSelectwantedKeyParameters

Constructor Detail

UnionResultSetExtractorback to summary
protected UnionResultSetExtractor(Database database)