Interface Argument

All Known Implementing Classes:
BitStringEnumSetArgument, CharacterStreamArgument, InputStreamArgument, NullArgument, ObjectArgument
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Argument
Represents an argument to a prepared statement. It will be called right before the statement is executed to bind the parameter. Make sure to override Object.toString() if you want to be able to log values with an SqlLogger.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply​(int position, PreparedStatement statement, StatementContext ctx)
    Apply the argument to the given prepared statement.
  • Method Details

    • apply

      void apply(int position, PreparedStatement statement, StatementContext ctx) throws SQLException
      Apply the argument to the given prepared statement.
      Parameters:
      position - the position to which the argument should be bound, using the stupid JDBC "start at 1" bit
      statement - the prepared statement the argument is to be bound to
      ctx - the statement context
      Throws:
      SQLException - if anything goes wrong