Class BulkUpdate
java.lang.Object
me.lucko.luckperms.common.bulkupdate.BulkUpdate
Represents a query to be applied to a set of data.
Queries can either be applied to im-memory sets of data, or converted to SQL syntax to be executed remotely.
-
Constructor Summary
ConstructorsConstructorDescriptionBulkUpdate(DataType dataType, Action action, List<Query> queries, boolean trackStatistics) -
Method Summary
Modifier and TypeMethodDescriptionAppends the constraints of thisBulkUpdateto the provided statement builder in SQL syntaxapply(Set<net.luckperms.api.node.Node> nodes, HolderType holderType) Applies this query to the given set of nodes, and returns the result.Converts thisBulkUpdateto SQL syntaxbooleaninthashCode()booleanbooleansatisfiesConstraints(net.luckperms.api.node.Node node) Check to see if a Node instance satisfies the constrints of this querytoString()
-
Constructor Details
-
BulkUpdate
-
-
Method Details
-
satisfiesConstraints
public boolean satisfiesConstraints(net.luckperms.api.node.Node node) Check to see if a Node instance satisfies the constrints of this query- Parameters:
node- the node to check- Returns:
- true if satisfied
-
apply
public @Nullable Set<net.luckperms.api.node.Node> apply(Set<net.luckperms.api.node.Node> nodes, HolderType holderType) Applies this query to the given set of nodes, and returns the result.- Parameters:
nodes- the input nodesholderType- the holder type the nodes are from- Returns:
- the transformed nodes, or null if no change was made
-
buildAsSql
Converts thisBulkUpdateto SQL syntax- Returns:
- this query in SQL form
-
appendConstraintsAsSql
Appends the constraints of thisBulkUpdateto the provided statement builder in SQL syntax- Parameters:
builder- the statement builder to append the constraints to- Returns:
- the same statement builder provided as input
-
getDataType
-
getAction
-
getQueries
-
isTrackingStatistics
public boolean isTrackingStatistics() -
getStatistics
-
equals
-
hashCode
public int hashCode() -
toString
-