@API(status=STABLE,
since="6.0")
public interface ReactiveNeo4jClient
imperative Neo4j client
is the fact that all
operations will only be executed once something subscribes to the reactive sequence defined.Modifier and Type | Interface and Description |
---|---|
static interface |
ReactiveNeo4jClient.MappingSpec<T> |
static interface |
ReactiveNeo4jClient.OngoingDelegation<T>
A contract for an ongoing delegation in the selected database.
|
static interface |
ReactiveNeo4jClient.RecordFetchSpec<T> |
static interface |
ReactiveNeo4jClient.RunnableDelegation<T>
A runnable delegation.
|
static interface |
ReactiveNeo4jClient.RunnableSpec
Contract for a runnable query that can be either run returning it's result, run without results or be
parameterized.
|
static interface |
ReactiveNeo4jClient.RunnableSpecTightToDatabase
Contract for a runnable query inside a dedicated database.
|
Modifier and Type | Field and Description |
---|---|
static LogAccessor |
cypherLog |
Modifier and Type | Method and Description |
---|---|
static ReactiveNeo4jClient |
create(org.neo4j.driver.Driver driver) |
static ReactiveNeo4jClient |
create(org.neo4j.driver.Driver driver,
ReactiveDatabaseSelectionProvider databaseSelectionProvider) |
<T> ReactiveNeo4jClient.OngoingDelegation<T> |
delegateTo(Function<org.neo4j.driver.reactive.RxQueryRunner,reactor.core.publisher.Mono<T>> callback)
Delegates interaction with the default database to the given callback.
|
ReactiveDatabaseSelectionProvider |
getDatabaseSelectionProvider()
Returns the assigned database selection provider.
|
default reactor.core.publisher.Mono<org.neo4j.driver.reactive.RxQueryRunner> |
getQueryRunner() |
reactor.core.publisher.Mono<org.neo4j.driver.reactive.RxQueryRunner> |
getQueryRunner(reactor.core.publisher.Mono<DatabaseSelection> databaseSelection)
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). |
ReactiveNeo4jClient.RunnableSpec |
query(String cypher)
Entrypoint for creating a new Cypher query.
|
ReactiveNeo4jClient.RunnableSpec |
query(Supplier<String> cypherSupplier)
Entrypoint for creating a new Cypher query based on a supplier.
|
static final LogAccessor cypherLog
static ReactiveNeo4jClient create(org.neo4j.driver.Driver driver)
static ReactiveNeo4jClient create(org.neo4j.driver.Driver driver, ReactiveDatabaseSelectionProvider databaseSelectionProvider)
default reactor.core.publisher.Mono<org.neo4j.driver.reactive.RxQueryRunner> getQueryRunner()
getQueryRunner(Mono)
reactor.core.publisher.Mono<org.neo4j.driver.reactive.RxQueryRunner> getQueryRunner(reactor.core.publisher.Mono<DatabaseSelection> databaseSelection)
@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.databaseSelection
- The target database.ReactiveNeo4jClient.RunnableSpec query(String cypher)
cypher
- The cypher code that shall be executedReactiveNeo4jClient.RunnableSpec query(Supplier<String> cypherSupplier)
cypherSupplier
- A supplier of arbitrary Cypher code<T> ReactiveNeo4jClient.OngoingDelegation<T> delegateTo(Function<org.neo4j.driver.reactive.RxQueryRunner,reactor.core.publisher.Mono<T>> callback)
T
- The type of the result being producedcallback
- A function receiving a reactive statement runner for database interaction that can optionally
return a publisher with none or exactly one element@Nullable ReactiveDatabaseSelectionProvider getDatabaseSelectionProvider()
Copyright © 2019–2021 Neo4j, Neo4j Sweden AB. All rights reserved.