Package org.jdbi.v3.core.statement
Class ParsedParameters
java.lang.Object
org.jdbi.v3.core.statement.ParsedParameters
The parsed parameters from an SQL statement.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanintThe number of parameters from the SQL statement.The parameter names from the SQL statement.inthashCode()booleanWhether the the SQL statement uses positional parameters.static ParsedParametersA static factory of namedParsedParametersinstances.static ParsedParameterspositional(int count) A static factory of positionalParsedParametersinstances.toString()
-
Method Details
-
isPositional
public boolean isPositional()Whether the the SQL statement uses positional parameters. False means that the statement either uses named parameters, or has no parameters at all.- Returns:
- true if the statemetnt uses positional parameters.
-
getParameterCount
public int getParameterCount()The number of parameters from the SQL statement.- Returns:
- the number of parameters from the SQL statement.
-
getParameterNames
The parameter names from the SQL statement.- Returns:
- the parameter names from the SQL statement.
-
equals
-
hashCode
public int hashCode() -
toString
-
named
A static factory of namedParsedParametersinstances. List given in argument must contain parameter names from the related statement. They must be bare names, free of SQL variable processing syntax such as a prefixed colon or other delimiters.- Parameters:
names- the parameter names from SQL statement- Returns:
- New
ParsedParametersinstance - Throws:
IllegalArgumentException- if names list contains positional parameter
-
positional
A static factory of positionalParsedParametersinstances. The count given in the argument must indicate how many positional parameters are available in the statement.- Parameters:
count- the number of positional parameters in statement- Returns:
- New
ParsedParametersinstance
-