java.lang.Object
org.neo4j.cypherdsl.core.Expressions
Utility methods for dealing with expressions.
- Since:
- 1.0
- Author:
- Michael J. Simons
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSomething that can build counting sub-queries. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull CountExpressioncount(PatternElement requiredPattern, PatternElement... patternElement) Creates a COUNT sub-query expressions from at least one pattern.static @NotNull CountExpressioncount(Statement.UnionQuery union) Creates a COUNT with an inner UNION sub-query.static @NotNull CountExpressioncount(Statement statement, IdentifiableElement... imports) Creates a COUNT from a full statement, including its filters and conditions.Start building a new sub-query expression by importing variables into the scope with a WITH clause.with(IdentifiableElement... identifiableElements) Start building a new sub-query expression by importing variables into the scope with a WITH clause.
-
Method Details
-
count
@NotNull public static @NotNull CountExpression count(PatternElement requiredPattern, PatternElement... patternElement) Creates a COUNT sub-query expressions from at least one pattern.- Parameters:
requiredPattern- One pattern is requiredpatternElement- Optional pattern- Returns:
- The immutable
CountExpression - Since:
- 2023.0.0
-
count
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) 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 tocount{}imports- Optional imports to be used in the statement (will be imported with WITH)- Returns:
- A counting sub-query.
- Since:
- 2023.1.0
-
with
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
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
-