Interface ReactiveCypherdslStatementExecutor<T>
- Type Parameters:
T
- The domain type of the repository
@API(status=STABLE,
since="6.1")
public interface ReactiveCypherdslStatementExecutor<T>
An interface that can be added to any reactive repository so that the repository exposes several methods taking in
a
Statement
from the Cypher-DSL, that allows for full customization of the queries executed in a programmatic
way in contrast to provide custom queries declaratively via @Query
annotations.- Since:
- 6.1
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<T>
findAll
(org.neo4j.cypherdsl.core.Statement statement) Find all elements of the domain as defined by thestatement
.<PT> reactor.core.publisher.Flux<PT>
Creates a custom projection of the repository type by a Cypher-DSL based statement.reactor.core.publisher.Mono<T>
findOne
(org.neo4j.cypherdsl.core.Statement statement) Find one element of the domain as defined by thestatement
.<PT> reactor.core.publisher.Mono<PT>
Creates a custom projection of the repository type by a Cypher-DSL based statement.
-
Method Details
-
findOne
Find one element of the domain as defined by thestatement
. The statement must return either no or exactly one mappable record.- Parameters:
statement
- A full Cypher statement, matching and returning all required nodes, relationships and properties- Returns:
- An empty Mono or a Mono containing the single element
-
findOne
<PT> reactor.core.publisher.Mono<PT> findOne(org.neo4j.cypherdsl.core.Statement statement, Class<PT> projectionClass) Creates a custom projection of the repository type by a Cypher-DSL based statement. The statement must return either no or exactly one mappable record.- Type Parameters:
PT
- The type of the projection- Parameters:
statement
- A full Cypher statement, matching and returning all required nodes, relationships and propertiesprojectionClass
- The class of the projection type- Returns:
- An empty Mono or a Mono containing the single, projected element
-
findAll
Find all elements of the domain as defined by thestatement
.- Parameters:
statement
- A full Cypher statement, matching and returning all required nodes, relationships and properties- Returns:
- A publisher full of domain objects
-
findAll
<PT> reactor.core.publisher.Flux<PT> findAll(org.neo4j.cypherdsl.core.Statement statement, Class<PT> projectionClass) Creates a custom projection of the repository type by a Cypher-DSL based statement.- Type Parameters:
PT
- The type of the projection- Parameters:
statement
- A full Cypher statement, matching and returning all required nodes, relationships and propertiesprojectionClass
- The class of the projection type- Returns:
- A publisher full of projections
-