Interface ReactiveExecutableStatement

All Superinterfaces:
ExecutableStatement
All Known Subinterfaces:
ReactiveExecutableResultStatement

@API(status=STABLE, since="2021.2.1") public interface ReactiveExecutableStatement extends ExecutableStatement
This is an extended version of the ExecutableStatement, spotting an additional executeWith(ReactiveQueryRunner) that runs a statement in a reactive fashion.

The usage of this interface require Project Reactor on the class path with org.reactivestreams and reactor.core being the corresponding Java modules.

Since:
2021.2.1
Author:
Michael J. Simons
  • Method Details

    • makeExecutable

      static ReactiveExecutableStatement makeExecutable(Statement statement)
      Creates an executable statement based on the given statement
      Parameters:
      statement - Any Cypher-DSL statement
      Returns:
      An executable statement. Maybe a ExecutableResultStatement, depending on the input.
      See Also:
    • makeExecutable

      static ReactiveExecutableResultStatement makeExecutable(ResultStatement statement)
      Creates an executable result statement based on the given statement
      Parameters:
      statement - A Cypher-DSL result statement
      Returns:
      An executable result statement.
      See Also:
    • of

      static ReactiveExecutableStatement of(Statement statement)
      Creates an executable statement based on the given statement
      Parameters:
      statement - Any Cypher-DSL statement
      Returns:
      An executable statement. Maybe a ExecutableResultStatement, depending on the input.
      See Also:
    • of

      Creates an executable result statement based on the given statement
      Parameters:
      statement - A Cypher-DSL result statement
      Returns:
      An executable result statement.
      See Also:
    • executeWith

      org.reactivestreams.Publisher<org.neo4j.driver.summary.ResultSummary> executeWith(org.neo4j.driver.reactivestreams.ReactiveQueryRunner queryRunner)
      If the Neo4j Java Driver is on the classpath, this method can be used to pass a ReactiveQueryRunner to the statement, execute it and retrieve a result summary in a reactive fashion. This method also requires Project Reactor to be available.

      All parameters with given values will be passed to the database. Please have a look at ResultStatement for further details about parameter conversions

      No resources passed to this method (neither sessions, transactions nor other query runners) will be closed. Resources opened inside the method will be closed.

      No statement will be generated and no parameters will be converted unless something subscribes to the result.

      Parameters:
      queryRunner - a reactive query runner
      Returns:
      A publisher of a result summary (including server information, counters etc).
      Since:
      2021.2.1