Package com.landawn.abacus.jdbc
Interface SQLExecutor.StatementSetter
- All Superinterfaces:
com.landawn.abacus.util.Throwables.TriConsumer<com.landawn.abacus.util.ParsedSql,
PreparedStatement, Object[], SQLException>
- Enclosing class:
- SQLExecutor
public static interface SQLExecutor.StatementSetter
extends com.landawn.abacus.util.Throwables.TriConsumer<com.landawn.abacus.util.ParsedSql,PreparedStatement,Object[],SQLException>
Refer to http://landawn.com/introduction-to-jdbc.html about how to set parameters in
java.sql.PreparedStatement
- Author:
- Haiyang Li
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(com.landawn.abacus.util.ParsedSql parsedSql, PreparedStatement stmt, Object[] parameters) Sets the parameters.static SQLExecutor.StatementSetter
create
(com.landawn.abacus.util.Throwables.BiConsumer<NamedQuery, Object[], SQLException> stmtSetter) static SQLExecutor.StatementSetter
create
(com.landawn.abacus.util.Throwables.Consumer<PreparedStatement, SQLException> stmtSetter)
-
Field Details
-
DEFAULT
-
-
Method Details
-
accept
void accept(com.landawn.abacus.util.ParsedSql parsedSql, PreparedStatement stmt, Object[] parameters) throws SQLException Sets the parameters.- Specified by:
accept
in interfacecom.landawn.abacus.util.Throwables.TriConsumer<com.landawn.abacus.util.ParsedSql,
PreparedStatement, Object[], SQLException> - Parameters:
parsedSql
-stmt
-parameters
-- Throws:
SQLException
- the SQL exception
-
create
static SQLExecutor.StatementSetter create(com.landawn.abacus.util.Throwables.Consumer<PreparedStatement, SQLException> stmtSetter) -
create
static SQLExecutor.StatementSetter create(com.landawn.abacus.util.Throwables.BiConsumer<NamedQuery, Object[], SQLException> stmtSetter)
-