Interface Statement

    • Method Detail

      • builder

        @NotNull
        @Contract(pure=true)
        static @NotNull StatementBuilder builder()
        Returns:
        A new statement builder.
      • call

        @NotNull
        @Contract(pure=true)
        static @NotNull StatementBuilder.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

        @NotNull
        @Contract(pure=true)
        @NotNull 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, use getParameterNames().

        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

        @NotNull
        @Contract(pure=true)
        @NotNull 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

        @NotNull
        @Contract(pure=true)
        @NotNull 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 $param for parameters. The placeholders for parameters can be retrieved via getParameterNames(). Bounded values for parameters can be retrieved via getParameters().

        This method is threadsafe

        Returns:
        A valid Cypher statement
        Since:
        2021.0.0
      • getContext

        @API(status=INTERNAL,
             since="2021.0.0")
        @NotNull
        @Contract(pure=true)
        @NotNull StatementContext getContext()
      • isRenderConstantsAsParameters

        @Contract(pure=true)
        boolean isRenderConstantsAsParameters()
        Some constants may be rendered as parameters.
        Returns:
        True if literal parameters hav
      • setRenderConstantsAsParameters

        void setRenderConstantsAsParameters​(boolean renderConstantsAsParameters)
        Use this method to configure whether some constant values should be rendered as parameters or as literals before the first call to getParameters() or getCypher().

        Renderers are free to chose to ignore this.

        Parameters:
        renderConstantsAsParameters - Set to true to render constants as parameters (when using getCypher().