Class FunctionInvocation

java.lang.Object
org.neo4j.cypherdsl.core.FunctionInvocation
All Implemented Interfaces:
Visitable, Expression

@API(status=STABLE, since="1.0") public final class FunctionInvocation extends Object implements Expression
Since:
1.0
Author:
Gerrit Meier, Michael J. Simons
  • Method Details

    • create

      public static FunctionInvocation create(FunctionInvocation.FunctionDefinition definition)
      Creates a FunctionInvocation based on a simple definition without any arguments.
      Parameters:
      definition - The definition of a function
      Returns:
      The invocation (a valid expression)
      Since:
      2021.2.3
    • create

      public static FunctionInvocation create(FunctionInvocation.FunctionDefinition definition, Expression... expressions)
      Creates a FunctionInvocation based on a simple definition with arguments.
      Parameters:
      definition - The definition of a function
      expressions - The arguments to the function
      Returns:
      The invocation (a valid expression)
      Since:
      2021.2.3
    • createDistinct

      public static FunctionInvocation createDistinct(FunctionInvocation.FunctionDefinition definition, Expression... expressions)
      Creates a FunctionInvocation based on a simple definition with arguments and adds the distinct operator to it. This is only supported with FunctionInvocation.FunctionDefinition.isAggregate() returning true.
      Parameters:
      definition - The definition of a function
      expressions - The arguments to the function
      Returns:
      The invocation (a valid expression)
      Since:
      2021.2.3
    • create

      public static FunctionInvocation create(FunctionInvocation.FunctionDefinition definition, PatternElement pattern)
      Creates a new function invocation for a pattern element.
      Parameters:
      definition - The definition of the function
      pattern - The argument to the function
      Returns:
      A function invocation
      Since:
      2021.2.3
    • getFunctionName

      @API(status=INTERNAL) public String getFunctionName()
      Returns:
      The name of this function.
    • accept

      public void accept(Visitor visitor)
      Description copied from interface: Visitable
      Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - the visitor to notify, must not be null.
    • toString

      public String toString()
      Description copied from interface: Visitable
      Most visitables will render themselves into a Cypher fragment preceded with the actual classname. The representation however is not cached - in contrast to the ones for full statements. Using toString is recommended for debugging purposes mainly, and not for production use.

      The concrete classname has been prepended to help debugging and actually to discourage using fragments to build queries without explicitly rendering them, either as statement or going through the renderer on purpose.

      Specified by:
      toString in interface Visitable
      Overrides:
      toString in class Object
      Returns:
      A string representation of this visitable formatted as Classname{cypher=value}