Package org.jdbi.v3.core.argument
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.
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 TypeMethodDescriptionvoid
apply
(int position, PreparedStatement statement, StatementContext ctx) Apply the argument to the given prepared statement.
-
Method Details
-
apply
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" bitstatement
- the prepared statement the argument is to be bound toctx
- the statement context- Throws:
SQLException
- if anything goes wrong
-