code: public void addResultSet(SelectResultSet resultSet, boolean moreResultAvailable) {
      if (resultSet.isCallableResult()) {
        callableResultSet = resultSet;
        return;
      }
      if (executionResults == null) {
        executionResults = new ArrayDeque<>();
      }
      executionResults.add(resultSet);
      if (cmdInformation == null) {
        if (batch) {
          cmdInformation = new CmdInformationBatch(expectedSize, autoIncrement);
        } else if (moreResultAvailable) {
          cmdInformation = new CmdInformationMultiple(expectedSize, autoIncrement);
        } else {
          cmdInformation = new CmdInformationSingle(0, -1, autoIncrement);
          return;
        }
      }
      cmdInformation.addResultSetStat();
    }
docs: Add resultSet to results.
  
  @param resultSet           new resultSet.
  @param moreResultAvailable indicate if other results (ResultSet or updateCount) are available.