Package liquibase.command.core
Class UpdateCountCommandStep
- java.lang.Object
-
- liquibase.command.AbstractCommandStep
-
- liquibase.command.core.AbstractUpdateCommandStep
-
- liquibase.command.core.UpdateCountCommandStep
-
- All Implemented Interfaces:
CleanUpCommandStep
,CommandStep
- Direct Known Subclasses:
UpdateCountSqlCommandStep
public class UpdateCountCommandStep extends AbstractUpdateCommandStep
-
-
Field Summary
Fields Modifier and Type Field Description static CommandArgumentDefinition<String>
CHANGELOG_FILE_ARG
static CommandArgumentDefinition<ChangeLogParameters>
CHANGELOG_PARAMETERS
static String[]
COMMAND_NAME
static CommandArgumentDefinition<String>
CONTEXTS_ARG
static CommandArgumentDefinition<Integer>
COUNT_ARG
static CommandArgumentDefinition<String>
LABEL_FILTER_ARG
-
Fields inherited from class liquibase.command.core.AbstractUpdateCommandStep
DEFAULT_CHANGE_EXEC_LISTENER_RESULT_KEY
-
Fields inherited from class liquibase.command.AbstractCommandStep
coreBundle
-
Fields inherited from interface liquibase.command.CommandStep
ORDER_DEFAULT, ORDER_NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description UpdateCountCommandStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adjustCommandDefinition(CommandDefinition commandDefinition)
Default implementation makes no changesprotected void
customMdcLogging(CommandScope commandScope)
String[][]
defineCommandNames()
Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}.String
getChangelogFileArg(CommandScope commandScope)
String[]
getCommandName()
String
getContextsArg(CommandScope commandScope)
String
getLabelFilterArg(CommandScope commandScope)
UpdateSummaryEnum
getShowSummary(CommandScope commandScope)
ChangeLogIterator
getStandardChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog databaseChangeLog)
ChangeLogIterator
getStatusChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog databaseChangeLog)
void
postUpdateLog(int rowsAffected)
LogList<Class<?>>
requiredDependencies()
Return a list of configured Classes that this command requires to be passed as a dependency.-
Methods inherited from class liquibase.command.core.AbstractUpdateCommandStep
cleanUp, getShowSummaryOutput, getStandardChangelogIteratorFilters, isUpToDate, isUpToDateFastCheck, preRun, run, setDBLock, setFastCheckEnabled
-
Methods inherited from class liquibase.command.AbstractCommandStep
getOrder, providedDependencies, validate
-
-
-
-
Field Detail
-
COMMAND_NAME
public static final String[] COMMAND_NAME
-
CHANGELOG_FILE_ARG
public static final CommandArgumentDefinition<String> CHANGELOG_FILE_ARG
-
LABEL_FILTER_ARG
public static final CommandArgumentDefinition<String> LABEL_FILTER_ARG
-
CONTEXTS_ARG
public static final CommandArgumentDefinition<String> CONTEXTS_ARG
-
COUNT_ARG
public static final CommandArgumentDefinition<Integer> COUNT_ARG
-
CHANGELOG_PARAMETERS
public static final CommandArgumentDefinition<ChangeLogParameters> CHANGELOG_PARAMETERS
-
-
Method Detail
-
defineCommandNames
public String[][] defineCommandNames()
Description copied from interface:CommandStep
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
-
adjustCommandDefinition
public void adjustCommandDefinition(CommandDefinition commandDefinition)
Description copied from class:AbstractCommandStep
Default implementation makes no changes- Specified by:
adjustCommandDefinition
in interfaceCommandStep
- Overrides:
adjustCommandDefinition
in classAbstractCommandStep
-
getChangelogFileArg
public String getChangelogFileArg(CommandScope commandScope)
- Specified by:
getChangelogFileArg
in classAbstractUpdateCommandStep
-
getContextsArg
public String getContextsArg(CommandScope commandScope)
- Specified by:
getContextsArg
in classAbstractUpdateCommandStep
-
getLabelFilterArg
public String getLabelFilterArg(CommandScope commandScope)
- Specified by:
getLabelFilterArg
in classAbstractUpdateCommandStep
-
getCommandName
public String[] getCommandName()
- Specified by:
getCommandName
in classAbstractUpdateCommandStep
-
getShowSummary
public UpdateSummaryEnum getShowSummary(CommandScope commandScope)
- Specified by:
getShowSummary
in classAbstractUpdateCommandStep
-
getStatusChangelogIterator
public ChangeLogIterator getStatusChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog databaseChangeLog) throws DatabaseException
- Overrides:
getStatusChangelogIterator
in classAbstractUpdateCommandStep
- Throws:
DatabaseException
-
getStandardChangelogIterator
public ChangeLogIterator getStandardChangelogIterator(CommandScope commandScope, Database database, Contexts contexts, LabelExpression labelExpression, DatabaseChangeLog databaseChangeLog) throws DatabaseException
- Overrides:
getStandardChangelogIterator
in classAbstractUpdateCommandStep
- Throws:
DatabaseException
-
requiredDependencies
public List<Class<?>> requiredDependencies()
Description copied from interface:CommandStep
Return a list of configured Classes that this command requires to be passed as a dependency.- Specified by:
requiredDependencies
in interfaceCommandStep
- Overrides:
requiredDependencies
in classAbstractUpdateCommandStep
- Returns:
- list with the required classes types
-
customMdcLogging
protected void customMdcLogging(CommandScope commandScope)
- Overrides:
customMdcLogging
in classAbstractUpdateCommandStep
-
postUpdateLog
public void postUpdateLog(int rowsAffected)
Description copied from class:AbstractUpdateCommandStep
Log- Overrides:
postUpdateLog
in classAbstractUpdateCommandStep
-
-