Top Fields Constructors Methods
liquibase.command.core

public Class DiffCommandStep

extends AbstractCommandStep
Class Inheritance
Imports
liquibase.CatalogAndSchema, .Scope, liquibase.command.*, liquibase.command.core.helpers.PreCompareCommandStep, liquibase.command.providers.ReferenceDatabase, liquibase.database.Database, .ObjectQuotingStrategy, liquibase.diff.DiffGeneratorFactory, .DiffResult, liquibase.diff.compare.CompareControl, liquibase.diff.output.ObjectChangeFilter, liquibase.diff.output.report.DiffToReport, liquibase.exception.DatabaseException, liquibase.logging.mdc.MdcKey, .MdcValue, liquibase.snapshot.*, liquibase.structure.DatabaseObject, liquibase.structure.core.DatabaseObjectFactory, liquibase.util.StringUtil, java.io.PrintStream, java.util.Arrays, .Collections, .List, .Set

Field Summary

Modifier and TypeField and Description
public static final String[]
public static final CommandResultDefinition<DiffResult>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<SnapshotControl>
public static final CommandArgumentDefinition<SnapshotListener>
public static final CommandArgumentDefinition<SnapshotControl>
Inherited from liquibase.command.AbstractCommandStep:
coreBundle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public DiffResult
protected DatabaseSnapshot
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 DatabaseSnapshot
generateDatabaseShapshot(CommandScope commandScope, Database database, CompareControl compareControl, CatalogAndSchema[] schemas, SnapshotControl snapshotControl)

protected DatabaseSnapshot
public static Class<? extends DatabaseObject>[]
parseSnapshotTypes(String... snapshotTypes)

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.AbstractCommandStep:
getOrdervalidate

Field Detail

COMMAND_NAMEback to summary
public static final String[] COMMAND_NAME
DIFF_RESULTback to summary
public static final CommandResultDefinition<DiffResult> DIFF_RESULT
FORMAT_ARGback to summary
public static final CommandArgumentDefinition<String> FORMAT_ARG
REFERENCE_SNAPSHOT_CONTROL_ARGback to summary
public static final CommandArgumentDefinition<SnapshotControl> REFERENCE_SNAPSHOT_CONTROL_ARG
SNAPSHOT_LISTENER_ARGback to summary
public static final CommandArgumentDefinition<SnapshotListener> SNAPSHOT_LISTENER_ARG
TARGET_SNAPSHOT_CONTROL_ARGback to summary
public static final CommandArgumentDefinition<SnapshotControl> TARGET_SNAPSHOT_CONTROL_ARG

Constructor Detail

DiffCommandStepback to summary
public DiffCommandStep()

Method Detail

adjustCommandDefinitionback to summary
public void adjustCommandDefinition(CommandDefinition commandDefinition)

Overrides liquibase.command.AbstractCommandStep.adjustCommandDefinition.

Implements liquibase.command.CommandStep.adjustCommandDefinition.

Doc from liquibase.command.AbstractCommandStep.adjustCommandDefinition.

Default implementation makes no changes

Annotations
@Override
createDiffResultback to summary
public DiffResult createDiffResult(CommandResultsBuilder resultsBuilder) throws DatabaseException, InvalidExampleException
createReferenceSnapshotback to summary
protected DatabaseSnapshot createReferenceSnapshot(CommandResultsBuilder resultsBuilder) throws DatabaseException, InvalidExampleException
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
generateDatabaseShapshotback to summary
private DatabaseSnapshot generateDatabaseShapshot(CommandScope commandScope, Database database, CompareControl compareControl, CatalogAndSchema[] schemas, SnapshotControl snapshotControl) throws DatabaseException, InvalidExampleException
getTargetSnapshotback to summary
protected DatabaseSnapshot getTargetSnapshot(CommandResultsBuilder resultsBuilder) throws DatabaseException, InvalidExampleException
parseSnapshotTypesback to summary
public static Class<? extends DatabaseObject>[] parseSnapshotTypes(String... snapshotTypes)
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