Top Description Fields Constructors Methods
liquibase.command.core.helpers

public Class PreCompareCommandStep

extends AbstractHelperCommandStep
Class Inheritance
Imports
liquibase.Scope, liquibase.command.*, liquibase.command.core.DiffCommandStep, liquibase.command.providers.ReferenceDatabase, liquibase.database.Database, liquibase.diff.compare.CompareControl, liquibase.diff.output.ObjectChangeFilter, .StandardObjectChangeFilter, liquibase.exception.UnexpectedLiquibaseException, liquibase.logging.mdc.MdcKey, liquibase.structure.DatabaseObject, java.util.Arrays, .List

Prepares objects used by database comparison Commands like diff, diffChangelog, etc

Field Summary

Modifier and TypeField and Description
protected static final String[]
public static final CommandArgumentDefinition<CompareControl>
public static final CommandResultDefinition<CompareControl>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<ObjectChangeFilter>
public static final CommandResultDefinition<ObjectChangeFilter>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<Class<T>[]>
public static final CommandResultDefinition<Class<T>[]>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String[][]
defineCommandNames()

Implements liquibase.command.CommandStep.defineCommandNames.

Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}.

private CompareControl
getCompareControl(CommandScope commandScope, Database database, String diffTypes)

private ObjectChangeFilter
private static Class<? extends DatabaseObject>[]
getSnapshotTypes(CommandScope commandScope, String diffTypes)

private static Database
public static void
logMdcProperties(String schemas, String outputSchemas, String referenceSchemas)

public List<Class<?>>
providedDependencies()

Overrides liquibase.command.AbstractCommandStep.providedDependencies.

Implements liquibase.command.CommandStep.providedDependencies.

Returns a list of all the dependency Classes that this step provides

public List<Class<?>>
requiredDependencies()

Overrides liquibase.command.AbstractCommandStep.requiredDependencies.

Implements liquibase.command.CommandStep.requiredDependencies.

Return a list of configured Classes that this command requires to be passed as a dependency.

public void
run(CommandResultsBuilder resultsBuilder)

Implements liquibase.command.CommandStep.run.

Performs the business logic.

Inherited from liquibase.command.core.helpers.AbstractHelperCommandStep:
adjustCommandDefinition

Field Detail

COMMAND_NAMEback to summary
protected static final String[] COMMAND_NAME
COMPARE_CONTROL_ARGback to summary
public static final CommandArgumentDefinition<CompareControl> COMPARE_CONTROL_ARG
COMPARE_CONTROL_RESULTback to summary
public static final CommandResultDefinition<CompareControl> COMPARE_CONTROL_RESULT
DIFF_TYPES_ARGback to summary
public static final CommandArgumentDefinition<String> DIFF_TYPES_ARG
EXCLUDE_OBJECTS_ARGback to summary
public static final CommandArgumentDefinition<String> EXCLUDE_OBJECTS_ARG
INCLUDE_OBJECTS_ARGback to summary
public static final CommandArgumentDefinition<String> INCLUDE_OBJECTS_ARG
OBJECT_CHANGE_FILTER_ARGback to summary
public static final CommandArgumentDefinition<ObjectChangeFilter> OBJECT_CHANGE_FILTER_ARG
OBJECT_CHANGE_FILTER_RESULTback to summary
public static final CommandResultDefinition<ObjectChangeFilter> OBJECT_CHANGE_FILTER_RESULT
OUTPUT_SCHEMAS_ARGback to summary
public static final CommandArgumentDefinition<String> OUTPUT_SCHEMAS_ARG
REFERENCE_SCHEMAS_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_SCHEMAS_ARG
SCHEMAS_ARGback to summary
public static final CommandArgumentDefinition<String> SCHEMAS_ARG
SNAPSHOT_TYPES_ARGback to summary
public static final CommandArgumentDefinition<Class<T>[]> SNAPSHOT_TYPES_ARG
SNAPSHOT_TYPES_RESULTback to summary
public static final CommandResultDefinition<Class<T>[]> SNAPSHOT_TYPES_RESULT

Constructor Detail

PreCompareCommandStepback to summary
public PreCompareCommandStep()

Method Detail

defineCommandNamesback to summary
public String[][] defineCommandNames()

Implements liquibase.command.CommandStep.defineCommandNames.

Doc from liquibase.command.CommandStep.defineCommandNames.

Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}. If it is a part of `liquibase example init`, this should return {"example", "init"}.

This is used to determine the available command names.

This can return null if this step is not defining a new command but "cross-cutting" existing commands

Annotations
@Override
getCompareControlback to summary
private CompareControl getCompareControl(CommandScope commandScope, Database database, String diffTypes)
getObjectChangeFilterback to summary
private ObjectChangeFilter getObjectChangeFilter(CommandScope commandScope)
getSnapshotTypesback to summary
private static Class<? extends DatabaseObject>[] getSnapshotTypes(CommandScope commandScope, String diffTypes)
getTargetDatabaseback to summary
private static Database getTargetDatabase(CommandScope commandScope)
logMdcPropertiesback to summary
public static void logMdcProperties(String schemas, String outputSchemas, String referenceSchemas)
providedDependenciesback to summary
public List<Class<?>> providedDependencies()

Overrides liquibase.command.AbstractCommandStep.providedDependencies.

Implements liquibase.command.CommandStep.providedDependencies.

Doc from liquibase.command.CommandStep.providedDependencies.

Returns a list of all the dependency Classes that this step provides

Returns:List<Class<?>>

list with the provided classes types

Annotations
@Override
requiredDependenciesback to summary
public List<Class<?>> requiredDependencies()

Overrides liquibase.command.AbstractCommandStep.requiredDependencies.

Implements liquibase.command.CommandStep.requiredDependencies.

Doc from liquibase.command.CommandStep.requiredDependencies.

Return a list of configured Classes that this command requires to be passed as a dependency.

Returns:List<Class<?>>

list with the required classes types

Annotations
@Override
runback to summary
public void run(CommandResultsBuilder resultsBuilder) throws Exception

Implements liquibase.command.CommandStep.run.

Doc from liquibase.command.CommandStep.run.

Performs the business logic. This method should not be called directly. It is called by the overall pipeline logic in the CommandScope#execute() order.

Annotations
@Override