Class ParsedParameters

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

public final class ParsedParameters extends Object
The parsed parameters from an SQL statement.
  • 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

      public List<String> getParameterNames()
      The parameter names from the SQL statement.
      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