public interface StatementBuilder
DefaultStatementBuilder.FACTORY creates a new statement on every call.
A StatementBuilder is always associated with exactly one Handle instanceStatementBuilderFactory| Modifier and Type | Method and Description |
|---|---|
void |
close(Connection conn)
Called when the handle this StatementBuilder is attached to is closed.
|
void |
close(Connection conn,
String sql,
Statement stmt)
Called to close an individual prepared statement created from this builder.
|
Statement |
create(Connection conn,
StatementContext ctx)
Called each time a statement needs to be created.
|
PreparedStatement |
create(Connection conn,
String sql,
StatementContext ctx)
Called each time a prepared statement needs to be created.
|
CallableStatement |
createCall(Connection conn,
String sql,
StatementContext ctx)
Called each time a Callable statement needs to be created.
|
void close(Connection conn)
conn - the connection to close.void close(Connection conn, String sql, Statement stmt) throws SQLException
conn - the connection to closesql - the translated SQL which was preparedstmt - the statementSQLException - if anything goes wrong closing the statementStatement create(Connection conn, StatementContext ctx) throws SQLException
conn - the JDBC Connection the statement is being created forctx - Statement context associated with the SqlStatement this is building forSQLException - if anything goes wrong getting the statementPreparedStatement create(Connection conn, String sql, StatementContext ctx) throws SQLException
conn - the JDBC Connection the statement is being created forsql - the translated SQL which should be preparedctx - Statement context associated with the SqlStatement this is building forSQLException - if anything goes wrong preparing the statementCallableStatement createCall(Connection conn, String sql, StatementContext ctx) throws SQLException
conn - the JDBC Connection the statement is being created forsql - the translated SQL which should be preparedctx - Statement context associated with the SqlStatement this is building forSQLException - if anything goes wrong preparing the statementCopyright © 2019. All rights reserved.