ImportRun: allow to fetch specific keys

This commit is contained in:
Thomas Gelf 2016-07-13 21:37:31 +02:00
parent 70f8a8986e
commit 354392d216
1 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class ImportRun extends DbObject
return $db->fetchCol($query);
}
public function fetchRows($columns, $filter = null)
public function fetchRows($columns, $filter = null, $keys = null)
{
$db = $this->getDb();
$binchecksum = $this->rowset_checksum;
@ -96,6 +96,10 @@ class ImportRun extends DbObject
$empty->$k = null;
}
if ($keys !== null) {
$query->where('r.object_name IN (?)', $keys);
}
foreach ($db->fetchAll($query) as $row) {
if (! array_key_exists($row->object_name, $result)) {
$result[$row->object_name] = clone($empty);