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, Ali Ince
  • Method Details

    • node

      public static 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

      public static 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

      public static 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

      public static 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

      public static Node anyNode()
      Returns a node matching any node.
      Returns:
      a node matching any node
    • exactlyLabel

      public static Labels exactlyLabel(String label)
      Creates an expression that matches the given label exactly. Can be used as starting point to add conditions via Labels.and(Labels) or Labels.or(Labels).
      Parameters:
      label - the label to match
      Returns:
      a label expression
    • allLabels

      public static Labels allLabels(Expression expression)
      Creates a dynamic label expression matching all labels to which expression resolves.
      Parameters:
      expression - the expression that must resolve to a string or a list of strings
      Returns:
      a dynamic label expression
      Since:
      2025.1.0
    • anyLabel

      public static Labels anyLabel(Expression expression)
      Creates a dynamic label expression matching any label to which expression resolves.
      Parameters:
      expression - the expression that must resolve to a string or a list of strings
      Returns:
      a dynamic label expression
      Since:
      2025.1.0
    • node

      @Deprecated(forRemoval=true) public static Node node(LabelExpression labelExpression)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new Node object.
      Parameters:
      labelExpression - required expression
      Returns:
      a node matching a label expression
      Since:
      2023.0.2
    • node

      public static Node node(Labels labels)
      Creates a new Node object.
      Parameters:
      labels - required expression
      Returns:
      a node matching the given labels
      Since:
      2025.1.0
    • asterisk

      public static Asterisk asterisk()
      Returns the '*' wildcard literal.
      Returns:
      the '*' wildcard literal
    • anyNode

      public static Node anyNode(String symbolicName)
      Creates a new unlabeled Node object.
      Parameters:
      symbolicName - the new symbolic name
      Returns:
      a node matching any node with the symbolic the given symbolicName.
    • anyNode

      public static Node anyNode(SymbolicName symbolicName)
      Creates a new unlabeled Node object.
      Parameters:
      symbolicName - the new symbolic name
      Returns:
      a node matching any node with the symbolic the given symbolicName.
    • property

      public static 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

      public static 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

      public static Property property(Expression expression, String... names)
      Dereferences a property on an 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

      public static 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

      public static 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

      public static Property property(Expression expression, Expression lookup)
      Creates a dynamic lookup of a property on an 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

      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

      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
    • shortestK

      public static NamedPath.OngoingShortestDefinition shortestK(int k)
      Returns an ongoing definition of a named path, returning the k shortest paths.
      Parameters:
      k - the number of shortest groups to return
      Returns:
      an ongoing definition of a named path, returning the k shortest paths.
      Since:
      2024.7.0
    • shortestKGroups

      public static NamedPath.OngoingShortestDefinition shortestKGroups(int k)
      Returns an ongoing definition of a named path, returning the k shortest groups of points.
      Parameters:
      k - the number of shortest groups to return
      Returns:
      an ongoing definition of a named path, returning the k shortest groups of paths.
      Since:
      2024.7.0
    • anyShortest

      public static NamedPath.OngoingShortestDefinition anyShortest()
      Returns an ongoing definition of a named path, returning any shortest path.
      Returns:
      an ongoing definition of a named path, returning any shortest path
      Since:
      2024.7.0
    • allShortest

      public static NamedPath.OngoingShortestDefinition allShortest()
      Returns an ongoing definition of a named path, returning all shortest paths.
      Returns:
      an ongoing definition of a named path, returning all shortest paths
      Since:
      2024.7.0
    • name

      public static SymbolicName name(String value)
      Creates a new symbolic name.
      Parameters:
      value - the value of the symbolic name
      Returns:
      a new symbolic name
    • parameter

      public static 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

      public static <T> 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

      public static <T> 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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static <T> 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

      public static Literal<Boolean> literalTrue()
      Returns the `TRUE` literal.
      Returns:
      the `TRUE` literal
    • literalFalse

      public static Literal<Boolean> literalFalse()
      Returns the `FALSE` literal.
      Returns:
      the `FALSE` literal
    • literalNull

      public static Literal<Void> literalNull()
      Returns the `NULL` literal.
      Returns:
      the `NULL` literal
    • union

      public static 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

      public static 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

      public static 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

      public static 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

      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

      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

      public static 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

      public static 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

      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

      public static 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

      public static Case caseExpression()
      Returns generic case expression start.
      Returns:
      generic case expression start
    • caseExpression

      public static Case caseExpression(Expression expression)
      Starts building a CASE expression.
      Parameters:
      expression - initial expression for the simple case statement
      Returns:
      simple case expression start
    • call

      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

      public static 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

      public static 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

      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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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
    • callRawCypher

      public static ExposesSubqueryCall.BuildableSubquery callRawCypher(String rawCypher, Object... args)
      Starts building a statement from a raw Cypher string that might also have arguments as supported through raw(String, Object...). Use this method as your own risk and be aware that no checks are done on the Cypher.
      Parameters:
      rawCypher - the raw Cypher statement to call
      args - optional args that replace placeholders in the rawCypher
      Returns:
      ongoing sub-query definition based on the raw Cypher statement.
      Since:
      2024.2.0
    • returningRaw

      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

      public static <FE> 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

      public static 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

      public static ExposesLoadCSV usingPeriodicCommit(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

      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)
      A condition testing if the given relationship pattern matches.
      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 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:
      a "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:
      a "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:
      a "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:
      a "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:
      a "greater than" comparison
      Since:
      2023.9.0
    • not

      public static Condition not(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

      public static Condition not(RelationshipPattern pattern)
      Negates the given pattern element: The pattern must not matche 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

      public static 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()
      Creates a |true condition.
      Returns:
      a condition that is always true.
      Since:
      2023.9.0
    • isFalse

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

      public static Condition hasLabelsOrType(SymbolicName symbolicName, String... labelsOrTypes)
      Checks if a given object has the given labels or types.
      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
    • hasLabelsOrType

      public static Condition hasLabelsOrType(SymbolicName symbolicName, Labels labels)
      Checks if a given object has the given labels or types.
      Parameters:
      symbolicName - reference to the entity that should be checked for labels or types
      labels - the expression 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:
      2025.1.0
    • count

      public static 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

      public static 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

      public static 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, 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

      public static 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)
      Returns the name of the given expression or the expression itself if it isn't named.
      Type Parameters:
      T - the tyoe of the 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") public static FunctionInvocation elementId(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") public static FunctionInvocation elementId(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

      public static FunctionInvocation keys(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

      public static FunctionInvocation keys(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

      public static FunctionInvocation keys(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

      public static FunctionInvocation labels(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

      public static FunctionInvocation labels(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

      public static FunctionInvocation type(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

      public static FunctionInvocation type(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

      public static FunctionInvocation count(Node node)
      Creates an instance of the count function.
      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

      public static 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

      public static FunctionInvocation countDistinct(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

      public static 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

      public static 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

      public static 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

      public static FunctionInvocation properties(MapExpression map)
      Creates a function invocation for properties()) on maps.
      Parameters:
      map - the map whose properties should be returned.
      Returns:
      a function call for properties())
      Since:
      2023.9.0
    • coalesce

      public static 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

      public static 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

      public static FunctionInvocation ltrim(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

      public static 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

      public static FunctionInvocation reverse(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

      public static 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

      public static FunctionInvocation rtrim(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

      public static 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

      public static FunctionInvocation toLower(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

      public static FunctionInvocation toUpper(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

      public static FunctionInvocation trim(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

      public static FunctionInvocation split(Expression expression, 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

      public static FunctionInvocation split(Expression expression, 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

      public static 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

      public static 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

      public static FunctionInvocation exists(Expression expression)
      Creates a function invocation for the exists() function. See exists.
      Parameters:
      expression - the expression whose existence is to be evaluated
      Returns:
      a function call for exists() for one expression
      Since:
      2023.9.0
    • distance

      public static FunctionInvocation distance(Expression point1, 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static FunctionInvocation collect(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

      public static FunctionInvocation collectDistinct(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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static FunctionInvocation range(Integer start, Integer end)
      Creates a function invocation for the range() function.
      Parameters:
      start - the range's start
      end - the range's end
      Returns:
      a function call for range()
      Since:
      2023.9.0
      See Also:
    • range

      public static FunctionInvocation range(Expression start, Expression end)
      Creates a function invocation for the range() function.
      Parameters:
      start - the range's start
      end - the range's end
      Returns:
      a function call for range()
      Since:
      2023.9.0
      See Also:
    • range

      public static FunctionInvocation range(Integer start, 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

      public static FunctionInvocation range(Expression start, 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

      public static 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

      public static 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

      public static FunctionInvocation nodes(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

      public static FunctionInvocation nodes(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

      public static FunctionInvocation relationships(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

      public static FunctionInvocation relationships(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

      public static FunctionInvocation startNode(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

      public static FunctionInvocation endNode(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

      public static 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

      public static 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

      public static 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

      public static 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

      public static 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

      public static FunctionInvocation date(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

      public static FunctionInvocation date(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

      public static FunctionInvocation date(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

      public static FunctionInvocation datetime()
      Creates a function invocation for datetime({}). See datetime.
      Returns:
      a function call for datetime({}).
      Since:
      2023.9.0
    • datetime

      public static FunctionInvocation datetime(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

      public static FunctionInvocation datetime(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

      public static FunctionInvocation datetime(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

      public static FunctionInvocation datetime(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

      public static FunctionInvocation localdatetime()
      Creates a function invocation for localdatetime({}). See localdatetime.
      Returns:
      a function call for localdatetime({}).
      Since:
      2023.9.0
    • localdatetime

      public static FunctionInvocation localdatetime(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

      public static FunctionInvocation localdatetime(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

      public static FunctionInvocation localdatetime(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

      public static FunctionInvocation localdatetime(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

      public static FunctionInvocation localtime()
      Creates a function invocation for localtime({}). See localtime.
      Returns:
      a function call for localtime({}).
      Since:
      2023.9.0
    • localtime

      public static FunctionInvocation localtime(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

      public static FunctionInvocation localtime(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

      public static FunctionInvocation localtime(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

      public static FunctionInvocation localtime(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

      public static FunctionInvocation time()
      Creates a function invocation for time({}). See time.
      Returns:
      a function call for time({}).
      Since:
      2023.9.0
    • time

      public static FunctionInvocation time(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

      public static FunctionInvocation time(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

      public static FunctionInvocation time(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

      public static FunctionInvocation time(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

      public static FunctionInvocation duration(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

      public static FunctionInvocation duration(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

      public static FunctionInvocation duration(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
    • reduce

      public static Reduction.OngoingDefinitionWithVariable reduce(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

      public static FunctionInvocation abs(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

      public static FunctionInvocation ceil(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

      public static FunctionInvocation floor(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

      public static FunctionInvocation rand()
      Creates a function invocation for rand({}). See rand.
      Returns:
      a function call for rand({}).
      Since:
      2023.9.0
    • round

      public static 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

      public static FunctionInvocation sign(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

      public static FunctionInvocation e()
      Creates a function invocation for e({}). See e.
      Returns:
      a function call for e({}).
      Since:
      2023.9.0
    • exp

      public static FunctionInvocation exp(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

      public static FunctionInvocation log(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

      public static FunctionInvocation log10(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

      public static FunctionInvocation sqrt(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

      public static FunctionInvocation acos(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

      public static FunctionInvocation asin(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

      public static FunctionInvocation atan(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

      public static FunctionInvocation atan2(Expression y, 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

      public static FunctionInvocation cos(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

      public static FunctionInvocation cot(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

      public static FunctionInvocation degrees(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

      public static FunctionInvocation haversin(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

      public static FunctionInvocation pi()
      Creates a function invocation for pi({}). See pi.
      Returns:
      a function call for pi({}).
      Since:
      2023.9.0
    • radians

      public static FunctionInvocation radians(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

      public static FunctionInvocation sin(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

      public static FunctionInvocation tan(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

      public static FunctionInvocation toInteger(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

      public static FunctionInvocation toString(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

      public static FunctionInvocation toStringOrNull(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

      public static FunctionInvocation toFloat(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

      public static FunctionInvocation toBoolean(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

      public static 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

      public static 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

      public static FunctionInvocation length(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") public static 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") public static 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") public static 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 to 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
    • setLabel

      public static Operation setLabel(Node target, Labels label)
      Creates an operation adding dynamic labels to a node.
      Parameters:
      target - the target of the new labels
      label - the labels to be added
      Returns:
      a set operation
      Since:
      2025.1.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

      public static 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

      public static 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, 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

      public static OngoingListBasedPredicateFunction all(String variable)
      Starts building an ALL predicate.
      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

      public static 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

      public static OngoingListBasedPredicateFunction any(String variable)
      Starts building a ANY predicate.
      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

      public static 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

      public static OngoingListBasedPredicateFunction none(String variable)
      Starts building a NONE predicate.
      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

      public static 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

      public static OngoingListBasedPredicateFunction single(String variable)
      Starts building a SINGLE predicate.
      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

      public static 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