Replace $currentDatabase with $database

parent 9e37d1bd
...@@ -2875,13 +2875,13 @@ abstract class AbstractPlatform ...@@ -2875,13 +2875,13 @@ abstract class AbstractPlatform
* requests may be impossible. * requests may be impossible.
* *
* @param string $table * @param string $table
* @param string $currentDatabase * @param string $database
* *
* @return string * @return string
* *
* @throws DBALException If not supported on this platform. * @throws DBALException If not supported on this platform.
*/ */
public function getListTableIndexesSQL($table, $currentDatabase = null) public function getListTableIndexesSQL($table, $database = null)
{ {
throw DBALException::notSupported(__METHOD__); throw DBALException::notSupported(__METHOD__);
} }
......
...@@ -340,7 +340,7 @@ class DB2Platform extends AbstractPlatform ...@@ -340,7 +340,7 @@ class DB2Platform extends AbstractPlatform
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getListTableIndexesSQL($table, $currentDatabase = null) public function getListTableIndexesSQL($table, $database = null)
{ {
$table = $this->quoteStringLiteral($table); $table = $this->quoteStringLiteral($table);
......
...@@ -149,16 +149,16 @@ class MySqlPlatform extends AbstractPlatform ...@@ -149,16 +149,16 @@ class MySqlPlatform extends AbstractPlatform
* Two approaches to listing the table indexes. The information_schema is * 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". * 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) { if ($database) {
$currentDatabase = $this->quoteStringLiteral($currentDatabase); $database = $this->quoteStringLiteral($database);
$table = $this->quoteStringLiteral($table); $table = $this->quoteStringLiteral($table);
return 'SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name,' . 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' . ' SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type' .
' FROM information_schema.STATISTICS WHERE TABLE_NAME = ' . $table . ' FROM information_schema.STATISTICS WHERE TABLE_NAME = ' . $table .
' AND TABLE_SCHEMA = ' . $currentDatabase . ' AND TABLE_SCHEMA = ' . $database .
' ORDER BY SEQ_IN_INDEX ASC'; ' ORDER BY SEQ_IN_INDEX ASC';
} }
......
...@@ -419,7 +419,7 @@ class OraclePlatform extends AbstractPlatform ...@@ -419,7 +419,7 @@ class OraclePlatform extends AbstractPlatform
* *
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaOracleReader.html * @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->normalizeIdentifier($table);
$table = $this->quoteStringLiteral($table->getName()); $table = $this->quoteStringLiteral($table->getName());
......
...@@ -346,7 +346,7 @@ SQL ...@@ -346,7 +346,7 @@ SQL
* *
* @link http://ezcomponents.org/docs/api/trunk/DatabaseSchema/ezcDbSchemaPgsqlReader.html * @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, return 'SELECT quote_ident(relname) as relname, pg_index.indisunique, pg_index.indisprimary,
pg_index.indkey, pg_index.indrelid, pg_index.indkey, pg_index.indrelid,
......
...@@ -874,7 +874,7 @@ SQL ...@@ -874,7 +874,7 @@ SQL
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getListTableIndexesSQL($table, $currentDatabase = null) public function getListTableIndexesSQL($table, $database = null)
{ {
$user = ''; $user = '';
......
...@@ -963,7 +963,7 @@ SQL ...@@ -963,7 +963,7 @@ SQL
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getListTableIndexesSQL($table, $currentDatabase = null) public function getListTableIndexesSQL($table, $database = null)
{ {
return "SELECT idx.name AS key_name, return "SELECT idx.name AS key_name,
col.name AS column_name, col.name AS column_name,
......
...@@ -451,7 +451,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -451,7 +451,7 @@ class SqlitePlatform extends AbstractPlatform
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getListTableColumnsSQL($table, $currentDatabase = null) public function getListTableColumnsSQL($table, $database = null)
{ {
$table = str_replace('.', '__', $table); $table = str_replace('.', '__', $table);
...@@ -461,7 +461,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -461,7 +461,7 @@ class SqlitePlatform extends AbstractPlatform
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getListTableIndexesSQL($table, $currentDatabase = null) public function getListTableIndexesSQL($table, $database = null)
{ {
$table = str_replace('.', '__', $table); $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