Package org.neo4j.jdbc.utils
Class PreparedStatementBuilder
- java.lang.Object
-
- org.neo4j.jdbc.utils.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnamedParameterCount(String raw)Given a string (statement) it counts all valid placeholdersstatic StringreplacePlaceholders(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.
-
-
-
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
-
-