Interface PatternElement

All Superinterfaces:
Visitable
All Known Subinterfaces:
Node, Relationship, RelationshipPattern
All Known Implementing Classes:
NamedPath, NodeBase, ParenthesizedPathPattern, QuantifiedPathPattern, QuantifiedPathPattern.TargetPattern, RelationshipBase, RelationshipChain

@API(status=STABLE, since="1.0") public interface PatternElement extends Visitable
Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • where

      @Neo4jVersion(minimum="5.0") @NotNull @Contract(pure=true) default @NotNull PatternElement where(@Nullable @Nullable Expression predicate)
      Creates a new PatternElement which including an additional filter. Returns this pattern. when predicate is literal null.

      The pattern might be a node pattern or a relationship pattern.

      A WHERE on a pattern is only supported from Neo4j 5.0 onwards.

      Parameters:
      predicate - the predicate to filter on
      Returns:
      a new pattern element or this instance if the predicate to this method was literal null
      Throws:
      UnsupportedOperationException - In cases the underlying element does not support a WHERE clause
      Since:
      2023.9.0