Package org.neo4j.cypherdsl.core
Interface Statement
-
- All Superinterfaces:
Visitable
- All Known Subinterfaces:
Statement.RegularQuery,Statement.SingleQuery
- All Known Implementing Classes:
ProcedureCall
@API(status=EXPERIMENTAL, since="1.0") public interface Statement extends VisitableShall be the common interfaces for queries that we support.For reference see: Cypher. We have skipped the intermediate "Query" structure so a statement in the context of this generator is either a
Statement.RegularQueryor aStandaloneCall.- Since:
- 1.0
- Author:
- Michael J. Simons
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceStatement.RegularQueryRepresentsRegularQuery.static interfaceStatement.SingleQueryRepresents aSingleQuery.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static StatementBuilderbuilder()static ProcedureCall.OngoingStandaloneCallWithoutArgumentscall(java.lang.String... namespaceAndProcedure)java.lang.StringgetCypher()This method uses the default renderer to create a String representation of this statement.java.util.Collection<java.lang.String>getParameterNames()After the statement has been build, this method returns a list of all parameter names used, regardless whether a value was bound to the parameter o not.java.util.Map<java.lang.String,java.lang.Object>getParameters()After a statement has been build, all parameters that have been added to the statement can be retrieved through this method.
-
-
-
Method Detail
-
builder
static StatementBuilder builder()
- Returns:
- A new statement builder.
-
call
static ProcedureCall.OngoingStandaloneCallWithoutArguments call(java.lang.String... namespaceAndProcedure)
- Parameters:
namespaceAndProcedure- The fully qualified name of a stored procedure. Each part can be given as a separate String, but a fully qualified String is ok as well.- Returns:
- An entry point into a statement that starts with a call to stored procedure.
-
getParameters
java.util.Map<java.lang.String,java.lang.Object> getParameters()
After a statement has been build, all parameters that have been added to the statement can be retrieved through this method. The result will only contain parameters with a defined value. If you are interested in all parameter names, usegetParameterNames().The map can be used for example as an argument with various methods on the Neo4j Java Driver that allow the execution of parameterized queries.
This method is threadsafe
- Returns:
- A map of all parameters with a bound value.
- Since:
- 2021.0.0
-
getParameterNames
java.util.Collection<java.lang.String> getParameterNames()
After the statement has been build, this method returns a list of all parameter names used, regardless whether a value was bound to the parameter o not.This method is threadsafe
- Returns:
- A set of parameter names being used.
- Since:
- 2021.0.0
-
getCypher
java.lang.String getCypher()
This method uses the default renderer to create a String representation of this statement. The generated Cypher will use escaped literals and correct placeholders like$paramfor parameters. The placeholders for parameters can be retrieved viagetParameterNames(). Bounded values for paramters can be retrieved viagetParameters().This method is threadsafe
- Returns:
- A valid Cypher statement
- Since:
- 2021.0.0
-
-