public function import(DataSource $reader) { $i = 0; while ($rows = $reader->getRows($this->rowsPerInsert)) { $this->db->execute($this->getQuery($rows[0]), [$rows]); ++$i; if ($i % 100 == 0) { $this->db->getLogger()->reset(); } } return $this->table; }
public function remove(DataSource $reader) { while ($rows = $reader->getRows()) { $this->removeRows($rows); } }