code: public List<QueryParameters> wrap(Statement stmt) throws SQLException {
          List<QueryParameters> mergedResult = new ArrayList<QueryParameters>();
          List<QueryParameters> converted = null;
          ResultSet rs = null;
  
          List<ResultSet> closedResultSet = new ArrayList<ResultSet>();
  
          // generating QueryParameters class with values from Statement
          QueryParameters statementParams = new QueryParameters();
          statementParams.set(HandlersConstants.STMT_UPDATE_COUNT, stmt.getUpdateCount());
          mergedResult.add(statementParams);
  
          if ((Integer) statementParams.getValue(HandlersConstants.STMT_UPDATE_COUNT) > 0 &&
                  this.overrider.hasOverride(MjdbcConstants.OVERRIDE_INT_GET_GENERATED_KEYS) == true) {
  
              // value from this field is irrelevant, but I need to read the value in order to remove it if it should be invoked once.
              this.overrider.getOverride(MjdbcConstants.OVERRIDE_INT_GET_GENERATED_KEYS);
  
              rs = stmt.getGeneratedKeys();
  
              if (rs != null) {
                  converted = MappingUtils.convertResultSet(rs);
                  mergedResult.addAll(converted);
  
                  MjdbcUtils.closeQuietly(rs);
                  closedResultSet.add(rs);
              }
          }
  
          rs = stmt.getResultSet();
  
          while (rs != null) {
  
              // it is possible that ResultSet might be already returned by getGeneratedKeys.
              if (closedResultSet.contains(rs) == false) {
                  converted = MappingUtils.convertResultSet(rs);
                  mergedResult.addAll(converted);
  
                  MjdbcUtils.closeQuietly(rs);
                  closedResultSet.add(rs);
              }
  
              if (stmt.getMoreResults() == true) {
                  rs = stmt.getResultSet();
              } else {
                  rs = null;
              }
          }
  
          return mergedResult;
      }
docs: {@inheritDoc}