Class ResultSetLogger

java.lang.Object
org.apache.ibatis.logging.jdbc.BaseJdbcLogger
org.apache.ibatis.logging.jdbc.ResultSetLogger
All Implemented Interfaces:
InvocationHandler

public final class ResultSetLogger extends BaseJdbcLogger implements InvocationHandler
ResultSet proxy to add logging.
  • Field Details

    • BLOB_TYPES

      private static final Set<Integer> BLOB_TYPES
    • first

      private boolean first
    • rows

      private int rows
    • rs

      private final ResultSet rs
    • blobColumns

      private final Set<Integer> blobColumns
  • Constructor Details

    • ResultSetLogger

      private ResultSetLogger(ResultSet rs, Log statementLog, int queryStack)
  • Method Details

    • invoke

      public Object invoke(Object proxy, Method method, Object[] params) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable
    • printColumnHeaders

      private void printColumnHeaders(ResultSetMetaData rsmd, int columnCount) throws SQLException
      Throws:
      SQLException
    • printColumnValues

      private void printColumnValues(int columnCount)
    • newInstance

      public static ResultSet newInstance(ResultSet rs, Log statementLog, int queryStack)
      Creates a logging version of a ResultSet.
      Parameters:
      rs - the ResultSet to proxy
      statementLog - the statement log
      queryStack - the query stack
      Returns:
      the ResultSet with logging
    • getRs

      public ResultSet getRs()
      Get the wrapped result set.
      Returns:
      the resultSet