yii\db\BatchQueryResult::fetchData PHP Method

fetchData() protected method

Fetches the next batch of data.
protected fetchData ( ) : array
return array the data fetched
    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);
    }