@FunctionalInterface public interface PreparedStatementSetter
Database
.
Implementations of this interface set values on a PreparedStatement
provided by the Database class.
They are responsible for setting parameters: a SQL statement with placeholders (question marks) will already have been supplied.
Implementations don't need to worry about handling exceptions:
they will be handled internally by DataOperations
implementations.
If the handling is done in async context then implementations should make the details available in some way.
AsyncDataOperations
may place these details inside a never null CompletableFuture object.
Modifier and Type | Method and Description |
---|---|
void |
setValues(@NotNull PreparedStatement ps)
Sets parameter values into the given active PreparedStatement.
|
void setValues(@NotNull @NotNull PreparedStatement ps) throws SQLException
ps
- the PreparedStatement to invoke setter methods onSQLException
- if an SQLException is encountered while trying to set values (no need to catch)Copyright © 2021. All rights reserved.