code: protected function fetchData()
      {
          if ($this->_dataReader === null) {
              $this->_dataReader = $this->query->createCommand($this->db)->query();
          }
  
          $rows = [];
          $count = 0;
          while ($count++ < $this->batchSize && ($row = $this->_dataReader->read())) {
              $rows[] = $row;
          }
  
          return $this->query->populate($rows);
      }
docs: Fetches the next batch of data.
  @return array the data fetched