public function MigrateSQLMap::getQualifiedMapTable in Migrate 6.2
Same name and namespace in other branches
- 7.2 plugins/sources/sqlmap.inc \MigrateSQLMap::getQualifiedMapTable()
Qualifying the map table name with the database name makes cross-db joins possible. Note that, because prefixes are applied after we do this (i.e., it will prefix the string we return), we do not qualify the table if it has a prefix. This will work fine when the source data is in the default (prefixed) database (in particular, for simpletest), but not if the primary query is in an external database.
Return value
string
File
- plugins/
sources/ sqlmap.inc, line 32 - Defines a Drupal db-based implementation of MigrateMap.
Class
- MigrateSQLMap
- @file Defines a Drupal db-based implementation of MigrateMap.
Code
public function getQualifiedMapTable() {
$options = $this->connection
->getConnectionOptions();
$prefix = $this->connection
->tablePrefix($this->mapTable);
if ($prefix) {
return $this->mapTable;
}
else {
return $options['database'] . '.' . $this->mapTable;
}
}