@API(status=STABLE,
since="6.0")
public interface Neo4jClient
Modifier and Type | Interface and Description |
---|---|
static interface |
Neo4jClient.BindSpec<S extends Neo4jClient.BindSpec<S>>
Contract for binding parameters to a query.
|
static interface |
Neo4jClient.MappingSpec<T> |
static interface |
Neo4jClient.OngoingBindSpec<T,S extends Neo4jClient.BindSpec<S>>
Ongoing bind specification.
|
static interface |
Neo4jClient.OngoingDelegation<T>
A contract for an ongoing delegation in the selected database.
|
static interface |
Neo4jClient.RecordFetchSpec<T> |
static interface |
Neo4jClient.RunnableDelegation<T>
A runnable delegation.
|
static interface |
Neo4jClient.RunnableSpec
Contract for a runnable query that can be either run returning it's result, run without results or be
parameterized.
|
static interface |
Neo4jClient.RunnableSpecTightToDatabase
Contract for a runnable query inside a dedicated database.
|
Modifier and Type | Field and Description |
---|---|
static org.springframework.core.log.LogAccessor |
cypherLog |
Modifier and Type | Method and Description |
---|---|
static Neo4jClient |
create(org.neo4j.driver.Driver driver) |
<T> Neo4jClient.OngoingDelegation<T> |
delegateTo(Function<org.neo4j.driver.QueryRunner,Optional<T>> callback)
Delegates interaction with the default database to the given callback.
|
Neo4jClient.RunnableSpec |
query(String cypher)
Entrypoint for creating a new Cypher query.
|
Neo4jClient.RunnableSpec |
query(Supplier<String> cypherSupplier)
Entrypoint for creating a new Cypher query based on a supplier.
|
static String |
verifyDatabaseName(String databaseName)
This is a utility method to verify and sanitize a database name.
|
static final org.springframework.core.log.LogAccessor cypherLog
static Neo4jClient create(org.neo4j.driver.Driver driver)
Neo4jClient.RunnableSpec query(String cypher)
cypher
- The cypher code that shall be executedNeo4jClient.RunnableSpec query(Supplier<String> cypherSupplier)
cypherSupplier
- A supplier of arbitrary Cypher code<T> Neo4jClient.OngoingDelegation<T> delegateTo(Function<org.neo4j.driver.QueryRunner,Optional<T>> callback)
T
- The type of the result being producedcallback
- A function receiving a statement runner for database interaction that can optionally return a
result.static String verifyDatabaseName(String databaseName)
databaseName
- The database name to verify and sanitizeIllegalArgumentException
- when the database name is not allowed with the underlying driver.Copyright © 2019–2020 Neo4j, Neo4j Sweden AB. All rights reserved.