Class ParsedParameters

java.lang.Object
org.jdbi.v3.core.statement.ParsedParameters

public class ParsedParameters extends Object
The parsed parameters from an SQL statement.
  • Method Details

    • isPositional

      public boolean isPositional()
      Returns:
      true if the SQL statement uses positional parameters, false if the statement uses named parameters, or has no parameters at all.
    • getParameterCount

      public int getParameterCount()
      Returns:
      the number of parameters from the SQL statement.
    • getParameterNames

      public List<String> getParameterNames()
      Returns:
      the parameter names from the SQL statement.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • named

      public static ParsedParameters named(List<String> names)
      A static factory of named ParsedParameters instances. 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 ParsedParameters instance
      Throws:
      IllegalArgumentException - if names list contains positional parameter
    • positional

      public static ParsedParameters positional(int count)
      A static factory of positional ParsedParameters instances. 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 ParsedParameters instance