Class Expressions

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

@API(status=DEPRECATED, since="2023.9.0") @Deprecated(since="2023.9.0") public final class Expressions extends Object
Deprecated.
use Cypher instead. This class will become package private in the next major release and no longer be accessible.
Utility methods for dealing with expressions.
Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • count

      @NotNull public static @NotNull CountExpression count(PatternElement requiredPattern, PatternElement... patternElement)
      Deprecated.
      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.0.0
    • count

      @NotNull public static @NotNull CountExpression count(Statement.UnionQuery union)
      Deprecated.
      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.0.0
    • count

      @NotNull public static @NotNull CountExpression count(Statement statement, IdentifiableElement... imports)
      Deprecated.
      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.1.0
    • count

      public static CountExpression count(List<PatternElement> pattern, @Nullable @Nullable Where where)
      Deprecated.
      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
    • with

      @Deprecated public static Expressions.SubqueryExpressionBuilder with(String... identifiableElements)
      Deprecated.
      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.0.0
    • with

      @Deprecated public static Expressions.SubqueryExpressionBuilder with(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.0.0
    • collect

      @NotNull public static @NotNull Expression collect(Statement statement)
      Deprecated.
      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.8.0