Issue #2388067 by david_garcia: getQualifiedMapTableName is database specific logic out of the database driver

8.0.x
Alex Pott 2015-02-27 12:20:42 +00:00
parent f144ac6e7a
commit b79c650836
2 changed files with 16 additions and 5 deletions

View File

@ -317,6 +317,20 @@ abstract class Connection implements \Serializable {
}
}
/**
* Get a fully qualified table name.
*
* @param string $table
* The name of the table in question.
*
* @return string
*/
public function getFullQualifiedTableName($table) {
$options = $this->getConnectionOptions();
$prefix = $this->tablePrefix($table);
return $options['database'] . '.' . $prefix . $table;
}
/**
* Prepares a query string and returns the prepared statement.
*
@ -922,7 +936,7 @@ abstract class Connection implements \Serializable {
// in question has already been accidentally committed.
if (!isset($this->transactionLayers[$savepoint_name])) {
throw new TransactionNoActiveException();
}
}
// We need to find the point we're rolling back to, all other savepoints
// before are no longer needed. If we rolled back other active savepoints,

View File

@ -207,10 +207,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface {
* The fully qualified map table name.
*/
public function getQualifiedMapTableName() {
$database = $this->getDatabase();
$options = $database->getConnectionOptions();
$prefix = $database->tablePrefix($this->mapTableName);
return $options['database'] . '.' . $prefix . $this->mapTableName;
return $this->getDatabase()->getFullQualifiedTableName($this->mapTableName);
}
/**