Replace $currentDatabase with $database

parent 9e37d1bd
......@@ -2875,13 +2875,13 @@ abstract class AbstractPlatform
* requests may be impossible.
*
* @param string $table
* @param string $currentDatabase
* @param string $database
*
* @return string
*
* @throws DBALException If not supported on this platform.
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
throw DBALException::notSupported(__METHOD__);
}
......
......@@ -340,7 +340,7 @@ class DB2Platform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$table = $this->quoteStringLiteral($table);
......
......@@ -149,16 +149,16 @@ class MySqlPlatform extends AbstractPlatform
* Two approaches to listing the table indexes. The information_schema is
* preferred, because it doesn't cause problems with SQL keywords such as "order" or "table".
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
if ($currentDatabase) {
$currentDatabase = $this->quoteStringLiteral($currentDatabase);
$table = $this->quoteStringLiteral($table);
if ($database) {
$database = $this->quoteStringLiteral($database);
$table = $this->quoteStringLiteral($table);
return 'SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name,' .
' SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type' .
' FROM information_schema.STATISTICS WHERE TABLE_NAME = ' . $table .
' AND TABLE_SCHEMA = ' . $currentDatabase .
' AND TABLE_SCHEMA = ' . $database .
' ORDER BY SEQ_IN_INDEX ASC';
}
......
......@@ -419,7 +419,7 @@ class OraclePlatform extends AbstractPlatform
*
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$table = $this->normalizeIdentifier($table);
$table = $this->quoteStringLiteral($table->getName());
......
......@@ -346,7 +346,7 @@ SQL
*
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
return 'SELECT quote_ident(relname) as relname, pg_index.indisunique, pg_index.indisprimary,
pg_index.indkey, pg_index.indrelid,
......
......@@ -874,7 +874,7 @@ SQL
/**
* {@inheritdoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$user = '';
......
......@@ -963,7 +963,7 @@ SQL
/**
* {@inheritDoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
return "SELECT idx.name AS key_name,
col.name AS column_name,
......
......@@ -451,7 +451,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getListTableColumnsSQL($table, $currentDatabase = null)
public function getListTableColumnsSQL($table, $database = null)
{
$table = str_replace('.', '__', $table);
......@@ -461,7 +461,7 @@ class SqlitePlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
public function getListTableIndexesSQL($table, $database = null)
{
$table = str_replace('.', '__', $table);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment