Class Cypher

java.lang.Object
org.neo4j.cypherdsl.core.Cypher

@API(status=STABLE, since="1.0") public final class Cypher extends Object
The main entry point into the Cypher DSL. The Cypher Builder API is intended for framework usage to produce Cypher statements required for database operations.
Since:
1.0
Author:
Michael J. Simons, Gerrit Meier, Andreas Berger
  • Method Details

    • node

      @NotNull @Contract(pure=true) public static @NotNull Node node(String primaryLabel, String... additionalLabels)
      Create a new Node representation with at least one label, the "primary" label. This is required. All other labels are optional.
      Parameters:
      primaryLabel - The primary label this node is identified by.
      additionalLabels - Additional labels
      Returns:
      A new node representation
    • node

      @NotNull @Contract(pure=true) public static @NotNull Node node(String primaryLabel, List<String> additionalLabels)
      Create a new Node representation with at least one label, the "primary" label. This is required. All other labels are optional.
      Parameters:
      primaryLabel - The primary label this node is identified by.
      additionalLabels - Additional labels
      Returns:
      A new node representation
    • node

      @NotNull @Contract(pure=true) public static @NotNull Node node(String primaryLabel, MapExpression properties, String... additionalLabels)
      Create a new Node representation with at least one label, the "primary" label. This is required. All other labels are optional. This method also takes a map of properties. This allows the returned node object to be used in a MATCH or MERGE statement.
      Parameters:
      primaryLabel - The primary label this node is identified by.
      properties - The properties expected to exist on the node.
      additionalLabels - Additional labels
      Returns:
      A new node representation
    • node

      @NotNull @Contract(pure=true) public static @NotNull Node node(String primaryLabel, MapExpression properties, Collection<String> additionalLabels)
      Create a new Node representation with at least one label, the "primary" label. This is required. All other labels are optional. This method also takes a map of properties. This allows the returned node object to be used in a MATCH or MERGE statement.
      Parameters:
      primaryLabel - The primary label this node is identified by.
      properties - The properties expected to exist on the node.
      additionalLabels - Additional labels
      Returns:
      A new node representation
      Since:
      2021.2.2
    • anyNode

      @NotNull @Contract(pure=true) public static @NotNull Node anyNode()
      Returns:
      A node matching any node.
    • node

      @NotNull @Contract(pure=true) public static @NotNull Node node(LabelExpression labelExpression)
      Parameters:
      labelExpression - required expression
      Returns:
      A node matching a label expression
      Since:
      2023.0.2
    • asterisk

      @NotNull @Contract(pure=true) public static @NotNull Asterisk asterisk()
      Returns:
      The * wildcard literal.
    • anyNode

      @NotNull @Contract(pure=true) public static @NotNull Node anyNode(String symbolicName)
      Parameters:
      symbolicName - The new symbolic name
      Returns:
      A node matching any node with the symbolic the given symbolicName.
    • anyNode

      @NotNull @Contract(pure=true) public static @NotNull Node anyNode(SymbolicName symbolicName)
      Parameters:
      symbolicName - The new symbolic name
      Returns:
      A node matching any node with the symbolic the given symbolicName.
    • property

      @NotNull @Contract(pure=true) public static @NotNull Property property(String containerName, String... names)
      Dereferences a property for a symbolic name, most likely pointing to a property container like a node or a relationship.
      Parameters:
      containerName - The symbolic name of a property container
      names - The names of the properties to dereference. More than one name does create a nested property like containerName.name1.name2.
      Returns:
      A new property
    • property

      @NotNull @Contract(pure=true) public static @NotNull Property property(String containerName, Collection<String> names)
      Dereferences a property for a symbolic name, most likely pointing to a property container like a node or a relationship.
      Parameters:
      containerName - The symbolic name of a property container
      names - The names of the properties to dereference. More than one name does create a nested property like containerName.name1.name2.
      Returns:
      A new property
      Since:
      2021.2.2
    • property

      @NotNull @Contract(pure=true) public static @NotNull Property property(Expression expression, String... names)
      Dereferences a property on a arbitrary expression.
      Parameters:
      expression - The expression that describes some sort of accessible map
      names - The names of the properties to dereference. More than one name does create a nested property like expression.name1.name2.
      Returns:
      A new property.
    • property

      @NotNull @Contract(pure=true) public static @NotNull Property property(Expression expression, Collection<String> names)
      Dereferences a property on a arbitrary expression.
      Parameters:
      expression - The expression that describes some sort of accessible map
      names - The names of the properties to dereference. More than one name does create a nested property like expression.name1.name2.
      Returns:
      A new property.
      Since:
      2021.2.2
    • property

      @NotNull @Contract(pure=true) public static @NotNull Property property(String containerName, Expression lookup)
      Creates a dynamic lookup of a property for a symbolic name, most likely pointing to a property container like a node or a relationship. A dynamic property will be rendered as p[expression].
      Parameters:
      containerName - The symbolic name of a property container
      lookup - An expression to use as a dynamic lookup for properties of the container with the given name
      Returns:
      A new property
      Since:
      2021.0.0
    • property

      @NotNull @Contract(pure=true) public static @NotNull Property property(Expression expression, Expression lookup)
      Creates a dynamic lookup of a property on a arbitrary expression. A dynamic property will be rendered as p[expression].
      Parameters:
      expression - The expression that describes some sort of accessible map
      lookup - An expression to use as a dynamic lookup for properties of the container the expression resolved to
      Returns:
      A new property.
      Since:
      2021.0.0
    • path

      @NotNull @Contract(pure=true) public static NamedPath.OngoingDefinitionWithName path(String name)
      Starts defining a named path by indicating a name.
      Parameters:
      name - The name of the new path
      Returns:
      An ongoing definition of a named path
      Since:
      1.1
    • path

      @NotNull @Contract(pure=true) public static NamedPath.OngoingDefinitionWithName path(SymbolicName name)
      Starts defining a named path by indicating a name.
      Parameters:
      name - The name of the new path
      Returns:
      An ongoing definition of a named path
      Since:
      1.1
    • shortestPath

      @NotNull @Contract(pure=true) public static NamedPath.OngoingShortestPathDefinitionWithName shortestPath(String name)
      Starts defining a named path defined by the shortestPath between a relationship by indicating a name.
      Parameters:
      name - The name of the new shortestPath path
      Returns:
      An ongoing definition of a named path
      Since:
      1.1.1
    • shortestPath

      @NotNull @Contract(pure=true) public static NamedPath.OngoingShortestPathDefinitionWithName shortestPath(SymbolicName name)
      Starts defining a named path defined by the shortestPath between a relationship by indicating a name.
      Parameters:
      name - The name of the new shortestPath path
      Returns:
      An ongoing definition of a named path
      Since:
      1.1.1
    • name

      @NotNull @Contract(pure=true) public static @NotNull SymbolicName name(String value)
      Creates a new symbolic name.
      Parameters:
      value - The value of the symbolic name
      Returns:
      A new symbolic name
    • parameter

      @NotNull @Contract(pure=true) public static @NotNull Parameter<Object> parameter(String name)
      Creates a new parameter placeholder. Existing $-signs will be removed.
      Parameters:
      name - The name of the parameter, must not be null
      Returns:
      The new parameter
    • parameter

      @NotNull @Contract(pure=true) public static <T> @NotNull Parameter<T> parameter(String name, T value)
      Creates a new parameter with the given name and a value bound to it. The value can be retrieved from the final statement build.
      Type Parameters:
      T - Type of the new parameter
      Parameters:
      name - The name of the parameter, must not be null
      value - The value of the parameter.
      Returns:
      The new parameter
      Since:
      2021.0.0
    • anonParameter

      @NotNull @Contract(pure=true) public static <T> @NotNull Parameter<T> anonParameter(T value)
      Creates a new anonymous parameter with a value bound to it. The value can be retrieved from the final statement build. The name will be available as soon as the statement has been rendered.
      Type Parameters:
      T - Type of the new parameter
      Parameters:
      value - The value of the parameter.
      Returns:
      The new parameter
      Since:
      2021.1.0
    • optionalMatch

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere optionalMatch(PatternElement... pattern)
      Prepares an optional match statement.
      Parameters:
      pattern - The patterns to match
      Returns:
      An ongoing match that is used to specify an optional where and a required return clause
    • optionalMatch

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere optionalMatch(Collection<? extends PatternElement> pattern)
      Prepares an optional match statement.
      Parameters:
      pattern - The patterns to match
      Returns:
      An ongoing match that is used to specify an optional where and a required return clause
      Since:
      2021.2.2
    • match

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere match(PatternElement... pattern)
      Starts building a statement based on a match clause. Use node(String, String...) and related to retrieve a node or a relationship, which both are pattern elements.
      Parameters:
      pattern - The patterns to match
      Returns:
      An ongoing match that is used to specify an optional where and a required return clause
    • match

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere match(Collection<? extends PatternElement> pattern)
      Starts building a statement based on a match clause. Use node(String, String...) and related to retrieve a node or a relationship, which both are pattern elements.
      Parameters:
      pattern - The patterns to match
      Returns:
      An ongoing match that is used to specify an optional where and a required return clause
      Since:
      2021.2.2
    • match

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere match(boolean optional, PatternElement... pattern)
      Starts building a statement based on a match clause. Use node(String, String...) and related to retrieve a node or a relationship, which both are pattern elements.
      Parameters:
      optional - A flag whether the MATCH clause includes the OPTIONAL keyword.
      pattern - The patterns to match
      Returns:
      An ongoing match that is used to specify an optional where and a required return clause
      Since:
      2020.1.3
    • match

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere match(boolean optional, Collection<? extends PatternElement> pattern)
      Starts building a statement based on a match clause. Use node(String, String...) and related to retrieve a node or a relationship, which both are pattern elements.
      Parameters:
      optional - A flag whether the MATCH clause includes the OPTIONAL keyword.
      pattern - The patterns to match
      Returns:
      An ongoing match that is used to specify an optional where and a required return clause
      Since:
      2021.2.2
    • create

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingUpdate create(PatternElement... pattern)
      Starts building a statement based on a CREATE clause.
      Parameters:
      pattern - The patterns to create
      Returns:
      An ongoing CREATE that can be used to specify WITH and RETURNING etc.
    • create

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingUpdate create(Collection<? extends PatternElement> pattern)
      Starts building a statement based on a CREATE clause.
      Parameters:
      pattern - The patterns to create
      Returns:
      An ongoing CREATE that can be used to specify WITH and RETURNING etc.
      Since:
      2021.2.2
    • with

      @NotNull @Contract(pure=true) public static StatementBuilder.OrderableOngoingReadingAndWithWithoutWhere with(String... variables)
      Starts a statement with a leading WITH. Those are useful for passing on lists of various type that can be unwound later on etc. A leading WITH obviously cannot be used with patterns and needs its arguments to have an alias.
      Parameters:
      variables - One ore more variables.
      Returns:
      An ongoing with clause.
      Since:
      2020.1.2
    • with

      @NotNull @Contract(pure=true) public static StatementBuilder.OrderableOngoingReadingAndWithWithoutWhere with(IdentifiableElement... elements)
      Starts a statement with a leading WITH. Those are useful for passing on lists of various type that can be unwound later on etc. A leading WITH cannot be used with patterns obviously and needs its arguments to have an alias.
      Parameters:
      elements - One ore more variables.
      Returns:
      An ongoing with clause.
      Since:
      2020.1.2
    • subqueryWith

      public static SubqueryExpressionBuilder subqueryWith(String... identifiableElements)
      Start building a new sub-query expression by importing variables into the scope with a WITH clause.
      Parameters:
      identifiableElements - The identifiable elements to import
      Returns:
      A builder for creating the concrete sub-query
      Since:
      2023.9.0
    • subqueryWith

      public static SubqueryExpressionBuilder subqueryWith(IdentifiableElement... identifiableElements)
      Start building a new sub-query expression by importing variables into the scope with a WITH clause.
      Parameters:
      identifiableElements - The identifiable elements to import
      Returns:
      A builder for creating the concrete sub-query
      Since:
      2023.9.0
    • with

      @NotNull @Contract(pure=true) public static StatementBuilder.OrderableOngoingReadingAndWithWithoutWhere with(Collection<IdentifiableElement> elements)
      Starts a statement with a leading WITH. Those are useful for passing on lists of various type that can be unwound later on etc. A leading WITH cannot be used with patterns obviously and needs its arguments to have an alias.

      This method takes both aliased and non-aliased expression. The later will produce only valid Cypher when used in combination with a correlated subquery via call(Statement).

      Parameters:
      elements - One ore more expressions.
      Returns:
      An ongoing with clause.
      Since:
      2021.2.2
    • merge

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingMerge merge(PatternElement... pattern)
      Starts building a statement based on a MERGE clause.
      Parameters:
      pattern - The patterns to merge
      Returns:
      An ongoing MERGE that can be used to specify WITH and RETURNING etc.
    • merge

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingMerge merge(Collection<? extends PatternElement> pattern)
      Starts building a statement based on a MERGE clause.
      Parameters:
      pattern - The patterns to merge
      Returns:
      An ongoing MERGE that can be used to specify WITH and RETURNING etc.
      Since:
      2021.2.2
    • unwind

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingUnwind unwind(Expression expression)
      Starts building a statement starting with an UNWIND clause. The expression needs to be an expression evaluating to a list, otherwise the query will fail.
      Parameters:
      expression - The expression to unwind
      Returns:
      An ongoing UNWIND.
    • unwind

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingUnwind unwind(Expression... expressions)
      Starts building a statement starting with an UNWIND clause. The expressions passed will be turned into a list expression
      Parameters:
      expressions - expressions to unwind
      Returns:
      a new instance of StatementBuilder.OngoingUnwind
    • unwind

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingUnwind unwind(Collection<? extends Expression> expressions)
      Starts building a statement starting with an UNWIND clause. The expressions passed will be turned into a list expression
      Parameters:
      expressions - expressions to unwind
      Returns:
      a new instance of StatementBuilder.OngoingUnwind
      Since:
      2021.2.2
    • sort

      @NotNull @Contract(pure=true) public static @NotNull SortItem sort(Expression expression)
      Creates a new SortItem to be used as part of an Order.
      Parameters:
      expression - The expression by which things should be sorted
      Returns:
      A sort item, providing means to specify ascending or descending order
    • sort

      @NotNull @Contract(pure=true) public static @NotNull SortItem sort(Expression expression, SortItem.Direction direction)
      Creates a new SortItem to be used as part of an Order.
      Parameters:
      expression - The expression by which things should be sorted
      direction - The direction to sort by. Defaults to SortItem.Direction.UNDEFINED.
      Returns:
      A sort item
      Since:
      2021.1.0
    • mapOf

      @NotNull @Contract(pure=true) public static @NotNull MapExpression mapOf(Object... keysAndValues)
      Creates a map of expression from a list of key/value pairs.
      Parameters:
      keysAndValues - A list of key and values. Must be an even number, with alternating String and Expression
      Returns:
      A new map expression.
    • sortedMapOf

      @NotNull @Contract(pure=true) public static @NotNull MapExpression sortedMapOf(Object... keysAndValues)
      Creates an alphabetically sorted map of expression from a list of key/value pairs.
      Parameters:
      keysAndValues - A list of key and values. Must be an even number, with alternating String and Expression
      Returns:
      A new map expression.
    • asExpression

      @NotNull @Contract(pure=true) public static @NotNull MapExpression asExpression(Map<String,Object> map)
      Creates a map of expression from a Java Map.
      Parameters:
      map - A map to be turned into a MapExpression
      Returns:
      A new map expression.
      Since:
      2021.1.0
    • listOf

      @NotNull @Contract(pure=true) public static @NotNull ListExpression listOf(Expression... expressions)
      Creates a list-expression from several expressions.
      Parameters:
      expressions - expressions to get combined into a list
      Returns:
      a new instance of ListExpression
    • listOf

      @NotNull @Contract(pure=true) public static @NotNull ListExpression listOf(Collection<? extends Expression> expressions)
      Creates a list-expression from several expressions.
      Parameters:
      expressions - expressions to get combined into a list
      Returns:
      a new instance of ListExpression
      Since:
      2021.2.2
    • literalOf

      @NotNull @Contract(pure=true) public static <T> @NotNull Literal<T> literalOf(Object object)
      Creates a new Literal<?> from the given object.
      Type Parameters:
      T - The type of the literal returned
      Parameters:
      object - the object to represent.
      Returns:
      a new Literal<?>.
      Throws:
      Literal.UnsupportedLiteralException - when the object cannot be represented as a literal
    • literalTrue

      @NotNull @Contract(pure=true) public static @NotNull Literal<Boolean> literalTrue()
      Returns:
      The true literal.
    • literalFalse

      @NotNull @Contract(pure=true) public static @NotNull Literal<Boolean> literalFalse()
      Returns:
      The false literal.
    • literalNull

      @NotNull @Contract(pure=true) public static @NotNull Literal<Void> literalNull()
      Returns:
      The null literal.
    • union

      @NotNull @Contract(pure=true) public static @NotNull Statement.UnionQuery union(Statement... statements)
      Creates a UNION statement from several other statements. No checks are applied for matching return types.
      Parameters:
      statements - the statements to union.
      Returns:
      A union statement.
    • union

      @NotNull @Contract(pure=true) public static @NotNull Statement.UnionQuery union(Collection<Statement> statements)
      Creates a UNION statement from several other statements. No checks are applied for matching return types.
      Parameters:
      statements - the statements to union.
      Returns:
      A union statement.
      Since:
      2021.2.2
    • unionAll

      @NotNull @Contract(pure=true) public static @NotNull Statement unionAll(Statement... statements)
      Creates a UNION ALL statement from several other statements. No checks are applied for matching return types.
      Parameters:
      statements - the statements to union.
      Returns:
      A union statement.
    • unionAll

      @NotNull @Contract(pure=true) public static @NotNull Statement unionAll(Collection<Statement> statements)
      Creates a UNION ALL statement from several other statements. No checks are applied for matching return types.
      Parameters:
      statements - the statements to union.
      Returns:
      A union statement.
      Since:
      2021.2.2
    • returning

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingAndReturn returning(Expression... expressions)
      A RETURN statement without a previous match.
      Parameters:
      expressions - The elements to return
      Returns:
      A buildable statement
      Since:
      1.0.1
    • returning

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingAndReturn returning(Collection<? extends Expression> expressions)
      A RETURN statement without a previous match.
      Parameters:
      expressions - The expressions to return
      Returns:
      A buildable statement
      Since:
      2021.2.2
    • listBasedOn

      @NotNull @Contract(pure=true) public static @NotNull PatternComprehension.OngoingDefinitionWithPattern listBasedOn(RelationshipPattern relationshipPattern)
      Creates a list comprehension starting with a Relationship or a chain of relationships.
      Parameters:
      relationshipPattern - The relationship pattern on which the new list comprehension is based on.
      Returns:
      An ongoing definition.
      Since:
      2020.0.0
    • listBasedOn

      @NotNull @Contract(pure=true) public static @NotNull PatternComprehension.OngoingDefinitionWithPattern listBasedOn(NamedPath namedPath)
      Creates a list comprehension starting with a named path.
      Parameters:
      namedPath - The named path on which the new list comprehension is based on.
      Returns:
      An ongoing definition.
      Since:
      2020.1.1
    • listWith

      @NotNull @Contract(pure=true) public static @NotNull ListComprehension.OngoingDefinitionWithVariable listWith(SymbolicName variable)
      Starts defining a list comprehension.
      Parameters:
      variable - The variable to which each element of the list is assigned.
      Returns:
      An ongoing definition of a list comprehension
      Since:
      1.0.1
    • quote

      @NotNull @Contract(pure=true) public static @NotNull String quote(String unquotedString)
      Escapes and quotes the unquotedString for safe usage in Neo4j-Browser and Shell.
      Parameters:
      unquotedString - An unquoted string
      Returns:
      A quoted string with special chars escaped.
    • caseExpression

      @NotNull @Contract(pure=true) public static @NotNull Case caseExpression()
      Returns:
      generic case expression start
    • caseExpression

      @NotNull @Contract(pure=true) public static @NotNull Case caseExpression(@Nullable @Nullable Expression expression)
      Parameters:
      expression - initial expression for the simple case statement
      Returns:
      simple case expression start
    • call

      @NotNull @Contract(pure=true) public static @NotNull StatementBuilder.OngoingStandaloneCallWithoutArguments call(String procedureName)
      Starts defining a procedure call of the procedure with the given procedureName. That procedure name might be fully qualified - that is, including a namespace - or just a simple name.
      Parameters:
      procedureName - The procedure name of the procedure to call. Might be fully qualified.
      Returns:
      An ongoing definition of a call
    • call

      @NotNull @Contract(pure=true) public static @NotNull StatementBuilder.OngoingStandaloneCallWithoutArguments call(String... namespaceAndProcedure)
      Starts defining a procedure call of the procedure with the given qualified name.
      Parameters:
      namespaceAndProcedure - The procedure name of the procedure to call.
      Returns:
      An ongoing definition of a call
    • call

      @NotNull @Contract(pure=true) public static @NotNull StatementBuilder.OngoingStandaloneCallWithoutArguments call(Collection<String> namespaceAndProcedure)
      Starts defining a procedure call of the procedure with the given qualified name.
      Parameters:
      namespaceAndProcedure - The procedure name of the procedure to call.
      Returns:
      An ongoing definition of a call
      Since:
      2021.2.2
    • call

      @Neo4jVersion(minimum="4.0.0") @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingWithoutWhere call(Statement subquery)
      Starts building a statement based on one subquery.
      Parameters:
      subquery - The statement representing the subquery
      Returns:
      A new ongoing read without any further conditions or returns.
      Since:
      2020.1.2
      See Also:
      Neo4j version required
      4.0.0
    • subList

      @NotNull @Contract(pure=true) public static @NotNull Expression subList(Expression targetExpression, Integer start, Integer end)
      Creates a closed range with given boundaries.
      Parameters:
      targetExpression - The target expression for the range
      start - The inclusive start
      end - The exclusive end
      Returns:
      A range literal.
      Since:
      2020.1.0
    • subList

      @NotNull @Contract(pure=true) public static @NotNull Expression subList(Expression targetExpression, Expression start, Expression end)
      Creates a closed range with given boundaries.
      Parameters:
      targetExpression - The target expression for the range
      start - The inclusive start
      end - The exclusive end
      Returns:
      A range literal.
      Since:
      2020.1.0
    • subListFrom

      @NotNull @Contract(pure=true) public static @NotNull Expression subListFrom(Expression targetExpression, Integer start)
      Creates an open range starting at start.
      Parameters:
      targetExpression - The target expression for the range
      start - The inclusive start
      Returns:
      A range literal.
      Since:
      2020.1.0
    • subListFrom

      @NotNull @Contract(pure=true) public static @NotNull Expression subListFrom(Expression targetExpression, Expression start)
      Creates an open range starting at start.
      Parameters:
      targetExpression - The target expression for the range
      start - The inclusive start
      Returns:
      A range literal.
      Since:
      2020.1.0
    • subListUntil

      @NotNull @Contract(pure=true) public static @NotNull Expression subListUntil(Expression targetExpression, Integer end)
      Creates an open range starting at start.
      Parameters:
      targetExpression - The target expression for the range
      end - The exclusive end
      Returns:
      A range literal.
      Since:
      2020.1.0
    • subListUntil

      @NotNull @Contract(pure=true) public static @NotNull Expression subListUntil(Expression targetExpression, Expression end)
      Creates an open range starting at start.
      Parameters:
      targetExpression - The target expression for the range
      end - The exclusive end
      Returns:
      A range literal.
      Since:
      2020.1.0
    • valueAt

      @NotNull @Contract(pure=true) public static @NotNull ListOperator valueAt(Expression targetExpression, Integer index)
      Creates a single valued range at index.
      Parameters:
      targetExpression - The target expression for the range
      index - The index of the range
      Returns:
      A range literal.
      Since:
      2020.1.0
    • valueAt

      @NotNull @Contract(pure=true) public static @NotNull ListOperator valueAt(Expression targetExpression, Expression index)
      Creates a single valued range at index.
      Parameters:
      targetExpression - The target expression for the range
      index - The index of the range
      Returns:
      A range literal.
      Since:
      2020.1.0
    • raw

      @NotNull @Contract(pure=true) public static @NotNull Expression raw(String format, Object... mixedArgs)
      Creates an expression from a raw string fragment. No validation is performed on it. If it is used as expression, you must make sure to define something that works as expression.

      This method expects exactly one placeholder in the form of $E for any argument passed with mixedArgs.

      To use exactly the term $E escape it like this: \$E

      Parameters:
      format - A raw Cypher string
      mixedArgs - Args to the Cypher string
      Returns:
      An expression to reuse with the builder.
      Since:
      2021.0.2
    • returningRaw

      @NotNull @Contract(pure=true) public static StatementBuilder.OngoingReadingAndReturn returningRaw(Expression rawExpression)
      Creates a RETURN clause from a raw Cypher expression created via raw(String, Object...). The expression maybe aliased but it must resolve to a raw element
      Parameters:
      rawExpression - Must be a plain raw or an aliased raw expression. To eventually render as valid Cypher, it must contain the RETURN keyword.
      Returns:
      A match that can be build now
      Since:
      2021.2.1
    • adapt

      @NotNull @Contract(pure=true) public static <FE> @NotNull ForeignAdapter<FE> adapt(FE expression)
      Provides access to the foreign DSL adapter. Please make sure you have the necessary runtime dependencies on the class path, otherwise you will see some kind of ClassNotFoundException along various classes related to the foreign DSL.
      Type Parameters:
      FE - The type of the expression
      Parameters:
      expression - The expression that should be adapted
      Returns:
      A foreign adapter
      Throws:
      IllegalArgumentException - in case the object cannot be adapter
      Since:
      2021.1.0
    • usingPeriodicCommit

      @NotNull @Contract(pure=true) public static @NotNull ExposesLoadCSV usingPeriodicCommit()
      Starts building a LOAD CSV clause by using a periodic commit. The default rate of the database will be used.
      Returns:
      An ongoing definition of a LOAD CSV clause
      Since:
      2021.2.1
    • usingPeriodicCommit

      @NotNull @Contract(pure=true) public static @NotNull ExposesLoadCSV usingPeriodicCommit(@Nullable @Nullable Integer rate)
      Starts building a LOAD CSV clause by using a periodic commit.
      Parameters:
      rate - The rate to be used. No checks are done on the rate, the database will verify valid values.
      Returns:
      An ongoing definition of a LOAD CSV clause
      Since:
      2021.2.1
    • loadCSV

      public static LoadCSVStatementBuilder.OngoingLoadCSV loadCSV(URI from)
      Starts building a LOAD CSV. No headers are assumed.
      Parameters:
      from - The URI to load data from. Any uri that is resolvable by the database itself is valid.
      Returns:
      An ongoing definition of a LOAD CSV clause
      Since:
      2021.2.1
    • loadCSV

      public static LoadCSVStatementBuilder.OngoingLoadCSV loadCSV(URI from, boolean withHeaders)
      Starts building a LOAD CSV.
      Parameters:
      from - The URI to load data from. Any uri that is resolvable by the database itself is valid.
      withHeaders - Set to true if the csv file contains header
      Returns:
      An ongoing definition of a LOAD CSV clause
    • format

      public static String format(Expression expression)
      Tries to format this expression into something human-readable. Not all expressions are supported
      Parameters:
      expression - An expression to format
      Returns:
      A human-readable string
      Throws:
      IllegalArgumentException - When the expression cannot be formatted
      Since:
      2021.3.2
    • use

      public static Statement.UseStatement use(String target, Statement statement)
      Decorates the given statement by prepending a static USE clause.
      Parameters:
      target - The target. This might be a single database or a constituent of a composite database. This value will be escaped if necessary. If it contains a ., both the first and second part will be escaped individually.
      statement - The statement to decorate
      Returns:
      The new buildable statement
      Since:
      2023.0.0
    • use

      public static Statement.UseStatement use(Parameter<?> target, Statement statement)
      Decorates the given statement by prepending a dynamic USE clause. A dynamic USE clause will utilize graph.byName to resolve the target database.
      Parameters:
      target - A parameter that must resolve to a Cypher string.
      statement - The statement to decorate
      Returns:
      The new buildable statement
      Since:
      2023.0.0
    • use

      public static Statement.UseStatement use(StringLiteral target, Statement statement)
      Decorates the given statement by prepending a dynamic USE clause. A dynamic USE clause will utilize graph.byName to resolve the target database.
      Parameters:
      target - A string expression
      statement - The statement to decorate
      Returns:
      The new buildable statement
      Since:
      2023.0.0
    • use

      @Deprecated(forRemoval=true, since="2023.4.0") public static Statement.UseStatement use(SymbolicName target, Statement statement)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Decorates the given statement by prepending a dynamic USE clause. A dynamic USE clause will utilize graph.byName to resolve the target database.
      Parameters:
      target - The name of a variable pointing to the graph or constituent
      statement - The statement to decorate
      Returns:
      The new buildable statement
      Since:
      2023.0.0
    • use

      public static Statement.UseStatement use(Expression target, Statement statement)
      Decorates the given statement by prepending a dynamic USE clause. A dynamic USE clause will utilize graph.byName to resolve the target database unless graphByName(Expression) has already been used.
      Parameters:
      target - The name of a variable pointing to the graph or constituent
      statement - The statement to decorate
      Returns:
      The new buildable statement
      Since:
      2023.4.0
    • includesAll

      public static Condition includesAll(Expression lhs, Expression rhs)
      Creates a condition that checks whether the lhs includes all elements present in rhs.
      Parameters:
      lhs - Argument that is tested whether it contains all values in rhs or not
      rhs - The reference collection
      Returns:
      An "includesAll" comparison
      Since:
      2023.9.0
    • includesAny

      public static Condition includesAny(Expression lhs, Expression rhs)
      Creates a condition that checks whether the lhs includes any element present in rhs.
      Parameters:
      lhs - Argument that is tested whether it contains any values in rhs or not
      rhs - The reference collection
      Returns:
      A "not_includes" comparison
      Since:
      2023.9.0
    • matching

      public static Condition matching(RelationshipPattern relationshipPattern)
      Parameters:
      relationshipPattern - The pattern being evaluated in a condition
      Returns:
      A new condition matching the given pattern
      Since:
      2023.9.0
    • matches

      public static Condition matches(Expression lhs, Expression rhs)
      Creates a condition that matches if the right hand side is a regular expression that matches the the left hand side via =~.
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      A "matches" comparison
      Since:
      2023.9.0
    • isEqualTo

      public static Condition isEqualTo(Expression lhs, Expression rhs)
      Creates a condition that matches if both expressions are equals according to =.
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      An "equals" comparison
      Since:
      2023.9.0
    • isNotEqualTo

      public static Condition isNotEqualTo(Expression lhs, Expression rhs)
      Creates a condition that matches if both expressions are equals according to <>.
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      An "not equals" comparison
      Since:
      2023.9.0
    • lt

      public static Condition lt(Expression lhs, Expression rhs)
      Creates a condition that matches if the left hand side is less than the right hand side..
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      An "less than" comparison
      Since:
      2023.9.0
    • lte

      public static Condition lte(Expression lhs, Expression rhs)
      Creates a condition that matches if the left hand side is less than or equal the right hand side..
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      An "less than or equal" comparison
      Since:
      2023.9.0
    • gte

      public static Condition gte(Expression lhs, Expression rhs)
      Creates a condition that matches if the left hand side is greater than or equal the right hand side..
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      An "greater than or equal" comparison
      Since:
      2023.9.0
    • gt

      public static Condition gt(Expression lhs, Expression rhs)
      Creates a condition that matches if the left hand side is greater than the right hand side..
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      An "greater than" comparison
      Since:
      2023.9.0
    • not

      @Contract(pure=true) @NotNull public static @NotNull Condition not(@NotNull @NotNull Condition condition)
      Negates the given condition.
      Parameters:
      condition - The condition to negate. Must not be null.
      Returns:
      The negated condition.
      Since:
      2023.9.0
    • not

      @Contract(pure=true) @NotNull public static @NotNull Condition not(@NotNull @NotNull RelationshipPattern pattern)
      Negates the given pattern element: The pattern must not matched to be included in the result.
      Parameters:
      pattern - The pattern to negate. Must not be null.
      Returns:
      A condition that evaluates to true when the pattern does not match.
      Since:
      2023.9.0
    • startsWith

      public static Condition startsWith(Expression lhs, Expression rhs)
      Creates a condition that checks whether the lhs starts with the rhs.
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      A new condition.
      Since:
      2023.9.0
    • contains

      public static Condition contains(Expression lhs, Expression rhs)
      Creates a condition that checks whether the lhs contains with the rhs.
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      A new condition.
      Since:
      2023.9.0
    • endsWith

      public static Condition endsWith(Expression lhs, Expression rhs)
      Creates a condition that checks whether the lhs ends with the rhs.
      Parameters:
      lhs - The left hand side of the comparison
      rhs - The right hand side of the comparison
      Returns:
      A new condition.
      Since:
      2023.9.0
    • noCondition

      @Contract(pure=true) @NotNull public static @NotNull Condition noCondition()
      Creates a placeholder condition which is not rendered in the final statement but is useful while chaining conditions together.
      Returns:
      A placeholder condition.
      Since:
      2023.9.0
    • isNull

      public static Condition isNull(Expression expression)
      Creates a condition that checks whether the expression is null.
      Parameters:
      expression - The expression to check for null
      Returns:
      A new condition.
      Since:
      2023.9.0
    • isNotNull

      public static Condition isNotNull(Expression expression)
      Creates a condition that checks whether the expression is not null.
      Parameters:
      expression - The expression to check for null
      Returns:
      A new condition.
      Since:
      2023.9.0
    • isEmpty

      public static Condition isEmpty(Expression expression)
      Creates a new condition based on a function invocation for the isEmpty() function. See isEmpty.

      The argument e must refer to an expression that evaluates to a list for isEmpty() to work

      Parameters:
      expression - An expression referring to a list
      Returns:
      A function call for isEmpty() for a list
      Since:
      2023.9.0
    • isTrue

      public static Condition isTrue()
      Returns:
      a condition that is always true.
      Since:
      2023.9.0
    • isFalse

      public static Condition isFalse()
      Returns:
      a condition that is always false.
      Since:
      2023.9.0
    • hasLabelsOrType

      public static Condition hasLabelsOrType(SymbolicName symbolicName, String... labelsOrTypes)
      Parameters:
      symbolicName - Reference to the entity that should be checked for labels or types
      labelsOrTypes - the list of labels or types to check for
      Returns:
      A condition that checks whether a node has a set of given labels or a relationship a set of given types.
      Since:
      2023.9.0
    • count

      @NotNull public static @NotNull CountExpression count(PatternElement requiredPattern, PatternElement... patternElement)
      Creates a COUNT sub-query expressions from at least one pattern.
      Parameters:
      requiredPattern - One pattern is required
      patternElement - Optional pattern
      Returns:
      The immutable CountExpression
      Since:
      2023.9.0
    • count

      @NotNull public static @NotNull CountExpression count(Statement.UnionQuery union)
      Creates a COUNT with an inner UNION sub-query.
      Parameters:
      union - The union that will be the source of the COUNT sub-query
      Returns:
      The immutable CountExpression
      Since:
      2023.9.0
    • count

      @NotNull public static @NotNull CountExpression count(Statement statement, IdentifiableElement... imports)
      Creates a COUNT from a full statement, including its filters and conditions. The statement may or may not have a RETURN clause. It must however not contain any updates. While it would render syntactically correct Cypher, Neo4j does not support updates inside counting sub-queries.
      Parameters:
      statement - The statement to be passed to count{}
      imports - Optional imports to be used in the statement (will be imported with WITH)
      Returns:
      A counting sub-query.
      Since:
      2023.9.0
    • count

      public static CountExpression count(List<PatternElement> pattern, @Nullable @Nullable Where where)
      Creates a COUNT expression based on a list of pattern
      Parameters:
      pattern - the list of patterns that shall be counted
      where - an optional where-clause
      Returns:
      a count expression.
      Since:
      2023.9.0
    • collect

      @NotNull public static @NotNull Expression collect(Statement statement)
      Creates a COLLECT subquery from a statement, including its filters and conditions. The statement must return exactly one column. It must however not contain any updates. While it would render syntactically correct Cypher, Neo4j does not support updates inside counting sub-queries.
      Parameters:
      statement - the statement to be passed to COLLECT{}
      Returns:
      a collecting sub-query.
      Since:
      2023.9.0
    • nameOrExpression

      public static <T extends Expression> Expression nameOrExpression(T expression)
      Parameters:
      expression - Possibly named with a non-empty symbolic name.
      Returns:
      The name of the expression if the expression is named or the expression itself.
      Since:
      2023.9.0
    • createSymbolicNames

      public static SymbolicName[] createSymbolicNames(String[] variables)
    • createSymbolicNames

      public static SymbolicName[] createSymbolicNames(Named[] variables)
    • elementId

      @Neo4jVersion(minimum="5.0.0") @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation elementId(@NotNull @NotNull Node node)
      Creates a function invocation for elementId{}.
      Parameters:
      node - The node for which the element id should be retrieved
      Returns:
      A function call for elementId() on a node.
      Since:
      2023.9.0
    • elementId

      @Neo4jVersion(minimum="5.0.0") @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation elementId(@NotNull @NotNull Relationship relationship)
      Creates a function invocation for elementId{}.
      Parameters:
      relationship - The relationship for which the element id should be retrieved
      Returns:
      A function call for elementId() on a relationship.
      Since:
      2023.9.0
    • keys

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation keys(@NotNull @NotNull Node node)
      Creates a function invocation for keys{}. See keys.
      Parameters:
      node - The node which keys should be returned.
      Returns:
      A function call for keys() on an expression.
      Since:
      2023.9.0
    • keys

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation keys(@NotNull @NotNull Relationship relationship)
      Creates a function invocation for keys{}. See keys.
      Parameters:
      relationship - The relationship which keys should be returned.
      Returns:
      A function call for keys() on an expression.
      Since:
      2023.9.0
    • keys

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation keys(@NotNull @NotNull Expression expression)
      Creates a function invocation for keys{}. See keys.
      Parameters:
      expression - The expressions which keys should be returned. Must resolve to a node, relationship or map.
      Returns:
      A function call for keys() on an expression.
      Since:
      2023.9.0
    • labels

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation labels(@NotNull @NotNull Node node)
      Creates a function invocation for labels{}. See labels.
      Parameters:
      node - The node for which the labels should be retrieved
      Returns:
      A function call for labels() on a node.
      Since:
      2023.9.0
    • labels

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation labels(@NotNull @NotNull SymbolicName node)
      Creates a function invocation for labels{}. The symbolic name node must point to a node. This can't be checked during compile time, so please make sure of that.

      See labels.

      Parameters:
      node - The node for which the labels should be retrieved
      Returns:
      A function call for labels() on a node.
      Since:
      2023.9.0
    • type

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation type(@NotNull @NotNull Relationship relationship)
      Creates a function invocation for type{}. See type.
      Parameters:
      relationship - The relationship for which the type should be retrieved
      Returns:
      A function call for type() on a relationship.
      Since:
      2023.9.0
    • type

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation type(@NotNull @NotNull SymbolicName relationship)
      Creates a function invocation for type{}. The symbolic name relationship must point to a relationship. This can't be checked during compile time, so please make sure of that.

      See type.

      Parameters:
      relationship - The relationship for which the type should be retrieved
      Returns:
      A function call for type() on a relationship.
      Since:
      2023.9.0
    • count

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation count(@NotNull @NotNull Node node)
      Parameters:
      node - The named node to be counted
      Returns:
      A function call for count() for one named node
      Since:
      2023.9.0
      See Also:
    • count

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation count(Expression expression)
      Creates a function invocation for the count() function. See count.
      Parameters:
      expression - An expression describing the things to count.
      Returns:
      A function call for count() for an expression like asterisk() etc.
      Since:
      2023.9.0
    • countDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation countDistinct(@NotNull @NotNull Node node)
      Creates a function invocation for a count() function with DISTINCT added.
      Parameters:
      node - The named node to be counted
      Returns:
      A function call for count() for one named node
      Since:
      2023.9.0
      See Also:
    • countDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation countDistinct(Expression expression)
      Creates a function invocation for a count() function with DISTINCT added. See count.
      Parameters:
      expression - An expression describing the things to count.
      Returns:
      A function call for count() for an expression like asterisk() etc.
      Since:
      2023.9.0
    • properties

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation properties(Node node)
      Creates a function invocation for properties()) on nodes.
      Parameters:
      node - The node who's properties should be returned.
      Returns:
      A function call for properties())
      Since:
      2023.9.0
    • properties

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation properties(Relationship relationship)
      Creates a function invocation for properties()) on relationships.
      Parameters:
      relationship - The relationship who's properties should be returned.
      Returns:
      A function call for properties())
      Since:
      2023.9.0
    • properties

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation properties(MapExpression map)
      Creates a function invocation for properties()) on maps.
      Parameters:
      map - The map who's properties should be returned.
      Returns:
      A function call for properties())
      Since:
      2023.9.0
    • coalesce

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation coalesce(Expression... expressions)
      Creates a function invocation for the coalesce() function. See coalesce.
      Parameters:
      expressions - One or more expressions to be coalesced
      Returns:
      A function call for coalesce.
      Since:
      2023.9.0
    • left

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation left(Expression expression, Expression length)
      Creates a function invocation for the left() function. See left.
      Parameters:
      expression - An expression resolving to a string
      length - desired length
      Returns:
      A function call for left()
      Since:
      2023.9.0
    • ltrim

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation ltrim(@NotNull @NotNull Expression expression)
      Creates a function invocation for the ltrim() function. See ltrim.
      Parameters:
      expression - An expression resolving to a string
      Returns:
      A function call for ltrim()
      Since:
      2023.9.0
    • replace

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation replace(Expression original, Expression search, Expression replace)
      Creates a function invocation for the replace() function. See replace.
      Parameters:
      original - An expression that returns a string
      search - An expression that specifies the string to be replaced in original.
      replace - An expression that specifies the replacement string.
      Returns:
      A function call for replace()
      Since:
      2023.9.0
    • reverse

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation reverse(@NotNull @NotNull Expression original)
      Creates a function invocation for the reverse() function. See reverse.
      Parameters:
      original - An expression that returns a string
      Returns:
      A function call for reverse()
      Since:
      2023.9.0
    • right

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation right(Expression expression, Expression length)
      Creates a function invocation for the right() function. See right.
      Parameters:
      expression - An expression resolving to a string
      length - desired length
      Returns:
      A function call for right()
      Since:
      2023.9.0
    • rtrim

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation rtrim(@NotNull @NotNull Expression expression)
      Creates a function invocation for the rtrim() function. See rtrim.
      Parameters:
      expression - An expression resolving to a string
      Returns:
      A function call for rtrim()
      Since:
      2023.9.0
    • substring

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation substring(Expression original, Expression start, Expression length)
      Creates a function invocation for the substring() function. See rtrim.
      Parameters:
      original - An expression resolving to a string
      start - An expression that returns a positive integer, denoting the position at which the substring will begin.
      length - An expression that returns a positive integer, denoting how many characters of original will be returned.
      Returns:
      A function call for substring()
      Since:
      2023.9.0
    • toLower

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toLower(@NotNull @NotNull Expression expression)
      Creates a function invocation for the toLower() function. See toLower.
      Parameters:
      expression - An expression resolving to a string
      Returns:
      A function call for toLower() for one expression
      Since:
      2023.9.0
    • toUpper

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toUpper(@NotNull @NotNull Expression expression)
      Creates a function invocation for the toUpper() function. See toUpper.
      Parameters:
      expression - An expression resolving to a string
      Returns:
      A function call for toLower() for one expression
      Since:
      2023.9.0
    • trim

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation trim(@NotNull @NotNull Expression expression)
      Creates a function invocation for the trim() function. See trim.
      Parameters:
      expression - An expression resolving to a string
      Returns:
      A function call for trim() for one expression
      Since:
      2023.9.0
    • split

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation split(@NotNull @NotNull Expression expression, @NotNull @NotNull Expression delimiter)
      Creates a function invocation for the split() function. See split.
      Parameters:
      expression - An expression resolving to a string that should be split
      delimiter - The delimiter on which to split
      Returns:
      A function call for split()
      Since:
      2023.9.0
    • split

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation split(@NotNull @NotNull Expression expression, @NotNull @NotNull String delimiter)
      Creates a function invocation for the split() function. See split.
      Parameters:
      expression - An expression resolving to a string that should be split
      delimiter - The delimiter on which to split
      Returns:
      A function call for split()
      Since:
      2023.9.0
    • size

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation size(Expression expression)
      Creates a function invocation for the size() function. size can be applied to
      Parameters:
      expression - The expression who's size is to be returned
      Returns:
      A function call for size() for one expression
      Since:
      2023.9.0
    • size

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation size(RelationshipPattern pattern)
      Creates a function invocation for the size() function. size can be applied to
      Parameters:
      pattern - The pattern for which size() should be invoked.
      Returns:
      A function call for size() for a pattern
      Since:
      2023.9.0
    • exists

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation exists(Expression expression)
      Creates a function invocation for the exists() function. See exists.
      Parameters:
      expression - The expression who's existence is to be evaluated
      Returns:
      A function call for exists() for one expression
      Since:
      2023.9.0
    • distance

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation distance(@NotNull @NotNull Expression point1, @NotNull @NotNull Expression point2)
      Creates a function invocation for the distance() function. See exists. Both points need to be in the same coordinate system.
      Parameters:
      point1 - Point 1
      point2 - Point 2
      Returns:
      A function call for distance()
      Since:
      2023.9.0
    • point

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation point(MapExpression parameterMap)
      Creates a function invocation for the point() function. See point.
      Parameters:
      parameterMap - The map of parameters for point()
      Returns:
      A function call for point()
      Since:
      2023.9.0
    • point

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation point(Expression expression)
      Creates a function invocation for the point() function. See point.

      This generic expression variant is useful for referencing a point inside a parameter or another map.

      Parameters:
      expression - An expression resolving to a valid map of parameters for point()
      Returns:
      A function call for point()
      Since:
      2023.9.0
    • point

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation point(Parameter<?> parameter)
      Creates a function invocation for the point() function. See point.
      Parameters:
      parameter - A parameter referencing a point()
      Returns:
      A function call for point()
      Since:
      2023.9.0
    • cartesian

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation cartesian(double x, double y)
      Convenience method for creating a 2d cartesian point
      Parameters:
      x - The x coordinate
      y - The y coordinate
      Returns:
      A function call for point()
      Since:
      2023.9.0
    • coordinate

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation coordinate(double longitude, double latitude)
      Convenience method for creating a 2d coordinate in the WGS 84 coordinate system
      Parameters:
      longitude - The longitude
      latitude - The latitude
      Returns:
      A function call for point()
      Since:
      2023.9.0
    • withinBBox

      public static FunctionInvocation withinBBox(Expression point, Expression lowerLeft, Expression upperRight)
      Creates a function invocation for the point.withinBBox function. See point.withinBBox.
      Parameters:
      point - The point to check
      lowerLeft - The lower left point of the bounding box (south-west coordinate)
      upperRight - The upper right point of the bounding box (north-east coordinate)
      Returns:
      A function call for point.withinBBox
      Since:
      2023.9.0
    • avg

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation avg(Expression expression)
      Creates a function invocation for the avg() function. See avg.
      Parameters:
      expression - The things to average
      Returns:
      A function call for avg()
      Since:
      2023.9.0
    • avgDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation avgDistinct(Expression expression)
      Creates a function invocation for the avg() function with DISTINCT added. See avg.
      Parameters:
      expression - The things to average
      Returns:
      A function call for avg()
      Since:
      2023.9.0
    • collect

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation collect(@NotNull @NotNull Named variable)
      Creates a function invocation for the collect() function.
      Parameters:
      variable - The named thing to collect
      Returns:
      A function call for collect()
      Since:
      2023.9.0
      See Also:
    • collectDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation collectDistinct(@NotNull @NotNull Named variable)
      Creates a function invocation for the collect() function with DISTINCT added.
      Parameters:
      variable - The named thing to collect
      Returns:
      A function call for collect()
      Since:
      2023.9.0
      See Also:
    • collect

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation collect(Expression expression)
      Creates a function invocation for the collect() function. See collect.
      Parameters:
      expression - The things to collect
      Returns:
      A function call for collect()
      Since:
      2023.9.0
    • collectDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation collectDistinct(Expression expression)
      Creates a function invocation for the collect() function with DISTINCT added. See collect.
      Parameters:
      expression - The things to collect
      Returns:
      A function call for collect()
      Since:
      2023.9.0
    • max

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation max(Expression expression)
      Creates a function invocation for the max() function. See max.
      Parameters:
      expression - A list from which the maximum element value is returned
      Returns:
      A function call for max()
      Since:
      2023.9.0
    • maxDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation maxDistinct(Expression expression)
      Creates a function invocation for the max() function with DISTINCT added. See max.
      Parameters:
      expression - A list from which the maximum element value is returned
      Returns:
      A function call for max()
      Since:
      2023.9.0
    • min

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation min(Expression expression)
      Creates a function invocation for the min() function. See min.
      Parameters:
      expression - A list from which the minimum element value is returned
      Returns:
      A function call for min()
      Since:
      2023.9.0
    • minDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation minDistinct(Expression expression)
      Creates a function invocation for the min() function with DISTINCT added. See min.
      Parameters:
      expression - A list from which the minimum element value is returned
      Returns:
      A function call for min()
      Since:
      2023.9.0
    • percentileCont

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation percentileCont(Expression expression, Number percentile)
      Creates a function invocation for the percentileCont() function. See percentileCont.
      Parameters:
      expression - A numeric expression
      percentile - A numeric value between 0.0 and 1.0
      Returns:
      A function call for percentileCont()
      Since:
      2023.9.0
    • percentileContDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation percentileContDistinct(Expression expression, Number percentile)
      Creates a function invocation for the percentileCont() function with DISTINCT added. See percentileCont.
      Parameters:
      expression - A numeric expression
      percentile - A numeric value between 0.0 and 1.0
      Returns:
      A function call for percentileCont()
      Since:
      2023.9.0
    • percentileDisc

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation percentileDisc(Expression expression, Number percentile)
      Creates a function invocation for the percentileDisc() function. See percentileDisc.
      Parameters:
      expression - A numeric expression
      percentile - A numeric value between 0.0 and 1.0
      Returns:
      A function call for percentileDisc()
      Since:
      2023.9.0
    • percentileDiscDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation percentileDiscDistinct(Expression expression, Number percentile)
      Creates a function invocation for the percentileDisc() function with DISTINCT added. See percentileDisc.
      Parameters:
      expression - A numeric expression
      percentile - A numeric value between 0.0 and 1.0
      Returns:
      A function call for percentileDisc()
      Since:
      2023.9.0
    • stDev

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation stDev(Expression expression)
      Creates a function invocation for the stDev() function. See stDev.
      Parameters:
      expression - A numeric expression
      Returns:
      A function call for stDev()
      Since:
      2023.9.0
    • stDevDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation stDevDistinct(Expression expression)
      Creates a function invocation for the stDev() function with DISTINCT added. See stDev.
      Parameters:
      expression - A numeric expression
      Returns:
      A function call for stDev()
      Since:
      2023.9.0
    • stDevP

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation stDevP(Expression expression)
      Creates a function invocation for the stDevP() function. See stDevP.
      Parameters:
      expression - A numeric expression
      Returns:
      A function call for stDevP()
      Since:
      2023.9.0
    • stDevPDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation stDevPDistinct(Expression expression)
      Creates a function invocation for the stDevP() function with DISTINCT added. See stDevP.
      Parameters:
      expression - A numeric expression
      Returns:
      A function call for stDevP()
      Since:
      2023.9.0
    • sum

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation sum(Expression expression)
      Creates a function invocation for the sum() function. See sum.
      Parameters:
      expression - An expression returning a set of numeric values
      Returns:
      A function call for sum()
      Since:
      2023.9.0
    • sumDistinct

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation sumDistinct(Expression expression)
      Creates a function invocation for the sum() function with DISTINCT added. See sum.
      Parameters:
      expression - An expression returning a set of numeric values
      Returns:
      A function call for sum()
      Since:
      2023.9.0
    • range

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation range(Integer start, Integer end)
      Parameters:
      start - the range's start
      end - the range's end
      Returns:
      A function call for range()
      Since:
      2023.9.0
      See Also:
    • range

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation range(@NotNull @NotNull Expression start, @NotNull @NotNull Expression end)
      Parameters:
      start - the range's start
      end - the range's end
      Returns:
      A function call for range()
      Since:
      2023.9.0
      See Also:
    • range

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation range(@NotNull @NotNull Integer start, @NotNull @NotNull Integer end, Integer step)
      Creates a function invocation for the range() function. See range.
      Parameters:
      start - the range's start
      end - the range's end
      step - the range's step
      Returns:
      A function call for range()
      Since:
      2023.9.0
      See Also:
    • range

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation range(@NotNull @NotNull Expression start, @NotNull @NotNull Expression end, Expression step)
      Creates a function invocation for the range() function. See range.
      Parameters:
      start - the range's start
      end - the range's end
      step - the range's step
      Returns:
      A function call for range()
      Since:
      2023.9.0
    • head

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation head(Expression expression)
      Creates a function invocation for the head() function. See head.
      Parameters:
      expression - A list from which the head element is returned
      Returns:
      A function call for head()
      Since:
      2023.9.0
    • last

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation last(Expression expression)
      Creates a function invocation for the last() function. See last.
      Parameters:
      expression - A list from which the last element is returned
      Returns:
      A function call for last()
      Since:
      2023.9.0
    • nodes

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation nodes(@NotNull @NotNull NamedPath path)
      Creates a function invocation for nodes{}. See nodes.
      Parameters:
      path - The path for which the number of nodes should be retrieved
      Returns:
      A function call for nodes() on a path.
      Since:
      2023.9.0
    • nodes

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation nodes(@NotNull @NotNull SymbolicName symbolicName)
      Creates a function invocation for nodes{}. See nodes.
      Parameters:
      symbolicName - The symbolic name of a path for which the number of nodes should be retrieved
      Returns:
      A function call for nodes{} on a path represented by a symbolic name.
      Since:
      2023.9.0
    • relationships

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation relationships(@NotNull @NotNull NamedPath path)
      Creates a function invocation for relationships{}. See relationships.
      Parameters:
      path - The path for which the relationships should be retrieved
      Returns:
      A function call for relationships() on a path.
      Since:
      2023.9.0
    • relationships

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation relationships(@NotNull @NotNull SymbolicName symbolicName)
      Creates a function invocation for relationships{}. See relationships.
      Parameters:
      symbolicName - The symbolic name of a path for which the relationships should be retrieved
      Returns:
      A function call for relationships() on a path represented by a symbolic name.
      Since:
      2023.9.0
    • startNode

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation startNode(@NotNull @NotNull Relationship relationship)
      Creates a function invocation for startNode{}. See startNode.
      Parameters:
      relationship - The relationship for which the start node be retrieved
      Returns:
      A function call for startNode() on a path.
      Since:
      2023.9.0
    • endNode

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation endNode(@NotNull @NotNull Relationship relationship)
      Creates a function invocation for endNode{}. See endNode.
      Parameters:
      relationship - The relationship for which the end node be retrieved
      Returns:
      A function call for endNode() on a path.
      Since:
      2023.9.0
    • date

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation date()
      Creates a function invocation for date(). See date. This is the most simple form.
      Returns:
      A function call for date().
      Since:
      2023.9.0
    • calendarDate

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation calendarDate(Integer year, Integer month, Integer day)
      Creates a function invocation for date({}). See date.
      Parameters:
      year - The year
      month - The month
      day - The day
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • weekDate

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation weekDate(Integer year, Integer week, Integer dayOfWeek)
      Creates a function invocation for date({}). See date.
      Parameters:
      year - The year
      week - The optional week
      dayOfWeek - The optional day of the week
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • quarterDate

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation quarterDate(Integer year, Integer quarter, Integer dayOfQuarter)
      Creates a function invocation for date({}). See date.
      Parameters:
      year - The year
      quarter - The optional week
      dayOfQuarter - The optional day of the week
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • ordinalDate

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation ordinalDate(Integer year, Integer ordinalDay)
      Creates a function invocation for date({}). See date.
      Parameters:
      year - The year
      ordinalDay - The ordinal day of the year.
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • date

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation date(@NotNull @NotNull MapExpression components)
      Creates a function invocation for date({}). See date. This is the most generic form.
      Parameters:
      components - The map to pass to date({})
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • date

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation date(@NotNull @NotNull String temporalValue)
      Creates a function invocation for date({}). See date. This creates a date from a string.
      Parameters:
      temporalValue - A string representing a temporal value.
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • date

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation date(@NotNull @NotNull Expression temporalValue)
      Creates a function invocation for date({}). See date. This creates a date from a string.
      Parameters:
      temporalValue - An expression representing a temporal value.
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • datetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation datetime()
      Creates a function invocation for datetime({}). See datetime.
      Returns:
      A function call for datetime({}).
      Since:
      2023.9.0
    • datetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation datetime(@NotNull @NotNull TimeZone timeZone)
      Creates a function invocation for datetime({}). See datetime.
      Parameters:
      timeZone - The timezone to use when creating the temporal instance
      Returns:
      A function call for datetime({}).
      Since:
      2023.9.0
    • datetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation datetime(@NotNull @NotNull MapExpression components)
      Creates a function invocation for datetime({}). See datetime. This is the most generic form.
      Parameters:
      components - The map to pass to datetime({})
      Returns:
      A function call for datetime({}).
      Since:
      2023.9.0
    • datetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation datetime(@NotNull @NotNull String temporalValue)
      Creates a function invocation for datetime({}). See datetime. This creates a datetime from a string.
      Parameters:
      temporalValue - A string representing a temporal value.
      Returns:
      A function call for datetime({}).
      Since:
      2023.9.0
    • datetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation datetime(@NotNull @NotNull Expression temporalValue)
      Creates a function invocation for datetime({}). See datetime. This creates a datetime from a string.
      Parameters:
      temporalValue - An expression representing a temporal value.
      Returns:
      A function call for date({}).
      Since:
      2023.9.0
    • localdatetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localdatetime()
      Creates a function invocation for localdatetime({}). See localdatetime.
      Returns:
      A function call for localdatetime({}).
      Since:
      2023.9.0
    • localdatetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localdatetime(@NotNull @NotNull TimeZone timeZone)
      Creates a function invocation for localdatetime({}). See localdatetime.
      Parameters:
      timeZone - The timezone to use when creating the temporal instance
      Returns:
      A function call for localdatetime({}).
      Since:
      2023.9.0
    • localdatetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localdatetime(@NotNull @NotNull MapExpression components)
      Creates a function invocation for localdatetime({}). See localdatetime. This is the most generic form.
      Parameters:
      components - The map to pass to localdatetime({})
      Returns:
      A function call for localdatetime({}).
      Since:
      2023.9.0
    • localdatetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localdatetime(@NotNull @NotNull String temporalValue)
      Creates a function invocation for localdatetime({}). See localdatetime. This creates a localdatetime from a string.
      Parameters:
      temporalValue - A string representing a temporal value.
      Returns:
      A function call for localdatetime({}).
      Since:
      2023.9.0
    • localdatetime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localdatetime(@NotNull @NotNull Expression temporalValue)
      Creates a function invocation for localdatetime({}). See localdatetime. This creates a localdatetime from a string.
      Parameters:
      temporalValue - An expression representing a temporal value.
      Returns:
      A function call for localdatetime({}).
      Since:
      2023.9.0
    • localtime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localtime()
      Creates a function invocation for localtime({}). See localtime.
      Returns:
      A function call for localtime({}).
      Since:
      2023.9.0
    • localtime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localtime(@NotNull @NotNull TimeZone timeZone)
      Creates a function invocation for localtime({}). See localtime.
      Parameters:
      timeZone - The timezone to use when creating the temporal instance
      Returns:
      A function call for localtime({}).
      Since:
      2023.9.0
    • localtime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localtime(@NotNull @NotNull MapExpression components)
      Creates a function invocation for localtime({}). See localtime. This is the most generic form.
      Parameters:
      components - The map to pass to localtime({})
      Returns:
      A function call for localtime({}).
      Since:
      2023.9.0
    • localtime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localtime(@NotNull @NotNull String temporalValue)
      Creates a function invocation for localtime({}). See localtime. This creates a localtime from a string.
      Parameters:
      temporalValue - A string representing a temporal value.
      Returns:
      A function call for localtime({}).
      Since:
      2023.9.0
    • localtime

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation localtime(@NotNull @NotNull Expression temporalValue)
      Creates a function invocation for localtime({}). See localtime. This creates a localtime from a string.
      Parameters:
      temporalValue - An expression representing a temporal value.
      Returns:
      A function call for localtime({}).
      Since:
      2023.9.0
    • time

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation time()
      Creates a function invocation for time({}). See time.
      Returns:
      A function call for time({}).
      Since:
      2023.9.0
    • time

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation time(@NotNull @NotNull TimeZone timeZone)
      Creates a function invocation for time({}). See time.
      Parameters:
      timeZone - The timezone to use when creating the temporal instance
      Returns:
      A function call for time({}).
      Since:
      2023.9.0
    • time

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation time(@NotNull @NotNull MapExpression components)
      Creates a function invocation for time({}). See time. This is the most generic form.
      Parameters:
      components - The map to pass to time({})
      Returns:
      A function call for time({}).
      Since:
      2023.9.0
    • time

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation time(@NotNull @NotNull String temporalValue)
      Creates a function invocation for time({}). See time. This creates a time from a string.
      Parameters:
      temporalValue - A string representing a temporal value.
      Returns:
      A function call for time({}).
      Since:
      2023.9.0
    • time

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation time(@NotNull @NotNull Expression temporalValue)
      Creates a function invocation for time({}). See time. This creates a time from a string.
      Parameters:
      temporalValue - An expression representing a temporal value.
      Returns:
      A function call for time({}).
      Since:
      2023.9.0
    • duration

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation duration(@NotNull @NotNull MapExpression components)
      Creates a function invocation for duration({}). See duration. This is the most generic form.
      Parameters:
      components - The map to pass to duration({})
      Returns:
      A function call for duration({}).
      Since:
      2023.9.0
    • duration

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation duration(@NotNull @NotNull String temporalAmount)
      Creates a function invocation for duration({}). See duration. This creates a duration from a string.
      Parameters:
      temporalAmount - A string representing a temporal amount.
      Returns:
      A function call for duration({}).
      Since:
      2023.9.0
    • duration

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation duration(@NotNull @NotNull Expression temporalAmount)
      Creates a function invocation for duration({}). See duration. This creates a duration from a string.
      Parameters:
      temporalAmount - An expression representing a temporal amount.
      Returns:
      A function call for duration({}).
      Since:
      2023.9.0
    • shortestPath

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation shortestPath(Relationship relationship)
      Creates a function invocation for shortestPath({}).
      Parameters:
      relationship - The relationship to be passed to shortestPath.
      Returns:
      A function call for shortestPath({}).
      Since:
      2023.9.0
    • reduce

      @Contract(pure=true) @NotNull public static Reduction.OngoingDefinitionWithVariable reduce(@NotNull @NotNull SymbolicName variable)
      Starts building a function invocation for reduce({}).
      Parameters:
      variable - The closure will have a variable introduced in its context. We decide here which variable to use.
      Returns:
      An ongoing definition for a function call to reduce({}).
      Since:
      2023.9.0
    • abs

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation abs(@NotNull @NotNull Expression expression)
      Creates a function invocation for abs({}). See abs.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for abs({}).
      Since:
      2023.9.0
    • ceil

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation ceil(@NotNull @NotNull Expression expression)
      Creates a function invocation for ceil({}). See ceil.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for ceil({}).
      Since:
      2023.9.0
    • floor

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation floor(@NotNull @NotNull Expression expression)
      Creates a function invocation for floor({}). See floor.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for floor({}).
      Since:
      2023.9.0
    • rand

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation rand()
      Creates a function invocation for rand({}). See rand.
      Returns:
      A function call for rand({}).
      Since:
      2023.9.0
    • round

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation round(Expression value, Expression... expression)
      Creates a function invocation for round({}). See round.
      Parameters:
      value - The value to round
      expression - Additional parameters, length must be 0, 1 or 2: First entry is the precision, second is the rounding mode
      Returns:
      A function call for round({}).
      Since:
      2023.9.0
    • sign

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation sign(@NotNull @NotNull Expression expression)
      Creates a function invocation for sign({}). See sign.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for sign({}).
      Since:
      2023.9.0
    • e

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation e()
      Creates a function invocation for e({}). See e.
      Returns:
      A function call for e({}).
      Since:
      2023.9.0
    • exp

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation exp(@NotNull @NotNull Expression expression)
      Creates a function invocation for exp({}). See exp.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for exp({}).
      Since:
      2023.9.0
    • log

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation log(@NotNull @NotNull Expression expression)
      Creates a function invocation for log({}). See log.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for log({}).
      Since:
      2023.9.0
    • log10

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation log10(@NotNull @NotNull Expression expression)
      Creates a function invocation for log10({}). See log10.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for log10({}).
      Since:
      2023.9.0
    • sqrt

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation sqrt(@NotNull @NotNull Expression expression)
      Creates a function invocation for sqrt({}). See sqrt.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for sqrt({}).
      Since:
      2023.9.0
    • acos

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation acos(@NotNull @NotNull Expression expression)
      Creates a function invocation for acos({}). See acos.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for acos({}).
      Since:
      2023.9.0
    • asin

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation asin(@NotNull @NotNull Expression expression)
      Creates a function invocation for asin({}). See asin.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for asin({}).
      Since:
      2023.9.0
    • atan

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation atan(@NotNull @NotNull Expression expression)
      Creates a function invocation for atan({}). See atan.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for atan({}).
      Since:
      2023.9.0
    • atan2

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation atan2(@NotNull @NotNull Expression y, @NotNull @NotNull Expression x)
      Creates a function invocation for atan2({}). See atan2.
      Parameters:
      y - the y value of a point
      x - the x value of a point
      Returns:
      A function call for atan2({}).
      Since:
      2023.9.0
    • cos

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation cos(@NotNull @NotNull Expression expression)
      Creates a function invocation for cos({}). See cos.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for cos({}).
      Since:
      2023.9.0
    • cot

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation cot(@NotNull @NotNull Expression expression)
      Creates a function invocation for cot({}). See cot.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for cot({}).
      Since:
      2023.9.0
    • degrees

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation degrees(@NotNull @NotNull Expression expression)
      Creates a function invocation for degrees({}). See degrees.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for degrees({}).
      Since:
      2023.9.0
    • haversin

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation haversin(@NotNull @NotNull Expression expression)
      Creates a function invocation for haversin({}). See haversin.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for haversin({}).
      Since:
      2023.9.0
    • pi

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation pi()
      Creates a function invocation for pi({}). See pi.
      Returns:
      A function call for pi({}).
      Since:
      2023.9.0
    • radians

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation radians(@NotNull @NotNull Expression expression)
      Creates a function invocation for radians({}). See radians.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for radians({}).
      Since:
      2023.9.0
    • sin

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation sin(@NotNull @NotNull Expression expression)
      Creates a function invocation for sin({}). See sin.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for sin({}).
      Since:
      2023.9.0
    • tan

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation tan(@NotNull @NotNull Expression expression)
      Creates a function invocation for tan({}). See tan.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for tan({}).
      Since:
      2023.9.0
    • toInteger

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toInteger(@NotNull @NotNull Expression expression)
      Creates a function invocation for toInteger({}). See toInteger.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for toInteger({}).
      Since:
      2023.9.0
    • toString

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toString(@NotNull @NotNull Expression expression)
      Creates a function invocation for toString({}). See toString.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for toString({}).
      Since:
      2023.9.0
    • toStringOrNull

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toStringOrNull(@NotNull @NotNull Expression expression)
      Creates a function invocation for toStringOrNull({}). See toStringOrNull.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for toStringOrNull({}).
      Since:
      2023.9.0
    • toFloat

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toFloat(@NotNull @NotNull Expression expression)
      Creates a function invocation for toFloat({}). See toFloat.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for toFloat({}).
      Since:
      2023.9.0
    • toBoolean

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation toBoolean(@NotNull @NotNull Expression expression)
      Creates a function invocation for toBoolean({}). See toBoolean.
      Parameters:
      expression - The value to pass to the function.
      Returns:
      A function call for toBoolean({}).
      Since:
      2023.9.0
    • linenumber

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation linenumber()
      Creates a function invocation for linenumber({}). Only applicable inside an LOAD CSV clause.
      Returns:
      A function call for linenumber({}).
      Since:
      2023.9.0
    • file

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation file()
      Creates a function invocation for file({}). Only applicable inside an LOAD CSV clause.
      Returns:
      A function call for file({}).
      Since:
      2023.9.0
    • randomUUID

      public static FunctionInvocation randomUUID()
      Creates a function invocation for randomUUID({}). Only applicable inside an LOAD CSV clause.
      Returns:
      A function call for randomUUID({}).
      Since:
      2023.9.0
    • length

      @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation length(@NotNull @NotNull NamedPath path)
      Creates a function invocation for length(). See length.
      Parameters:
      path - The path for which the length should be retrieved
      Returns:
      A function call for length() on a path.
      Since:
      2023.9.0
    • graphNames

      @Neo4jVersion(minimum="5.0.0") @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation graphNames()
      Creates a function invocation for graph.names(). See graph.names.
      Returns:
      A function call for graph.names().
      Since:
      2023.9.0
    • graphPropertiesByName

      @Neo4jVersion(minimum="5.0.0") @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation graphPropertiesByName(Expression name)
      Creates a function invocation for graph.propertiesByName(). See graph.propertiesByName.
      Parameters:
      name - The name of the graph
      Returns:
      A function call for graph.propertiesByName().
      Since:
      2023.9.0
    • graphByName

      @Neo4jVersion(minimum="5.0.0") @Contract(pure=true) @NotNull public static @NotNull FunctionInvocation graphByName(Expression name)
      Creates a function invocation for graph.byName(). See graph.byName.
      Parameters:
      name - The name of the graph
      Returns:
      A function call for graph.byName().
      Since:
      2023.9.0
    • createProjection

      public static MapProjection createProjection(SymbolicName name, Object... content)
      Create a new map projection with the given, mixed content
      Parameters:
      name - The symbolic name of this project
      content - The projected content
      Returns:
      A new map projection
      Since:
      2023.9.0
    • 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:
      2023.9.0
    • 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:
      2023.9.0
    • concat

      public static Operation concat(Expression op1, Expression op2)
    • add

      public static Operation add(Expression op1, Expression op2)
    • subtract

      public static Operation subtract(Expression op1, Expression op2)
    • multiply

      public static Operation multiply(Expression op1, Expression op2)
    • divide

      public static Operation divide(Expression op1, Expression op2)
    • remainder

      public static Operation remainder(Expression op1, Expression op2)
    • pow

      public static Operation pow(Expression op1, Expression op2)
    • 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:
      2023.9.0
    • 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:
      2023.9.0
    • 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:
      2023.9.0
    • setLabel

      public static Operation setLabel(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:
      2023.9.0
    • removeLabel

      public static Operation removeLabel(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:
      2023.9.0
    • exists

      @Contract(pure=true) @NotNull public static @NotNull Condition exists(Property property)
      Creates a new condition based on a function invocation for the exists() function. See exists.
      Parameters:
      property - The property to be passed to exists()
      Returns:
      A function call for exists() for one property
      Since:
      2023.9.0
    • exists

      @Contract(pure=true) @NotNull public static @NotNull Condition exists(RelationshipPattern pattern)
      Creates a new condition based on a function invocation for the exists() function. See exists.
      Parameters:
      pattern - The pattern to be passed to exists()
      Returns:
      A function call for exists() for one pattern
      Since:
      2023.9.0
    • exists

      public static Condition exists(Statement statement, IdentifiableElement... imports)
      Creates a new condition via an existential sub-query. The statement may or may not have a RETURN clause. It must however not contain any updates. While it would render syntactically correct Cypher, Neo4j does not support updates inside existential sub-queries.
      Parameters:
      statement - The statement to be passed to exists{}
      imports - Optional imports to be used in the statement (will be imported with WITH)
      Returns:
      An existential sub-query.
      Since:
      2023.9.0
    • exists

      public static Condition exists(PatternElement pattern)
      Creates a new condition via an existential sub-query based on the list of patterns
      Parameters:
      pattern - the pattern that must exists
      Returns:
      An existential sub-query.
      Since:
      2023.9.0
    • exists

      public static Condition exists(List<PatternElement> pattern)
      Creates a new condition via an existential sub-query based on the list of patterns
      Parameters:
      pattern - the list of patterns that must exists
      Returns:
      An existential sub-query.
      Since:
      2023.9.0
    • exists

      public static Condition exists(List<PatternElement> pattern, @Nullable @Nullable Where where)
      Creates a new condition via an existential sub-query based on the list of patterns and an optional where-clause.
      Parameters:
      pattern - the list of patterns that must exists
      where - an optional where-clause
      Returns:
      An existential sub-query.
      Since:
      2023.9.0
    • all

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction all(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the all() predicate function
      Since:
      2023.9.0
      See Also:
    • all

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction all(SymbolicName variable)
      Starts building a new condition based on a function invocation for the all() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the all() predicate function
      Since:
      2023.9.0
    • any

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction any(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the any() predicate function
      Since:
      2023.9.0
      See Also:
    • any

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction any(SymbolicName variable)
      Starts building a new condition based on a function invocation for the any() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the any() predicate function
      Since:
      2023.9.0
    • none

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction none(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the none() predicate function
      Since:
      2023.9.0
      See Also:
    • none

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction none(SymbolicName variable)
      Starts building a new condition based on a function invocation for the none() function. See exists.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the none() predicate function
      Since:
      2023.9.0
    • single

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction single(String variable)
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the single() predicate function
      Since:
      2023.9.0
      See Also:
    • single

      @Contract(pure=true) @NotNull public static Predicates.OngoingListBasedPredicateFunction single(SymbolicName variable)
      Starts building a new condition based on a function invocation for the single() function. See single.
      Parameters:
      variable - The variable referring to elements of a list
      Returns:
      A builder for the single() predicate function
      Since:
      2023.9.0