Commit e38feb4f authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer Committed by Marco Pivetta

add testReturnsGetListTableColumnsSQL test

parent 42a50673
...@@ -706,6 +706,60 @@ EOD; ...@@ -706,6 +706,60 @@ EOD;
$this->assertEquals($createTriggerStatement, $sql[3]); $this->assertEquals($createTriggerStatement, $sql[3]);
} }
/**
* @dataProvider getReturnsGetListTableColumnsSQL
* @group DBAL-831
*/
public function testReturnsGetListTableColumnsSQL($database, $expectedSql)
{
$this->assertEquals($expectedSql, $this->_platform->getListTableColumnsSQL('"test"', $database));
}
public function getReturnsGetListTableColumnsSQL()
{
return array(
array(
null,
"SELECT c.*,
(
SELECT d.comments
FROM user_col_comments d
WHERE d.TABLE_NAME = c.TABLE_NAME
AND d.COLUMN_NAME = c.COLUMN_NAME
) AS comments
FROM user_tab_columns c
WHERE c.table_name = 'test'
ORDER BY c.column_name"
),
array(
'/',
"SELECT c.*,
(
SELECT d.comments
FROM user_col_comments d
WHERE d.TABLE_NAME = c.TABLE_NAME
AND d.COLUMN_NAME = c.COLUMN_NAME
) AS comments
FROM user_tab_columns c
WHERE c.table_name = 'test'
ORDER BY c.column_name"
),
array(
'scott',
"SELECT c.*,
(
SELECT d.comments
FROM all_col_comments d
WHERE d.TABLE_NAME = c.TABLE_NAME
AND d.COLUMN_NAME = c.COLUMN_NAME
) AS comments
FROM all_tab_columns c
WHERE c.table_name = 'test' AND c.owner = 'SCOTT'
ORDER BY c.column_name"
),
);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
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