public interface StatementBuilder
CachingStatementBuilderFactory
caches all prepared
statements created against a given handle.
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.
|
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)
void close(Connection conn, String sql, Statement stmt) throws SQLException
sql
- the translated SQL which was preparedstmt
- the statementSQLException
- if anything goes wrong closing 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
CallableStatement 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
Copyright © 2018. All rights reserved.