Interface StatementCustomizer

    • Method Detail

      • beforeTemplating

        default void beforeTemplating​(java.sql.PreparedStatement stmt,
                                      StatementContext ctx)
                               throws java.sql.SQLException
        Invoked prior to using the TemplateEngine to render sql from definitions.
        Parameters:
        stmt - the statement we are about to render
        ctx - 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.SQLException
        Invoked prior to applying bound parameters to the PreparedStatement.
        Parameters:
        stmt - Prepared statement being customized
        ctx - 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.SQLException
        Make the changes you need to inside this method. It will be invoked prior to execution of the prepared statement
        Parameters:
        stmt - Prepared statement being customized
        ctx - 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.SQLException
        This will be invoked after execution of the prepared statement, but before any results are accessed.
        Parameters:
        stmt - Prepared statement being customized
        ctx - Statement context associated with the statement being customized
        Throws:
        java.sql.SQLException - go ahead and percolate it for Jdbi to handle