Class PreparedStatementBuilder


  • public class PreparedStatementBuilder
    extends Object
    This class contains static methods used to process a raw statement and create a valid string to be used as preparedStatement in neo4j
    Since:
    3.0.0
    Author:
    AgileLARUS
    • Method Detail

      • replacePlaceholders

        public static String replacePlaceholders​(String raw)
        This method return a String that is the original raw string with all valid placeholders replaced with neo4j curly brackets notation for parameters.
        i.e. MATCH n RETURN n WHERE n.name = ? is transformed in MATCH n RETURN n WHERE n.name = {1}
        Parameters:
        raw - The string to be translated.
        Returns:
        The string with the placeholders replaced.
      • namedParameterCount

        public static int namedParameterCount​(String raw)
        Given a string (statement) it counts all valid placeholders
        Parameters:
        raw - The string of the statement
        Returns:
        The number of all valid placeholders