Interface ResultSetReturn


  • public interface ResultSetReturn
    Contract for extracting ResultSets from Statements, executing Statements, managing Statement/ResultSet resources, and logging statement calls. TODO: This could eventually utilize the new Return interface. It would be great to have a common API shared. Generally the methods here dealing with CallableStatement are extremely limited, relying on the legacy
    • Method Detail

      • extract

        ResultSet extract​(Statement statement,
                          String sql)
        Performs the given SQL statement, expecting a ResultSet in return
        Parameters:
        statement - The JDBC Statement object to use
        sql - The SQL to execute
        Returns:
        The resulting ResultSet
      • execute

        ResultSet execute​(PreparedStatement statement)
        Execute the PreparedStatement return its first ResultSet, if any. If there is no ResultSet, returns null
        Parameters:
        statement - The PreparedStatement to execute
        Returns:
        The extracted ResultSet, or null
      • execute

        ResultSet execute​(Statement statement,
                          String sql)
        Performs the given SQL statement, returning its first ResultSet, if any. If there is no ResultSet, returns null
        Parameters:
        statement - The JDBC Statement object to use
        sql - The SQL to execute
        Returns:
        The extracted ResultSet, or null
      • executeUpdate

        int executeUpdate​(Statement statement,
                          String sql)
        Execute the given SQL statement returning its "affected row count".
        Parameters:
        statement - The JDBC Statement object to use
        sql - The SQL to execute
        Returns:
        The Statement.executeUpdate(String) result