public class LabelExpression extends Object
Labels are tags that you can add to changesets to control which changeset will be executed in any migration run. Labels control whether a changeset is executed depending on runtime settings. Any string can be used for the label name, and it is case-insensitive.
Constructor and Description |
---|
LabelExpression() |
LabelExpression(Collection<String> labels) |
LabelExpression(String... labels) |
LabelExpression(String labels) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(String label) |
Set<String> |
getLabels() |
String |
getOriginalString() |
boolean |
isEmpty() |
boolean |
matches(Labels runtimeLabels)
Returns true if the passed runtime labels match this label expression
|
static boolean |
matchesAll(Collection<Labels> changesetLabels,
LabelExpression labelExpression)
Return true if any of the LabelExpression objects match the runtime
|
String |
toString() |
public LabelExpression()
public LabelExpression(String... labels)
public LabelExpression(String labels)
public LabelExpression(Collection<String> labels)
public boolean add(String label)
public boolean matches(Labels runtimeLabels)
public static boolean matchesAll(Collection<Labels> changesetLabels, LabelExpression labelExpression)
changesetLabels
- Expressions to match againstlabelExpression
- Runtime labelspublic boolean isEmpty()
public String getOriginalString()
Copyright © 2023 Liquibase.org. All rights reserved.