Class Operations


  • @API(status=STABLE,
         since="1.0")
    public final class Operations
    extends Object
    A set of operations.
    Since:
    1.0
    Author:
    Michael J. Simons
    • Method Detail

      • minus

        public static Operation minus​(Expression e)
        Creates an unary minus operation.
        Parameters:
        e - The expression to which the unary minus should be applied. We don't check if it's a numeric expression, but in hindsight to generate semantically correct Cypher, it's recommended that is one.
        Returns:
        An unary minus operation.
        Since:
        2021.2.3
      • plus

        public static Expression plus​(Expression e)
        Creates an unary plus operation.
        Parameters:
        e - The expression to which the unary plus should be applied. We don't check if it's a numeric expression, but in hindsight to generate semantically correct Cypher, it's recommended that is one.
        Returns:
        An unary plus operation.
        Since:
        2021.2.3
      • set

        public static Operation set​(Expression target,
                                    Expression value)
        Creates a = operation. The left hand side should resolve to a property or to something which has labels or types to modify and the right hand side should either be new properties or labels.
        Parameters:
        target - The target that should be modified
        value - The new value of the target
        Returns:
        A new operation.
        Since:
        2021.2.3
      • mutate

        public static Operation mutate​(Expression target,
                                       MapExpression value)
        Creates a += operation. The left hand side must resolve to a container (either a node or a relationship) of properties and the right hand side must be a map of new or updated properties
        Parameters:
        target - The target container that should be modified
        value - The new properties
        Returns:
        A new operation.
        Since:
        2020.1.5
      • mutate

        public static Operation mutate​(Expression target,
                                       Expression value)
        Creates a += operation. The left hand side must resolve to a container (either a node or a relationship) of properties and the right hand side must be a map of new or updated properties
        Parameters:
        target - The target container that should be modified
        value - The new properties
        Returns:
        A new operation.
        Since:
        2020.1.5
      • set

        public static Operation set​(Node target,
                                    String... label)
        Creates an operation adding one or more labels from a given node.
        Parameters:
        target - The target of the new labels
        label - The labels to be added
        Returns:
        A set operation
        Since:
        2021.2.3
      • remove

        public static Operation remove​(Node target,
                                       String... label)
        Creates an operation removing one or more labels from a given node.
        Parameters:
        target - The target of the remove operation
        label - The labels to be removed
        Returns:
        A remove operation
        Since:
        2021.2.3