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

public Class DbUrlConnectionCommandStep

extends AbstractDatabaseConnectionCommandStep
implements CleanUpCommandStep
Class Inheritance
All Implemented Interfaces
liquibase.command.CleanUpCommandStep
Imports
liquibase.Beta, .GlobalConfiguration, .Scope, liquibase.command.CleanUpCommandStep, .CommandArgumentDefinition, .CommandResultsBuilder, .CommandScope, liquibase.database.Database, liquibase.database.jvm.JdbcConnection, liquibase.exception.DatabaseException, liquibase.logging.mdc.MdcKey, liquibase.util.StringUtil, java.util.Collections, .List

Internal command step to be used on CommandStep pipeline to manage the database connection.

Field Summary

Modifier and TypeField and Description
protected static final String[]
public static final CommandArgumentDefinition<Database>
DATABASE_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
DEFAULT_CATALOG_NAME_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
DEFAULT_SCHEMA_NAME_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
DRIVER_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
DRIVER_PROPERTIES_FILE_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
PASSWORD_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<Boolean>
SKIP_DATABASE_STEP_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
URL_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.
public static final CommandArgumentDefinition<String>
USERNAME_ARG

Deprecated This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

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"}}.

public static void
logMdc(String url, Database database)

public Database
obtainDatabase(CommandScope
current command scope
commandScope
)

Try to retrieve and set the database object from the command scope, otherwise creates a new one .

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.AbstractDatabaseConnectionCommandStep:
cleanUpcreateDatabaseObject

Field Detail

COMMAND_NAMEback to summary
protected static final String[] COMMAND_NAME

Hides liquibase.command.core.helpers.AbstractDatabaseConnectionCommandStep.COMMAND_NAME.

DATABASE_ARGback to summary
public static final CommandArgumentDefinition<Database> DATABASE_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
DEFAULT_CATALOG_NAME_ARGback to summary
public static final CommandArgumentDefinition<String> DEFAULT_CATALOG_NAME_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
DEFAULT_SCHEMA_NAME_ARGback to summary
public static final CommandArgumentDefinition<String> DEFAULT_SCHEMA_NAME_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
DRIVER_ARGback to summary
public static final CommandArgumentDefinition<String> DRIVER_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
DRIVER_PROPERTIES_FILE_ARGback to summary
public static final CommandArgumentDefinition<String> DRIVER_PROPERTIES_FILE_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
PASSWORD_ARGback to summary
public static final CommandArgumentDefinition<String> PASSWORD_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
SKIP_DATABASE_STEP_ARGback to summary
public static final CommandArgumentDefinition<Boolean> SKIP_DATABASE_STEP_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Beta
@Deprecated
URL_ARGback to summary
public static final CommandArgumentDefinition<String> URL_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated
USERNAME_ARGback to summary
public static final CommandArgumentDefinition<String> USERNAME_ARG

Deprecated

This field is retained for backwards compatibility. Use the fields in DbUrlConnectionArgumentsCommandStep instead.

Annotations
@Deprecated

Constructor Detail

DbUrlConnectionCommandStepback to summary
public DbUrlConnectionCommandStep()

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
logMdcback to summary
public static void logMdc(String url, Database database)
obtainDatabaseback to summary
public Database obtainDatabase(CommandScope commandScope) throws DatabaseException

Try to retrieve and set the database object from the command scope, otherwise creates a new one .

Parameters
commandScope:CommandScope

current command scope

Exceptions
DatabaseException:
Thrown when there is a connection error
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