Beispiel #1
0
 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;
 }
Beispiel #2
0
 public function remove(DataSource $reader)
 {
     while ($rows = $reader->getRows()) {
         $this->removeRows($rows);
     }
 }