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

add testReturnsGetListTableColumnsSQL test

parent 4b2c8511
...@@ -704,6 +704,60 @@ EOD; ...@@ -704,6 +704,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