接口 ResultSetReturn

  • 所有已知实现类:
    ResultSetReturnImpl

    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
    作者:
    Brett Meyer, Steve Ebersole
    • 方法详细资料

      • extract

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

        ResultSet execute​(PreparedStatement statement)
        Execute the PreparedStatement return its first ResultSet, if any. If there is no ResultSet, returns null
        参数:
        statement - The PreparedStatement to execute
        返回:
        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
        参数:
        statement - The JDBC Statement object to use
        sql - The SQL to execute
        返回:
        The extracted ResultSet, or null
      • executeUpdate

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