Class Subquery

java.lang.Object
org.neo4j.cypherdsl.core.Subquery
All Implemented Interfaces:
Visitable, Clause

@API(status=STABLE, since="2020.1.2") @Neo4jVersion(minimum="4.0.0") public final class Subquery extends Object implements Clause
Represents a "callable" sub-query. A sub-query can contain statement that returns something (standard statements, union statements and calls to stored procedures, yielding their elements). Sub-queries can be nested.
Since:
2020.1.2
Author:
Michael J. Simons
Neo4j version required
4.0.0
  • Method Details

    • accept

      public void accept(Visitor visitor)
      Description copied from interface: Visitable
      Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - the visitor to notify, must not be null.
    • doesReturnOrYield

      @API(status=INTERNAL) public boolean doesReturnOrYield()
      Returns:
      true if this sub-query yields any items
    • toString

      public final String toString()
      Description copied from interface: Visitable
      Most visitables will render themselves into a Cypher fragment preceded with the actual classname. The representation however is not cached - in contrast to the ones for full statements. Using toString is recommended for debugging purposes mainly, and not for production use.

      The concrete classname has been prepended to help debugging and actually to discourage using fragments to build queries without explicitly rendering them, either as statement or going through the renderer on purpose.

      Specified by:
      toString in interface Visitable
      Overrides:
      toString in class Object
      Returns:
      A string representation of this visitable formatted as Classname{cypher=value}