public function MigrateSQLMap::setUpdate in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/sources/sqlmap.inc \MigrateSQLMap::setUpdate()
Set the specified row to be updated, if it exists.
File
- plugins/
sources/ sqlmap.inc, line 627 - Defines a Drupal db-based implementation of MigrateMap.
Class
- MigrateSQLMap
- @file Defines a Drupal db-based implementation of MigrateMap.
Code
public function setUpdate(array $source_key) {
$query = $this->connection
->update($this->mapTable)
->fields(array(
'needs_update' => MigrateMap::STATUS_NEEDS_UPDATE,
));
$count = 1;
foreach ($source_key as $key_value) {
$query
->condition('sourceid' . $count++, $key_value);
}
$query
->execute();
}