Package org.jdbi.v3.core.statement
Interface StatementCustomizer
-
- All Known Implementing Classes:
DefineNamedBindingsStatementCustomizer
public interface StatementCustomizerAllows tweaking of statement behaviour.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidafterExecution(java.sql.PreparedStatement stmt, StatementContext ctx)This will be invoked after execution of the prepared statement, but before any results are accessed.default voidbeforeBinding(java.sql.PreparedStatement stmt, StatementContext ctx)Invoked prior to applying bound parameters to thePreparedStatement.default voidbeforeExecution(java.sql.PreparedStatement stmt, StatementContext ctx)Make the changes you need to inside this method.default voidbeforeTemplating(java.sql.PreparedStatement stmt, StatementContext ctx)Invoked prior to using the TemplateEngine to render sql from definitions.
-
-
-
Method Detail
-
beforeTemplating
default void beforeTemplating(java.sql.PreparedStatement stmt, StatementContext ctx) throws java.sql.SQLExceptionInvoked prior to using the TemplateEngine to render sql from definitions.- Parameters:
stmt- the statement we are about to renderctx- the context associated with the statement- Throws:
java.sql.SQLException- go ahead and percolate it for Jdbi to handle
-
beforeBinding
default void beforeBinding(java.sql.PreparedStatement stmt, StatementContext ctx) throws java.sql.SQLExceptionInvoked prior to applying bound parameters to thePreparedStatement.- Parameters:
stmt- Prepared statement being customizedctx- Statement context associated with the statement being customized- Throws:
java.sql.SQLException- go ahead and percolate it for Jdbi to handle
-
beforeExecution
default void beforeExecution(java.sql.PreparedStatement stmt, StatementContext ctx) throws java.sql.SQLExceptionMake the changes you need to inside this method. It will be invoked prior to execution of the prepared statement- Parameters:
stmt- Prepared statement being customizedctx- Statement context associated with the statement being customized- Throws:
java.sql.SQLException- go ahead and percolate it for Jdbi to handle
-
afterExecution
default void afterExecution(java.sql.PreparedStatement stmt, StatementContext ctx) throws java.sql.SQLExceptionThis will be invoked after execution of the prepared statement, but before any results are accessed.- Parameters:
stmt- Prepared statement being customizedctx- Statement context associated with the statement being customized- Throws:
java.sql.SQLException- go ahead and percolate it for Jdbi to handle
-
-