public function MigrateSQLMap::importedCount in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/sources/sqlmap.inc \MigrateSQLMap::importedCount()
Returns a count of imported records in the map table.
Return value
int
Overrides MigrateMap::importedCount
File
- plugins/
sources/ sqlmap.inc, line 521 - Defines a Drupal db-based implementation of MigrateMap.
Class
- MigrateSQLMap
- @file Defines a Drupal db-based implementation of MigrateMap.
Code
public function importedCount() {
$query = $this->connection
->select($this->mapTable);
$query
->addExpression('COUNT(*)', 'count');
$query
->condition('needs_update', array(
MigrateMap::STATUS_IMPORTED,
MigrateMap::STATUS_NEEDS_UPDATE,
), 'IN');
$count = $query
->execute()
->fetchField();
return $count;
}