Commit fc77f6de authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #268 from deeky666/remove-deprecated-getshowdatabasessql-function

Remove deprecated getShowDatabasesSQL() from Platforms
parents e3f1af51 090066c7
...@@ -1972,16 +1972,6 @@ abstract class AbstractPlatform ...@@ -1972,16 +1972,6 @@ abstract class AbstractPlatform
return $tableName; return $tableName;
} }
/**
* Get sql query to show a list of database.
*
* @return string
*/
public function getShowDatabasesSQL()
{
throw DBALException::notSupported(__METHOD__);
}
/** /**
* Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* of a field declaration to be used in statements like CREATE TABLE. * of a field declaration to be used in statements like CREATE TABLE.
......
...@@ -294,14 +294,6 @@ class MySqlPlatform extends AbstractPlatform ...@@ -294,14 +294,6 @@ class MySqlPlatform extends AbstractPlatform
return true; return true;
} }
/**
* {@inheritDoc}
*/
public function getShowDatabasesSQL()
{
return 'SHOW DATABASES';
}
public function getListTablesSQL() public function getListTablesSQL()
{ {
return "SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'"; return "SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'";
......
...@@ -393,14 +393,6 @@ class SQLServerPlatform extends AbstractPlatform ...@@ -393,14 +393,6 @@ class SQLServerPlatform extends AbstractPlatform
return 'INSERT INTO ' . $quotedTableName . ' DEFAULT VALUES'; return 'INSERT INTO ' . $quotedTableName . ' DEFAULT VALUES';
} }
/**
* {@inheritDoc}
*/
public function getShowDatabasesSQL()
{
return 'SHOW DATABASES';
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
......
...@@ -75,7 +75,7 @@ class MySqlPlatformTest extends AbstractPlatformTestCase ...@@ -75,7 +75,7 @@ class MySqlPlatformTest extends AbstractPlatformTestCase
public function testGeneratesDDLSnippets() public function testGeneratesDDLSnippets()
{ {
$this->assertEquals('SHOW DATABASES', $this->_platform->getShowDatabasesSQL()); $this->assertEquals('SHOW DATABASES', $this->_platform->getListDatabasesSQL());
$this->assertEquals('CREATE DATABASE foobar', $this->_platform->getCreateDatabaseSQL('foobar')); $this->assertEquals('CREATE DATABASE foobar', $this->_platform->getCreateDatabaseSQL('foobar'));
$this->assertEquals('DROP DATABASE foobar', $this->_platform->getDropDatabaseSQL('foobar')); $this->assertEquals('DROP DATABASE foobar', $this->_platform->getDropDatabaseSQL('foobar'));
$this->assertEquals('DROP TABLE foobar', $this->_platform->getDropTableSQL('foobar')); $this->assertEquals('DROP TABLE foobar', $this->_platform->getDropTableSQL('foobar'));
......
...@@ -116,14 +116,6 @@ class OraclePlatformTest extends AbstractPlatformTestCase ...@@ -116,14 +116,6 @@ class OraclePlatformTest extends AbstractPlatformTestCase
); );
} }
/**
* @expectedException Doctrine\DBAL\DBALException
*/
public function testShowDatabasesThrowsException()
{
$this->assertEquals('SHOW DATABASES', $this->_platform->getShowDatabasesSQL());
}
/** /**
* @expectedException Doctrine\DBAL\DBALException * @expectedException Doctrine\DBAL\DBALException
*/ */
......
...@@ -67,7 +67,7 @@ class SQLServerPlatformTest extends AbstractPlatformTestCase ...@@ -67,7 +67,7 @@ class SQLServerPlatformTest extends AbstractPlatformTestCase
{ {
$dropDatabaseExpectation = 'DROP DATABASE foobar'; $dropDatabaseExpectation = 'DROP DATABASE foobar';
$this->assertEquals('SHOW DATABASES', $this->_platform->getShowDatabasesSQL()); $this->assertEquals('SELECT * FROM SYS.DATABASES', $this->_platform->getListDatabasesSQL());
$this->assertEquals('CREATE DATABASE foobar', $this->_platform->getCreateDatabaseSQL('foobar')); $this->assertEquals('CREATE DATABASE foobar', $this->_platform->getCreateDatabaseSQL('foobar'));
$this->assertEquals($dropDatabaseExpectation, $this->_platform->getDropDatabaseSQL('foobar')); $this->assertEquals($dropDatabaseExpectation, $this->_platform->getDropDatabaseSQL('foobar'));
$this->assertEquals('DROP TABLE foobar', $this->_platform->getDropTableSQL('foobar')); $this->assertEquals('DROP TABLE foobar', $this->_platform->getDropTableSQL('foobar'));
......
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