Interface ReactiveNeo4jClient


@API(status=STABLE, since="6.0") public interface ReactiveNeo4jClient
Reactive Neo4j client. The main difference to the imperative Neo4j client is the fact that all operations will only be executed once something subscribes to the reactive sequence defined.
Since:
6.0
Author:
Michael J. Simons
  • Field Details

  • Method Details

    • create

      static ReactiveNeo4jClient create(org.neo4j.driver.Driver driver)
    • create

      static ReactiveNeo4jClient create(org.neo4j.driver.Driver driver, ReactiveDatabaseSelectionProvider databaseSelectionProvider)
    • with

      static ReactiveNeo4jClient.Builder with(org.neo4j.driver.Driver driver)
    • getQueryRunner

      default reactor.core.publisher.Mono<org.neo4j.driver.reactivestreams.ReactiveQueryRunner> getQueryRunner()
      Returns:
      A managed query runner
      Since:
      6.2
      See Also:
    • getQueryRunner

      default reactor.core.publisher.Mono<org.neo4j.driver.reactivestreams.ReactiveQueryRunner> getQueryRunner(reactor.core.publisher.Mono<DatabaseSelection> databaseSelection)
      Returns:
      A managed query runner
      Since:
      6.2
      See Also:
    • getQueryRunner

      reactor.core.publisher.Mono<org.neo4j.driver.reactivestreams.ReactiveQueryRunner> getQueryRunner(reactor.core.publisher.Mono<DatabaseSelection> databaseSelection, reactor.core.publisher.Mono<UserSelection> userSelection)
      Retrieves a query runner that will participate in ongoing Spring transactions (either in declarative (implicit via @Transactional) or in programmatically (explicit via transaction template) ones). This runner can be used with the Cypher-DSL for example. If the client cannot retrieve an ongoing Spring transaction, this runner will use auto-commit semantics.
      Parameters:
      databaseSelection - The target database.
      userSelection - The user selection
      Returns:
      A managed query runner
      Since:
      6.2
    • query

      Entrypoint for creating a new Cypher query. Doesn't matter at this point whether it's a match, merge, create or removal of things.
      Parameters:
      cypher - The cypher code that shall be executed
      Returns:
      A new CypherSpec
    • query

      Entrypoint for creating a new Cypher query based on a supplier. Doesn't matter at this point whether it's a match, merge, create or removal of things. The supplier can be an arbitrary Supplier that may provide a DSL for generating the Cypher statement.
      Parameters:
      cypherSupplier - A supplier of arbitrary Cypher code
      Returns:
      A runnable query specification.
    • delegateTo

      <T> ReactiveNeo4jClient.OngoingDelegation<T> delegateTo(Function<org.neo4j.driver.reactivestreams.ReactiveQueryRunner,reactor.core.publisher.Mono<T>> callback)
      Delegates interaction with the default database to the given callback.
      Type Parameters:
      T - The type of the result being produced
      Parameters:
      callback - A function receiving a reactive statement runner for database interaction that can optionally return a publisher with none or exactly one element
      Returns:
      A single publisher containing none or exactly one element that will be produced by the callback
    • getDatabaseSelectionProvider

      @Nullable ReactiveDatabaseSelectionProvider getDatabaseSelectionProvider()
      Returns the assigned database selection provider.
      Returns:
      The database selection provider - can be null