Module org.neo4j.cypherdsl.core
Package org.neo4j.cypherdsl.core
Interface SubqueryExpressionBuilder
- All Known Subinterfaces:
Expressions.SubqueryExpressionBuilder
@API(status=STABLE,
since="2023.9.0")
public interface SubqueryExpressionBuilder
Something that can build counting sub-queries. Might be used in the future for existential sub-queries, too.
- Since:
- 2023.9.0
-
Method Summary
Modifier and TypeMethodDescriptionCreates a COLLECT subquery from a statement, including its filters and conditions.@NotNull CountExpression
count
(PatternElement requiredPattern, PatternElement... patternElement) Creates a COUNT sub-query expressions from at least one pattern.@NotNull CountExpression
count
(Statement.UnionQuery union) Creates a COUNT with an inner UNION sub-query.
-
Method Details
-
count
@NotNull @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.9.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.9.0
-
collect
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.To avoid confusion, shadowing of imported variables is not allowed. An outside scope variable is shadowed when a newly introduced variable within the inner scope is defined with the same variable.
- Parameters:
statement
- the statement to be passed toCOLLECT{}
- Returns:
- a collecting sub-query.
- Since:
- 2023.9.0
-